BaseStation_ReadEeprom
BaseStation_ReadEeprom

Contains logic for the base station read eeprom command

Constants
Packet Bytes
COMMAND_BYTE

0x73  - The Command ID byte for the read eeprom command

FAIL_BYTE

0x21  - The Fail Response ID byte for the read eeprom command

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(
std::weak_ptr<ResponseCollectorcollector
)

Creates a read eeprom Response object

Parameters
collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response

Variables
m_result
uint16 m_result

The result value of the read eeprom command.

Functions
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

result
uint16 result() const

Gets the result value of the response.

Returns

The result value of the response.

Exceptions
matchSuccessResponse
bool matchSuccessResponse(
DataBuffer &data
)

Checks if the bytes passed in match the success 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 success response pattern was found, false otherwise

matchFailResponse
bool matchFailResponse(
DataBuffer &data
)

Checks if the bytes passed in match the failure 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 failure response pattern was found, false otherwise