Package com.signalquest.api
Class MessageHandler
java.lang.Object
com.signalquest.api.MessageHandler
Handles the SignalQuest Transport Protocol message parsing for SignalQuest sensors.
Parses Status
and Location
data received from the message protocol
characteristic, using parse(byte[])
.
Receive parsed messages using MessageHandler.MessageReceiver
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Receives messages, parsed from sensor data, withparse(byte[])
. -
Constructor Summary
ConstructorDescriptionMessageHandler
(MessageHandler.MessageReceiver receiver) Creates a message handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
parse
(byte[] data) Resolves data, received from sensors, into messages.
-
Constructor Details
-
MessageHandler
Creates a message handler.- Parameters:
receiver
- Receives the parsed messages.
-
-
Method Details
-
parse
Resolves data, received from sensors, into messages.- Parameters:
data
- The data fromBluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, byte[])
- Throws:
ApiException
-