AutoCal
AutoCal

Contains logic for the AutoCal Node command.

Functions
buildCommand_shmLink
static ByteStream buildCommand_shmLink(
NodeAddress nodeAddress
)

Builds the AutoCal command packet for the SHM-Link node.

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 LongPing Node command

Functions
Response
Response(
NodeAddress nodeAddress,
WirelessModels::NodeModel model,
const Version &fwVersion,
std::weak_ptr<ResponseCollectorcollector
)

Creates a AutoCal Response object

Parameters
nodeAddress

The node address to check for.

model

The WirelessModels::NodeModel of the Node we are expecting a response for.

fwVersion
const Version&

The firmware version of the Node we are expecting a response 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.

m_model
WirelessModels::NodeModel m_model

The WirelessModels::NodeModel of the Node we are expecting a response for.

m_fwVersion
Version m_fwVersion

The firmware version of the Node we are expecting a response for.

m_calStarted
bool m_calStarted

Whether the AutoCal has been successfully started or not (as reported by the Node).

m_completionFlag
WirelessTypes::AutoCalCompletionFlag m_completionFlag

The <AutoCalCompletionFlag> representing the final autocal status.

m_timeUntilCompletion
float m_timeUntilCompletion

The amount of time (in seconds) that the autocal operation will take to complete.  This value gets reported by the Node before starting the calibration.

m_infoBytes
Bytes m_infoBytes

Contains all of the information bytes from the completion response.

Functions
calStarted
bool calStarted() const

Gets whether the AutoCal operation has started or not.

Returns

true if the Node indicated that the AutoCal operation has started, false otherwise.

calTime
float calTime() const

Gets the total time (in seconds) that the Node reported it will take to complete the AutoCal operation.

Returns

The time (in seconds) that the Node reported it will take to complete AutoCal.

completionFlag
WirelessTypes::AutoCalCompletionFlag completionFlag() const

Gets the WirelessTypes::AutoCalCompletionFlag of the AutoCal operation.

Returns

The WirelessTypes::AutoCalCompletionFlag of the AutoCal operation.

infoBytes
const Bytes& infoBytes() const

Gets the information bytes returned from the AutoCal completion packet.

Returns

The information Bytes from the AutoCal completion packet.

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

match_nodeReceived
bool match_nodeReceived(
const WirelessPacket &packet
)

Checks if the WirelessPacket passed in matches the "Node Received" packet.

Parmeters
packet

The WirelessPacket to try to match.

Returns

true if the packet matches the Node Received packet, false otherwise.

match_shmLink
bool match_shmLink(
const WirelessPacket &packet
)

Checks if the WirelessPacket matches the SHM-Link AutoCal packet.

Parameters
packet

The WirelessPacket to try to match.

Returns

true if the packet matches the SHM-Link AutoCal packet, false otherwise.