1
0
forked from fsfw/fsfw

tc distribution equalization

This commit is contained in:
2020-10-01 13:21:23 +02:00
parent 32ebca48b8
commit 315777d265
10 changed files with 170 additions and 135 deletions

View File

@ -1,12 +1,13 @@
#include "TcDistributor.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../tcdistribution/TcDistributor.h"
#include "../tmtcservices/TmTcMessage.h"
#include "../ipc/QueueFactory.h"
TcDistributor::TcDistributor(object_id_t set_object_id) :
SystemObject(set_object_id), tcQueue(NULL) {
tcQueue = QueueFactory::instance()->createMessageQueue(DISTRIBUTER_MAX_PACKETS);
TcDistributor::TcDistributor(object_id_t objectId) :
SystemObject(objectId) {
tcQueue = QueueFactory::instance()->
createMessageQueue(DISTRIBUTER_MAX_PACKETS);
}
TcDistributor::~TcDistributor() {
@ -38,14 +39,14 @@ ReturnValue_t TcDistributor::handlePacket() {
}
void TcDistributor::print() {
sif::debug << "Distributor content is: " << std::endl << "ID\t| message queue id"
<< std::endl;
for (TcMqMapIter it = this->queueMap.begin(); it != this->queueMap.end();
it++) {
sif::debug << it->first << "\t| 0x" << std::hex << it->second << std::dec
<< std::endl;
sif::debug << "Distributor content is: " << std::endl
<< "ID\t| Message Queue ID" << std::endl;
sif::debug << std::setfill('0') << std::setw(8) << std::hex;
for (const auto& queueMapIter: queueMap) {
sif::debug << queueMapIter.first << "\t| 0x" << queueMapIter.second
<< std::endl;
}
sif::debug << std::dec;
sif::debug << std::setfill(' ') << std::dec;
}