WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. WOWConnect
  4. Cubios.WOWConnect.Bluetooth
Mission Node

Cubios.WOWConnect.Bluetooth

Cubios.WOWConnect.Bluetooth Delegates DetectedDevicesListChangedDelegate Summary Device list change delegate. Gets called when the library detects new WOWCub...

WOWConnect

Cubios.WOWConnect.Bluetooth

Delegates

DetectedDevicesListChangedDelegate

Summary

Device list change delegate. Gets called when the library detects new WOWCube device, either physical or virtual.

Arguments

  • device - new WOWCube device object

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1delegate void DetectedDevicesListChangedDelegate(WOWCubeDevice device)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

MessageReceivedDelegate

Summary

This delegate is called when the library receives data over BLE from a cubeapp.

Arguments

  • sender - device that sends the data
  • messageType - data packet type identifier
  • data - received data byte array

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1MessageReceivedDelegate(WOWCubeDevice sender, byte messaageType, byte[] data)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

LogDelegate

Summary

This delegate is called when the library wants to output message to a log

Arguments

  • level - message severity level
  • text - message body

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1delegate void LogDelegate(LogLevel level, String text)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Public Methods

Open

Summary

Opens and initializes the library

Arguments

  • lcdelegate - device list changed delegate
  • msgdelegate - message received delegate
  • logdelegate - log delegate

Output

Returns true upon successfull initialization of the library, false otherwise.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static bool Open(DetectedDevicesListChangedDelegate lcdelegate = null, MessageReceivedDelegate msgdelegate = null, LogDelegate logdelegate = null)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Close

Summary

Closes the library and frees resources

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static void Close()
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

GetDevice

Summary

Returns a WOWCubeDevice deivce object from the list of detected devices by device name.

Arguments

  • deviceName - device name

Output

Returns a WOWCubeDevice object in case if device is found in the list, null otherwise.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static WOWCubeDevice GetDevice(string deviceName)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

AddEmulatedDevice

Summary

Adds an emulated device to the list of detected devices. This funciton comes in handy in cases when it's necessary to test a cubeapp that uses WOWConnect on WOWCube Emulator, if for one reason or another it is not possible to use the UPNP for emulated device discovery.

Arguments

  • deviceName - emulated device name as seen in the list
  • ip - ip address of the computer that runs WOWCube Emulator
  • port - emulated device communication port. The value can be found in WOWCube Emulator module 0 output console (MID0) - BLE Devise port: 32125

Output

Returns true if emulated device was added successfully, false otherwise.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static bool AddEmulatedDevice(string deviceName, string ip, int port)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Public Getters

Devices

Output

Returns a list of currently detected devices

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static List<WOWCubeDevice> Devices
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

DeviceList

Output

Returns a list of objects that hold BLE device-specific information

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static List<DeviceInformation> DeviceList
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

UPNPDeviceList

Output

Returns a list of objects that hold eumlated device-specific information

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static List<UPNPDeviceInformation> UPNPDeviceList
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

LastError

Output

Returns an error code for last called method.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static int LastError
2
3
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

LastErrorDescription

Output

Returns a textual description of the error code for last called method.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static string LastErrorDescription
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Version

Output

Returns a version of WOWConnect library

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static String Version
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Public Variables

EnableEmulatorSupport

Summary

Despite that using an emulated WOWCube device is very convenient for cubeapp development and debugging purposes, the presence of such functionality in release versions is redundant. The library allows toggling it on and off.

Output

Returns true if support for emulated WOWCube devices is enabled, false otherwise.

Synopsis

Cubios.WOWConnect.Bluetooth
CODE
1static bool EnableEmulatorSupport
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Jump Grid

On This Page

DelegatesDetectedDevicesListChangedDelegateMessageReceivedDelegateLogDelegatePublic MethodsOpenCloseGetDeviceAddEmulatedDevicePublic GettersDevicesDeviceListUPNPDeviceListLastErrorLastErrorDescriptionVersionPublic VariablesEnableEmulatorSupport
Context Rail

Related nodes

WOWCube SDK Examples
WOWConnect
WOWConnect Enumerated Types
WOWConnect
Cubios.WOWConnect.UPNPDeviceInformation
WOWConnect
Cubios.WOWConnect.WOWCubeDevice
WOWConnect
Previous Node
WOWCube SDK Examples
WOWConnect
Next Node
WOWConnect Enumerated Types
WOWConnect