BaseStation_WriteEeprom_v2
BaseStation_WriteEeprom_v2

Contains logic for the base station write eeprom command (v2)

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,
uint16 eepromAddress,
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

eepromAddress
uint16

The eeprom address being written to.

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.

m_eepromAddress
uint16 m_eepromAddress

The eeprom address to match in the response.

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.

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