PageDownload
PageDownload
PageDownload

Contains logic for the PageDownload Node command

Constants
Packet Information
COMMAND_ID

0x05  - The Command ID for the Page Download command

Functions
buildCommand
static ByteStream buildCommand(
NodeAddress nodeAddress,
uint16 pageIndex
)

Builds the PageDownload command packet

Parameters
nodeAddress

the address of the Node to build the command for

pageIndex
uint16

the page index to download from the Node's memory

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

Functions
Response
Response(
std::weak_ptr<ResponseCollectorcollector
)

Creates a PageDownload Response object

Parameters
collector
std::weak_ptr<ResponseCollector>

The ResponseCollector used to register and unregister the response

Variables
m_dataPoints
ByteStream m_dataPoints

The data points that make up the "page" that was downloaded from the Node

m_matchedPart1
bool m_matchedPart1

Whether or not part 1 (the Command Byte) of the response has been matched

Functions
match
virtual bool match(
DataBuffer &data
) override

Checks if the DataBuffer passed in matches the expected response pattern's bytes

Parameters
data

The DataBuffer containing the bytes to match

Returns

true if the bytes match a response pattern, false otherwise

dataPoints
ByteStream dataPoints()

Gets the dataPoints that were downloaded from the Node

Returns

A ByteStream holding the data points (if any) that were downloaded from the Node

matchSuccessResponsePart1
bool matchSuccessResponsePart1(
DataBuffer &data
)

Checks if the DataBuffer passed in matches the first part (Command Byte) of the response bytes

Parameters
data

The DataBuffer containing the bytes to match

Returns

true if the bytes match the first part of the success response pattern, false otherwise

matchSuccessResponse
bool matchSuccessResponse(
DataBuffer &data
)

Checks if the DataBuffer passed in matches the success response bytes

Parameters
data

The DataBuffer containing the bytes to match

Returns

true if the bytes match the success response pattern, false otherwise

matchSuccessResponse

Checks if the DataBuffer passed in matches the fail response bytes

Parameters
data

The DataBuffer containing the bytes to match

Returns

true if the bytes match the fail response pattern, false otherwise