2020-12-14 21:30:39 +01:00
|
|
|
#ifndef FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_
|
|
|
|
#define FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2022-05-24 11:52:29 +02:00
|
|
|
#include "fsfw/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 {
|
2022-02-02 10:29:30 +01:00
|
|
|
public:
|
|
|
|
static const uint8_t INTERFACE_ID = CLASS_ID::ACCEPTS_TELECOMMANDS_IF;
|
|
|
|
static const ReturnValue_t ACTIVITY_STARTED = MAKE_RETURN_CODE(1);
|
|
|
|
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.
|
|
|
|
*/
|
2022-05-24 11:52:29 +02:00
|
|
|
virtual ~AcceptsTelecommandsIF() = default;
|
2022-02-02 10:29:30 +01:00
|
|
|
/**
|
2022-07-29 15:53:39 +02:00
|
|
|
* @brief Getter for a generic identifier ID.
|
|
|
|
* @details Any receiving service (at least any PUS service) shall have an identifier. For
|
|
|
|
* example, this could be the APID for a receiver expecting generic PUS packets, or a PUS
|
|
|
|
* service for a component expecting specific PUS service packets.
|
|
|
|
* @return The identifier.
|
2022-02-02 10:29:30 +01:00
|
|
|
*/
|
2022-07-29 15:53:39 +02:00
|
|
|
virtual uint32_t getIdentifier() = 0;
|
2022-02-02 10:29:30 +01:00
|
|
|
/**
|
|
|
|
* @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;
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
2020-12-14 21:30:39 +01:00
|
|
|
#endif /* FRAMEWORK_TMTCSERVICES_ACCEPTSTELECOMMANDSIF_H_ */
|