|
|
|
@ -167,6 +167,10 @@ ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t device
|
|
|
|
|
result = prepareTcModeReplay();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case (mpsoc::OBSW_RESET_SEQ_COUNT): {
|
|
|
|
|
sequenceCount = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
sif::debug << "PlocMPSoCHandler::buildCommandFromCommand: Command not implemented"
|
|
|
|
|
<< std::endl;
|
|
|
|
@ -194,6 +198,7 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
|
|
|
|
|
this->insertInCommandMap(mpsoc::TC_DOWNLINK_PWR_OFF);
|
|
|
|
|
this->insertInCommandMap(mpsoc::TC_REPLAY_WRITE_SEQUENCE);
|
|
|
|
|
this->insertInCommandMap(mpsoc::TC_MODE_REPLAY);
|
|
|
|
|
this->insertInCommandMap(mpsoc::OBSW_RESET_SEQ_COUNT);
|
|
|
|
|
this->insertInReplyMap(mpsoc::ACK_REPORT, 1, nullptr, mpsoc::SIZE_ACK_REPORT);
|
|
|
|
|
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
|
|
|
|
|
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
|
|
|
|
@ -459,8 +464,9 @@ ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) {
|
|
|
|
|
// TODO: Interpretation of status field in acknowledgment report
|
|
|
|
|
sif::debug << "PlocMPSoCHandler::handleAckReport: Received Ack failure report" << std::endl;
|
|
|
|
|
DeviceCommandId_t commandId = getPendingCommand();
|
|
|
|
|
uint16_t status = getStatus(data);
|
|
|
|
|
if (commandId != DeviceHandlerIF::NO_COMMAND_ID) {
|
|
|
|
|
triggerEvent(ACK_FAILURE, commandId);
|
|
|
|
|
triggerEvent(ACK_FAILURE, commandId, status);
|
|
|
|
|
}
|
|
|
|
|
sendFailureReport(mpsoc::ACK_REPORT, MPSoCReturnValuesIF::RECEIVED_ACK_FAILURE);
|
|
|
|
|
disableAllReplies();
|
|
|
|
@ -568,6 +574,8 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case mpsoc::OBSW_RESET_SEQ_COUNT:
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Unknown command id" << std::endl;
|
|
|
|
|
break;
|
|
|
|
@ -743,3 +751,6 @@ void PlocMPSoCHandler::printStatus(const uint8_t* data) {
|
|
|
|
|
sif::info << "Verification report status: 0x" << std::hex << status << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PlocMPSoCHandler::getStatus(const uint8_t* data) {
|
|
|
|
|
return *(data + STATUS_OFFSET) << 8 | *(data + STATUS_OFFSET + 1);
|
|
|
|
|
}
|
|
|
|
|