TCP Node boilerplate; CLI interface
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
#ifndef PACKETTYPE_H
|
||||
#define PACKETTYPE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
PACKET_TYPE_NONE = 0,
|
||||
// Add more here
|
||||
} PacketType;
|
||||
PACKET_TYPE_REQUEST = 1,
|
||||
PACKET_TYPE_RESPONSE = 2,
|
||||
PACKET_TYPE_MAX = 3
|
||||
} packet_type_t;
|
||||
|
||||
static inline int PacketType_IsValid(uint8_t packetType) {
|
||||
return packetType > PACKET_TYPE_NONE && packetType < PACKET_TYPE_MAX;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user