Representation of a package of data that gets transmitted e.g.
More...
#include <Imt.Base.Lib.Remoting/DataFrame.h>
Representation of a package of data that gets transmitted e.g.
over a serial connection.
◆ append()
void imt::base::lib::remoting::DataFrame::append |
( |
uint8_t |
ch | ) |
|
Appends a character at the end of this data frame.
- Parameters
-
◆ appendCRC16()
void imt::base::lib::remoting::DataFrame::appendCRC16 |
( |
const uint16_t |
initialCrcValue = 0xffffU | ) |
|
Calculates and appends a 2 byte crc.
- Parameters
-
initialCrcValue | seed value for the CRC16 calculation |
◆ checkCRC16()
bool imt::base::lib::remoting::DataFrame::checkCRC16 |
( |
const uint16_t |
initialCrcValue = 0xffffU | ) |
const |
Checks if the crc 16 is valid.
- Parameters
-
initialCrcValue | seed value for the CRC16 calculation |
- Returns
- bool True if the check succeeded, false otherwise
◆ getCapacity()
uint32_t imt::base::lib::remoting::DataFrame::getCapacity |
( |
void |
| ) |
const |
|
inline |
Returns the maximum capacity of this data frame.
- Returns
- maximum capacity of this data frame
◆ getData()
const uint8_t* imt::base::lib::remoting::DataFrame::getData |
( |
void |
| ) |
const |
Returns a pointer to the first character of the frame.
- Returns
- pointer to the first character of the frame
◆ getSize()
uint32_t imt::base::lib::remoting::DataFrame::getSize |
( |
void |
| ) |
const |
|
inline |
Returns the current size of the data frame.
- Returns
- current size of the data frame
◆ init()
void imt::base::lib::remoting::DataFrame::init |
( |
const DataFrame & |
source | ) |
|
◆ removeCharacter()
bool imt::base::lib::remoting::DataFrame::removeCharacter |
( |
uint8_t & |
ch | ) |
|
Removes a character from the end of this data frame.
- Parameters
-
ch | The character to remove |
- Returns
- false if buffer was empty.
◆ removeCRC16()
bool imt::base::lib::remoting::DataFrame::removeCRC16 |
( |
void |
| ) |
|
Checks and removes a 2 byte crc.
- Returns
- False if size of data frame is too small
◆ setData()
void imt::base::lib::remoting::DataFrame::setData |
( |
const uint8_t *const |
pData, |
|
|
uint32_t |
dataSize |
|
) |
| |
Sets data.
- Parameters
-
pData | Pointer to the data buffer to be set |
dataSize | Size of the data buffer |
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.Lib.Remoting/DataFrame.h