BCNP 3.2.1
Batched Command Network Protocol
Loading...
Searching...
No Matches
bcnp::TypedPacket< MsgType, Storage > Struct Template Reference

Generic packet containing messages of a specific type. More...

#include <packet.h>

Collaboration diagram for bcnp::TypedPacket< MsgType, Storage >:
[legend]

Public Member Functions

 TypedPacket ()
 

Public Attributes

PacketHeader header {}
 
Storage messages {}
 

Detailed Description

template<typename MsgType, typename Storage = std::vector<MsgType>>
struct bcnp::TypedPacket< MsgType, Storage >

Generic packet containing messages of a specific type.

Template Parameters
MsgTypeThe message struct type (must have kTypeId, kWireSize, Encode/Decode)
StorageContainer type for messages (default: std::vector<MsgType>)

Storage options: std::vector<MsgType>: Heap allocation, unlimited size (default) StaticVector<MsgType, N>: Stack allocation, fixed capacity N (real-time safe)

// Heap-allocated (large batches, trajectory uploads)
// Stack-allocated (control loop, telemetry - 64 message default)
// Custom capacity
Generic packet containing messages of a specific type.
Definition packet.h:242

Definition at line 242 of file packet.h.

Constructor & Destructor Documentation

◆ TypedPacket()

template<typename MsgType , typename Storage = std::vector<MsgType>>
bcnp::TypedPacket< MsgType, Storage >::TypedPacket ( )
inline

Definition at line 249 of file packet.h.

Member Data Documentation

◆ header

template<typename MsgType , typename Storage = std::vector<MsgType>>
PacketHeader bcnp::TypedPacket< MsgType, Storage >::header {}

Definition at line 246 of file packet.h.

◆ messages

template<typename MsgType , typename Storage = std::vector<MsgType>>
Storage bcnp::TypedPacket< MsgType, Storage >::messages {}

Definition at line 247 of file packet.h.


The documentation for this struct was generated from the following file: