WIP: somethings wrong.. #19
@ -20,9 +20,9 @@ TcPacketStored::TcPacketStored(uint8_t service, uint8_t subservice,
|
|||||||
uint8_t* p_data = nullptr;
|
uint8_t* p_data = nullptr;
|
||||||
ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress,
|
ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress,
|
||||||
(TC_PACKET_MIN_SIZE + size), &p_data);
|
(TC_PACKET_MIN_SIZE + size), &p_data);
|
||||||
if (returnValue != this->store->RETURN_OK) {
|
if (returnValue != HasReturnvaluesIF::RETURN_OK) {
|
||||||
sif::warning << "TcPacketStored: Could not get free element from store!"
|
sif::warning << "TcPacketStored::TcPacketStored: Could not get "
|
||||||
<< std::endl;
|
"free element from store!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->setData(p_data);
|
this->setData(p_data);
|
||||||
@ -57,9 +57,9 @@ ReturnValue_t TcPacketStored::deletePacket() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool TcPacketStored::checkAndSetStore() {
|
bool TcPacketStored::checkAndSetStore() {
|
||||||
if (this->store == NULL) {
|
if (this->store == nullptr) {
|
||||||
this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
if (this->store == NULL) {
|
if (this->store == nullptr) {
|
||||||
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
|
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
@ -21,8 +21,9 @@ TmPacketStored::TmPacketStored(uint16_t apid, uint8_t service,
|
|||||||
ReturnValue_t returnValue = store->getFreeElement(&storeAddress,
|
ReturnValue_t returnValue = store->getFreeElement(&storeAddress,
|
||||||
(TmPacketBase::TM_PACKET_MIN_SIZE + size + headerSize), &pData);
|
(TmPacketBase::TM_PACKET_MIN_SIZE + size + headerSize), &pData);
|
||||||
|
|
||||||
if (returnValue != store->RETURN_OK) {
|
if (returnValue != HasReturnvaluesIF::RETURN_OK) {
|
||||||
sif::debug << "TM Packet Stored: Issue getting free storage" << std::endl;
|
sif::debug << "TmPacketStored::TmPacketStored: "
|
||||||
|
"Issue getting free storage" << std::endl;
|
||||||
checkAndReportLostTm();
|
checkAndReportLostTm();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user