2016-06-15 23:48:41 +02:00
|
|
|
#ifndef ACCEPTSTELECOMMANDSIF_H_
|
|
|
|
#define ACCEPTSTELECOMMANDSIF_H_
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
#include <framework/ipc/MessageQueueSenderIF.h>
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This interface is implemented by classes that are sinks for
|
|
|
|
* Telecommands.
|
|
|
|
* @details Any service receiving telecommands shall implement this interface
|
|
|
|
* and thus make the service id and the receiving message queue public.
|
|
|
|
*/
|
|
|
|
class AcceptsTelecommandsIF {
|
|
|
|
public:
|
2018-07-12 16:29:32 +02:00
|
|
|
static const uint8_t INTERFACE_ID = CLASS_ID::ACCEPTS_TELECOMMANDS_IF;
|
2019-12-03 19:30:37 +01:00
|
|
|
static const ReturnValue_t ACTIVITY_STARTED = MAKE_RETURN_CODE(1); // is this used anywhere or can it be removed?
|
2016-06-15 23:48:41 +02:00
|
|
|
static const ReturnValue_t INVALID_SUBSERVICE = MAKE_RETURN_CODE(2);
|
|
|
|
static const ReturnValue_t ILLEGAL_APPLICATION_DATA = MAKE_RETURN_CODE(3);
|
|
|
|
static const ReturnValue_t SEND_TM_FAILED = MAKE_RETURN_CODE(4);
|
|
|
|
static const ReturnValue_t TIMEOUT = MAKE_RETURN_CODE(5);
|
|
|
|
/**
|
|
|
|
* @brief The virtual destructor as it is mandatory for C++ interfaces.
|
|
|
|
*/
|
|
|
|
virtual ~AcceptsTelecommandsIF() {
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @brief Getter for the service id.
|
|
|
|
* @details Any receiving service (at least any PUS service) shall have a
|
|
|
|
* service id. If the receiver can handle Telecommands, but for
|
|
|
|
* some reason has no service id, it shall return 0.
|
|
|
|
* @return The service id or 0.
|
|
|
|
*/
|
|
|
|
virtual uint16_t getIdentifier() = 0;
|
|
|
|
/**
|
|
|
|
* @brief This method returns the message queue id of the telecommand
|
|
|
|
* receiving message queue.
|
|
|
|
* @return The telecommand reception message queue id.
|
|
|
|
*/
|
|
|
|
virtual MessageQueueId_t getRequestQueue() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* ACCEPTSTELECOMMANDSIF_H_ */
|