Contains the logic for the "Continuous Data Stream" command.
CMD_ID | CMD_CONTINUOUS_DATA_STREAM - The InertialTypes::Command for this command |
FIELD_DATA_BYTE | 0x85 - The Data Field Descriptor byte |
static uint8 getDeviceSelector( |
| ) |
Converts an InertialTypes::InertialCategory to the device selector for this command.
type | The InertialTypes::InertialCategory to get the device selector for. |
The device selector for the given InertialTypes::InertialCategory.
static ByteStream buildCommand_get( |
| ) |
Builds the bytes for the "get" command.
type | The InertialTypes::InertialCategory to get the current state for. |
A ByteStream that holds the bytes that make up the command.
static ByteStream buildCommand_set( |
| ) |
Builds the bytes for the "set" command.
type | The InertialTypes::InertialCategory to set the state for. |
enable bool | Whether to enable (true) or disable (false) continuous data streaming. |
A ByteStream that holds the bytes that make up the command.
Handles the response to the ContinuousDataStream command.
The device selector to look for in the response.
Response( |
| ) |
Creates the ContinuousDataStream::Response object.
collector std::weak_ptr<ResponseCollector> | The ResponseCollector to register the response with. |
dataResponse bool | Whether the command is expecting a data field response |
type | The InertialTypes::InertialCategory to use for the command/response. |
virtual bool match_data( |
| ) override |
Attempts to match an InertialDataField to the expected data field response.
true if the field matches the expected data, false if it does not.
bool parseResponse( |
| ) const |
Parses a successfully matched response for the ContinuousDataStream command.
response | The GenericInertialCommandResponse that matches the data field for this response. |
true if the data stream is enabled, false if it is disabled.