VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
serialization.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _DEFINE_PACKET_EXPAND(x)
 
#define _DEFINE_PACKET_CONCAT3(a, b, c)
 
#define _DEFINE_PACKET_CONCAT4(a, b, c, d)
 
#define _DEFINE_PACKET_NAME(sock, name)
 
#define _DEFINE_PACKET_METHOD(ns, name, suffix)
 
#define DEFINE_PACKET_DATA(ns, sock, pktT, name, ...)
 
#define DEFINE_PACKET_WO_DATA(ns, sock, pktT, name)
 

Macro Definition Documentation

◆ _DEFINE_PACKET_CONCAT3

#define _DEFINE_PACKET_CONCAT3 ( a,
b,
c )
Value:
a##b##c

Definition at line 4 of file serialization.h.

◆ _DEFINE_PACKET_CONCAT4

#define _DEFINE_PACKET_CONCAT4 ( a,
b,
c,
d )
Value:
a##b##c##d

Definition at line 5 of file serialization.h.

◆ _DEFINE_PACKET_EXPAND

#define _DEFINE_PACKET_EXPAND ( x)
Value:
x

Definition at line 3 of file serialization.h.

◆ _DEFINE_PACKET_METHOD

#define _DEFINE_PACKET_METHOD ( ns,
name,
suffix )
Value:
_DEFINE_PACKET_CONCAT4(ns, _, name, suffix)
#define _DEFINE_PACKET_CONCAT4(a, b, c, d)

Definition at line 10 of file serialization.h.

◆ _DEFINE_PACKET_NAME

#define _DEFINE_PACKET_NAME ( sock,
name )
Value:
_DEFINE_PACKET_CONCAT3(VlcbNet, sock, name)
#define _DEFINE_PACKET_CONCAT3(a, b, c)

Definition at line 7 of file serialization.h.

◆ DEFINE_PACKET_DATA

#define DEFINE_PACKET_DATA ( ns,
sock,
pktT,
name,
... )
Value:
typedef struct { \
__VA_ARGS__ \
} _DEFINE_PACKET_NAME(sock, name); \
void _DEFINE_PACKET_METHOD(ns, name, _Serialize)( \
pktT *const packet, _DEFINE_PACKET_NAME(sock, name) data); \
_DEFINE_PACKET_NAME(sock, name) \
_DEFINE_PACKET_METHOD(ns, name, _Deserialize)(const pktT *const packet);
#define _DEFINE_PACKET_NAME(sock, name)
#define _DEFINE_PACKET_METHOD(ns, name, suffix)

Definition at line 13 of file serialization.h.

◆ DEFINE_PACKET_WO_DATA

#define DEFINE_PACKET_WO_DATA ( ns,
sock,
pktT,
name )
Value:
inline void _DEFINE_PACKET_METHOD(ns, name, _Serialize)(pktT *const packet);

Definition at line 22 of file serialization.h.