Represents the response to a Long Ping Node command
Creates a PingResponse with default values
PingResponse( |
| ) |
Creates a PingResponse with the given parameters
success bool | Whether or not the Long Ping response was a success |
nodeRssi int16 | The node RSSI value received in the Long Ping response |
baseRssi int16 | The base station RSSI value received in the Long Ping response |
static PingResponse ResponseSuccess( |
| ) |
Creates a PingResponse with a successful response
nodeRssi int16 | the node RSSI from the response |
baseRssi int16 | the base station RSSI from the response |
A PingResponse representing a success response from the LongPing node command
Creates a PingResponse with a fail response
A PingResponse representing a failed response from the LongPing Node command
Whether or not the Long Ping response was a success
The node RSSI value received in the Long Ping response
The base station RSSI value received in the Long Ping response
Gets whether or not the Long Ping command was a success (the node responded).
true if the Long Ping command was a success, false otherwise.
Gets the node RSSI that was returned with the response (if success() returns true). This is the signal strength at which the Node received the BaseStation's command packet.
The node RSSI that was returned with the response
Gets the base station RSSI that was returned with the response (if success() returns true). This is the signal strength at which the BaseStation received the Nodes's response packet.
The base station RSSI that was returned with the response.
Contains logic for the LongPing Node command
static ByteStream buildCommand( |
| ) |
Builds the LongPing command packet
nodeAddress | the address of the Node to build the command for |
A ByteStream containing the LongPing command packet
Handles the response to the LongPing Node command
Response( |
| ) |
Creates a LongPing Response object
nodeAddress | the node address to check for |
collector std::weak_ptr<ResponseCollector> | The ResponseCollector used to register and unregister the response |
virtual bool match( |
| ) override |
Checks if the WirelessPacket passed in matches the expected response pattern's bytes
packet const WirelessPacket& | The WirelessPacket in which to try to find the pattern |
true if the packet matches a response pattern, false otherwise
Gets the PingResponse that holds the result of the response
A PingResponse that holds the result of the response