Loading...
Searching...
No Matches
packet.h
Go to the documentation of this file.
1
4
5// ALLOW FORMATTING
6#ifndef PACKET_H
7#define PACKET_H
8
9#include "stdint.h"
10#include "stddef.h"
11#include "stdbool.h"
12
13typedef struct {
14 uint8_t size;
15 uint8_t *data;
16} Field;
17
18typedef struct {
19 uint8_t id;
20 uint8_t length;
21 Field *fields;
22} Packet;
23
24bool Packet_asBytes(Packet *packet, uint8_t *out, uint8_t size);
25
26#endif
bool Packet_asBytes(Packet *packet, uint8_t *out, uint8_t size)
Definition packet.c:24
Definition packet.h:13