2020-08-28 18:46:47 +02:00
|
|
|
#ifndef FSFW_PARAMETERS_PARAMETERHELPER_H_
|
|
|
|
#define FSFW_PARAMETERS_PARAMETERHELPER_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "ParameterMessage.h"
|
|
|
|
#include "ReceivesParameterMessagesIF.h"
|
2020-08-28 18:46:47 +02:00
|
|
|
#include "../ipc/MessageQueueIF.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Helper class to handle parameter messages.
|
|
|
|
* @details
|
|
|
|
* This class simplfies handling of parameter messages, which are sent
|
|
|
|
* to a class which implements ReceivesParameterMessagesIF.
|
|
|
|
*/
|
2016-06-15 23:48:41 +02:00
|
|
|
class ParameterHelper {
|
|
|
|
public:
|
|
|
|
ParameterHelper(ReceivesParameterMessagesIF *owner);
|
|
|
|
virtual ~ParameterHelper();
|
|
|
|
|
|
|
|
ReturnValue_t handleParameterMessage(CommandMessage *message);
|
|
|
|
|
|
|
|
ReturnValue_t initialize();
|
|
|
|
private:
|
|
|
|
ReceivesParameterMessagesIF *owner;
|
|
|
|
|
2020-08-28 18:46:47 +02:00
|
|
|
MessageQueueId_t ownerQueueId = MessageQueueIF::NO_QUEUE;
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-28 18:46:47 +02:00
|
|
|
StorageManagerIF *storage = nullptr;
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-28 18:46:47 +02:00
|
|
|
ReturnValue_t sendParameter(MessageQueueId_t to, uint32_t id,
|
|
|
|
const ParameterWrapper *description);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-28 18:46:47 +02:00
|
|
|
void rejectCommand(MessageQueueId_t to, ReturnValue_t reason,
|
|
|
|
Command_t initialCommand);
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
2020-08-28 18:46:47 +02:00
|
|
|
#endif /* FSFW_PARAMETERS_PARAMETERHELPER_H_ */
|