fsfw/parameters/ParameterHelper.h

37 lines
1.0 KiB
C
Raw Normal View History

2020-06-07 01:17:24 +02:00
#ifndef FRAMEWORK_PARAMETERS_PARAMETERHELPER_H_
#define FRAMEWORK_PARAMETERS_PARAMETERHELPER_H_
2020-06-07 01:17:24 +02:00
#include <framework/ipc/MessageQueueIF.h>
#include <framework/parameters/ParameterMessage.h>
#include <framework/parameters/ReceivesParameterMessagesIF.h>
/**
* @brief Helper class to handle parameter messages
* @details
* This class simplfiies handling of parameter messages, which are sent
* to a class which implements ReceivesParameterMessagesIF.
*/
class ParameterHelper {
public:
ParameterHelper(ReceivesParameterMessagesIF *owner);
virtual ~ParameterHelper();
ReturnValue_t handleParameterMessage(CommandMessage *message);
ReturnValue_t initialize();
private:
ReceivesParameterMessagesIF *owner;
2020-06-07 01:17:24 +02:00
MessageQueueId_t ownerQueueId = MessageQueueIF::NO_QUEUE;
2020-06-07 01:17:24 +02:00
StorageManagerIF *storage = nullptr;
2020-06-07 01:18:19 +02:00
ReturnValue_t sendParameter(MessageQueueId_t to, uint32_t id,
const ParameterWrapper *description);
2020-06-07 01:18:19 +02:00
void rejectCommand(MessageQueueId_t to, ReturnValue_t reason,
Command_t initialCommand);
};
#endif /* PARAMETERHELPER_H_ */