The callback interface for processing messages from the Hub.
More...
#include <HubListener.h>
The callback interface for processing messages from the Hub.
The application needs to implement this class and pass its instance to Hub::registerListener()
◆ onDeviceConnected()
| virtual void gf::HubListener::onDeviceConnected |
( |
SPDEVICE |
device | ) |
|
|
inlinevirtual |
This callback is called when a device has been connected to the hub successfully.
- Parameters
-
| device | The pointer to the Device object that the hub has connected to. |
◆ onDeviceDiscard()
| virtual void gf::HubListener::onDeviceDiscard |
( |
SPDEVICE |
device | ) |
|
|
inlinevirtual |
This callback is called when a previously found but not connected device has been dropped by the Hub.
- Parameters
-
| device | The pointer to the Device object that was previously found and passed to the application. |
◆ onDeviceDisconnected()
| virtual void gf::HubListener::onDeviceDisconnected |
( |
SPDEVICE |
device, |
|
|
GF_UINT8 |
reason |
|
) |
| |
|
inlinevirtual |
This callback is called when a device has been disconnected from connection state or failed to connect to.
- Parameters
-
| device | The pointer to the Device object that was disconnected. |
| reason | The reason of why device disconnected. |
◆ onDeviceFound()
| virtual void gf::HubListener::onDeviceFound |
( |
SPDEVICE |
device | ) |
|
|
inlinevirtual |
This callback is called when the hub finds a device during scanning.
- Parameters
-
| device | The pointer to a Device object that was found. |
◆ onDeviceStatusChanged()
This callback is called when the device status has been changed.
- Parameters
-
| device | Pointer to the Device sending data |
| status | What status of the device has been changed |
◆ onExtendedDeviceData()
This callback is called when the extended data is recevied.
- Parameters
-
| device | The Pointer to the Device. |
| dataType | The data type carried |
| data | The data buffer managed by reference |
◆ onGestureData()
| virtual void gf::HubListener::onGestureData |
( |
SPDEVICE |
device, |
|
|
Gesture |
gest |
|
) |
| |
|
inlinevirtual |
This callback is called when the gesture data is recevied.
- Parameters
-
| device | The Pointer to the Device. |
| gest | The Gesture object. |
◆ onOrientationData()
| virtual void gf::HubListener::onOrientationData |
( |
SPDEVICE |
device, |
|
|
const Quaternion & |
orientation |
|
) |
| |
|
inlinevirtual |
This callback is called when the orientation of the device has changed.
- Parameters
-
| device | The pointer to the Device. |
| orientation | The Quaternion object that indicates the updated orientation of the device. |
◆ onScanFinished()
| virtual void gf::HubListener::onScanFinished |
( |
| ) |
|
|
inlinevirtual |
This callback is called when the Hub finishes scanning devices.
◆ onStateChanged()
| virtual void gf::HubListener::onStateChanged |
( |
HubState |
state | ) |
|
|
inlinevirtual |
This callback is called when the state of the hub changed.
- Parameters
-
| state | An enumerated value of HubState which indicates the state of the hub. |
The documentation for this class was generated from the following file: