bugfix for virt channel: clear invalid state #827

Merged
muellerr merged 7 commits from virt-channel-bugfix into main 2023-11-29 15:13:08 +01:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 352043cb51 - Show all commits

View File

@ -30,6 +30,7 @@ ReturnValue_t PapbVcInterface::initialize() {
ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& writtenSize) {
// There are no packets smaller than 4, this is considered a configuration error.
if (size < 4) {
sif::warning << "PapbVcInterface::write: Passed packet smaller than 4 bytes" << std::endl;
return returnvalue::FAILED;
}
// The user must call advance until completion before starting a new packet transfer.

View File

@ -54,8 +54,13 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) {
}
}
} else if (result != MessageQueueIF::EMPTY) {
sif::warning << "LiveTmTask: TM queue failure, returncode 0x" << std::hex << std::setw(4)
<< result << std::dec << std::endl;
const char* contextStr = "Regular TM queue";
if (isCfdp) {
contextStr = "CFDP TM queue";
}
sif::warning << "LiveTmTask: " << contextStr << " handling failure, returncode 0x"
<< std::setfill('0') << std::hex << std::setw(4) << result << std::dec
<< std::endl;
}
}