some minor improvements
This commit is contained in:
parent
83c9d4fc1c
commit
0f9930524b
@ -122,6 +122,7 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
|
|||||||
result == HasReturnvaluesIF::RETURN_OK;
|
result == HasReturnvaluesIF::RETURN_OK;
|
||||||
result = tmTcReceptionQueue->receiveMessage(&message))
|
result = tmTcReceptionQueue->receiveMessage(&message))
|
||||||
{
|
{
|
||||||
|
//sif::info << (int) packetSentCounter << std::endl;
|
||||||
if(communicationLinkUp == false or
|
if(communicationLinkUp == false or
|
||||||
packetSentCounter >= sentPacketsPerCycle) {
|
packetSentCounter >= sentPacketsPerCycle) {
|
||||||
storeDownlinkData(&message);
|
storeDownlinkData(&message);
|
||||||
@ -138,8 +139,10 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
|
|||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
status = result;
|
status = result;
|
||||||
}
|
}
|
||||||
tmStore->deleteData(message.getStorageId());
|
else {
|
||||||
packetSentCounter++;
|
tmStore->deleteData(message.getStorageId());
|
||||||
|
packetSentCounter++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -152,7 +155,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
|
|||||||
<< "of stored packet IDs reached! " << std::endl;
|
<< "of stored packet IDs reached! " << std::endl;
|
||||||
if(overwriteOld) {
|
if(overwriteOld) {
|
||||||
tmFifo->retrieve(&storeId);
|
tmFifo->retrieve(&storeId);
|
||||||
tmStore->deleteData(storeId);
|
tmStore->deleteData(storeId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
@ -168,8 +171,9 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
|
|||||||
ReturnValue_t TmTcBridge::handleStoredTm() {
|
ReturnValue_t TmTcBridge::handleStoredTm() {
|
||||||
ReturnValue_t status = RETURN_OK;
|
ReturnValue_t status = RETURN_OK;
|
||||||
while(not tmFifo->empty() and packetSentCounter < sentPacketsPerCycle) {
|
while(not tmFifo->empty() and packetSentCounter < sentPacketsPerCycle) {
|
||||||
//info << "TMTC Bridge: Sending stored TM data. There are "
|
//sif::info << "TMTC Bridge: Sending stored TM data. There are "
|
||||||
// << (int) fifo.size() << " left to send\r\n" << std::flush;
|
// << (int) tmFifo->size() << " left to send\r\n" << std::flush;
|
||||||
|
|
||||||
store_address_t storeId;
|
store_address_t storeId;
|
||||||
const uint8_t* data = nullptr;
|
const uint8_t* data = nullptr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user