Packet manipulation class.
More...
#include <InformationPacket.h>
|
| | InformationPacket ()=default |
| | Default constructor.
|
| |
| template<typename T > |
| T * | allocatePayload (EType type) |
| | Allocates the memory needed for the packet.
|
| |
| const Header & | getHeader () const |
| | Gets the header of the current packet.
|
| |
| Header & | getHeader () |
| | Gets the header of the current packet.
|
| |
| template<typename T > |
| const T & | getPayload () const |
| | Gets a typed payload of the current packet.
|
| |
| template<typename T > |
| T & | getPayload () |
| | Gets a typed payload of the current packet.
|
| |
| const char * | data () const |
| | Gets the data pointer of the buffer.
|
| |
| char * | data () |
| | Gets the data pointer of the buffer.
|
| |
| size_t | size () const |
| | Gets the size of the packet buffer.
|
| |
| void | resizePayload (size_t sz) |
| | Resizes the buffer to include the .
|
| |
Packet manipulation class.
◆ EType
Enumeration packet types used in the packet header.
| Enumerator |
|---|
| tInitialize | Send version to compare get same version and pass what data to subscribe to.
|
| tPingPong | Sends a packet and it should return it only incrementing the counter.
|
| tVariableInfo | |
| tVariable | |
| tResultData | |
◆ InformationPacket()
| sf::InformationPacket::InformationPacket |
( |
| ) |
|
|
default |
◆ allocatePayload()
template<typename T >
| T * sf::InformationPacket::allocatePayload |
( |
EType |
type | ) |
|
|
inline |
Allocates the memory needed for the packet.
◆ data() [1/2]
| char * sf::InformationPacket::data |
( |
| ) |
|
|
inline |
Gets the data pointer of the buffer.
◆ data() [2/2]
| const char * sf::InformationPacket::data |
( |
| ) |
const |
|
inline |
Gets the data pointer of the buffer.
◆ getHeader() [1/2]
| Header & sf::InformationPacket::getHeader |
( |
| ) |
|
|
inline |
Gets the header of the current packet.
◆ getHeader() [2/2]
| const Header & sf::InformationPacket::getHeader |
( |
| ) |
const |
|
inline |
Gets the header of the current packet.
◆ getPayload() [1/2]
template<typename T >
| T & sf::InformationPacket::getPayload |
( |
| ) |
|
|
inline |
Gets a typed payload of the current packet.
◆ getPayload() [2/2]
template<typename T >
| const T & sf::InformationPacket::getPayload |
( |
| ) |
const |
|
inline |
Gets a typed payload of the current packet.
◆ headerSize()
| static size_t sf::InformationPacket::headerSize |
( |
| ) |
|
|
inlinestatic |
◆ resizePayload()
| void sf::InformationPacket::resizePayload |
( |
size_t |
sz | ) |
|
|
inline |
Resizes the buffer to include the .
◆ size()
| size_t sf::InformationPacket::size |
( |
| ) |
const |
|
inline |
Gets the size of the packet buffer.
The documentation for this class was generated from the following file: