ReadSingleSensor
ReadSingleSensor

Contains logic for the Read Single Sensor Node command

Functions
buildCommand
static ByteStream buildCommand(
NodeAddress nodeAddress,
uint8 channelNumber
)

Builds the ReadSingleSensor command packet.

Parameters
nodeAddress

The address of the Node to build the command for.

Returns

A ByteStream containing the command packet.

Response
public
ResponsePattern
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
GenericInertialCommand.​Response
Response

Handles the response to the ReadSingleSensor node command

Variables
m_sensorValue
uint16 m_sensorValue

The value read from the sensor.

Functions
Response
explicit Response(
std::weak_ptr<ResponseCollectorcollector
)

Creates a ReadSingleSensor Response object

Parameters
collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response

match
virtual bool match(
DataBuffer &data
) override

Checks if the bytes passed in match the response pattern from their current read position

Parameters
data

The DataBuffer containing the bytes in which to try to find the pattern

Returns

true if the response pattern was found, false otherwise

sensorValue
uint16 sensorValue() const

Gets the sensor value that was in the response to the read single sensor command.