pdu2 dataset update snapshot

This commit is contained in:
Jakob Meier 2021-02-06 11:57:45 +01:00
parent 00cabbb8e9
commit c3665cbd65
18 changed files with 312 additions and 149 deletions

View File

@ -139,7 +139,7 @@ void InitMission::initTasks(){
FixedTimeslotTaskIF* GomSpacePstTask = TaskFactory::instance()-> FixedTimeslotTaskIF* GomSpacePstTask = TaskFactory::instance()->
createFixedTimeslotTask("GS_PST_TASK", 50, createFixedTimeslotTask("GS_PST_TASK", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE*4, 3.0, nullptr); PeriodicTaskIF::MINIMUM_STACK_SIZE*8, 3.0, nullptr);
result = pst::gomspacePstInit(GomSpacePstTask); result = pst::gomspacePstInit(GomSpacePstTask);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: GomSpace PST initialization " sif::error << "InitMission::initTasks: GomSpace PST initialization "

View File

@ -81,18 +81,10 @@ void ObjectFactory::produce(){
new I2cComIF(objects::I2C_COM_IF); new I2cComIF(objects::I2C_COM_IF);
/* Device Handler */ /* Device Handler */
new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF, p60DockCspCookie);
p60DockCspCookie, P60Dock::MAX_CONFIGTABLE_ADDRESS, new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, pdu1CspCookie);
P60Dock::MAX_HKTABLE_ADDRESS, P60Dock::HK_TABLE_SIZE); new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie);
new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF, new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, acuCspCookie);
pdu1CspCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_SIZE);
new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
pdu2CspCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_SIZE);
new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF,
acuCspCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
ACU::MAX_HKTABLE_ADDRESS, ACU::HK_TABLE_SIZE);
new PCDUHandler(objects::PCDU_HANDLER); new PCDUHandler(objects::PCDU_HANDLER);
/* Temperature sensors */ /* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler( Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(

View File

@ -156,15 +156,10 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort,
<< " device map" << std::endl; << " device map" << std::endl;
} }
uint8_t* replyBuffer = iter->second.data(); uint8_t* replyBuffer = iter->second.data();
// uint8_t tmpCmdBuffer[cmdBufferLen];
// memcpy(tmpCmdBuffer, cmdBuffer, cmdBufferLen);
csp_conn_t * conn = csp_connect(CSP_PRIO_HIGH, cspAddress, cspPort, 0, csp_conn_t * conn = csp_connect(CSP_PRIO_HIGH, cspAddress, cspPort, 0,
CSP_O_NONE); CSP_O_NONE);
// int result = csp_transaction_persistent(conn, timeout_ms,
// tmpCmdBuffer, cmdBufferLen, replyBuffer, querySize);
csp_packet_t* commandPacket = (csp_packet_t*)csp_buffer_get(cmdLen); csp_packet_t* commandPacket = (csp_packet_t*)csp_buffer_get(cmdLen);
if (commandPacket == NULL) { if (commandPacket == NULL) {
sif::error << "CspComIF::cspTransfer: Failed to get memory for a csp packet from the csp " sif::error << "CspComIF::cspTransfer: Failed to get memory for a csp packet from the csp "

2
fsfw

@ -1 +1 @@
Subproject commit 2104d3f38a409a46210849ea23b0ea7fc7efe617 Subproject commit 2f374aef347a1b0e7a04305eadc768ea63e35077

View File

@ -10,10 +10,12 @@
// These defines should be disabled for mission code but are useful for // These defines should be disabled for mission code but are useful for
// debugging. // debugging.
#define OBSW_ENHANCED_PRINTOUT 1 #define OBSW_ENHANCED_PRINTOUT 0
#define TE0720 0 #define TE0720 0
#define PDU2_DEBUG 1
#include "OBSWVersion.h" #include "OBSWVersion.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -26,6 +26,7 @@ namespace pcduSwitches {
static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH1 = OFF; static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH1 = OFF;
static const uint8_t INIT_STATE_RW = OFF; static const uint8_t INIT_STATE_RW = OFF;
#if TE0720 == 1 #if TE0720 == 1
/* Because the TE0720 is not connected to the PCDU, this switch is always on */
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = ON; static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = ON;
#else #else
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = OFF; static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = OFF;

View File

@ -1,9 +1,9 @@
#include "ACUHandler.h" #include "ACUHandler.h"
ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress, uint16_t hkTableSize) : GomspaceDeviceHandler(objectId, comIF, comCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
GomspaceDeviceHandler(objectId, comIF, comCookie, maxConfigTableAddress, maxHkTableAddress, ACU::MAX_HKTABLE_ADDRESS, ACU::HK_TABLE_SIZE, &acuHkTableDataset), acuHkTableDataset(
hkTableSize, &acuHkTableDataset), acuHkTableDataset(this) { this) {
} }
ACUHandler::~ACUHandler() { ACUHandler::~ACUHandler() {

View File

@ -10,8 +10,7 @@
*/ */
class ACUHandler: public GomspaceDeviceHandler { class ACUHandler: public GomspaceDeviceHandler {
public: public:
ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress, uint16_t hkTableSize);
virtual ~ACUHandler(); virtual ~ACUHandler();
protected: protected:

View File

@ -1,9 +1,10 @@
#include "P60DockHandler.h" #include "P60DockHandler.h"
P60DockHandler::P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie,
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress, uint16_t hkTableSize) : P60DockHandler::P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
GomspaceDeviceHandler(objectId, comIF, comCookie, maxConfigTableAddress, maxHkTableAddress, GomspaceDeviceHandler(objectId, comIF, comCookie, P60Dock::MAX_CONFIGTABLE_ADDRESS,
hkTableSize, &p60dockHkTableDataset), p60dockHkTableDataset(this) { P60Dock::MAX_HKTABLE_ADDRESS, P60Dock::HK_TABLE_SIZE, &p60dockHkTableDataset), p60dockHkTableDataset(
this) {
} }
P60DockHandler::~P60DockHandler() { P60DockHandler::~P60DockHandler() {

View File

@ -11,8 +11,7 @@
*/ */
class P60DockHandler: public GomspaceDeviceHandler { class P60DockHandler: public GomspaceDeviceHandler {
public: public:
P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress, uint16_t hkTableSize);
virtual ~P60DockHandler(); virtual ~P60DockHandler();
protected: protected:

View File

@ -42,7 +42,7 @@ ReturnValue_t PCDUHandler::initialize() {
HasLocalDataPoolIF* pdu2Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU2_HANDLER); HasLocalDataPoolIF* pdu2Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU2_HANDLER);
if(pdu2Handler == nullptr) { if(pdu2Handler == nullptr) {
sif::warning << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl; sif::error << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl;
return RETURN_FAILED; return RETURN_FAILED;
} }
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages( result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages(
@ -50,6 +50,7 @@ ReturnValue_t PCDUHandler::initialize() {
if (result != RETURN_OK) { if (result != RETURN_OK) {
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from " sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
<< "PDU2Handler" << std::endl; << "PDU2Handler" << std::endl;
return result;
} }
return RETURN_OK; return RETURN_OK;
@ -70,6 +71,12 @@ void PCDUHandler::initializeSwitchStates() {
void PCDUHandler::readCommandQueue() { void PCDUHandler::readCommandQueue() {
ReturnValue_t result; ReturnValue_t result;
CommandMessage command; CommandMessage command;
result = commandQueue->receiveMessage(&command);
if (result != RETURN_OK) {
return;
}
result = poolManager.handleHousekeepingMessage(&command); result = poolManager.handleHousekeepingMessage(&command);
if (result == RETURN_OK) { if (result == RETURN_OK) {
return; return;
@ -82,28 +89,8 @@ MessageQueueId_t PCDUHandler::getCommandQueue() const {
void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId) { void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId) {
ReturnValue_t result; if (sid == sid_t(objects::PDU2_HANDLER, PDU2::HK_TABLE_DATA_SET_ID)) {
updatePdu2HousekeepingDataset(storeId);
if (sid == sid_t(objects::PCDU_HANDLER, PDU2::HK_TABLE_DATA_SET_ID)) {
HousekeepingSnapshot packetUpdate(reinterpret_cast<uint8_t*>(&timeStamp),
sizeof(timeStamp), &pdu2HkTableDataset);
const uint8_t* packet_ptr = NULL;
size_t size;
result = IPCStore->getData(storeId, &packet_ptr, &size);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to get data from IPCStore."
<< std::endl;
}
result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::BIG);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to deserialize packet in "
<< "pdu2HkTableDataset" << std::endl;
}
result = IPCStore->deleteData(storeId);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to delete data in IPCStore"
<< std::endl;
}
updatePdu2SwitchStates(); updatePdu2SwitchStates();
} }
else { else {
@ -111,17 +98,43 @@ void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId) {
} }
} }
void PCDUHandler::updatePdu2HousekeepingDataset(store_address_t storeId) {
ReturnValue_t result;
HousekeepingSnapshot packetUpdate(reinterpret_cast<uint8_t*>(&timeStampPdu2HkDataset),
sizeof(timeStampPdu2HkDataset), &pdu2HkTableDataset);
const uint8_t* packet_ptr = NULL;
size_t size;
result = IPCStore->getData(storeId, &packet_ptr, &size);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to get data from IPCStore."
<< std::endl;
}
pdu2HkTableDataset.read();
result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to deserialize packet in "
<< "pdu2HkTableDataset" << std::endl;
}
pdu2HkTableDataset.commit();
result = IPCStore->deleteData(storeId);
if (result != RETURN_OK) {
sif::error << "PCDUHandler::handleChangedDataset: Failed to delete data in IPCStore"
<< std::endl;
}
}
void PCDUHandler::updatePdu2SwitchStates() { void PCDUHandler::updatePdu2SwitchStates() {
//TODO: pool read helper //TODO: pool read helper
if (pdu2HkTableDataset.read() != RETURN_OK) { if (pdu2HkTableDataset.read() == RETURN_OK) {
switchStates[pcduSwitches::Q7S] = pdu2HkTableDataset.outEnabledQ7S.value; switchStates[pcduSwitches::Q7S] = pdu2HkTableDataset.outEnabledQ7S.value;
switchStates[pcduSwitches::PAYLOAD_PCDU_CH1] = pdu2HkTableDataset.outEnabledPlPCDUCh1.value; switchStates[pcduSwitches::PAYLOAD_PCDU_CH1] = pdu2HkTableDataset.outEnabledPlPCDUCh1.value;
switchStates[pcduSwitches::RW] = pdu2HkTableDataset.outEnabledReactionWheels.value; switchStates[pcduSwitches::RW] = pdu2HkTableDataset.outEnabledReactionWheels.value;
switchStates[pcduSwitches::TCS_BOARD_8V_HEATER_IN] = pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value; switchStates[pcduSwitches::TCS_BOARD_8V_HEATER_IN] = pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value;
switchStates[pcduSwitches::SUS_REDUNDANT] = pdu2HkTableDataset.outEnabledSUS.value; switchStates[pcduSwitches::SUS_REDUNDANT] = pdu2HkTableDataset.outEnabledSUSRedundant.value;
switchStates[pcduSwitches::DEPLOYMENT_MECHANISM] = pdu2HkTableDataset.outEnabledDeplMechanism.value; switchStates[pcduSwitches::DEPLOYMENT_MECHANISM] = pdu2HkTableDataset.outEnabledDeplMechanism.value;
switchStates[pcduSwitches::PAYLOAD_PCDU_CH6] = pdu2HkTableDataset.outEnabledPlPCDUCh6.value; switchStates[pcduSwitches::PAYLOAD_PCDU_CH6] = pdu2HkTableDataset.outEnabledPlPCDUCh6.value;
switchStates[pcduSwitches::ACS_BOARD_SIDE_B] = pdu2HkTableDataset.outEnabledAcsBoard.value; switchStates[pcduSwitches::ACS_BOARD_SIDE_B] = pdu2HkTableDataset.outEnabledAcsBoardSideB.value;
switchStates[pcduSwitches::PAYLOAD_CAMERA] = pdu2HkTableDataset.outEnabledPayloadCamera.value; switchStates[pcduSwitches::PAYLOAD_CAMERA] = pdu2HkTableDataset.outEnabledPayloadCamera.value;
} }
else { else {
@ -260,7 +273,6 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool &localDat
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_CONV_EN, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, new PoolEntry<uint8_t>( { localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, new PoolEntry<uint8_t>( {
pcduSwitches::INIT_STATE_Q7S })); pcduSwitches::INIT_STATE_Q7S }));
@ -283,14 +295,12 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool &localDat
pcduSwitches::INIT_STATE_ACS_BOARD_SIDE_B })); pcduSwitches::INIT_STATE_ACS_BOARD_SIDE_B }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry<uint8_t>( { localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry<uint8_t>( {
pcduSwitches::INIT_STATE_PAYLOAD_CAMERA })); pcduSwitches::INIT_STATE_PAYLOAD_CAMERA }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_OUT_EN, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_BATT_MODE, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry<uint16_t>( { 0 }));
@ -320,7 +330,6 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool &localDat
localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_DEVICE_STATUS, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry<uint32_t>( { 0 }));

View File

@ -61,7 +61,12 @@ private:
*/ */
PDU2::PDU2HkTableDataset pdu2HkTableDataset; PDU2::PDU2HkTableDataset pdu2HkTableDataset;
/** The timeStamp of the current pdu2HkTableDataset */ /** The timeStamp of the current pdu2HkTableDataset */
CCSDSTime::CDS_short timeStamp; CCSDSTime::CDS_short timeStampPdu2HkDataset;
/** Hk table dataset of PDU1 */
// PDU1::PDU1HkTableDataset pdu1HkTableDataset;
// /** The timeStamp of the current pdu1HkTableDataset */
// CCSDSTime::CDS_short timeStampPdu1HkDataset;
uint8_t switchStates[pcduSwitches::NUMBER_OF_SWITCHES]; uint8_t switchStates[pcduSwitches::NUMBER_OF_SWITCHES];
/** /**
@ -94,6 +99,12 @@ private:
*/ */
void updatePdu2SwitchStates(); void updatePdu2SwitchStates();
/**
* @brief In case of an update snapshot message with a pdu2 hk table dataset, this function
* copies the updated values to the local pdu2HkTableDataset.
*/
void updatePdu2HousekeepingDataset(store_address_t storeId);
/** /**
* @brief Updates all switchStates related to the PDU1. Called each time the PDU1Handler * @brief Updates all switchStates related to the PDU1. Called each time the PDU1Handler
* sends a new hk dataset. * sends a new hk dataset.

View File

@ -1,10 +1,10 @@
#include "PDU1Handler.h" #include "PDU1Handler.h"
#include <mission/devices/devicedefinitions/GomSpacePackets.h> #include <mission/devices/devicedefinitions/GomSpacePackets.h>
PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, 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, PDU::MAX_CONFIGTABLE_ADDRESS,
GomspaceDeviceHandler(objectId, comIF, comCookie, maxConfigTableAddress, maxHkTableAddress, PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu1HkTableDataset), pdu1HkTableDataset(
hkTableSize, &pdu1HkTableDataset), pdu1HkTableDataset(this) { this) {
} }
PDU1Handler::~PDU1Handler() { PDU1Handler::~PDU1Handler() {

View File

@ -21,9 +21,7 @@
*/ */
class PDU1Handler: public GomspaceDeviceHandler { class PDU1Handler: public GomspaceDeviceHandler {
public: public:
PDU1Handler(object_id_t objectId, object_id_t comIF, PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
CookieIF * comCookie, uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress,
uint16_t hkTableSize);
virtual ~PDU1Handler(); virtual ~PDU1Handler();
protected: protected:
/** /**

View File

@ -2,10 +2,10 @@
#include <mission/devices/devicedefinitions/GomSpacePackets.h> #include <mission/devices/devicedefinitions/GomSpacePackets.h>
#include <fsfwconfig/OBSWConfig.h> #include <fsfwconfig/OBSWConfig.h>
PDU2Handler::PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, PDU2Handler::PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress) : GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
GomspaceDeviceHandler(objectId, comIF, comCookie, maxConfigTableAddress, maxHkTableAddress, PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_REPLY_SIZE, &pdu2HkTableDataset), pdu2HkTableDataset(
PDU::HK, &pdu2HkTableDataset), pdu2HkTableDataset(this) { this) {
} }
PDU2Handler::~PDU2Handler() { PDU2Handler::~PDU2Handler() {
@ -19,27 +19,213 @@ ReturnValue_t PDU2Handler::buildNormalDeviceCommand(
void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) { void PDU2Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
ReturnValue_t result; parseHkTableReply(packet);
handleDeviceTM(&pdu2HkTableDataset, id, true);
/* Pointer points to beginning of payload data */ #if OBSW_ENHANCED_PRINTOUT == 1 && PDU2_DEBUG == 1
pdu2HkTableDataset.read(); pdu2HkTableDataset.read();
const uint8_t* payloadPtr = packet + 12; sif::info << "PDU2 Q7S current voltage: " << pdu2HkTableDataset.voltageOutQ7S << " mV" << std::endl;
size_t size = (size_t)hkTableSize; sif::info << "PDU2 VCC: " << pdu2HkTableDataset.vcc << " mV" << std::endl;
result = pdu2HkTableDataset.deSerialize(&payloadPtr, &size, SerializeIF::Endianness::BIG); float vbat = pdu2HkTableDataset.vbat.value * 0.1;
if (result != RETURN_OK) { sif::info << "PDU2 VBAT: " << vbat << std::endl;
sif::debug << "PDU2Handler::letChildHandleHkReply: Failed to deserialize housekeeping " float temperatureC = pdu2HkTableDataset.temperature.value * 0.1;
<< "packet array into pdu2HkTableDataset" << std::endl; sif::info << "PDU2 Temperature: " << temperatureC << " °C" << std::endl;
return; sif::info << "PDU2 Q7S enable state: " << unsigned(pdu2HkTableDataset.outEnabledQ7S.value) << std::endl;
} sif::info << "PDU2 Payload PCDU channel 1 enable state: "
// FullTableReply fullTableReply(id, HK_TABLE_ID, &pdu2HkTableDataset); << unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh1.value) << std::endl;
// handleDeviceTM(&fullTableReply, id, true); sif::info << "PDU2 reaction wheels enable state: "
#if OBSW_ENHANCED_PRINTOUT == 1 << unsigned(pdu2HkTableDataset.outEnabledReactionWheels.value) << std::endl;
float temperatureC = pdu2HkTableDataset.temperature.value; sif::info << "PDU2 TCS Board 8V heater input enable state: "
sif::info << "PDU2 Temperature: " << temperatureC << "°C" << std::endl; << unsigned(pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value) << std::endl;
sif::info << "PDU2 redundant SUS group enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledSUSRedundant.value) << std::endl;
sif::info << "PDU2 deployment mechanism enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledDeplMechanism.value) << std::endl;
sif::info << "PDU2 PCDU channel 6 enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPlPCDUCh6.value) << std::endl;
sif::info << "PDU2 ACS board side B enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledAcsBoardSideB.value) << std::endl;
sif::info << "PDU2 payload camera enable state: "
<< unsigned(pdu2HkTableDataset.outEnabledPayloadCamera.value) << std::endl;
sif::info << "PDU2 uptime: " << pdu2HkTableDataset.uptime << " seconds" << std::endl;
sif::info << "PDU2 battery mode: " << unsigned(pdu2HkTableDataset.battMode.value) << std::endl;
sif::info << "PDU2 ground watchdog reboots: " << pdu2HkTableDataset.gndWdtReboots << std::endl;
sif::info << "PDU2 ground watchdog timer seconds left: "
<< pdu2HkTableDataset.groundWatchdogSecondsLeft << " seconds" << std::endl;
sif::info << "PDU2 csp1 watchdog pings before reboot: "
<< unsigned(pdu2HkTableDataset.csp1WatchdogPingsLeft.value) << std::endl;
sif::info << "PDU2 csp2 watchdog pings before reboot: "
<< unsigned(pdu2HkTableDataset.csp2WatchdogPingsLeft.value) << std::endl;
pdu2HkTableDataset.commit(); pdu2HkTableDataset.commit();
#endif #endif
} }
void PDU2Handler::parseHkTableReply(const uint8_t *packet) {
uint16_t dataOffset = 0;
pdu2HkTableDataset.read();
/* Fist 10 bytes contain the gomspace header. Each variable is preceded by the 16-bit table
* address. */
dataOffset += 12;
pdu2HkTableDataset.currentOutQ7S = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutPayloadPCDUCh1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutReactionWheels = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutTCSBoardHeaterIn = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutSUSRedundant = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutDeplMechanism = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutPayloadPCDUCh6 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutACSBoardSideB = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.currentOutPayloadCamera = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutQ7S = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutPayloadPCDUCh1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutReactionWheels = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutTCSBoardHeaterIn = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutSUSRedundant = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutDeplMechanism = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutPayloadPCDUCh6 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutACSBoardSideB = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.voltageOutPayloadCamera = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.temperature = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.converterEnable1 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.converterEnable2 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.converterEnable3 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledQ7S = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledPlPCDUCh1 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledReactionWheels = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledTCSBoardHeaterIn = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledSUSRedundant = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledDeplMechanism = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledPlPCDUCh6 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledAcsBoardSideB = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.outEnabledPayloadCamera = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.bootcause = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.bootcount = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.uptime = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.resetcause = *(packet + dataOffset + 1) << 8 | *(packet + dataOffset);
dataOffset += 4;
pdu2HkTableDataset.battMode = *(packet + dataOffset);
/* +10 because here begins the second gomspace csp packet */
dataOffset += 3 + 10;
pdu2HkTableDataset.latchupsQ7S = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsPayloadPcduCh1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsRw = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsTcsBoardHeaterIn = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsSusRedundant = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsDeplMenchanism = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsPayloadPcduCh6 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsAcsBoardSideB = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.latchupsPayloadCamera = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
pdu2HkTableDataset.device0 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device1 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device2 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device3 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device4 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device5 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device6 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device7 = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device0Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device1Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device2Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device3Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device4Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device5Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device6Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.device7Status = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.gndWdtReboots = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.i2cWdtReboots = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.canWdtReboots = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.csp1WdtReboots = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.csp2WdtReboots = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.groundWatchdogSecondsLeft = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.i2cWatchdogSecondsLeft = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.canWatchdogSecondsLeft = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
dataOffset += 6;
pdu2HkTableDataset.csp1WatchdogPingsLeft = *(packet + dataOffset);
dataOffset += 3;
pdu2HkTableDataset.csp2WatchdogPingsLeft = *(packet + dataOffset);
pdu2HkTableDataset.commit();
pdu2HkTableDataset.setChanged(true);
}
ReturnValue_t PDU2Handler::initializeLocalDataPool( ReturnValue_t PDU2Handler::initializeLocalDataPool(
localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
@ -70,7 +256,6 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_CONV_EN, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, new PoolEntry<uint8_t>( { 0 }));
@ -85,14 +270,12 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_OUT_EN, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_BYTE_BATT_MODE, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry<uint16_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry<uint16_t>( { 0 }));
@ -122,7 +305,6 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(
localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry<uint8_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry<uint8_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_DUMMY_DEVICE_STATUS, new PoolEntry<uint16_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry<uint32_t>( { 0 }));
localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry<uint32_t>( { 0 })); localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry<uint32_t>( { 0 }));

View File

@ -20,8 +20,7 @@
*/ */
class PDU2Handler: public GomspaceDeviceHandler { class PDU2Handler: public GomspaceDeviceHandler {
public: public:
PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, PDU2Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress, uint16_t hkTableSize);
virtual ~PDU2Handler(); virtual ~PDU2Handler();
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
@ -35,8 +34,11 @@ protected:
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override; virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
private: private:
/** Dataset for the housekeeping table of the PDU2 */ /** Dataset for the housekeeping table of the PDU2 */
PDU2::PDU2HkTableDataset pdu2HkTableDataset; PDU2::PDU2HkTableDataset pdu2HkTableDataset;
void parseHkTableReply(const uint8_t *packet);
}; };
#endif /* MISSION_DEVICES_PDU2HANDLER_H_ */ #endif /* MISSION_DEVICES_PDU2HANDLER_H_ */

View File

@ -316,33 +316,33 @@ private:
/** /**
* @brief This class generates the reply containing data from a full table request. * @brief This class generates the reply containing data from a full housekeeping table request
* of the PDU2.
*/ */
class FullTableReply : public SerialLinkedListAdapter<SerializeIF> { class Pdu2FullTableReply : public SerialLinkedListAdapter<SerializeIF> {
public: public:
/** /**
* @brief Constructor * @brief Constructor
* *
* @param action_ The command which triggers the full table request. * @param action_ The command which triggered the full table request.
* @param tableId_ The id of the requested table. * @param tableId_ The id of the requested table.
* @param tableDataset_ Pointer to the dataset holding the table data. * @param tableDataset_ The dataset holding the table data.
*/ */
FullTableReply(uint8_t action_, uint8_t tableId_, LocalPoolDataSetBase* tableDataset_) : Pdu2FullTableReply(uint8_t action_, uint8_t tableId_, PDU2::PDU2HkTableDataset tableDataset_) :
action(action_), tableId(tableId_), tableDataset(*tableDataset_) { action(action_), tableId(tableId_), tableDataset(tableDataset_) {
setLinks(); setLinks();
} }
private: private:
FullTableReply(const FullTableReply &reply); Pdu2FullTableReply(const Pdu2FullTableReply &reply);
void setLinks() { void setLinks() {
setStart(&action); setStart(&action);
action.setNext(&tableId); action.setNext(&tableId);
tableId.setNext(&tableDataset); tableId.setNext(&tableDataset);
tableDataset.setNext(&tableDataset);
} }
SerializeElement<uint8_t> action; SerializeElement<uint8_t> action;
SerializeElement<uint8_t> tableId; SerializeElement<uint8_t> tableId;
SerializeElement<LocalPoolDataSetBase> tableDataset; SerializeElement<PDU2::PDU2HkTableDataset> tableDataset;
}; };
@ -413,7 +413,7 @@ public:
} }
private: private:
GomspaceSetParamMessage(const FullTableReply &reply); GomspaceSetParamMessage(const GomspaceSetParamMessage &reply);
void setLinks() { void setLinks() {
setStart(&memoryAddress); setStart(&memoryAddress);
memoryAddress.setNext(&parameterValueInfo); memoryAddress.setNext(&parameterValueInfo);

View File

@ -162,7 +162,6 @@ namespace P60System {
PDU1_CONV_EN_1, PDU1_CONV_EN_1,
PDU1_CONV_EN_2, PDU1_CONV_EN_2,
PDU1_CONV_EN_3, PDU1_CONV_EN_3,
PDU1_DUMMY_BYTE_CONV_EN,
PDU1_OUT_EN_TCS_BOARD_3V3, PDU1_OUT_EN_TCS_BOARD_3V3,
PDU1_OUT_EN_SYRLINKS, PDU1_OUT_EN_SYRLINKS,
PDU1_OUT_EN_STAR_TRACKER, PDU1_OUT_EN_STAR_TRACKER,
@ -172,13 +171,11 @@ namespace P60System {
PDU1_OUT_EN_PLOC, PDU1_OUT_EN_PLOC,
PDU1_OUT_EN_ACS_BOARD_SIDE_A, PDU1_OUT_EN_ACS_BOARD_SIDE_A,
PDU1_OUT_EN_CHANNEL8, PDU1_OUT_EN_CHANNEL8,
PDU1_DUMMY_BYTE_OUT_EN,
PDU1_BOOTCAUSE, PDU1_BOOTCAUSE,
PDU1_BOOTCNT, PDU1_BOOTCNT,
PDU1_UPTIME, PDU1_UPTIME,
PDU1_RESETCAUSE, PDU1_RESETCAUSE,
PDU1_BATT_MODE, PDU1_BATT_MODE,
PDU1_DUMMY_BYTE_BATT_MODE,
PDU1_LATCHUP_TCS_BOARD_3V3, PDU1_LATCHUP_TCS_BOARD_3V3,
PDU1_LATCHUP_SYRLINKS, PDU1_LATCHUP_SYRLINKS,
PDU1_LATCHUP_STAR_TRACKER, PDU1_LATCHUP_STAR_TRACKER,
@ -204,7 +201,6 @@ namespace P60System {
PDU1_DEVICE_5_STATUS, PDU1_DEVICE_5_STATUS,
PDU1_DEVICE_6_STATUS, PDU1_DEVICE_6_STATUS,
PDU1_DEVICE_7_STATUS, PDU1_DEVICE_7_STATUS,
PDU1_DUMMY_DEVICE_STATUS,
PDU1_WDT_CNT_GND, PDU1_WDT_CNT_GND,
PDU1_WDT_CNT_I2C, PDU1_WDT_CNT_I2C,
PDU1_WDT_CNT_CAN, PDU1_WDT_CNT_CAN,
@ -241,7 +237,6 @@ namespace P60System {
PDU2_CONV_EN_1, PDU2_CONV_EN_1,
PDU2_CONV_EN_2, PDU2_CONV_EN_2,
PDU2_CONV_EN_3, PDU2_CONV_EN_3,
PDU2_DUMMY_BYTE_CONV_EN,
PDU2_OUT_EN_Q7S, PDU2_OUT_EN_Q7S,
PDU2_OUT_EN_PAYLOAD_PCDU_CH1, PDU2_OUT_EN_PAYLOAD_PCDU_CH1,
PDU2_OUT_EN_RW, PDU2_OUT_EN_RW,
@ -251,13 +246,11 @@ namespace P60System {
PDU2_OUT_EN_PAYLOAD_PCDU_CH6, PDU2_OUT_EN_PAYLOAD_PCDU_CH6,
PDU2_OUT_EN_ACS_BOARD_SIDE_B, PDU2_OUT_EN_ACS_BOARD_SIDE_B,
PDU2_OUT_EN_PAYLOAD_CAMERA, PDU2_OUT_EN_PAYLOAD_CAMERA,
PDU2_DUMMY_BYTE_OUT_EN,
PDU2_BOOTCAUSE, PDU2_BOOTCAUSE,
PDU2_BOOTCNT, PDU2_BOOTCNT,
PDU2_UPTIME, PDU2_UPTIME,
PDU2_RESETCAUSE, PDU2_RESETCAUSE,
PDU2_BATT_MODE, PDU2_BATT_MODE,
PDU2_DUMMY_BYTE_BATT_MODE,
PDU2_LATCHUP_Q7S, PDU2_LATCHUP_Q7S,
PDU2_LATCHUP_PAYLOAD_PCDU_CH1, PDU2_LATCHUP_PAYLOAD_PCDU_CH1,
PDU2_LATCHUP_RW, PDU2_LATCHUP_RW,
@ -283,7 +276,6 @@ namespace P60System {
PDU2_DEVICE_5_STATUS, PDU2_DEVICE_5_STATUS,
PDU2_DEVICE_6_STATUS, PDU2_DEVICE_6_STATUS,
PDU2_DEVICE_7_STATUS, PDU2_DEVICE_7_STATUS,
PDU2_DUMMY_DEVICE_STATUS,
PDU2_WDT_CNT_GND, PDU2_WDT_CNT_GND,
PDU2_WDT_CNT_I2C, PDU2_WDT_CNT_I2C,
PDU2_WDT_CNT_CAN, PDU2_WDT_CNT_CAN,
@ -615,11 +607,9 @@ namespace PDU{
static const uint16_t MAX_REPLY_LENGTH = 318; static const uint16_t MAX_REPLY_LENGTH = 318;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
static const uint16_t MAX_HKTABLE_ADDRESS = 141; static const uint16_t MAX_HKTABLE_ADDRESS = 141;
// static const uint16_t HK_TABLE_SIZE = 142; /** The size of the reply containing the housekeeping table data */
static const uint16_t HK_TABLE_REPLY_SIZE = 303; static const uint16_t HK_TABLE_REPLY_SIZE = 303;
static const uint8_t HK_TABLE_ENTRIES = 60; static const uint8_t HK_TABLE_ENTRIES = 73;
/** The length of the header holding information about the received housekeeping table reply */
static const uint8_t HK_REPLY_HEADER_LENGTH = 13;
} }
@ -643,7 +633,7 @@ namespace PDU1 {
* @brief This class defines a dataset for the hk table of the PDU1. * @brief This class defines a dataset for the hk table of the PDU1.
*/ */
class PDU1HkTableDataset : class PDU1HkTableDataset :
public StaticLocalDataSet<PDU::HK_TABLE_SIZE> { public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
public: public:
PDU1HkTableDataset(HasLocalDataPoolIF* owner): PDU1HkTableDataset(HasLocalDataPoolIF* owner):
@ -707,9 +697,7 @@ namespace PDU1 {
P60System::PDU1_CONV_EN_2, this); P60System::PDU1_CONV_EN_2, this);
lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_CONV_EN_3, this); P60System::PDU1_CONV_EN_3, this);
/** Dummy byte inserted by the full hk table request. */
lp_var_t<uint8_t> dummyByteConvEn = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_DUMMY_BYTE_CONV_EN, this);
/** Output channels enable status */ /** Output channels enable status */
lp_var_t<uint8_t> outEnabledTCSBoard3V3 = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledTCSBoard3V3 = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_OUT_EN_TCS_BOARD_3V3, this); P60System::PDU1_OUT_EN_TCS_BOARD_3V3, this);
@ -742,9 +730,6 @@ namespace PDU1 {
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_BATT_MODE, this); P60System::PDU1_BATT_MODE, this);
/** Dummy byte which is received with full hk table request: */
lp_var_t<uint8_t> dummyByteBattMode = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_DUMMY_BYTE_BATT_MODE, this);
/** Number of detected latchups on each output channel */ /** Number of detected latchups on each output channel */
lp_var_t<uint16_t> latchupsTcsBoard3V3 = lp_var_t<uint16_t>(sid.objectId, lp_var_t<uint16_t> latchupsTcsBoard3V3 = lp_var_t<uint16_t>(sid.objectId,
@ -803,9 +788,7 @@ namespace PDU1 {
P60System::PDU1_DEVICE_6_STATUS, this); P60System::PDU1_DEVICE_6_STATUS, this);
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_DEVICE_7_STATUS, this); P60System::PDU1_DEVICE_7_STATUS, this);
/** Two dummy bytes will be inserted here by a full hk table request. */
lp_var_t<uint16_t> dummyBytesdeviceStatus = lp_var_t<uint16_t>(sid.objectId,
P60System::PDU1_DUMMY_DEVICE_STATUS, this);
/** Number of reboots triggered by the ground watchdog */ /** Number of reboots triggered by the ground watchdog */
lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU1_WDT_CNT_GND, this); P60System::PDU1_WDT_CNT_GND, this);
@ -830,9 +813,9 @@ namespace PDU1 {
lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU1_WDT_CAN_LEFT, this); P60System::PDU1_WDT_CAN_LEFT, this);
/** CSP watchdogs remaining pings before rebooting. */ /** CSP watchdogs remaining pings before rebooting. */
lp_var_t<uint8_t> csp2WatchdogSecondsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_WDT_CSP_LEFT1, this); P60System::PDU1_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp1WatchdogSecondsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU1_WDT_CSP_LEFT2, this); P60System::PDU1_WDT_CSP_LEFT2, this);
}; };
} }
@ -858,7 +841,7 @@ namespace PDU2 {
* @brief This class defines a dataset for the hk table of the PDU2. * @brief This class defines a dataset for the hk table of the PDU2.
*/ */
class PDU2HkTableDataset: class PDU2HkTableDataset:
public StaticLocalDataSet<PDU::HK_TABLE_SIZE> { public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
public: public:
PDU2HkTableDataset(HasLocalDataPoolIF* owner): PDU2HkTableDataset(HasLocalDataPoolIF* owner):
@ -884,7 +867,7 @@ namespace PDU2 {
P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this); P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this);
lp_var_t<int16_t> currentOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> currentOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this); P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this);
lp_var_t<int16_t> currentOutACSBoard = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> currentOutACSBoardSideB = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this); P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this);
lp_var_t<int16_t> currentOutPayloadCamera = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> currentOutPayloadCamera = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this); P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this);
@ -897,13 +880,13 @@ namespace PDU2 {
P60System::PDU2_VOLTAGE_OUT_RW, this); P60System::PDU2_VOLTAGE_OUT_RW, this);
lp_var_t<int16_t> voltageOutTCSBoardHeaterIn = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutTCSBoardHeaterIn = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this); P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this);
lp_var_t<int16_t> voltageOutSUS = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutSUSRedundant = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this); P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this);
lp_var_t<int16_t> voltageOutDeplMechanism = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutDeplMechanism = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this); P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this);
lp_var_t<int16_t> voltageOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this); P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this);
lp_var_t<int16_t> voltageOutACSBoard = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutACSBoardSideB = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this); P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this);
lp_var_t<int16_t> voltageOutPayloadCamera = lp_var_t<int16_t>(sid.objectId, lp_var_t<int16_t> voltageOutPayloadCamera = lp_var_t<int16_t>(sid.objectId,
P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this); P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this);
@ -922,8 +905,6 @@ namespace PDU2 {
P60System::PDU2_CONV_EN_2, this); P60System::PDU2_CONV_EN_2, this);
lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_CONV_EN_3, this); P60System::PDU2_CONV_EN_3, this);
lp_var_t<uint8_t> dummyByteConvEn = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_DUMMY_BYTE_CONV_EN, this);
/** Output channels enable status */ /** Output channels enable status */
lp_var_t<uint8_t> outEnabledQ7S = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledQ7S = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_Q7S, this); P60System::PDU2_OUT_EN_Q7S, this);
@ -933,19 +914,16 @@ namespace PDU2 {
P60System::PDU2_OUT_EN_RW, this); P60System::PDU2_OUT_EN_RW, this);
lp_var_t<uint8_t> outEnabledTCSBoardHeaterIn = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledTCSBoardHeaterIn = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this); P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this);
lp_var_t<uint8_t> outEnabledSUS = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledSUSRedundant = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_SUS_REDUNDANT, this); P60System::PDU2_OUT_EN_SUS_REDUNDANT, this);
lp_var_t<uint8_t> outEnabledDeplMechanism = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledDeplMechanism = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this); P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this);
lp_var_t<uint8_t> outEnabledPlPCDUCh6 = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledPlPCDUCh6 = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this); P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this);
lp_var_t<uint8_t> outEnabledAcsBoard = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledAcsBoardSideB = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this); P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this);
lp_var_t<uint8_t> outEnabledPayloadCamera = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> outEnabledPayloadCamera = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, this); P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, this);
/** Dummy byte which is received with a full hk table request. */
lp_var_t<uint8_t> dummyByteOutEn = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_DUMMY_BYTE_OUT_EN, this);
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU2_BOOTCAUSE, this); P60System::PDU2_BOOTCAUSE, this);
@ -960,9 +938,6 @@ namespace PDU2 {
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_BATT_MODE, this); P60System::PDU2_BATT_MODE, this);
/** Dummy byte which is received with full hk table request: */
lp_var_t<uint8_t> dummyByteBattMode = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_DUMMY_BYTE_BATT_MODE, this);
/** Number of detected latchups on each output channel */ /** Number of detected latchups on each output channel */
lp_var_t<uint16_t> latchupsQ7S = lp_var_t<uint16_t>(sid.objectId, lp_var_t<uint16_t> latchupsQ7S = lp_var_t<uint16_t>(sid.objectId,
@ -1021,9 +996,6 @@ namespace PDU2 {
P60System::PDU2_DEVICE_6_STATUS, this); P60System::PDU2_DEVICE_6_STATUS, this);
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_DEVICE_7_STATUS, this); P60System::PDU2_DEVICE_7_STATUS, this);
/** Two dummy bytes will be inserted here by a full hk table request. */
lp_var_t<uint16_t> dummyBytesdeviceStatus = lp_var_t<uint16_t>(sid.objectId,
P60System::PDU2_DUMMY_DEVICE_STATUS, this);
/** Number of reboots triggered by the ground watchdog */ /** Number of reboots triggered by the ground watchdog */
lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId,
@ -1037,7 +1009,7 @@ namespace PDU2 {
/** Number of reboots triggered through the CSP watchdog */ /** Number of reboots triggered through the CSP watchdog */
lp_var_t<uint32_t> csp1WdtReboots = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> csp1WdtReboots = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU2_WDT_CNT_CSP1, this); P60System::PDU2_WDT_CNT_CSP1, this);
lp_var_t<uint32_t> cs2pWdtReboots = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> csp2WdtReboots = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU2_WDT_CNT_CSP2, this); P60System::PDU2_WDT_CNT_CSP2, this);
/** Ground watchdog remaining seconds before rebooting */ /** Ground watchdog remaining seconds before rebooting */
lp_var_t<uint32_t> groundWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> groundWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
@ -1049,9 +1021,9 @@ namespace PDU2 {
lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId, lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
P60System::PDU2_WDT_CAN_LEFT, this); P60System::PDU2_WDT_CAN_LEFT, this);
/** CSP watchdog remaining pings before rebooting. */ /** CSP watchdog remaining pings before rebooting. */
lp_var_t<uint8_t> csp1WatchdogSecondsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_WDT_CSP_LEFT1, this); P60System::PDU2_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp2WatchdogSecondsLeft = lp_var_t<uint8_t>(sid.objectId, lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
P60System::PDU2_WDT_CSP_LEFT2, this); P60System::PDU2_WDT_CSP_LEFT2, this);
}; };
} }