1
0
forked from fsfw/fsfw

message arriving.

big clean up in tcdistribution folder
This commit is contained in:
2020-07-08 02:20:38 +02:00
parent 399fc0e287
commit 2efcda735f
12 changed files with 253 additions and 174 deletions

View File

@ -1,5 +1,5 @@
#ifndef PUSDISTRIBUTOR_H_
#define PUSDISTRIBUTOR_H_
#ifndef FRAMEWORK_TCDISTRIBUTION_PUSDISTRIBUTOR_H_
#define FRAMEWORK_TCDISTRIBUTION_PUSDISTRIBUTOR_H_
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <framework/tcdistribution/PUSDistributorIF.h>
@ -9,37 +9,42 @@
#include <framework/tmtcservices/VerificationReporter.h>
/**
* This class accepts PUS Telecommands and forwards them to Application services.
* In addition, the class performs a formal packet check and sends acceptance success
* or failure messages.
* \ingroup tc_distribution
* This class accepts PUS Telecommands and forwards them to Application
* services. In addition, the class performs a formal packet check and
* sends acceptance success or failure messages.
* @ingroup tc_distribution
*/
class PUSDistributor: public TcDistributor,
public PUSDistributorIF,
public AcceptsTelecommandsIF {
public:
/**
* The ctor passes \c set_apid to the checker class and calls the TcDistribution ctor with a certain object id.
* The ctor passes @c set_apid to the checker class and calls the
* TcDistribution ctor with a certain object id.
* @param setApid The APID of this receiving Application.
* @param setObjectId Object ID of the distributor itself
* @param setPacketSource Object ID of the source of TC packets. Must implement CCSDSDistributorIF.
* @param setPacketSource Object ID of the source of TC packets.
* Must implement CCSDSDistributorIF.
*/
PUSDistributor(uint16_t setApid, object_id_t setObjectId, object_id_t setPacketSource);
PUSDistributor(uint16_t setApid, object_id_t setObjectId,
object_id_t setPacketSource);
/**
* The destructor is empty.
*/
virtual ~PUSDistributor();
ReturnValue_t registerService(AcceptsTelecommandsIF* service);
MessageQueueId_t getRequestQueue();
uint16_t getIdentifier();
ReturnValue_t initialize();
ReturnValue_t registerService(AcceptsTelecommandsIF* service) override;
MessageQueueId_t getRequestQueue() override;
ReturnValue_t initialize() override;
uint16_t getIdentifier() override;
protected:
/**
* This attribute contains the class, that performs a formal packet check.
*/
TcPacketCheck checker;
/**
* With this class, verification messages are sent to the TC Verification service.
* With this class, verification messages are sent to the
* TC Verification service.
*/
VerificationReporter verifyChannel;
/**
@ -47,21 +52,26 @@ protected:
*/
TcPacketStored currentPacket;
/**
* With this variable, the current check status is stored to generate acceptance messages later.
* With this variable, the current check status is stored to generate
* acceptance messages later.
*/
ReturnValue_t tcStatus;
const object_id_t packetSource;
/**
* This method reads the packet service, checks if such a service is registered and forwards the packet to the destination.
* It also initiates the formal packet check and sending of verification messages.
* @return Iterator to map entry of found service id or iterator to \c map.end().
* This method reads the packet service, checks if such a service is
* registered and forwards the packet to the destination.
* It also initiates the formal packet check and sending of verification
* messages.
* @return Iterator to map entry of found service id
* or iterator to @c map.end().
*/
iterator_t selectDestination();
TcMessageQueueMapIter selectDestination();
/**
* The callback here handles the generation of acceptance success/failure messages.
* The callback here handles the generation of acceptance
* success/failure messages.
*/
ReturnValue_t callbackAfterSending(ReturnValue_t queueStatus);
};
#endif /* PUSDISTRIBUTOR_H_ */
#endif /* FRAMEWORK_TCDISTRIBUTION_PUSDISTRIBUTOR_H_ */