using size_t

This commit is contained in:
Robin Müller 2020-04-18 13:38:05 +02:00
parent 4d8aca8417
commit e34a438e77

View File

@ -16,7 +16,7 @@ TmTcBridge::TmTcBridge(object_id_t objectId_,
ccsdsPacketDistributor(ccsdsPacketDistributor_)
{
TmTcReceptionQueue = QueueFactory::instance()->
createMessageQueue(TMTC_RECEPTION_QUEUE_DEPTH);
createMessageQueue(TMTC_RECEPTION_QUEUE_DEPTH);
}
TmTcBridge::~TmTcBridge() {}
@ -75,7 +75,6 @@ ReturnValue_t TmTcBridge::readTmQueue() {
TmTcMessage message;
const uint8_t* data = nullptr;
size_t size = 0;
for (ReturnValue_t result = TmTcReceptionQueue->receiveMessage(&message);
result == RETURN_OK; result = TmTcReceptionQueue->receiveMessage(&message))
{
@ -122,8 +121,8 @@ ReturnValue_t TmTcBridge::sendStoredTm() {
uint8_t counter = 0;
ReturnValue_t result = RETURN_OK;
while(!fifo.empty() && counter < MAX_STORED_DATA_SENT_PER_CYCLE) {
info << "UDP Server: Sending stored TM data. There are "
<< (int) fifo.size() << " left to send\r\n" << std::flush;
info << "TMTC Bridge: Sending stored TM data. There are "
<< (int) fifo.size() << " left to send\r\n" << std::flush;
store_address_t storeId;
const uint8_t* data = NULL;
size_t size = 0;
@ -131,7 +130,8 @@ ReturnValue_t TmTcBridge::sendStoredTm() {
result = tmStore->getData(storeId, &data, &size);
sendTm(data,size);
if(result != RETURN_OK) {
error << "UDP Server: Could not send stored downlink data" << std::endl;
error << "TMTC Bridge: Could not send stored downlink data"
<< std::endl;
result = RETURN_FAILED;
}
counter ++;