VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
release_node_num_deserialize.c
Go to the documentation of this file.
1
#include "
vlcb/net/packet/datagram/module.h
"
2
3
#include <assert.h>
4
5
#include "
vlcb/common/vlcb_defs.h
"
6
#include "
vlcb/platform/endian.h
"
7
8
#include <string.h>
9
10
inline
VlcbNetDgramReleaseNodeNumber
11
vlcb_net_pkt_dgram_module_ReleaseNodeNumber_deserialize
(
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
}
endian.h
ntohs
static uint16_t ntohs(uint16_t netshort)
Definition
endian.h:40
module.h
vlcb_net_pkt_dgram_module_ReleaseNodeNumber_deserialize
VlcbNetDgramReleaseNodeNumber vlcb_net_pkt_dgram_module_ReleaseNodeNumber_deserialize(const VlcbNetPacketDatagram *const packet)
Definition
release_node_num_deserialize.c:11
VlcbNetPacketDatagram
Definition
packet/datagram.h:19
VlcbNetPacketDatagram::payload
VlcbNetDatagramPayload payload
Definition
packet/datagram.h:22
VlcbNetPacketDatagram::opc
VlcbOpCode opc
Definition
packet/datagram.h:20
VlcbNetPacketDatagram::payload_len
uint8_t payload_len
Definition
packet/datagram.h:21
vlcb_defs.h
VLCB_OPC_NODE_NUMBER_RELEASED
@ VLCB_OPC_NODE_NUMBER_RELEASED
Definition
vlcb_defs.h:812
net
src
packet
datagram
module
release_node_num_deserialize.c
Generated on Mon Nov 4 2024 09:13:33 for VLCB SDK by
1.12.0