From 0d476062299a1c5f305146327be3920480fd940a Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 21 Aug 2020 15:49:06 +0200 Subject: [PATCH] tm/tc packet stored improvements --- tmtcpacket/pus/TcPacketStored.cpp | 10 +++++----- tmtcpacket/pus/TmPacketStored.cpp | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tmtcpacket/pus/TcPacketStored.cpp b/tmtcpacket/pus/TcPacketStored.cpp index 3f10cac0a..64b369eae 100644 --- a/tmtcpacket/pus/TcPacketStored.cpp +++ b/tmtcpacket/pus/TcPacketStored.cpp @@ -20,9 +20,9 @@ TcPacketStored::TcPacketStored(uint8_t service, uint8_t subservice, uint8_t* p_data = nullptr; ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress, (TC_PACKET_MIN_SIZE + size), &p_data); - if (returnValue != this->store->RETURN_OK) { - sif::warning << "TcPacketStored: Could not get free element from store!" - << std::endl; + if (returnValue != HasReturnvaluesIF::RETURN_OK) { + sif::warning << "TcPacketStored::TcPacketStored: Could not get " + "free element from store!" << std::endl; return; } this->setData(p_data); @@ -57,9 +57,9 @@ ReturnValue_t TcPacketStored::deletePacket() { } bool TcPacketStored::checkAndSetStore() { - if (this->store == NULL) { + if (this->store == nullptr) { this->store = objectManager->get(objects::TC_STORE); - if (this->store == NULL) { + if (this->store == nullptr) { sif::error << "TcPacketStored::TcPacketStored: TC Store not found!" << std::endl; return false; diff --git a/tmtcpacket/pus/TmPacketStored.cpp b/tmtcpacket/pus/TmPacketStored.cpp index e42f8cda8..9476dcd6b 100644 --- a/tmtcpacket/pus/TmPacketStored.cpp +++ b/tmtcpacket/pus/TmPacketStored.cpp @@ -21,8 +21,9 @@ TmPacketStored::TmPacketStored(uint16_t apid, uint8_t service, ReturnValue_t returnValue = store->getFreeElement(&storeAddress, (TmPacketBase::TM_PACKET_MIN_SIZE + size + headerSize), &pData); - if (returnValue != store->RETURN_OK) { - sif::debug << "TM Packet Stored: Issue getting free storage" << std::endl; + if (returnValue != HasReturnvaluesIF::RETURN_OK) { + sif::debug << "TmPacketStored::TmPacketStored: " + "Issue getting free storage" << std::endl; checkAndReportLostTm(); return; }