ShortPing_v2
ShortPing_v2

Contains logic for the ShortPing Node command (version 2).

Functions
buildCommand
static ByteStream buildCommand(
NodeAddress nodeAddress
)

Builds the ShortPing_v2 command packet

Parameters
nodeAddress

the address of the Node to build the command for.

Returns

A ByteStream containing the ShortPing_v2 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 ShortPing_v2 Node command.

Functions
Response
Response(
NodeAddress nodeAddress,
std::weak_ptr<ResponseCollectorcollector
)

Creates a ShortPing_v2 Response object.

Parameters
nodeAddress

the node address to check for.

collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response.

Variables
m_nodeAddress
NodeAddress m_nodeAddress

The node address to look for in the response

Functions
match
virtual bool match(
const WirelessPacket &packet
) override

Checks if the WirelessPacket passed in matches the expected response pattern's bytes

Parameters
packet

The WirelessPacket in which to try to find the pattern

Returns

true if the packet matches a response pattern, false otherwise

matchSuccessResponse
bool matchSuccessResponse(
const WirelessPacket &packet
)

Checks if the packet passed in matches the success response.

Parameters
packet

The WirelessPacket to try to match.

Returns

true if the success response pattern was found, false otherwise

matchFailResponse
bool matchFailResponse(
const WirelessPacket &packet
)

Checks if the packet passed in matches the failure response.

Parameters
packet

The WirelessPacket to try to match.

Returns

true if the failure response pattern was found, false otherwise