15#define Q_PACKETID_BYTELENGTH 6
16#define Q_OPCODE_BYTELENGTH 1
17#define Q_REQUESTID_BYTELENGTH 2
18#define Q_NODETYPE_BYTELENGTH 1
19#define Q_NODEID_BYTELENGTH 1
21#define Q_HEADER_BYTELENGTH Q_PACKETID_BYTELENGTH + Q_OPCODE_BYTELENGTH
22#define Q_DISCOVERREPLY_BYTELENGTH Q_HEADER_BYTELENGTH + Q_NODETYPE_BYTELENGTH + Q_NODEID_BYTELENGTH
23#define Q_POLLREPLY_BYTELENGTH Q_DISCOVERREPLY_BYTELENGTH
25#define Q_OPCODE_INDEX Q_PACKETID_BYTELENGTH
26#define Q_PAYLOAD_INDEX Q_OPCODE_INDEX
28#define Q_PACKETID_STRING "ASLS-Q"
Q_packet_s * Q_parser_parse(void *data, uint8_t len)
parses and converts received data into a Q_packet instance
char * Q_parser_forge_poll_reply(uint8_t node_id)
Forges a poll reply packet using provided node's id.
Q_packet_opcode_cmd_e
List of Q packet opcodes.
void Q_parser_free(Q_packet_s *packet)
Frees packet's dynamically allocated ressources.
char * Q_parser_forge_discover_reply(uint8_t node_id)
Forges a discover reply packet using provided node's id.
Q packet structure object.
Q_packet_opcode_cmd_e opcode