paqueteCnC
Loading...
Searching...
No Matches
packet_extended_housekeeping_2.h
Go to the documentation of this file.
1
28#ifndef PACKET_EXTENDED_HOUSEKEEPING_2_H
29#define PACKET_EXTENDED_HOUSEKEEPING_2_H
30
31#include <vector>
32#include <unordered_map>
33
34#include "../packet.h"
37
39public:
40 PacketExtendedHousekeeping2(const Packet& packet, uint16_t structureId,
41 uint8_t collectionInterval, uint8_t amountOfSamples,
42 const std::vector<uint8_t>& samples, uint8_t amountOfArrays,
43 const std::vector<std::vector<uint8_t>>& arrays);
44
45 /****** Methods from composited classes ******/
46
53
60
65 uint16_t getStructureIdentifier();
66
67 /****** Methods from this class ******/
68
69 uint8_t getCollectionInterval();
70 void setCollectionInterval(const uint8_t newCollectionInterval);
71
72 uint8_t getAmountOfSamples();
73
81 void setAmountOfSamples(const uint8_t newAmountOfSamples);
82
83 const std::vector<uint8_t>& getSamples();
84
90 void setSamples(const std::vector<uint8_t>& newSamples);
91 void setSamples(std::vector<uint8_t>&& newSamples);
92
93 uint8_t getAmountOfArrays();
94
102 void setAmountOfArrays(const uint8_t newAmountOfArrays);
103
104 const std::vector<uint8_t>& getArrays();
105
109 void setArrays(const std::vector<uint8_t>& newArrays);
110 void setArrays(std::vector<uint8_t>&& newArrays);
111
112private:
113 PacketExtendedHousekeeping packetHousekeepingBasic_;
114 uint8_t collectionInterval_;
115 uint8_t amountOfSamples_;
116 std::vector<uint8_t> samples_;
117 uint8_t amountOfArrays_;
118 std::vector<std::vector<uint8_t>> arrays_;
119};
120
121#endif
Definition: packet_extended_housekeeping_2.h:38
void setAmountOfSamples(const uint8_t newAmountOfSamples)
Set new amount of samples. When changing this make sure that samples.size() == newAmountOfSamples or ...
Definition: packet_extended_housekeeping_2.cpp:46
uint16_t getStructureIdentifier()
Calls the packet extended housekeeping implementation of this method.
Definition: packet_extended_housekeeping_2.cpp:29
Packet & getPacket()
Calls the packet extended basic implementation of this method.
Definition: packet_extended_housekeeping_2.cpp:16
void setArrays(const std::vector< uint8_t > &newArrays)
PacketExtendedHousekeeping2 swapApplicationIdFields()
Calls the packet extended basic implementation of this method.
Definition: packet_extended_housekeeping_2.cpp:20
void setSamples(const std::vector< uint8_t > &newSamples)
Definition: packet_extended_housekeeping_2.cpp:55
void setAmountOfArrays(const uint8_t newAmountOfArrays)
Set new amount of arrays. When changing this make sure that arrays.size() == newAmountOfArrays or the...
Definition: packet_extended_housekeeping_2.cpp:69
Definition: packet_extended_housekeeping_basic.h:36
Definition: packet.h:26
Higher level packet for the services.
Higher level packet for housekeeping and diagnostic data service. Basic packet that all the subtypes ...