diff --git a/CHANGELOG.md b/CHANGELOG.md index 488ace71..87834020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ will consitute of a breaking change warranting a new major release: ## Fixed +- If the PCDU handler fails reading data from the IPC store, it will + not try to do a deserialization anymore. +- All action commands sent by the PLOC SUPV to itself will have no sender now. - RW speed commands get reset to 0 RPM, if the `AcsController` has changed its mode to Safe - Antistiction for RWs will set commanded speed to 0 RPM, if a wheel is detected as not diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 0d34b63f..88a68635 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -1115,7 +1115,7 @@ void FreshSupvHandler::handleEvent(EventMessage* eventMessage) { if (not isCommandAlreadyActive(supv::SHUTDOWN_MPSOC)) { CommandMessage actionMsg; ActionMessage::setCommand(&actionMsg, supv::SHUTDOWN_MPSOC, store_address_t::invalid()); - result = messageQueue->sendMessage(getCommandQueue(), &actionMsg); + result = messageQueue->sendMessageFrom(getCommandQueue(), &actionMsg, MessageQueueIF::NO_QUEUE); if (result != returnvalue::OK) { triggerEvent(supv::SUPV_MPSOC_SHUTDOWN_BUILD_FAILED); sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown " diff --git a/linux/payload/PlocSupvUartMan.cpp b/linux/payload/PlocSupvUartMan.cpp index f73ca560..56bb3dd5 100644 --- a/linux/payload/PlocSupvUartMan.cpp +++ b/linux/payload/PlocSupvUartMan.cpp @@ -945,15 +945,7 @@ ReturnValue_t PlocSupvUartManager::handleRunningLongerRequest() { break; } case Request::REQUEST_EVENT_BUFFER: { - // result = performEventBufferRequest(); - // if (result == returnvalue::OK) { - // triggerEvent(SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL, result); - // } else if (result == PROCESS_TERMINATED) { - // // Event already triggered - // break; - // } else { - // triggerEvent(SUPV_EVENT_BUFFER_REQUEST_FAILED, result); - // } + sif::error << "Requesting event buffer is not implemented" << std::endl; break; } case Request::DEFAULT: { diff --git a/mission/power/PcduHandler.cpp b/mission/power/PcduHandler.cpp index 0561288c..1596d522 100644 --- a/mission/power/PcduHandler.cpp +++ b/mission/power/PcduHandler.cpp @@ -65,8 +65,8 @@ ReturnValue_t PcduHandler::performOperation(uint8_t counter) { ReturnValue_t PcduHandler::initialize() { ReturnValue_t result; - IPCStore = ObjectManager::instance()->get(objects::IPC_STORE); - if (IPCStore == nullptr) { + ipcStore = ObjectManager::instance()->get(objects::IPC_STORE); + if (ipcStore == nullptr) { return ObjectManagerIF::CHILD_INIT_FAILED; } @@ -162,10 +162,13 @@ void PcduHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet sizeof(CCSDSTime::CDS_short), dataset); const uint8_t* packet_ptr = nullptr; size_t size = 0; - result = IPCStore->getData(storeId, &packet_ptr, &size); + result = ipcStore->getData(storeId, &packet_ptr, &size); if (result != returnvalue::OK) { - sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPCStore." - << std::endl; + sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPC store, result 0x" + << std::hex << std::setw(4) << std::setfill('0') << result << std::dec + << std::setfill(' ') << std::endl; + result = ipcStore->deleteData(storeId); + return; } result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE); if (result != returnvalue::OK) { @@ -173,7 +176,7 @@ void PcduHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet "in hk table dataset" << std::endl; } - result = IPCStore->deleteData(storeId); + result = ipcStore->deleteData(storeId); if (result != returnvalue::OK) { sif::error << "PCDUHandler::updateHkTableDataset: Failed to delete data in IPCStore" << std::endl; @@ -396,7 +399,7 @@ ReturnValue_t PcduHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO setParamMessage.serialize(&commandPtr, &serializedLength, maxSize, SerializeIF::Endianness::BIG); store_address_t storeAddress; - result = IPCStore->addData(&storeAddress, command, sizeof(command)); + result = ipcStore->addData(&storeAddress, command, sizeof(command)); CommandMessage message; ActionMessage::setCommand(&message, GOMSPACE::PARAM_SET, storeAddress); diff --git a/mission/power/PcduHandler.h b/mission/power/PcduHandler.h index 86d3747f..73df73ef 100644 --- a/mission/power/PcduHandler.h +++ b/mission/power/PcduHandler.h @@ -94,7 +94,7 @@ class PcduHandler : public PowerSwitchIF, * Pointer to the IPCStore. * This caches the pointer received from the objectManager in the constructor. */ - StorageManagerIF* IPCStore = nullptr; + StorageManagerIF* ipcStore = nullptr; /** * Message queue to communicate with other objetcs. Used for example to receive