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
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
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
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
Close
Summary
Closes the library and frees resources
Synopsis
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
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
Public Getters
Devices
Output
Returns a list of currently detected devices
Synopsis
DeviceList
Output
Returns a list of objects that hold BLE device-specific information
Synopsis
UPNPDeviceList
Output
Returns a list of objects that hold eumlated device-specific information
Synopsis
LastError
Output
Returns an error code for last called method.
Synopsis
LastErrorDescription
Output
Returns a textual description of the error code for last called method.
Synopsis
Version
Output
Returns a version of WOWConnect library
Synopsis
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