Provides easy access to the datalogging memory on a WirelessNode.
NodeMemory( |
| ) |
Creates a NodeMemory object.
node | The WirelessNode to access the memory of. |
logPage uint16 | The last log page that contains datalogging data. |
pageOffset uint16 | The byte offset into the last log page containing datalogging data. |
Error_NodeCommunication: Failed to read info from the Node.
Error_Connection: A connection error has occurred with the parent BaseStation.
The last log page that contains datalogging data.
The byte offset into the last log page containing datalogging data.
The total number of bytes that can be downloaded.
Holds the page number of the data that is stored in m_currentPageData
Holds the page number of the data that is stored in m_previousPageData
Contains data for the current page that has been downloaded.
Contains data for the previous page that was downloaded. This allows us to grab data from a page, and then look back at previous data (to piece a packet together) without redownloading it.
void findPageAndOffset( |
| ) const |
Gets the page and offset from the memory position.
bytePosition uint64 | The byte position in the Node's datalogging memory. |
page uint16& | Holds the page index result. |
offset uint16& | Holds the offset position result; |
ByteStream* getByteStream( |
| ) |
Gets a pointer to the ByteStream containing the data for the requested page. If the data does not exist in a current ByteStream, it will be downloaded from the Node.
page uint16 | The page index to request data for. |
A ByteStream pointer containing the data for the requested page.
Error_NodeCommunication: Failed to download data from the Node.
Error_Connection: A connection error has occurred.
void findData( |
| ) |
Gets the data ByteStream, and offset into the ByteStream to read from, given the byte position.
bytePosition uint64 | The byte position requested in the Node's datalogging memory. |
data | Holds the ByteStream result containing the data to read. |
offset uint16& | Holds the offset result, which is the offset into the data to read from. |
Error_NodeCommunication: Failed to download data from the Node.
Error_NoData: The requested bytePosition is outside the range of the datalogged data.
Error_Connection: A connection error has occurred.
uint8 at( |
| ) |
Reads a 1-byte unsigned integer from the datalogging data.
bytePosition uint64 | The 0-based position into the Node's memory to read from. |
The 1-byte uint8 at the requested position.
Error_NodeCommunication: Failed to download data from the Node.
Error_NoData: The requested bytePosition is outside the range of the datalogged data.
Error_Connection: A connection error has occurred.
uint64 bytesRemaining( |
| ) |
Calculates how many bytes are remaining in the Node's datalogging memory, based on the given byte position.
currentByte uint64 | The byte position to check against the total bytes to calculate the number of bytes remaining. |
The number of bytes remaining before the end of the Node's datalogging memory.