BaseStation_ReadEeprom_v2
BaseStation_ReadEeprom_v2

Contains logic for the base station read eeprom command (v2).

Functions
buildCommand
static ByteStream buildCommand(
uint16 eepromAddress
)

Builds the eeprom read command packet.

Parameters
eepromAddress
uint16

The eeprom address to read from the base station.

Returns

A ByteStream containing the base station read eeprom command

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 base station read eeprom command.

Functions
Response
Response(
uint16 eepromAddress,
std::weak_ptr<ResponseCollectorcollector
)

Creates a read eeprom Response object.

Parameters
eepromAddress
uint16

The eeprom address being read from.

collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response.

Variables
m_eepromAddress
uint16 m_eepromAddress

The eeprom address to match in the response.

m_result
uint16 m_result

The result value of the read eeprom command.

m_errorCode
WirelessPacket::ResponseErrorCode m_errorCode

The WirelessPacket::ResponseErrorCode from the response.

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

Checks if the packet passed in matches either the success or failure response.

Parameters
packet

The WirelessPacket to try to match.

Returns

true if the response pattern was found, false otherwise.

result
uint16 result() const

Gets the result value of the response.

Returns

The result value of the response.

Exceptions
errorCode
WirelessPacket::ResponseErrorCode errorCode() const

Gets the WirelessPacket::ResponseErrorCode from the response packet.

Returns

The error code from the response.

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