v1.12.0 #269

Merged
muellerr merged 493 commits from develop into main 2022-07-04 11:19:05 +02:00
5 changed files with 32 additions and 13 deletions
Showing only changes of commit cedc6bec23 - Show all commits

View File

@ -1708,11 +1708,11 @@ ReturnValue_t CoreController::timeFileHandler() {
} }
std::string fileName = currMntPrefix + TIME_FILE; std::string fileName = currMntPrefix + TIME_FILE;
std::ofstream timeFile(fileName); std::ofstream timeFile(fileName);
if (not timeFile.good()) { // if (not timeFile.good()) {
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) // sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
<< std::endl; // << std::endl;
return RETURN_FAILED; // return RETURN_FAILED;
} // }
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
} }
return RETURN_OK; return RETURN_OK;

View File

@ -29,6 +29,9 @@ static const DeviceCommandId_t TC_MODE_REPLAY = 16;
static const DeviceCommandId_t TC_CAM_CMD_SEND = 17; static const DeviceCommandId_t TC_CAM_CMD_SEND = 17;
static const DeviceCommandId_t TC_MODE_IDLE = 18; static const DeviceCommandId_t TC_MODE_IDLE = 18;
static const DeviceCommandId_t TM_CAM_CMD_RPT = 19; static const DeviceCommandId_t TM_CAM_CMD_RPT = 19;
static const DeviceCommandId_t SET_UART_TX_TRISTATE = 20;
static const DeviceCommandId_t RELEASE_UART_TX = 21;
// Will reset the sequence count of the OBSW // Will reset the sequence count of the OBSW
static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50; static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50;

View File

@ -99,6 +99,20 @@ void PlocMPSoCHandler::performOperationHook() {
ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) { const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
switch(actionId) {
case mpsoc::SET_UART_TX_TRISTATE: {
uartIsolatorSwitch.pullLow();
return EXECUTION_FINISHED;
break;
}
case mpsoc::RELEASE_UART_TX: {
uartIsolatorSwitch.pullHigh();
return EXECUTION_FINISHED;
break;
default:
break;
}
}
if (plocMPSoCHelperExecuting) { if (plocMPSoCHelperExecuting) {
return MPSoCReturnValuesIF::MPSOC_HELPER_EXECUTING; return MPSoCReturnValuesIF::MPSOC_HELPER_EXECUTING;
@ -267,6 +281,8 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(mpsoc::TC_MODE_REPLAY); this->insertInCommandMap(mpsoc::TC_MODE_REPLAY);
this->insertInCommandMap(mpsoc::TC_MODE_IDLE); this->insertInCommandMap(mpsoc::TC_MODE_IDLE);
this->insertInCommandMap(mpsoc::TC_CAM_CMD_SEND); this->insertInCommandMap(mpsoc::TC_CAM_CMD_SEND);
this->insertInCommandMap(mpsoc::RELEASE_UART_TX);
this->insertInCommandMap(mpsoc::SET_UART_TX_TRISTATE);
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT); this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_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); this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);

View File

@ -859,7 +859,6 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
} }
case supv::APID_ACK_SUCCESS: { case supv::APID_ACK_SUCCESS: {
setNextReplyId(); setNextReplyId();
handleSpecialAcknowledgments(data);
break; break;
} }
default: { default: {
@ -887,6 +886,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
switch (apid) { switch (apid) {
case (supv::APID_EXE_SUCCESS): { case (supv::APID_EXE_SUCCESS): {
handleSpecialExecutionReport(data);
break; break;
} }
case (supv::APID_EXE_FAILURE): { case (supv::APID_EXE_FAILURE): {
@ -1813,17 +1813,17 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
return result; return result;
} }
void PlocSupervisorHandler::handleSpecialAcknowledgments(const uint8_t* data) { void PlocSupervisorHandler::handleSpecialExecutionReport(const uint8_t* data) {
DeviceCommandId_t commandId = getPendingCommand(); DeviceCommandId_t commandId = getPendingCommand();
switch(commandId) { switch(commandId) {
case supv::READ_GPIO: { case supv::READ_GPIO: {
supv::AcknowledgmentReport ack; supv::ExecutionReport exe;
ack.addWholeData(data, supv::SIZE_ACK_REPORT); exe.addWholeData(data, supv::SIZE_EXE_REPORT);
uint16_t gpioState = ack.getStatusCode(); uint16_t gpioState = exe.getStatusCode();
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1 #if OBSW_DEBUG_PLOC_SUPERVISOR == 1
sif::info << "PlocsupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl; sif::info << "PlocsupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
handleDeviceTM(reinterpret_cast<uint8_t*>(&gpioState), sizeof(gpioState), supv::ACK_REPORT); handleDeviceTM(reinterpret_cast<uint8_t*>(&gpioState), sizeof(gpioState), supv::EXE_REPORT);
break; break;
} }
default: default:

View File

@ -351,9 +351,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
ReturnValue_t eventSubscription(); ReturnValue_t eventSubscription();
/** /**
* @brief Handles acknowledgment reports which contains additional informations in the data field * @brief Handles execution reports which contains additional information in the data field
*/ */
void handleSpecialAcknowledgments(const uint8_t* data); void handleSpecialExecutionReport(const uint8_t* data);
}; };
#endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */ #endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */