read gpio tm handling
This commit is contained in:
parent
e18661bb59
commit
f0884c0096
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 0aee86442eafa6d8827435e2c2e22074ba733e34
|
Subproject commit 9731dc1e619e6e52207174e67daf0468a675a5ec
|
@ -859,6 +859,7 @@ 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: {
|
||||||
@ -1811,3 +1812,21 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlocSupervisorHandler::handleSpecialAcknowledgments(const uint8_t* data) {
|
||||||
|
DeviceCommandId_t commandId = getPendingCommand();
|
||||||
|
switch(commandId) {
|
||||||
|
case supv::READ_GPIO: {
|
||||||
|
supv::AcknowledgmentReport ack;
|
||||||
|
ack.addWholeData(data, supv::SIZE_ACK_REPORT);
|
||||||
|
uint16_t gpioState = ack.getStatusCode();
|
||||||
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
|
sif::info << "PlocsupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
|
||||||
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
|
handleDeviceTM(reinterpret_cast<uint8_t*>(&gpioState), sizeof(gpioState), supv::ACK_REPORT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -349,6 +349,11 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t extractUpdateCommand(const uint8_t* commandData, size_t size, std::string* file,
|
ReturnValue_t extractUpdateCommand(const uint8_t* commandData, size_t size, std::string* file,
|
||||||
uint8_t* memoryId, uint32_t* startAddress);
|
uint8_t* memoryId, uint32_t* startAddress);
|
||||||
ReturnValue_t eventSubscription();
|
ReturnValue_t eventSubscription();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handles acknowledgment reports which contains additional informations in the data field
|
||||||
|
*/
|
||||||
|
void handleSpecialAcknowledgments(const uint8_t* data);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */
|
#endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user