eive-obsw/mission/devices/PDU1Handler.cpp
2021-01-28 14:55:21 +01:00

26 lines
935 B
C++

#include "PDU1Handler.h"
PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF,
CookieIF * comCookie, uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress,
uint16_t hkTableSize) : GomspaceDeviceHandler(objectId, comIF,
comCookie, maxConfigTableAddress, maxHkTableAddress, hkTableSize) {
}
PDU1Handler::~PDU1Handler() {
}
ReturnValue_t PDU1Handler::buildNormalDeviceCommand(
DeviceCommandId_t * id) {
*id = GOMSPACE::REQUEST_HK_TABLE;
return buildCommandFromCommand(*id, NULL, 0);
}
void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
const uint8_t* payloadPtr = packet + GOMSPACE::GS_HDR_LENGTH;
size_t size = (size_t)hkTableSize;
hkTableDataset.deSerialize(&payloadPtr, &size, SerializeIF::Endianness::BIG);
FullTableReply fullTableReply(id, HK_TABLE_ID, hkTableDataset);
handleDeviceTM(&fullTableReply, id, true);
}