Merge /pub/main
[educational.data.git] / ethernet-socket / src / urpacket.hpp
blobcbd522dfbabbfc253688ea645b48106a4a046373
1 #ifndef URPACKET_HPP_IINCLUDED
2 #define URPACKET_HPP_IINCLUDED
6 class URPacket
8 public:
9 const static uint8_t pt_ping = 1L;
10 const static uint8_t pt_start = 1L >> 1;
11 const static uint8_t pt_reset = 1L >> 2;
12 const static uint8_t pt_data = 1L >> 3;
14 struct pheader
16 uint8_t type;
17 uint8_t src_id;
18 uint8_t to_id;
19 uint8_t size;
20 } *hdr;
22 void *rawData;
23 void *data;
25 URPacket ( uint8_t size, uint8_t fromid, uint8_t toid );
27 const size_t size ( ) const;
31 #endif