read gpio tm handling
This commit is contained in:
@ -859,6 +859,7 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
|
||||
}
|
||||
case supv::APID_ACK_SUCCESS: {
|
||||
setNextReplyId();
|
||||
handleSpecialAcknowledgments(data);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -1811,3 +1812,21 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user