paqueteCnC
Loading...
Searching...
No Matches
packet_buffer_io.h
1
8#ifndef PACKET_BUFFER_IO_H
9#define PACKET_BUFFER_IO_H
10
11#include <type_traits>
12
13#include "packet.h"
14
16public:
18
19 Packet readPacket(const std::byte* buffer);
20 void writePacket(std::byte* buffer, Packet& packet);
21private:
32 uint8_t extractFieldFrom(std::byte inputByte, uint8_t startIndex,
33 size_t lengthOfField);
34};
35
36#endif
Definition: packet_buffer_io.h:15
Packet readPacket(const std::byte *buffer)
Definition: packet_buffer_io.cpp:33
void writePacket(std::byte *buffer, Packet &packet)
Definition: packet_buffer_io.cpp:135
Definition: packet.h:26
High level packet representation; does not care as much about size.