|
rohdeschwarz
0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
|
Object-oriented Block Data storage and manipulation. More...
#include <block_data.hpp>
Public Member Functions | |
| BlockData () | |
| Default Constructor. More... | |
| BlockData (std::vector< unsigned char > data) | |
| Constructor. More... | |
| bool | isHeaderError () const |
| Checks the header for errors. More... | |
| bool | isHeader () const |
| Checks for a valid and complete Block Data header. More... | |
| bool | isComplete () const |
| Checks for complete Block Data header and payload. More... | |
| void | push_back (std::vector< unsigned char >::const_iterator begin, std::size_t size) |
| Copies data to block. More... | |
| std::size_t | size () const |
| Gets payload size, in bytes, from a complete header. More... | |
| unsigned char * | data () |
| Gets a pointer to the payload data. More... | |
Object-oriented Block Data storage and manipulation.
Definition at line 23 of file block_data.hpp.
| BlockData::BlockData | ( | ) |
Default Constructor.
Definition at line 17 of file block_data.cpp.
| BlockData::BlockData | ( | std::vector< unsigned char > | data | ) |
Constructor.
This constructor supports move semantics.
| [in] | data | Initial data to populate Block Data with |
Definition at line 27 of file block_data.cpp.
| unsigned char * BlockData::data | ( | ) |
Gets a pointer to the payload data.
Requires isHeader() to be true.
Definition at line 142 of file block_data.cpp.
| bool BlockData::isComplete | ( | ) | const |
Checks for complete Block Data header and payload.
Definition at line 99 of file block_data.cpp.
| bool BlockData::isHeader | ( | ) | const |
Checks for a valid and complete Block Data header.
Definition at line 93 of file block_data.cpp.
| bool BlockData::isHeaderError | ( | ) | const |
Checks the header for errors.
Incomplete headers are judged based on the
true if block data header is valid or has the potential to be valid; false otherwise Definition at line 38 of file block_data.cpp.
| void BlockData::push_back | ( | std::vector< unsigned char >::const_iterator | begin, |
| std::size_t | size | ||
| ) |
Copies data to block.
Definition at line 109 of file block_data.cpp.
| std::size_t BlockData::size | ( | ) | const |
Gets payload size, in bytes, from a complete header.
Requires isHeader() to be true.
0 otherwise Definition at line 136 of file block_data.cpp.