paqueteCnC
Loading...
Searching...
No Matches
packet_extended_large_data_1.h
Go to the documentation of this file.
1
11#ifndef PACKET_EXTENDED_LARGE_DATA_1_H
12#define PACKET_EXTENDED_LARGE_DATA_1_H
13
14#include <vector>
15
16#include "../packet.h"
18
20public:
21 // Note: sequence nubmer is not the same field as the main header's
22 // sequence control field. This one is relative to the large data unit,
23 // so it starts from 1 for this large data transfer.
24 PacketExtendedLargeData1(const Packet& packet, uint8_t largeDataUnitId,
25 uint16_t sequenceNumber, const std::vector<std::byte>& data);
26 PacketExtendedLargeData1(const Packet& packet, uint8_t largeDataUnitId,
27 uint16_t sequenceNumber, std::vector<std::byte>&& data);
28
29 /****** Methods from composited classes ******/
30
40
48
55 uint8_t getLargeDataUnitId();
56
57 /****** Methods from this class ******/
58
59 uint16_t getSequenceNumber();
60 void setSequenceNumber(const uint16_t newSequenceNumber);
61
62 std::vector<std::byte>& getData();
63 void setData(const std::vector<std::byte>& newData);
64 void setData(std::vector<std::byte>&& newData);
65private:
66 PacketExtendedBasic packetBasic_;
67 uint8_t largeDataUnitId_;
68 uint16_t sequenceNumber_;
69 std::vector<std::byte> data_;
70};
71
72#endif
Definition: packet_extended_basic.h:13
Definition: packet_extended_large_data_1.h:19
Packet & getPacket()
Calls the packet extended basic implementation of this method.
Definition: packet_extended_large_data_1.cpp:22
uint8_t getLargeDataUnitId()
Calls the packet extended large data implementation of this method.
Definition: packet_extended_large_data_1.cpp:35
PacketExtendedLargeData1 swapApplicationIdFields()
Calls the packet extended basic implementation of this method.
Definition: packet_extended_large_data_1.cpp:26
Definition: packet.h:26
Higher level packet for the services.