BaseStation_WriteEeprom
BaseStation_WriteEeprom

Contains logic for the base station write eeprom command

Constants
Packet Information
COMMAND_BYTE

0x78  - The Command ID byte of the write eeprom command

FAIL_BYTE

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

Functions
buildCommand
static ByteStream buildCommand(
uint16 eepromAddress,
uint16 valueToWrite
)

Builds the eeprom write command packet

Parameters
eepromAddress
uint16

The eeprom address to write to on the base station

valueToWrite
uint16

The value to write to the specified eeprom address

Returns

A ByteStream containing the base station write 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 write eeprom command

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

Creates a write eeprom Response object

Parameters
valueToWrite
uint16

The value that is expected to be written to eeprom from the associated command

collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response

Variables
m_valueWritten
uint16 m_valueWritten

The value that is expected to be written to eeprom from the associated 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

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