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

@ -15,7 +15,6 @@ TcDistributor::~TcDistributor() {
ReturnValue_t TcDistributor::performOperation(uint8_t opCode) {
ReturnValue_t status = RETURN_OK;
// debug << "TcDistributor: performing Operation." << std::endl;
for (status = tcQueue->receiveMessage(&currentMessage); status == RETURN_OK;
status = tcQueue->receiveMessage(&currentMessage)) {
status = handlePacket();
@ -29,7 +28,7 @@ ReturnValue_t TcDistributor::performOperation(uint8_t opCode) {
ReturnValue_t TcDistributor::handlePacket() {
iterator_t queueMapIt = this->selectDestination();
TcMessageQueueMapIter queueMapIt = this->selectDestination();
ReturnValue_t returnValue = RETURN_FAILED;
if (queueMapIt != this->queueMap.end()) {
returnValue = this->tcQueue->sendMessage(queueMapIt->second,
@ -41,7 +40,7 @@ ReturnValue_t TcDistributor::handlePacket() {
void TcDistributor::print() {
sif::debug << "Distributor content is: " << std::endl << "ID\t| message queue id"
<< std::endl;
for (iterator_t it = this->queueMap.begin(); it != this->queueMap.end();
for (TcMessageQueueMapIter it = this->queueMap.begin(); it != this->queueMap.end();
it++) {
sif::debug << it->first << "\t| 0x" << std::hex << it->second << std::dec
<< std::endl;