VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
release_node_num_deserialize.c
Go to the documentation of this file.
2
3#include <assert.h>
4
7
8#include <string.h>
9
10inline VlcbNetDgramReleaseNodeNumber
12 const VlcbNetPacketDatagram *const packet) {
13 VlcbNetDgramReleaseNodeNumber data;
14 assert(packet != NULL && packet->opc == VLCB_OPC_NODE_NUMBER_RELEASED &&
15 packet->payload_len == sizeof(data.nodeNumber));
16 memcpy(&data.nodeNumber, &packet->payload, sizeof(data.nodeNumber));
17 data.nodeNumber = ntohs(data.nodeNumber);
18 return data;
19}
static uint16_t ntohs(uint16_t netshort)
Definition endian.h:40
VlcbNetDgramReleaseNodeNumber vlcb_net_pkt_dgram_module_ReleaseNodeNumber_deserialize(const VlcbNetPacketDatagram *const packet)
VlcbNetDatagramPayload payload
@ VLCB_OPC_NODE_NUMBER_RELEASED
Definition vlcb_defs.h:812