2020-10-01 13:23:06 +02:00
|
|
|
#ifndef FSFW_TCDISTRIBUTION_CCSDSDISTRIBUTORIF_H_
|
|
|
|
#define FSFW_TCDISTRIBUTION_CCSDSDISTRIBUTORIF_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "../tmtcservices/AcceptsTelecommandsIF.h"
|
|
|
|
#include "../ipc/MessageQueueSenderIF.h"
|
2016-06-15 23:48:41 +02:00
|
|
|
/**
|
|
|
|
* This is the Interface to a CCSDS Distributor.
|
2020-10-01 13:23:06 +02:00
|
|
|
* On a CCSDS Distributor, Applications (in terms of CCSDS) may register
|
|
|
|
* themselves, either by passing a pointer to themselves (and implementing the
|
|
|
|
* CCSDSApplicationIF), or by explicitly passing an APID and a MessageQueueId
|
|
|
|
* to route the TC's to.
|
|
|
|
* @ingroup tc_distribution
|
2016-06-15 23:48:41 +02:00
|
|
|
*/
|
|
|
|
class CCSDSDistributorIF {
|
|
|
|
public:
|
2021-06-24 09:47:28 +02:00
|
|
|
/**
|
|
|
|
* With this call, a class implementing the CCSDSApplicationIF can register
|
|
|
|
* at the distributor.
|
|
|
|
* @param application A pointer to the Application to register.
|
|
|
|
* @return - @c RETURN_OK on success,
|
|
|
|
* - @c RETURN_FAILED on failure.
|
|
|
|
*/
|
|
|
|
virtual ReturnValue_t registerApplication(
|
|
|
|
AcceptsTelecommandsIF* application) = 0;
|
|
|
|
/**
|
|
|
|
* With this call, other Applications can register to the CCSDS distributor.
|
|
|
|
* This is done by passing an APID and a MessageQueueId to the method.
|
|
|
|
* @param apid The APID to register.
|
|
|
|
* @param id The MessageQueueId of the message queue to send the
|
|
|
|
* TC Packets to.
|
|
|
|
* @return - @c RETURN_OK on success,
|
|
|
|
* - @c RETURN_FAILED on failure.
|
|
|
|
*/
|
|
|
|
virtual ReturnValue_t registerApplication( uint16_t apid,
|
|
|
|
MessageQueueId_t id) = 0;
|
|
|
|
/**
|
|
|
|
* The empty virtual destructor.
|
|
|
|
*/
|
|
|
|
virtual ~CCSDSDistributorIF() {}
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-10-01 13:23:06 +02:00
|
|
|
#endif /* FSFW_TCDISTRIBUTION_CCSDSDISTRIBUTORIF_H_ */
|