The DataFormat class is a common base class for the R2Sonic up/downlink data formats as definned in the R2Sonic data formats pdf.
More...
#include <packet.hpp>
|
| | Packet (char *start_bit) |
| | Constructor.
|
| |
| const sections::MiniHeader * | miniHeader () const |
| | returns a pointer to the miniHeader
|
| |
| char * | startBit () const |
| | returns a pointer to the start bit used to define the packet
|
| |
| u16 | getSize () const |
| | gets the size of the entire DataFormat Packet reported by the MiniHeader
|
| |
| char * | end () const |
| | end returns a pointer to one bit beyond the current DataFormat Packet (the first bit of the next Packet)
|
| |
| char * | SectionsStartBit () const |
| | Returns the starting bit of the data sections of the packet (just after the mini header)
|
| |
| bool | isType () const |
| | Determines if the packet can be instantiated given the current data in the buffer.
|
| |
The DataFormat class is a common base class for the R2Sonic up/downlink data formats as definned in the R2Sonic data formats pdf.
- Note
- accessors with a get* prefix will return a machine-endian value accessors without the get prefix will return a reference to the raw data which will be in big-endian order as per the r2sonic spec
◆ Packet()
| r2sonic::packets::Packet::Packet |
( |
char * | start_bit | ) |
|
|
inline |
Constructor.
- Parameters
-
| the | start bit of the datagram you want to read |
◆ end()
| char * r2sonic::packets::Packet::end |
( |
| ) |
const |
|
inline |
end returns a pointer to one bit beyond the current DataFormat Packet (the first bit of the next Packet)
- Returns
- the pointer to the next packet
◆ getSize()
| u16 r2sonic::packets::Packet::getSize |
( |
| ) |
const |
|
inline |
gets the size of the entire DataFormat Packet reported by the MiniHeader
- Returns
- the size of the DataFormat Packet
◆ isType()
| bool r2sonic::packets::Packet::isType |
( |
| ) |
const |
|
inline |
Determines if the packet can be instantiated given the current data in the buffer.
- Returns
◆ miniHeader()
returns a pointer to the miniHeader
- Returns
- a pointer to the miniHeader
◆ nominalType()
| virtual char * r2sonic::packets::Packet::nominalType |
( |
| ) |
const |
|
protectedpure virtual |
◆ SectionsStartBit()
| char * r2sonic::packets::Packet::SectionsStartBit |
( |
| ) |
const |
|
inline |
Returns the starting bit of the data sections of the packet (just after the mini header)
- Returns
- a pointer to the first section of the packet after the mini header
◆ startBit()
| char * r2sonic::packets::Packet::startBit |
( |
| ) |
const |
|
inline |
returns a pointer to the start bit used to define the packet
- Returns
- a pointer to the start bit of the packet
◆ typeErrorCheck()
| void r2sonic::packets::Packet::typeErrorCheck |
( |
| ) |
const |
|
inlineprotected |
The documentation for this class was generated from the following file: