TMTC Routing Refactoring

1. Make TcDistributor less powerful / more flexible and rename it to TcDistributorBase
2. Require AcceptsTelecommandsIF to have an abstract function returning the name
3. Allows the CCSDS distributor to remove the CCSDS header before rerouting. This is useful
for protocols like CFDP which are CCSDS agnostic.

WIP: Still need to implement the removal of the CCSDS header
This commit is contained in:
2022-08-01 11:00:36 +02:00
parent f4beef8c9f
commit 458fe460eb
33 changed files with 368 additions and 292 deletions

View File

@ -82,9 +82,9 @@ void PusServiceBase::handleRequestQueue() {
}
}
uint32_t PusServiceBase::getIdentifier() { return psbParams.serviceId; }
uint32_t PusServiceBase::getIdentifier() const { return psbParams.serviceId; }
MessageQueueId_t PusServiceBase::getRequestQueue() {
MessageQueueId_t PusServiceBase::getRequestQueue() const {
if (psbParams.reqQueue == nullptr) {
return MessageQueueIF::NO_QUEUE;
}
@ -194,7 +194,7 @@ void PusServiceBase::setVerificationReporter(VerificationReporterIF& reporter) {
}
ReturnValue_t PusServiceBase::registerService(PusDistributorIF& distributor) {
return distributor.registerService(this);
return distributor.registerService(*this);
}
void PusServiceBase::setTmReceiver(AcceptsTelemetryIF& tmReceiver_) {
@ -202,3 +202,5 @@ void PusServiceBase::setTmReceiver(AcceptsTelemetryIF& tmReceiver_) {
}
void PusServiceBase::setRequestQueue(MessageQueueIF& reqQueue) { psbParams.reqQueue = &reqQueue; }
const char* PusServiceBase::getName() const { return psbParams.name; }