receiveTc (almost) empty now

This commit is contained in:
Robin Müller 2020-04-21 21:48:47 +02:00
parent fdbc5d5c57
commit 7a79fab52a
2 changed files with 6 additions and 13 deletions

View File

@ -68,18 +68,6 @@ ReturnValue_t TmTcBridge::handleTc() {
uint8_t * recvBuffer = nullptr;
size_t recvLen = 0;
ReturnValue_t result = receiveTc(&recvBuffer, &recvLen);
if(result == RETURN_OK and recvLen > 0 and recvBuffer != nullptr) {
store_address_t storeId = 0;
ReturnValue_t result = tcStore->addData(&storeId,
recvBuffer, (uint32_t)recvLen);
if(result != RETURN_OK) {
return result;
}
TmTcMessage message(storeId);
if (TmTcReceptionQueue->sendToDefault(&message) != RETURN_OK) {
tcStore->deleteData(storeId);
}
}
return result;
}

View File

@ -65,7 +65,12 @@ protected:
bool tmStored = false;
/**
* Handle TC reception. Default implementation provided
* @brief Handle TC reception
* @details
* Default implementation provided, but is empty.
* Child handler should override this in most cases orsend TC to the
* TC distributor directly with the address of the reception queue by
* calling getReportRecptionQueue()
* @return
*/
virtual ReturnValue_t handleTc();