more testing #807
@ -34,7 +34,6 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w
|
|||||||
}
|
}
|
||||||
// The user must call advance until completion before starting a new packet transfer.
|
// The user must call advance until completion before starting a new packet transfer.
|
||||||
if (writeActiveStatus) {
|
if (writeActiveStatus) {
|
||||||
sif::debug << "is busy with writing" << std::endl;
|
|
||||||
return IS_BUSY;
|
return IS_BUSY;
|
||||||
}
|
}
|
||||||
if (size > packetBuf.capacity()) {
|
if (size > packetBuf.capacity()) {
|
||||||
@ -48,7 +47,6 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size, size_t& w
|
|||||||
if (pollReadyForPacket()) {
|
if (pollReadyForPacket()) {
|
||||||
startPacketTransfer(ByteWidthCfg::ONE);
|
startPacketTransfer(ByteWidthCfg::ONE);
|
||||||
} else {
|
} else {
|
||||||
sif::debug << "is busy can not even start" << std::endl;
|
|
||||||
return DirectTmSinkIF::IS_BUSY;
|
return DirectTmSinkIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
return advanceWrite(writtenSize);
|
return advanceWrite(writtenSize);
|
||||||
@ -78,7 +76,6 @@ ReturnValue_t PapbVcInterface::advanceWrite(size_t& writtenSize) {
|
|||||||
if (not pollReadyForPacket()) {
|
if (not pollReadyForPacket()) {
|
||||||
return PARTIALLY_WRITTEN;
|
return PARTIALLY_WRITTEN;
|
||||||
}
|
}
|
||||||
sif::debug << "aborting unexpectedly" << std::endl;
|
|
||||||
abortPacketTransfer();
|
abortPacketTransfer();
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
@ -180,9 +180,9 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd
|
|||||||
sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x"
|
sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x"
|
||||||
<< std::setw(4) << std::hex << result << std::dec << std::endl;
|
<< std::setw(4) << std::hex << result << std::dec << std::endl;
|
||||||
}
|
}
|
||||||
} else if(result != returnvalue::OK) {
|
} else if (result != returnvalue::OK) {
|
||||||
sif::error << "LiveTmTask: Channel write failed with code 0x" << std::hex << std::setw(4) <<
|
sif::error << "LiveTmTask: Channel write failed with code 0x" << std::hex << std::setw(4)
|
||||||
result << std::dec << std::endl;
|
<< result << std::dec << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Try delete in any case, ignore failures (which should not happen), it is more important to
|
// Try delete in any case, ignore failures (which should not happen), it is more important to
|
||||||
|
@ -67,15 +67,12 @@ ReturnValue_t VirtualChannel::handleWriteCompletionSynchronously(size_t& written
|
|||||||
}
|
}
|
||||||
ReturnValue_t result = advanceWrite(writtenSize);
|
ReturnValue_t result = advanceWrite(writtenSize);
|
||||||
if (result == returnvalue::OK) {
|
if (result == returnvalue::OK) {
|
||||||
sif::debug << "transfer complete" << std::endl;
|
|
||||||
// Transfer complete
|
// Transfer complete
|
||||||
return result;
|
return result;
|
||||||
} else if (result != PARTIALLY_WRITTEN) {
|
} else if (result != PARTIALLY_WRITTEN) {
|
||||||
sif::debug << "transfer completion error" << std::endl;
|
|
||||||
// Some error where we can not or should not continue the transfer.
|
// Some error where we can not or should not continue the transfer.
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sif::debug << "wtf" << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user