huge progress on hk + testing

This commit is contained in:
2020-09-19 01:17:43 +02:00
parent 757d2275ea
commit ba56f48e8e
16 changed files with 237 additions and 82 deletions

View File

@ -39,7 +39,7 @@ void HousekeepingMessage::setToggleReportingCommand(CommandMessage *message,
}
else {
if(enableReporting) {
message->setCommand(ENABLE_PERIODIC_HK_GENERATION);
message->setCommand(ENABLE_PERIODIC_HK_REPORT_GENERATION);
}
else {
message->setCommand(DISABLE_PERIODIC_HK_REPORT_GENERATION);

View File

@ -33,6 +33,14 @@ union sid_t {
bool notSet() const {
return raw == INVALID_ADDRESS;
}
bool operator==(const sid_t& other) const {
return raw == other.raw;
}
bool operator!=(const sid_t& other) const {
return not (raw == other.raw);
}
};
@ -57,7 +65,7 @@ public:
static constexpr uint8_t MESSAGE_ID = messagetypes::HOUSEKEEPING;
static constexpr Command_t ENABLE_PERIODIC_HK_GENERATION =
static constexpr Command_t ENABLE_PERIODIC_HK_REPORT_GENERATION =
MAKE_COMMAND_ID(5);
static constexpr Command_t DISABLE_PERIODIC_HK_REPORT_GENERATION =
MAKE_COMMAND_ID(6);

View File

@ -14,13 +14,8 @@
*/
class HousekeepingPacketDownlink: public SerialLinkedListAdapter<SerializeIF> {
public:
HousekeepingPacketDownlink(sid_t sid, /*bool reportingStatus,
float collectionInterval, uint8_t numberOfParameters, */
LocalPoolDataSetBase* dataSetPtr):
sourceId(sid.objectId), setId(sid.ownerSetId),
/*reportingStatus(reportingStatus),
collectionInterval(collectionInterval),
numberOfParameters(numberOfParameters), */hkData(dataSetPtr) {
HousekeepingPacketDownlink(sid_t sid, LocalPoolDataSetBase* dataSetPtr):
sourceId(sid.objectId), setId(sid.ownerSetId), hkData(dataSetPtr) {
setLinks();
}
@ -29,17 +24,10 @@ private:
setStart(&sourceId);
sourceId.setNext(&setId);
setId.setNext(&hkData);
//setId.setNext(&reportingStatus);
//reportingStatus.setNext(&collectionInterval);
//collectionInterval.setNext(&numberOfParameters);
//numberOfParameters.setNext(&hkData);
}
SerializeElement<object_id_t> sourceId;
SerializeElement<uint32_t> setId;
//SerializeElement<uint8_t> reportingStatus;
//SerializeElement<float> collectionInterval;
//SerializeElement<uint8_t> numberOfParameters;
LinkedElement<SerializeIF> hkData;
};

View File

@ -1,9 +1,9 @@
#ifndef FRAMEWORK_HOUSEKEEPING_HOUSEKEEPINGPACKETUPDATE_H_
#define FRAMEWORK_HOUSEKEEPING_HOUSEKEEPINGPACKETUPDATE_H_
#include <framework/serialize/SerialBufferAdapter.h>
#include <framework/serialize/SerialLinkedListAdapter.h>
#include <framework/datapoollocal/LocalPoolDataSetBase.h>
#include "../serialize/SerialBufferAdapter.h"
#include "../serialize/SerialLinkedListAdapter.h"
#include "../datapoollocal/LocalPoolDataSetBase.h"
/**
* @brief This helper class will be used to serialize and deserialize

View File

@ -0,0 +1,13 @@
#ifndef FSFW_HOUSEKEEPING_HOUSEKEEPINGSETPACKET_H_
#define FSFW_HOUSEKEEPING_HOUSEKEEPINGSETPACKET_H_
#include "../serialize/SerialLinkedListAdapter.h"
class HousekeepingSetPacket: public SerialLinkedListAdapter<SerializeIF> {
};
#endif /* FSFW_HOUSEKEEPING_HOUSEKEEPINGSETPACKET_H_ */