|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
|
|
|
|
#include <fsfw/tasks/TaskFactory.h>
|
|
|
|
|
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
#include <fstream>
|
|
|
|
@ -40,16 +42,15 @@ ReturnValue_t PlocMpsocSpecialComHelper::performOperation(uint8_t operationCode)
|
|
|
|
|
#endif
|
|
|
|
|
switch (internalState) {
|
|
|
|
|
case InternalState::IDLE: {
|
|
|
|
|
sif::debug << "ploc mpsoc helper idle" << std::endl;
|
|
|
|
|
semaphore.acquire();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case InternalState::FLASH_WRITE: {
|
|
|
|
|
result = performFlashWrite();
|
|
|
|
|
if (result == returnvalue::OK) {
|
|
|
|
|
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL);
|
|
|
|
|
triggerEvent(MPSOC_FLASH_WRITE_SUCCESSFUL, sequenceCount->get());
|
|
|
|
|
} else {
|
|
|
|
|
triggerEvent(MPSOC_FLASH_WRITE_FAILED);
|
|
|
|
|
triggerEvent(MPSOC_FLASH_WRITE_FAILED, sequenceCount->get());
|
|
|
|
|
}
|
|
|
|
|
internalState = InternalState::IDLE;
|
|
|
|
|
break;
|
|
|
|
@ -57,9 +58,9 @@ ReturnValue_t PlocMpsocSpecialComHelper::performOperation(uint8_t operationCode)
|
|
|
|
|
case InternalState::FLASH_READ: {
|
|
|
|
|
result = performFlashRead();
|
|
|
|
|
if (result == returnvalue::OK) {
|
|
|
|
|
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL);
|
|
|
|
|
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL, sequenceCount->get());
|
|
|
|
|
} else {
|
|
|
|
|
triggerEvent(MPSOC_FLASH_READ_FAILED);
|
|
|
|
|
triggerEvent(MPSOC_FLASH_READ_FAILED, sequenceCount->get());
|
|
|
|
|
}
|
|
|
|
|
internalState = InternalState::IDLE;
|
|
|
|
|
break;
|
|
|
|
@ -155,13 +156,18 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashWrite() {
|
|
|
|
|
file.read(reinterpret_cast<char*>(fileBuf.data()), dataLength);
|
|
|
|
|
bytesRead += dataLength;
|
|
|
|
|
remainingSize -= dataLength;
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
mpsoc::TcFlashWrite tc(spParams, *sequenceCount);
|
|
|
|
|
result = tc.buildPacket(fileBuf.data(), dataLength);
|
|
|
|
|
result = tc.setPayload(fileBuf.data(), dataLength);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
flashfclose();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
result = tc.finishPacket();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
flashfclose();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
result = handlePacketTransmissionNoReply(tc);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
flashfclose();
|
|
|
|
@ -205,7 +211,6 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|
|
|
|
flashfclose();
|
|
|
|
|
return FILE_READ_ERROR;
|
|
|
|
|
}
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
mpsoc::TcFlashRead flashReadRequest(spParams, *sequenceCount);
|
|
|
|
|
result = flashReadRequest.setPayload(nextReadSize);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
@ -219,15 +224,11 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|
|
|
|
flashfclose();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
result = handlePacketTransmissionFlashRead(flashReadRequest);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
|
|
|
|
flashfclose();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
result = handleFlashReadReply(ofile, nextReadSize);
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
result = handlePacketTransmissionFlashRead(flashReadRequest, ofile, nextReadSize);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
|
|
|
|
sif::debug << "flash close" << std::endl;
|
|
|
|
|
flashfclose();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -239,7 +240,6 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::flashfopen(mpsoc::FileAccessMode mode) {
|
|
|
|
|
spParams.buf = commandBuffer;
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
mpsoc::FlashFopen flashFopen(spParams, *sequenceCount);
|
|
|
|
|
ReturnValue_t result = flashFopen.setPayload(flashReadAndWrite.mpsocFile, mode);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
@ -249,6 +249,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::flashfopen(mpsoc::FileAccessMode mode)
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
result = handlePacketTransmissionNoReply(flashFopen);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
@ -258,12 +259,22 @@ ReturnValue_t PlocMpsocSpecialComHelper::flashfopen(mpsoc::FileAccessMode mode)
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::flashfclose() {
|
|
|
|
|
spParams.buf = commandBuffer;
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
|
|
|
|
return handlePacketTransmissionNoReply(flashFclose);
|
|
|
|
|
ReturnValue_t result = flashFclose.finishPacket();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
(*sequenceCount)++;
|
|
|
|
|
result = handlePacketTransmissionNoReply(flashFclose);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionFlashRead(mpsoc::TcFlashRead& tc) {
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionFlashRead(mpsoc::TcFlashRead& tc,
|
|
|
|
|
std::ofstream& ofile,
|
|
|
|
|
size_t expectedReadLen) {
|
|
|
|
|
ReturnValue_t result = sendCommand(tc);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
@ -272,12 +283,29 @@ ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionFlashRead(mpsoc
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
result = handleTmReception(ccsds::HEADER_LEN + mpsoc::FLASH_READ_MIN_OVERHEAD + tc.readSize +
|
|
|
|
|
mpsoc::CRC_SIZE);
|
|
|
|
|
// ccsds::HEADER_LEN + mpsoc::FLASH_READ_MIN_OVERHEAD + tc.readSize + mpsoc::CRC_SIZE
|
|
|
|
|
result = handleTmReception();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return handleExe();
|
|
|
|
|
|
|
|
|
|
// We have the nominal case where the flash read report appears first, or the case where we
|
|
|
|
|
// get an EXE failure immediately.
|
|
|
|
|
if (spReader.getApid() == mpsoc::apid::TM_FLASH_READ_REPORT) {
|
|
|
|
|
result = handleFlashReadReply(ofile, expectedReadLen);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return handleExe();
|
|
|
|
|
} else if (spReader.getApid() == mpsoc::apid::EXE_FAILURE) {
|
|
|
|
|
handleExeFailure();
|
|
|
|
|
} else {
|
|
|
|
|
triggerEvent(MPSOC_EXE_INVALID_APID, spReader.getApid(), static_cast<uint32_t>(internalState));
|
|
|
|
|
sif::warning << "PLOC MPSoC: Expected execution report "
|
|
|
|
|
<< "but received space packet with apid " << std::hex << spReader.getApid()
|
|
|
|
|
<< std::endl;
|
|
|
|
|
}
|
|
|
|
|
return returnvalue::FAILED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionNoReply(ploc::SpTcBase& tc) {
|
|
|
|
@ -294,7 +322,6 @@ ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionNoReply(ploc::S
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::sendCommand(ploc::SpTcBase& tc) {
|
|
|
|
|
ReturnValue_t result = returnvalue::OK;
|
|
|
|
|
arrayprinter::print(tc.getFullPacket(), tc.getFullPacketLen());
|
|
|
|
|
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
|
|
|
@ -306,12 +333,12 @@ ReturnValue_t PlocMpsocSpecialComHelper::sendCommand(ploc::SpTcBase& tc) {
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handleAck() {
|
|
|
|
|
ReturnValue_t result = returnvalue::OK;
|
|
|
|
|
result = handleTmReception(mpsoc::SIZE_ACK_REPORT);
|
|
|
|
|
result = handleTmReception();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
|
|
|
|
result = checkReceivedTm(tmPacket);
|
|
|
|
|
result = checkReceivedTm();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -327,7 +354,7 @@ void PlocMpsocSpecialComHelper::handleAckApidFailure(const ploc::SpTmReader& rea
|
|
|
|
|
uint16_t apid = reader.getApid();
|
|
|
|
|
if (apid == mpsoc::apid::ACK_FAILURE) {
|
|
|
|
|
uint16_t status = mpsoc::getStatusFromRawData(reader.getFullData());
|
|
|
|
|
sif::warning << "MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl;
|
|
|
|
|
sif::warning << "PLOC MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState), status);
|
|
|
|
|
} else {
|
|
|
|
|
triggerEvent(MPSOC_ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
|
|
|
@ -339,74 +366,93 @@ void PlocMpsocSpecialComHelper::handleAckApidFailure(const ploc::SpTmReader& rea
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handleExe() {
|
|
|
|
|
ReturnValue_t result = returnvalue::OK;
|
|
|
|
|
|
|
|
|
|
result = handleTmReception(mpsoc::SIZE_EXE_REPORT);
|
|
|
|
|
result = handleTmReception();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
ploc::SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
|
|
|
|
result = checkReceivedTm(tmPacket);
|
|
|
|
|
result = checkReceivedTm();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
uint16_t apid = tmPacket.getApid();
|
|
|
|
|
if (apid != mpsoc::apid::EXE_SUCCESS) {
|
|
|
|
|
handleExeApidFailure(tmPacket);
|
|
|
|
|
uint16_t apid = spReader.getApid();
|
|
|
|
|
if (apid == mpsoc::apid::EXE_FAILURE) {
|
|
|
|
|
handleExeFailure();
|
|
|
|
|
return returnvalue::FAILED;
|
|
|
|
|
} else if (apid != mpsoc::apid::EXE_SUCCESS) {
|
|
|
|
|
triggerEvent(MPSOC_EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
|
|
|
|
sif::warning << "PLOC MPSoC: Expected execution report "
|
|
|
|
|
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
|
|
|
|
}
|
|
|
|
|
return returnvalue::OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PlocMpsocSpecialComHelper::handleExeApidFailure(const ploc::SpTmReader& reader) {
|
|
|
|
|
uint16_t apid = reader.getApid();
|
|
|
|
|
if (apid == mpsoc::apid::EXE_FAILURE) {
|
|
|
|
|
uint16_t status = mpsoc::getStatusFromRawData(reader.getFullData());
|
|
|
|
|
sif::warning << "MPSoC EXE Failure: " << mpsoc::getStatusString(status) << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
|
|
|
|
|
} else {
|
|
|
|
|
triggerEvent(MPSOC_EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
|
|
|
|
|
sif::warning << "PlocMPSoCHelper::handleExeApidFailure: Expected execution report "
|
|
|
|
|
<< "but received space packet with apid " << std::hex << apid << std::endl;
|
|
|
|
|
}
|
|
|
|
|
void PlocMpsocSpecialComHelper::handleExeFailure() {
|
|
|
|
|
uint16_t status = mpsoc::getStatusFromRawData(spReader.getFullData());
|
|
|
|
|
sif::warning << "PLOC MPSoC EXE Failure: " << mpsoc::getStatusString(status) << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handleTmReception(size_t remainingBytes) {
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handleTmReception() {
|
|
|
|
|
ReturnValue_t result = returnvalue::OK;
|
|
|
|
|
tmCountdown.resetTimer();
|
|
|
|
|
size_t readBytes = 0;
|
|
|
|
|
size_t currentBytes = 0;
|
|
|
|
|
for (int retries = 0; retries < RETRIES; retries++) {
|
|
|
|
|
result = receive(tmBuf.data() + readBytes, ¤tBytes, remainingBytes);
|
|
|
|
|
uint32_t usleepDelay = 5;
|
|
|
|
|
size_t fullPacketLen = 0;
|
|
|
|
|
while (true) {
|
|
|
|
|
if (tmCountdown.hasTimedOut()) {
|
|
|
|
|
triggerEvent(MPSOC_READ_TIMEOUT, tmCountdown.getTimeoutMs());
|
|
|
|
|
return returnvalue::FAILED;
|
|
|
|
|
}
|
|
|
|
|
result = receive(tmBuf.data() + readBytes, 6, ¤tBytes);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
spReader.setReadOnlyData(tmBuf.data(), tmBuf.size());
|
|
|
|
|
fullPacketLen = spReader.getFullPacketLen();
|
|
|
|
|
readBytes += currentBytes;
|
|
|
|
|
remainingBytes = remainingBytes - currentBytes;
|
|
|
|
|
if (remainingBytes == 0) {
|
|
|
|
|
if (readBytes == 6) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
usleep(usleepDelay);
|
|
|
|
|
if (usleepDelay < 200000) {
|
|
|
|
|
usleepDelay *= 4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (remainingBytes != 0) {
|
|
|
|
|
sif::warning << "PlocMPSoCHelper::handleTmReception: Failed to receive reply" << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
|
|
|
|
|
return returnvalue::FAILED;
|
|
|
|
|
sif::debug << "recvd first 6 bytes" << std::endl;
|
|
|
|
|
while (true) {
|
|
|
|
|
if (tmCountdown.hasTimedOut()) {
|
|
|
|
|
triggerEvent(MPSOC_READ_TIMEOUT, tmCountdown.getTimeoutMs());
|
|
|
|
|
return returnvalue::FAILED;
|
|
|
|
|
}
|
|
|
|
|
result = receive(tmBuf.data() + readBytes, fullPacketLen - readBytes, ¤tBytes);
|
|
|
|
|
readBytes += currentBytes;
|
|
|
|
|
if (fullPacketLen == readBytes) {
|
|
|
|
|
sif::debug << "recvd full " << fullPacketLen << std::endl;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
usleep(usleepDelay);
|
|
|
|
|
if (usleepDelay < 200000) {
|
|
|
|
|
usleepDelay *= 4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::handleFlashReadReply(std::ofstream& ofile,
|
|
|
|
|
size_t expectedReadLen) {
|
|
|
|
|
SpTmReader tmPacket(tmBuf.data(), tmBuf.size());
|
|
|
|
|
ReturnValue_t result = checkReceivedTm(tmPacket);
|
|
|
|
|
ReturnValue_t result = checkReceivedTm();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
uint16_t apid = tmPacket.getApid();
|
|
|
|
|
uint16_t apid = spReader.getApid();
|
|
|
|
|
if (apid != mpsoc::apid::TM_FLASH_READ_REPORT) {
|
|
|
|
|
triggerEvent(MPSOC_FLASH_READ_PACKET_ERROR, FlashReadErrorType::FLASH_READ_APID_ERROR);
|
|
|
|
|
sif::warning << "PLOC MPSoC Flash Read: Unexpected APID" << std::endl;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
const uint8_t* packetData = tmPacket.getPacketData();
|
|
|
|
|
size_t deserDummy = tmPacket.getPacketDataLen() - mpsoc::CRC_SIZE;
|
|
|
|
|
const uint8_t* packetData = spReader.getPacketData();
|
|
|
|
|
size_t deserDummy = spReader.getPacketDataLen() - mpsoc::CRC_SIZE;
|
|
|
|
|
uint32_t receivedReadLen = 0;
|
|
|
|
|
std::string receivedShortName = std::string(reinterpret_cast<const char*>(packetData), 12);
|
|
|
|
|
if (receivedShortName != flashReadAndWrite.mpsocFile.substr(0, 12)) {
|
|
|
|
@ -462,21 +508,20 @@ ReturnValue_t PlocMpsocSpecialComHelper::startFlashReadOrWriteBase(std::string o
|
|
|
|
|
return returnvalue::OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::checkReceivedTm(SpTmReader& reader) {
|
|
|
|
|
ReturnValue_t result = reader.checkSize();
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::checkReceivedTm() {
|
|
|
|
|
ReturnValue_t result = spReader.checkSize();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "PlocMPSoCHelper::handleTmReception: Size check on received TM failed"
|
|
|
|
|
<< std::endl;
|
|
|
|
|
sif::error << "PLOC MPSoC: Size check on received TM failed" << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_TM_SIZE_ERROR);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
reader.checkCrc();
|
|
|
|
|
spReader.checkCrc();
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::warning << "PlocMPSoCHelper::handleTmReception: CRC check failed" << std::endl;
|
|
|
|
|
sif::warning << "PLOC MPSoC: CRC check failed" << std::endl;
|
|
|
|
|
triggerEvent(MPSOC_TM_CRC_MISSMATCH, *sequenceCount);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
uint16_t recvSeqCnt = reader.getSequenceCount();
|
|
|
|
|
uint16_t recvSeqCnt = spReader.getSequenceCount();
|
|
|
|
|
if (recvSeqCnt != *sequenceCount) {
|
|
|
|
|
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
|
|
|
|
|
*sequenceCount = recvSeqCnt;
|
|
|
|
@ -486,8 +531,8 @@ ReturnValue_t PlocMpsocSpecialComHelper::checkReceivedTm(SpTmReader& reader) {
|
|
|
|
|
return returnvalue::OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::receive(uint8_t* data, size_t* readBytes,
|
|
|
|
|
size_t requestBytes) {
|
|
|
|
|
ReturnValue_t PlocMpsocSpecialComHelper::receive(uint8_t* data, size_t requestBytes,
|
|
|
|
|
size_t* readBytes) {
|
|
|
|
|
ReturnValue_t result = returnvalue::OK;
|
|
|
|
|
uint8_t* buffer = nullptr;
|
|
|
|
|
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
|
|
|
|
How do we ever get to PowerState::OFF, if we return here? Is that not needed for this configuration?
This is done by the supervisor, so when the action reply arrive, the power state will go to OFF. Some sort of timeout is missing though..