VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
packet/datagram.c
Go to the documentation of this file.
2
3#include <assert.h>
4#include <stdbool.h>
5
10
11 switch (err) {
13 return "datagram payload too large";
15 return "datagram invalid opcode";
16 }
17 assert(false /* unhandled case guard */);
18}
19
23 VlcbNetPacketDatagram *const packet) {}
24
26vlcb_net_pkt_dgram_New(VlcbOpCode opc, uint8_t payload_len,
28 VlcbNetPacketDatagram *const packet) {}
const char *const vlcb_error
Definition error.h:3
vlcb_error vlcb_net_pkt_dgram_ConstructErrToStr(VlcbNetPacketDatagramConstructErr err)
VlcbNetPacketDatagramConstructErr vlcb_net_pkt_dgram_New(VlcbOpCode opc, uint8_t payload_len, const VlcbNetDatagramPayload *const payload, VlcbNetPacketDatagram *const packet)
VlcbNetPacketDatagramConstructErr vlcb_net_pkt_dgram_NewUnchecked(VlcbOpCode opc, uint8_t payload_len, const VlcbNetDatagramPayload *const payload, VlcbNetPacketDatagram *const packet)
uint8_t VlcbNetDatagramPayload[7]
VlcbNetPacketDatagramConstructErr
@ VLCB_DGRAM_PKT_CONSTRUCT_ERR_COUNT
@ VLCB_DGRAM_PKT_CONSTRUCT_ERR_PAYLOAD_TOO_LARGE
@ VLCB_DGRAM_PKT_CONSTRUCT_ERR_OK
@ VLCB_DGRAM_PKT_CONSTRUCT_ERR_INVALID_OPCODE
VlcbOpCode
Definition vlcb_defs.h:493