diff --git a/fsfw b/fsfw index 0677de39..43917d98 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 0677de39aa4c20e8ee1c066909818d2dfffcbc2a +Subproject commit 43917d98c025b446aa0d79d2166b1f031fb288ae diff --git a/linux/devices/GPSHyperionLinuxController.cpp b/linux/devices/GPSHyperionLinuxController.cpp index 1a1f752e..b892dc70 100644 --- a/linux/devices/GPSHyperionLinuxController.cpp +++ b/linux/devices/GPSHyperionLinuxController.cpp @@ -79,9 +79,11 @@ ReturnValue_t GPSHyperionLinuxController::initializeLocalDataPool( localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry()); localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry()); localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry()); + bool enablePeriodicHk = false; #if OBSW_ENABLE_PERIODIC_HK == 1 - poolManager.subscribeForPeriodicPacket(gpsSet.getSid(), true, 2.0, false); + enablePeriodicHk = true; #endif + poolManager.subscribeForPeriodicPacket(gpsSet.getSid(), enablePeriodicHk, 2.0, false); return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/ACUHandler.cpp b/mission/devices/ACUHandler.cpp index b7a54088..7c6e048c 100644 --- a/mission/devices/ACUHandler.cpp +++ b/mission/devices/ACUHandler.cpp @@ -194,81 +194,82 @@ void ACUHandler::parseHkTableReply(const uint8_t *packet) { ReturnValue_t ACUHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL5, new PoolEntry({0})); + using namespace P60System; + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_CURRENT_IN_CHANNEL5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VOLTAGE_IN_CHANNEL5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VCC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_TEMPERATURE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_TEMPERATURE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_TEMPERATURE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_MPPT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_MPPT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_VBOOST_CHANNEL5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_POWER_CHANNEL5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_EN_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_EN_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_EN_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_EN_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_EN_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_EN_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DAC_RAW_5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DAC_RAW_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_BOOTCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_BOOTCNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_RESET_CAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_MPPT_TIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_MPPT_PERIOD, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_BOOTCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_BOOTCNT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_RESET_CAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_MPPT_TIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_MPPT_PERIOD, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_7, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_0_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_1_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_2_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_3_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_4_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_5_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_6_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_DEVICE_7_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::ACU_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(pool::ACU_WDT_GND_LEFT, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/P60DockHandler.cpp b/mission/devices/P60DockHandler.cpp index ed209b86..455784fb 100644 --- a/mission/devices/P60DockHandler.cpp +++ b/mission/devices/P60DockHandler.cpp @@ -71,95 +71,29 @@ void P60DockHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t * } void P60DockHandler::parseHkTableReply(const uint8_t *packet) { + using namespace P60Dock; uint16_t dataOffset = 0; - p60dockHkTableDataset.read(); + PoolReadGuard pg(&p60dockHkTableDataset); + if (pg.getReadResult() != HasReturnvaluesIF::RETURN_OK) { + return; + } /** * Fist 10 bytes contain the gomspace header. Each variable is preceded by the 16-bit table * address. */ dataOffset += 12; - p60dockHkTableDataset.currentAcuVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentPdu1Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentX3IdleVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentPdu2Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentAcuVbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentPdu1Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentX3IdleVbat = - *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentPdu2Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentStackVbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentStack3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentStack5V = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentGS3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.currentGS5V = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - - p60dockHkTableDataset.voltageAcuVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageAcuVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltagePdu1Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageX3IdleVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltagePdu2Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageAcuVbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltagePdu1Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageX3IdleVbat = - *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltagePdu2Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageStackVbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageStack3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageStack5V = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.voltageGS3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - - p60dockHkTableDataset.outputEnableStateAcuVcc = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStatePdu1Vcc = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateX3IdleVcc = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStatePdu2Vcc = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateAcuVbat = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStatePdu1Vbat = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateX3IdleVbat = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStatePdu2Vbat = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateStackVbat = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateStack3V3 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateStack5V = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateGS3V3 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.outputEnableStateGS5V = *(packet + dataOffset); - dataOffset += 3; + for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) { + p60dockHkTableDataset.currents[idx] = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); + dataOffset += 4; + } + for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) { + p60dockHkTableDataset.voltages[idx] = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); + dataOffset += 4; + } + for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) { + p60dockHkTableDataset.outputEnables[idx] = *(packet + dataOffset); + dataOffset += 3; + } p60dockHkTableDataset.temperature1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); dataOffset += 4; @@ -167,6 +101,7 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) { dataOffset += 4; p60dockHkTableDataset.bootcause = *(packet + dataOffset) << 24 | + *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3); dataOffset += 6; @@ -187,35 +122,10 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) { p60dockHkTableDataset.converter5VStatus = *(packet + dataOffset); dataOffset += 3; - p60dockHkTableDataset.latchupsAcuVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsAcuVcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsPdu1Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsX3IdleVcc = - *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsPdu2Vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsAcuVbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsPdu1Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsX3IdleVbat = - *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsPdu2Vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsStackVbat = - *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsStack3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsStack5V = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; - p60dockHkTableDataset.latchupsGS3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); - dataOffset += 4; + for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) { + p60dockHkTableDataset.latchups[idx] = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); + dataOffset += 4; + } p60dockHkTableDataset.dockVbatVoltageValue = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); @@ -234,39 +144,14 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) { *(packet + dataOffset) << 8 | *(packet + dataOffset + 1); dataOffset += 4; - p60dockHkTableDataset.device0 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device1 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device2 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device3 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device4 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device5 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device6 = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device7 = *(packet + dataOffset); - dataOffset += 3; - - p60dockHkTableDataset.device0Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device1Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device2Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device3Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device4Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device5Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device6Status = *(packet + dataOffset); - dataOffset += 3; - p60dockHkTableDataset.device7Status = *(packet + dataOffset); - dataOffset += 3; + for (uint8_t idx = 0; idx < NUM_DEVS; idx++) { + p60dockHkTableDataset.devicesType[idx] = *(packet + dataOffset); + dataOffset += 3; + } + for (uint8_t idx = 0; idx < NUM_DEVS; idx++) { + p60dockHkTableDataset.devicesStatus[idx] = *(packet + dataOffset); + dataOffset += 3; + } p60dockHkTableDataset.dearmStatus = *(packet + dataOffset); dataOffset += 3; @@ -320,130 +205,62 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) { p60dockHkTableDataset.ant6Depl = *(packet + dataOffset); dataOffset += 3; p60dockHkTableDataset.ar6Depl = *(packet + dataOffset); - - p60dockHkTableDataset.commit(); + p60dockHkTableDataset.setValidity(true, true); } ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_ACU_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_X3_IDLE_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_ACU_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_X3_IDLE_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_STACK_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_STACK_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_STACK_5V, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_GS3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CURRENT_GS5V, new PoolEntry({0})); + using namespace P60System; + localDataPoolMap.emplace(pool::CURRENTS, &hkCurrents); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_ACU_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_X3_IDLE_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_ACU_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_X3_IDLE_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_STACK_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_STACK_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_STACK_5V, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_GS3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VOLTAGE_GS5V, new PoolEntry({0})); + localDataPoolMap.emplace(pool::VOLTAGES, &hkVoltages); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_ACU_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VCC, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_ACU_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VBAT, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_STACK_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_STACK_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_STACK_5V, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_GS3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_OUTPUTENABLE_GS5V, new PoolEntry({0})); + localDataPoolMap.emplace(pool::OUTPUT_ENABLE, &outputEnables); - localDataPoolMap.emplace(P60System::P60DOCK_TEMPERATURE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_TEMPERATURE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_TEMPERATURE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_TEMPERATURE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BOOT_CAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BOOT_CNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_RESETCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_HEATER_ON, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_CONV_5V_ENABLE_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BOOT_CAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BOOT_CNT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_RESETCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_HEATER_ON, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_CONV_5V_ENABLE_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_ACU_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_X3_IDLE_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_ACU_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_X3_IDLE_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_STACK_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_STACK_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_STACK_5V, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_GS3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_LATCHUP_GS5V, new PoolEntry({0})); + localDataPoolMap.emplace(pool::LATCHUPS, &latchups); - localDataPoolMap.emplace(P60System::P60DOCK_VBAT_VALUE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_VCC_CURRENT_VALUE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATTERY_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATTERY_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_DOCK_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_DOCK_VCC_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATTERY_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATTERY_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATTERY_TEMPERATURE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATTERY_TEMPERATURE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATTERY_TEMPERATURE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATTERY_TEMPERATURE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(pool::DEVICES_TYPE, &devicesType); + localDataPoolMap.emplace(pool::DEVICES_STATUS, &devicesStatus); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_DEARM_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_DEARM_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CNT_I2C, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CNT_CAN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CNT_CSP_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CNT_CSP_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CNT_I2C, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CNT_CAN, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CNT_CSP_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CNT_CSP_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_I2C_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CAN_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CSP_LEFT_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_WDT_CSP_LEFT_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_GND_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_I2C_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CAN_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CSP_LEFT_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_WDT_CSP_LEFT_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATT_CHARGE_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_BATT_DISCHARGE_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATT_CHARGE_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_BATT_DISCHARGE_CURRENT, new PoolEntry({0})); - - localDataPoolMap.emplace(P60System::P60DOCK_ANT6_DEPL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::P60DOCK_AR6_DEPL, new PoolEntry({0})); - -#if OBSW_ENABLE_PERIODIC_HK == 1 - poolManager.subscribeForPeriodicPacket(p60dockHkTableDataset.getSid(), false, 0.8, true); -#endif + localDataPoolMap.emplace(pool::P60DOCK_ANT6_DEPL, new PoolEntry({0})); + localDataPoolMap.emplace(pool::P60DOCK_AR6_DEPL, new PoolEntry({0})); + poolManager.subscribeForPeriodicPacket(p60dockHkTableDataset.getSid(), false, 10.0, false); return HasReturnvaluesIF::RETURN_OK; } @@ -477,6 +294,7 @@ ReturnValue_t P60DockHandler::printStatus(DeviceCommandId_t cmd) { } void P60DockHandler::printHkTableSwitchIV() { + using namespace P60Dock; sif::info << "P60 Dock Info:" << std::endl; sif::info << "Boot Cause: " << p60dockHkTableDataset.bootcause << " | Boot Count: " << std::setw(4) << std::right << p60dockHkTableDataset.bootCount @@ -491,70 +309,43 @@ void P60DockHandler::printHkTableSwitchIV() { sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "BATT" << std::dec << "| -, " << std::setw(4) << std::right << p60dockHkTableDataset.batteryCurrent.value << ", " << std::setw(5) << p60dockHkTableDataset.batteryVoltage.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VCC" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStateAcuVcc.value) << ", " << std::setw(4) - << std::right << p60dockHkTableDataset.currentAcuVcc.value << ", " << std::setw(5) - << p60dockHkTableDataset.voltageAcuVcc.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VBAT" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStateAcuVbat.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentAcuVbat.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltageAcuVbat.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VCC" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStatePdu1Vcc.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentPdu1Vcc.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltagePdu1Vcc.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VBAT" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStatePdu1Vbat.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentPdu1Vbat.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltagePdu1Vbat.value << std::endl; + auto genericPrintoutHandler = [&](std::string name, uint8_t idx) { + sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << name << std::dec << "| " + << unsigned(p60dockHkTableDataset.outputEnables[idx]) << ", " << std::setw(4) + << std::right << p60dockHkTableDataset.currents[idx] << ", " << std::setw(5) + << p60dockHkTableDataset.voltages[idx] << std::endl; + }; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VCC" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vcc.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vcc.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltagePdu2Vcc.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VBAT" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vbat.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vbat.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltagePdu2Vbat.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack VBAT" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStateStackVbat.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentStackVbat.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltageStackVbat.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 3V3" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStateStack3V3.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentStack3V3.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltageStack3V3.value << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 5V" << std::dec << "| " - << unsigned(p60dockHkTableDataset.outputEnableStateStack5V.value) << ", " - << std::setw(4) << std::right << p60dockHkTableDataset.currentStack5V.value << ", " - << std::setw(5) << p60dockHkTableDataset.voltageStack5V.value << std::endl; + genericPrintoutHandler("ACU VCC", hk::ACU_VCC); + genericPrintoutHandler("ACU VBAT", hk::ACU_VBAT); + genericPrintoutHandler("PDU1 VCC", hk::PDU1_VCC); + genericPrintoutHandler("PDU1 VBAT", hk::PDU1_VBAT); + genericPrintoutHandler("PDU2 VCC", hk::PDU2_VCC); + genericPrintoutHandler("PDU2 VBAT", hk::PDU2_VBAT); + genericPrintoutHandler("Stack VBAT", hk::STACK_VBAT); + genericPrintoutHandler("Stack 3V3", hk::STACK_3V3); + genericPrintoutHandler("Stack 5V", hk::STACK_5V); } void P60DockHandler::printHkTableLatchups() { + using namespace P60Dock; sif::info << "P60 Latchup Information" << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VCC" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsAcuVcc << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VBAT" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsAcuVbat << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VCC" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu1Vcc << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VBAT" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu1Vbat << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VCC" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu2Vcc << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VBAT" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu2Vbat << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 3V3" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsStack3V3 << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 5V" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsStack5V << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "GS 3V3" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsGS3V3 << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "GS 5V" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsGS5V << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "X3 VBAT" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsX3IdleVbat << std::endl; - sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "X3 VCC" << std::dec << "| " - << std::setw(4) << std::right << p60dockHkTableDataset.latchupsX3IdleVcc << std::endl; + auto genericPrintoutHandler = [&](std::string name, uint8_t idx) { + sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << name << std::dec << "| " + << std::setw(4) << std::right << p60dockHkTableDataset.latchups[idx] << std::endl; + }; + genericPrintoutHandler("ACU VCC", hk::ACU_VCC); + genericPrintoutHandler("ACU VBAT", hk::ACU_VBAT); + genericPrintoutHandler("PDU1 VCC", hk::PDU1_VCC); + genericPrintoutHandler("PDU1 VBAT", hk::PDU1_VBAT); + genericPrintoutHandler("PDU2 VCC", hk::PDU2_VCC); + genericPrintoutHandler("PDU2 VBAT", hk::PDU2_VBAT); + genericPrintoutHandler("STACK VBAT", hk::STACK_VBAT); + genericPrintoutHandler("STACK 3V3", hk::STACK_3V3); + genericPrintoutHandler("STACK 5V", hk::STACK_5V); + genericPrintoutHandler("GS 3V3", hk::GS3V3); + genericPrintoutHandler("GS 5V", hk::GS5V); + genericPrintoutHandler("X3 VBAT", hk::X3_IDLE_VBAT); + genericPrintoutHandler("X3 VCC", hk::X3_IDLE_VCC); } diff --git a/mission/devices/P60DockHandler.h b/mission/devices/P60DockHandler.h index 38ca391a..b86f37bb 100644 --- a/mission/devices/P60DockHandler.h +++ b/mission/devices/P60DockHandler.h @@ -39,6 +39,13 @@ class P60DockHandler : public GomspaceDeviceHandler { P60Dock::HkTableDataset p60dockHkTableDataset; static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 16; + PoolEntry hkCurrents = PoolEntry(P60Dock::hk::CHNLS_LEN); + PoolEntry hkVoltages = PoolEntry(P60Dock::hk::CHNLS_LEN); + PoolEntry outputEnables = PoolEntry(P60Dock::hk::CHNLS_LEN); + PoolEntry latchups = PoolEntry(P60Dock::hk::CHNLS_LEN); + + PoolEntry devicesType = PoolEntry(P60Dock::NUM_DEVS); + PoolEntry devicesStatus = PoolEntry(P60Dock::NUM_DEVS); /** * @brief Function extracts the hk table information from the received csp packet and stores * the values in the p60dockHkTableDataset. diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 837d4f37..44b9181a 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -376,221 +376,210 @@ object_id_t PCDUHandler::getObjectId() const { return SystemObject::getObjectId( ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { using namespace pcduSwitches; - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, + using namespace P60System; + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VCC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, + localDataPoolMap.emplace(pool::PDU2_OUT_EN_Q7S, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH0_Q7S]})); localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, + pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8]})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_RW, + localDataPoolMap.emplace(pool::PDU2_OUT_EN_RW, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH2_RW_5V]})); #ifdef TE0720_1CFA - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({1})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({1})); #else localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, + pool::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V]})); #endif localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_SUS_REDUNDANT, + pool::PDU2_OUT_EN_SUS_REDUNDANT, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH4_SUS_REDUNDANT_3V3]})); localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, + pool::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V]})); localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, + pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8]})); localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, + pool::PDU2_OUT_EN_ACS_BOARD_SIDE_B, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3]})); localDataPoolMap.emplace( - P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, + pool::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU2_CH8_PAYLOAD_CAMERA]})); - localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BOOTCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BOOTCNT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_RESETCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BATT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_ACS_BOARD_SIDE_B, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_7, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_0_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_1_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_2_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_3_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_4_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_5_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_6_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_7_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CAN, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CSP1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CSP2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_GND_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_I2C_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CAN_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_I2C, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CAN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CSP1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CSP2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_I2C_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CAN_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CSP_LEFT1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CSP_LEFT2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_TCS_BOARD_3V3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_STAR_TRACKER, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_SUS_NOMINAL, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CURRENT_OUT_CHANNEL8, new PoolEntry({0})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, + pool::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH0_TCS_BOARD_3V3]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_SYRLINKS, + pool::PDU1_VOLTAGE_OUT_SYRLINKS, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH1_SYRLINKS_12V]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, + pool::PDU1_VOLTAGE_OUT_STAR_TRACKER, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH2_STAR_TRACKER_5V]})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_MGT, + localDataPoolMap.emplace(pool::PDU1_VOLTAGE_OUT_MGT, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH3_MGT_5V]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_SUS_NOMINAL, + pool::PDU1_VOLTAGE_OUT_SUS_NOMINAL, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH4_SUS_NOMINAL_3V3]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, + pool::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH5_SOLAR_CELL_EXP_5V]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_PLOC, + pool::PDU1_VOLTAGE_OUT_PLOC, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH6_PLOC_12V]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, + pool::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH7_ACS_A_SIDE_3V3]})); localDataPoolMap.emplace( - P60System::PDU1_VOLTAGE_OUT_CHANNEL8, + pool::PDU1_VOLTAGE_OUT_CHANNEL8, new PoolEntry({INIT_SWITCH_STATES[Switches::PDU1_CH8_UNOCCUPIED]})); - localDataPoolMap.emplace(P60System::PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_VCC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CONV_EN_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CONV_EN_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_CONV_EN_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_ACS_BOARD_SIDE_A, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_TCS_BOARD_3V3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_STAR_TRACKER, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_SUS_NOMINAL, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_SOLAR_CELL_EXP, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_ACS_BOARD_SIDE_A, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_OUT_EN_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BOOTCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BOOTCNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_RESETCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BATT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_BOOTCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_BOOTCNT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_RESETCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_BATT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_ACS_BOARD_SIDE_A, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_TCS_BOARD_3V3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_STAR_TRACKER, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_SUS_NOMINAL, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_SOLAR_CELL_EXP, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_ACS_BOARD_SIDE_A, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_LATCHUP_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_7, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_0_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_1_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_2_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_3_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_4_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_5_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_6_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_DEVICE_7_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_I2C, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CAN, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CSP1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CSP2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_GND_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_I2C_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CAN_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CNT_I2C, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CNT_CAN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CNT_CSP1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CNT_CSP2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_I2C_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CAN_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CSP_LEFT1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU1_WDT_CSP_LEFT2, new PoolEntry({0})); return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/PDU1Handler.cpp b/mission/devices/PDU1Handler.cpp index 38256cf9..e0c369a3 100644 --- a/mission/devices/PDU1Handler.cpp +++ b/mission/devices/PDU1Handler.cpp @@ -329,92 +329,104 @@ void PDU1Handler::parseHkTableReply(const uint8_t *packet) { ReturnValue_t PDU1Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CURRENT_OUT_CHANNEL8, new PoolEntry({0})); - - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VOLTAGE_OUT_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_SUS_NOMINAL, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CURRENT_OUT_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_CONV_EN_3, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_STAR_TRACKER, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_SUS_NOMINAL, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VOLTAGE_OUT_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_ACS_BOARD_SIDE_A, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_OUT_EN_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VCC, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CONV_EN_1, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CONV_EN_2, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_CONV_EN_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BOOTCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BOOTCNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_RESETCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_BATT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_TCS_BOARD_3V3, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_STAR_TRACKER, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_SUS_NOMINAL, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_SOLAR_CELL_EXP, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_ACS_BOARD_SIDE_A, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_OUT_EN_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_TCS_BOARD_3V3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SYRLINKS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_STAR_TRACKER, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_MGT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SUS_NOMINAL, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_SOLAR_CELL_EXP, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_PLOC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_ACS_BOARD_SIDE_A, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_LATCHUP_CHANNEL8, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_BOOTCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_BOOTCNT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_RESETCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_BATT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_TCS_BOARD_3V3, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_SYRLINKS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_STAR_TRACKER, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_MGT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_SUS_NOMINAL, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_SOLAR_CELL_EXP, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_PLOC, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_ACS_BOARD_SIDE_A, + new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_LATCHUP_CHANNEL8, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_0, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_1, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_2, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_3, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_4, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_5, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_6, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_7, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_I2C, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CAN, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CSP1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CNT_CSP2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_GND_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_I2C_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CAN_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT2, new PoolEntry({0})); -#if OBSW_ENABLE_PERIODIC_HK == 1 + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_0_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_1_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_2_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_3_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_4_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_5_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_6_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_DEVICE_7_STATUS, new PoolEntry({0})); + + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CNT_I2C, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CNT_CAN, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CNT_CSP1, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CNT_CSP2, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_I2C_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CAN_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CSP_LEFT1, new PoolEntry({0})); + localDataPoolMap.emplace(P60System::pool::PDU1_WDT_CSP_LEFT2, new PoolEntry({0})); poolManager.subscribeForPeriodicPacket(pdu1HkTableDataset.getSid(), false, 0.4, true); -#endif return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/PDU2Handler.cpp b/mission/devices/PDU2Handler.cpp index 512d8745..48e7f90e 100644 --- a/mission/devices/PDU2Handler.cpp +++ b/mission/devices/PDU2Handler.cpp @@ -266,104 +266,94 @@ void PDU2Handler::parseHkTableReply(const uint8_t *packet) { ReturnValue_t PDU2Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, + using namespace P60System; + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VCC, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_VBAT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_CONV_EN_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VCC, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_VBAT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_CONV_EN_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_RW, new PoolEntry({0})); #ifdef TE0720_1CFA - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({1})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({1})); #else - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, new PoolEntry({0})); #endif - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_OUT_EN_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_BOOTCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_BOOTCNT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_UPTIME, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_RESETCAUSE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_BATT_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BOOTCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BOOTCNT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_UPTIME, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_RESETCAUSE, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_BATT_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_Q7S, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_RW, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_SUS_REDUNDANT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, - new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_ACS_BOARD_SIDE_B, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_LATCHUP_PAYLOAD_CAMERA, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_Q7S, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_RW, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_SUS_REDUNDANT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_ACS_BOARD_SIDE_B, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_LATCHUP_PAYLOAD_CAMERA, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_0, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_3, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_4, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_5, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_6, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_7, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_0, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_3, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_4, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_5, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_6, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_7, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_0_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_1_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_2_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_3_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_4_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_5_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_6_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_DEVICE_7_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_0_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_1_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_2_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_3_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_4_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_5_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_6_STATUS, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_DEVICE_7_STATUS, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_GND, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_I2C, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CAN, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CSP1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CNT_CSP2, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_GND_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_I2C_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CAN_LEFT, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT1, new PoolEntry({0})); - localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_GND, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_I2C, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CAN, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CSP1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CNT_CSP2, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_GND_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_I2C_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CAN_LEFT, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CSP_LEFT1, new PoolEntry({0})); + localDataPoolMap.emplace(pool::PDU2_WDT_CSP_LEFT2, new PoolEntry({0})); #if OBSW_ENABLE_PERIODIC_HK == 1 poolManager.subscribeForPeriodicPacket(pdu2HkTableDataset.getSid(), false, 0.4, true); #endif diff --git a/mission/devices/devicedefinitions/GomspaceDefinitions.h b/mission/devices/devicedefinitions/GomspaceDefinitions.h index d06c7eef..3a66ca69 100644 --- a/mission/devices/devicedefinitions/GomspaceDefinitions.h +++ b/mission/devices/devicedefinitions/GomspaceDefinitions.h @@ -42,46 +42,13 @@ static const DeviceCommandId_t PRINT_LATCHUPS = 33; } // namespace GOMSPACE namespace P60System { -enum P60SytemPoolIds : lp_id_t { - P60DOCK_CURRENT_ACU_VCC, - P60DOCK_CURRENT_PDU1_VCC, - P60DOCK_CURRENT_X3_IDLE_VCC, - P60DOCK_CURRENT_PDU2_VCC, - P60DOCK_CURRENT_ACU_VBAT, - P60DOCK_CURRENT_PDU1_VBAT, - P60DOCK_CURRENT_X3_IDLE_VBAT, - P60DOCK_CURRENT_PDU2_VBAT, - P60DOCK_CURRENT_STACK_VBAT, - P60DOCK_CURRENT_STACK_3V3, - P60DOCK_CURRENT_STACK_5V, - P60DOCK_CURRENT_GS3V3, - P60DOCK_CURRENT_GS5V, - P60DOCK_VOLTAGE_ACU_VCC, - P60DOCK_VOLTAGE_PDU1_VCC, - P60DOCK_VOLTAGE_X3_IDLE_VCC, - P60DOCK_VOLTAGE_PDU2_VCC, - P60DOCK_VOLTAGE_ACU_VBAT, - P60DOCK_VOLTAGE_PDU1_VBAT, - P60DOCK_VOLTAGE_X3_IDLE_VBAT, - P60DOCK_VOLTAGE_PDU2_VBAT, - P60DOCK_VOLTAGE_STACK_VBAT, - P60DOCK_VOLTAGE_STACK_3V3, - P60DOCK_VOLTAGE_STACK_5V, - P60DOCK_VOLTAGE_GS3V3, - P60DOCK_VOLTAGE_GS5V, - P60DOCK_OUTPUTENABLE_ACU_VCC, - P60DOCK_OUTPUTENABLE_PDU1_VCC, - P60DOCK_OUTPUTENABLE_X3_IDLE_VCC, - P60DOCK_OUTPUTENABLE_PDU2_VCC, - P60DOCK_OUTPUTENABLE_ACU_VBAT, - P60DOCK_OUTPUTENABLE_PDU1_VBAT, - P60DOCK_OUTPUTENABLE_X3_IDLE_VBAT, - P60DOCK_OUTPUTENABLE_PDU2_VBAT, - P60DOCK_OUTPUTENABLE_STACK_VBAT, - P60DOCK_OUTPUTENABLE_STACK_3V3, - P60DOCK_OUTPUTENABLE_STACK_5V, - P60DOCK_OUTPUTENABLE_GS3V3, - P60DOCK_OUTPUTENABLE_GS5V, + +namespace pool { + +enum Ids : lp_id_t { + CURRENTS, + VOLTAGES, + OUTPUT_ENABLE, P60DOCK_TEMPERATURE_1, P60DOCK_TEMPERATURE_2, P60DOCK_BOOT_CAUSE, @@ -91,41 +58,16 @@ enum P60SytemPoolIds : lp_id_t { P60DOCK_BATT_MODE, P60DOCK_HEATER_ON, P60DOCK_CONV_5V_ENABLE_STATUS, - P60DOCK_LATCHUP_ACU_VCC, - P60DOCK_LATCHUP_PDU1_VCC, - P60DOCK_LATCHUP_X3_IDLE_VCC, - P60DOCK_LATCHUP_PDU2_VCC, - P60DOCK_LATCHUP_ACU_VBAT, - P60DOCK_LATCHUP_PDU1_VBAT, - P60DOCK_LATCHUP_X3_IDLE_VBAT, - P60DOCK_LATCHUP_PDU2_VBAT, - P60DOCK_LATCHUP_STACK_VBAT, - P60DOCK_LATCHUP_STACK_3V3, - P60DOCK_LATCHUP_STACK_5V, - P60DOCK_LATCHUP_GS3V3, - P60DOCK_LATCHUP_GS5V, - P60DOCK_VBAT_VALUE, - P60DOCK_VCC_CURRENT_VALUE, + LATCHUPS, + P60DOCK_DOCK_VBAT, + P60DOCK_DOCK_VCC_CURRENT, + // Difference between charge and discharge P60DOCK_BATTERY_CURRENT, P60DOCK_BATTERY_VOLTAGE, P60DOCK_BATTERY_TEMPERATURE_1, P60DOCK_BATTERY_TEMPERATURE_2, - P60DOCK_DEVICE_0, - P60DOCK_DEVICE_1, - P60DOCK_DEVICE_2, - P60DOCK_DEVICE_3, - P60DOCK_DEVICE_4, - P60DOCK_DEVICE_5, - P60DOCK_DEVICE_6, - P60DOCK_DEVICE_7, - P60DOCK_DEVICE_0_STATUS, - P60DOCK_DEVICE_1_STATUS, - P60DOCK_DEVICE_2_STATUS, - P60DOCK_DEVICE_3_STATUS, - P60DOCK_DEVICE_4_STATUS, - P60DOCK_DEVICE_5_STATUS, - P60DOCK_DEVICE_6_STATUS, - P60DOCK_DEVICE_7_STATUS, + DEVICES_TYPE, + DEVICES_STATUS, P60DOCK_DEVICE_TYPE_GROUP, P60DOCK_DEVICE_STATUS_GROUP, P60DOCK_DEARM_STATUS, @@ -359,9 +301,33 @@ enum P60SytemPoolIds : lp_id_t { ACU_WDT_GND_LEFT }; } +} // namespace P60System namespace P60Dock { +static constexpr uint8_t NUM_DEVS = 8; + +namespace hk { + +enum Index : uint8_t { + ACU_VCC = 0, + PDU1_VCC = 1, + X3_IDLE_VCC = 2, + PDU2_VCC = 3, + ACU_VBAT = 4, + PDU1_VBAT = 5, + X3_IDLE_VBAT = 6, + PDU2_VBAT = 7, + STACK_VBAT = 8, + STACK_3V3 = 9, + STACK_5V = 10, + GS3V3 = 11, + GS5V = 12, + CHNLS_LEN = 13 +}; + +} + enum SwitchChannels : uint8_t { ACU = 0, PDU1 = 1, @@ -408,207 +374,99 @@ class HkTableDataset : public StaticLocalDataSet { : StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) {} /** Measured output currents */ - lp_var_t currentAcuVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_ACU_VCC, this); - lp_var_t currentPdu1Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_PDU1_VCC, this); - lp_var_t currentX3IdleVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_X3_IDLE_VCC, this); - lp_var_t currentPdu2Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_PDU2_VCC, this); - lp_var_t currentAcuVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_ACU_VBAT, this); - lp_var_t currentPdu1Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_PDU1_VBAT, this); - lp_var_t currentX3IdleVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_X3_IDLE_VBAT, this); - lp_var_t currentPdu2Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_PDU2_VBAT, this); - lp_var_t currentStackVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_STACK_VBAT, this); - lp_var_t currentStack3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_STACK_3V3, this); - lp_var_t currentStack5V = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_STACK_5V, this); - lp_var_t currentGS3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_GS3V3, this); - lp_var_t currentGS5V = - lp_var_t(sid.objectId, P60System::P60DOCK_CURRENT_GS5V, this); + lp_vec_t currents = + lp_vec_t(sid.objectId, P60System::pool::CURRENTS, + this); /** Measured output voltages */ - lp_var_t voltageAcuVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_ACU_VCC, this); - lp_var_t voltagePdu1Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_PDU1_VCC, this); - lp_var_t voltageX3IdleVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_X3_IDLE_VCC, this); - lp_var_t voltagePdu2Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_PDU2_VCC, this); - lp_var_t voltageAcuVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_ACU_VBAT, this); - lp_var_t voltagePdu1Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_PDU1_VBAT, this); - lp_var_t voltageX3IdleVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_X3_IDLE_VBAT, this); - lp_var_t voltagePdu2Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_PDU2_VBAT, this); - lp_var_t voltageStackVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_STACK_VBAT, this); - lp_var_t voltageStack3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_STACK_3V3, this); - lp_var_t voltageStack5V = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_STACK_5V, this); - lp_var_t voltageGS3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_GS3V3, this); - lp_var_t voltageGS5V = - lp_var_t(sid.objectId, P60System::P60DOCK_VOLTAGE_GS5V, this); + lp_vec_t voltages = + lp_vec_t(sid.objectId, P60System::pool::VOLTAGES, + this); /** Output enable states */ - lp_var_t outputEnableStateAcuVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_ACU_VCC, this); - lp_var_t outputEnableStatePdu1Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_PDU1_VCC, this); - lp_var_t outputEnableStateX3IdleVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VCC, this); - lp_var_t outputEnableStatePdu2Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_PDU2_VCC, this); - lp_var_t outputEnableStateAcuVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_ACU_VBAT, this); - lp_var_t outputEnableStatePdu1Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_PDU1_VBAT, this); - lp_var_t outputEnableStateX3IdleVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VBAT, this); - lp_var_t outputEnableStatePdu2Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_PDU2_VBAT, this); - lp_var_t outputEnableStateStackVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_STACK_VBAT, this); - lp_var_t outputEnableStateStack3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_STACK_3V3, this); - lp_var_t outputEnableStateStack5V = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_STACK_5V, this); - lp_var_t outputEnableStateGS3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_GS3V3, this); - lp_var_t outputEnableStateGS5V = - lp_var_t(sid.objectId, P60System::P60DOCK_OUTPUTENABLE_GS5V, this); + lp_vec_t outputEnables = + lp_vec_t(sid.objectId, P60System::pool::OUTPUT_ENABLE, + this); lp_var_t temperature1 = - lp_var_t(sid.objectId, P60System::P60DOCK_TEMPERATURE_1, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_TEMPERATURE_1, this); lp_var_t temperature2 = - lp_var_t(sid.objectId, P60System::P60DOCK_TEMPERATURE_2, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_TEMPERATURE_2, this); lp_var_t bootcause = - lp_var_t(sid.objectId, P60System::P60DOCK_BOOT_CAUSE, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BOOT_CAUSE, this); lp_var_t bootCount = - lp_var_t(sid.objectId, P60System::P60DOCK_BOOT_CNT, this); - lp_var_t uptime = lp_var_t(sid.objectId, P60System::P60DOCK_UPTIME, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BOOT_CNT, this); + lp_var_t uptime = + lp_var_t(sid.objectId, P60System::pool::P60DOCK_UPTIME, this); lp_var_t resetcause = - lp_var_t(sid.objectId, P60System::P60DOCK_RESETCAUSE, this); - lp_var_t battMode = lp_var_t(sid.objectId, P60System::P60DOCK_BATT_MODE, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_RESETCAUSE, this); + lp_var_t battMode = + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATT_MODE, this); /** Battery heater control only possible on BP4 packs */ - lp_var_t heaterOn = lp_var_t(sid.objectId, P60System::P60DOCK_HEATER_ON, this); + lp_var_t heaterOn = + lp_var_t(sid.objectId, P60System::pool::P60DOCK_HEATER_ON, this); lp_var_t converter5VStatus = - lp_var_t(sid.objectId, P60System::P60DOCK_CONV_5V_ENABLE_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_CONV_5V_ENABLE_STATUS, this); /** Number of detected latchups on each output channel */ - lp_var_t latchupsAcuVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_ACU_VCC, this); - lp_var_t latchupsPdu1Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_PDU1_VCC, this); - lp_var_t latchupsX3IdleVcc = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_X3_IDLE_VCC, this); - lp_var_t latchupsPdu2Vcc = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_PDU2_VCC, this); - lp_var_t latchupsAcuVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_ACU_VBAT, this); - lp_var_t latchupsPdu1Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_PDU1_VBAT, this); - lp_var_t latchupsX3IdleVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_X3_IDLE_VBAT, this); - lp_var_t latchupsPdu2Vbat = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_PDU2_VBAT, this); - lp_var_t latchupsStackVbat = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_STACK_VBAT, this); - lp_var_t latchupsStack3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_STACK_3V3, this); - lp_var_t latchupsStack5V = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_STACK_5V, this); - lp_var_t latchupsGS3V3 = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_GS3V3, this); - lp_var_t latchupsGS5V = - lp_var_t(sid.objectId, P60System::P60DOCK_LATCHUP_GS5V, this); + lp_vec_t latchups = + lp_vec_t(sid.objectId, P60System::pool::LATCHUPS, + this); lp_var_t dockVbatVoltageValue = - lp_var_t(sid.objectId, P60System::P60DOCK_VBAT_VALUE, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_DOCK_VBAT, this); lp_var_t dockVccCurrent = - lp_var_t(sid.objectId, P60System::P60DOCK_VCC_CURRENT_VALUE, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_DOCK_VCC_CURRENT, this); // Difference between charge and discharge current lp_var_t batteryCurrent = - lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_CURRENT, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATTERY_CURRENT, this); lp_var_t batteryVoltage = - lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_VOLTAGE, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATTERY_VOLTAGE, this); lp_var_t batteryTemperature1 = - lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_TEMPERATURE_1, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATTERY_TEMPERATURE_1, this); lp_var_t batteryTemperature2 = - lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_TEMPERATURE_2, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATTERY_TEMPERATURE_2, this); - lp_var_t device0 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_0, this); - lp_var_t device1 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_1, this); - lp_var_t device2 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_2, this); - lp_var_t device3 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_3, this); - lp_var_t device4 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_4, this); - lp_var_t device5 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_5, this); - lp_var_t device6 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_6, this); - lp_var_t device7 = lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_7, this); - - lp_var_t device0Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_0_STATUS, this); - lp_var_t device1Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_1_STATUS, this); - lp_var_t device2Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_2_STATUS, this); - lp_var_t device3Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_3_STATUS, this); - lp_var_t device4Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_4_STATUS, this); - lp_var_t device5Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_5_STATUS, this); - lp_var_t device6Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_6_STATUS, this); - lp_var_t device7Status = - lp_var_t(sid.objectId, P60System::P60DOCK_DEVICE_7_STATUS, this); + lp_vec_t devicesType = + lp_vec_t(sid.objectId, P60System::pool::DEVICES_TYPE, this); + lp_vec_t devicesStatus = + lp_vec_t(sid.objectId, P60System::pool::DEVICES_STATUS, this); lp_var_t dearmStatus = - lp_var_t(sid.objectId, P60System::P60DOCK_DEARM_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_DEARM_STATUS, this); /** Number of reboots due to gnd, i2c, csp watchdog timeout */ lp_var_t wdtCntGnd = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_GND, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CNT_GND, this); lp_var_t wdtCntI2c = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_I2C, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CNT_I2C, this); lp_var_t wdtCntCan = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_CAN, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CNT_CAN, this); lp_var_t wdtCntCsp1 = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_CSP_1, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CNT_CSP_1, this); lp_var_t wdtCntCsp2 = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_CSP_2, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CNT_CSP_2, this); lp_var_t wdtGndLeft = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_GND_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_GND_LEFT, this); lp_var_t wdtI2cLeft = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_I2C_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_I2C_LEFT, this); lp_var_t wdtCanLeft = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CAN_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CAN_LEFT, this); lp_var_t wdtCspLeft1 = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CSP_LEFT_1, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CSP_LEFT_1, this); lp_var_t wdtCspLeft2 = - lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CSP_LEFT_2, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_WDT_CSP_LEFT_2, this); lp_var_t batteryChargeCurrent = - lp_var_t(sid.objectId, P60System::P60DOCK_BATT_CHARGE_CURRENT, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATT_CHARGE_CURRENT, this); lp_var_t batteryDischargeCurrent = - lp_var_t(sid.objectId, P60System::P60DOCK_BATT_DISCHARGE_CURRENT, this); - lp_var_t ant6Depl = lp_var_t(sid.objectId, P60System::P60DOCK_ANT6_DEPL, this); - lp_var_t ar6Depl = lp_var_t(sid.objectId, P60System::P60DOCK_AR6_DEPL, this); + lp_var_t(sid.objectId, P60System::pool::P60DOCK_BATT_DISCHARGE_CURRENT, this); + lp_var_t ant6Depl = + lp_var_t(sid.objectId, P60System::pool::P60DOCK_ANT6_DEPL, this); + lp_var_t ar6Depl = + lp_var_t(sid.objectId, P60System::pool::P60DOCK_AR6_DEPL, this); }; } // namespace P60Dock @@ -666,163 +524,166 @@ class PDU1HkTableDataset : public StaticLocalDataSet { /** Measured output currents */ lp_var_t currentOutTCSBoard3V3 = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_TCS_BOARD_3V3, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_TCS_BOARD_3V3, this); lp_var_t currentOutSyrlinks = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_SYRLINKS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_SYRLINKS, this); lp_var_t currentOutStarTracker = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_STAR_TRACKER, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_STAR_TRACKER, this); lp_var_t currentOutMGT = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_MGT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_MGT, this); lp_var_t currentOutSUSNominal = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_SUS_NOMINAL, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_SUS_NOMINAL, this); lp_var_t currentOutSolarCellExp = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, this); lp_var_t currentOutPLOC = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_PLOC, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_PLOC, this); lp_var_t currentOutACSBoardSideA = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, this); lp_var_t currentOutChannel8 = - lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_CHANNEL8, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CURRENT_OUT_CHANNEL8, this); /** Measured voltage of output channels */ lp_var_t voltageOutTCSBoard3V3 = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, this); lp_var_t voltageOutSyrlinks = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SYRLINKS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_SYRLINKS, this); lp_var_t voltageOutStarTracker = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_STAR_TRACKER, this); lp_var_t voltageOutMGT = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_MGT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_MGT, this); lp_var_t voltageOutSUSNominal = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SUS_NOMINAL, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_SUS_NOMINAL, this); lp_var_t voltageOutSolarCellExp = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, this); lp_var_t voltageOutPLOC = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_PLOC, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_PLOC, this); lp_var_t voltageOutACSBoardSideA = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, this); lp_var_t voltageOutChannel8 = - lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_CHANNEL8, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_VOLTAGE_OUT_CHANNEL8, this); /** Measured VCC */ - lp_var_t vcc = lp_var_t(sid.objectId, P60System::PDU1_VCC, this); + lp_var_t vcc = lp_var_t(sid.objectId, P60System::pool::PDU1_VCC, this); /** Measured VBAT */ - lp_var_t vbat = lp_var_t(sid.objectId, P60System::PDU1_VBAT, this); + lp_var_t vbat = lp_var_t(sid.objectId, P60System::pool::PDU1_VBAT, this); lp_var_t temperature = - lp_var_t(sid.objectId, P60System::PDU1_TEMPERATURE, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_TEMPERATURE, this); /** Output converter enable status */ lp_var_t converterEnable1 = - lp_var_t(sid.objectId, P60System::PDU1_CONV_EN_1, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CONV_EN_1, this); lp_var_t converterEnable2 = - lp_var_t(sid.objectId, P60System::PDU1_CONV_EN_2, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CONV_EN_2, this); lp_var_t converterEnable3 = - lp_var_t(sid.objectId, P60System::PDU1_CONV_EN_3, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_CONV_EN_3, this); /** Output channels enable status */ lp_var_t outEnabledTCSBoard3V3 = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_TCS_BOARD_3V3, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_TCS_BOARD_3V3, this); lp_var_t outEnabledSyrlinks = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_SYRLINKS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_SYRLINKS, this); lp_var_t outEnabledStarTracker = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_STAR_TRACKER, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_STAR_TRACKER, this); lp_var_t outEnabledMGT = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_MGT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_MGT, this); lp_var_t outEnabledSUSNominal = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_SUS_NOMINAL, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_SUS_NOMINAL, this); lp_var_t outEnabledSolarCellExp = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_SOLAR_CELL_EXP, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_SOLAR_CELL_EXP, this); lp_var_t outEnabledPLOC = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_PLOC, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_PLOC, this); lp_var_t outEnabledAcsBoardSideA = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_ACS_BOARD_SIDE_A, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_ACS_BOARD_SIDE_A, this); lp_var_t outEnabledChannel8 = - lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_CHANNEL8, this); - lp_var_t bootcause = lp_var_t(sid.objectId, P60System::PDU1_BOOTCAUSE, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_OUT_EN_CHANNEL8, this); + lp_var_t bootcause = + lp_var_t(sid.objectId, P60System::pool::PDU1_BOOTCAUSE, this); /** Number of reboots */ - lp_var_t bootcount = lp_var_t(sid.objectId, P60System::PDU1_BOOTCNT, this); + lp_var_t bootcount = + lp_var_t(sid.objectId, P60System::pool::PDU1_BOOTCNT, this); /** Uptime in seconds */ - lp_var_t uptime = lp_var_t(sid.objectId, P60System::PDU1_UPTIME, this); + lp_var_t uptime = lp_var_t(sid.objectId, P60System::pool::PDU1_UPTIME, this); lp_var_t resetcause = - lp_var_t(sid.objectId, P60System::PDU1_RESETCAUSE, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_RESETCAUSE, this); /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ - lp_var_t battMode = lp_var_t(sid.objectId, P60System::PDU1_BATT_MODE, this); + lp_var_t battMode = + lp_var_t(sid.objectId, P60System::pool::PDU1_BATT_MODE, this); /** Number of detected latchups on each output channel */ lp_var_t latchupsTcsBoard3V3 = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_TCS_BOARD_3V3, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_TCS_BOARD_3V3, this); lp_var_t latchupsSyrlinks = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SYRLINKS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_SYRLINKS, this); lp_var_t latchupsStarTracker = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_STAR_TRACKER, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_STAR_TRACKER, this); lp_var_t latchupsMgt = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_MGT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_MGT, this); lp_var_t latchupsSusNominal = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SUS_NOMINAL, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_SUS_NOMINAL, this); lp_var_t latchupsSolarCellExp = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SOLAR_CELL_EXP, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_SOLAR_CELL_EXP, this); lp_var_t latchupsPloc = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_PLOC, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_PLOC, this); lp_var_t latchupsAcsBoardSideA = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_ACS_BOARD_SIDE_A, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_ACS_BOARD_SIDE_A, this); lp_var_t latchupsChannel8 = - lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_CHANNEL8, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_LATCHUP_CHANNEL8, this); /** * There are 8 devices on the PDU. FRAM, ADCs, temperature sensor etc. Each device is * identified by an ID. Refer also to gs-man-nanopower-p60-pdu-200-1.pdf on pages 17 and 18. */ - lp_var_t device0 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_0, this); - lp_var_t device1 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_1, this); - lp_var_t device2 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_2, this); - lp_var_t device3 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_3, this); - lp_var_t device4 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_4, this); - lp_var_t device5 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_5, this); - lp_var_t device6 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_6, this); - lp_var_t device7 = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_7, this); + lp_var_t device0 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_0, this); + lp_var_t device1 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_1, this); + lp_var_t device2 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_2, this); + lp_var_t device3 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_3, this); + lp_var_t device4 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_4, this); + lp_var_t device5 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_5, this); + lp_var_t device6 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_6, this); + lp_var_t device7 = lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_7, this); /** The status of each device. 0 = None, 1 = Ok, 2 = Error, 3 = Not found */ lp_var_t device0Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_0_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_0_STATUS, this); lp_var_t device1Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_1_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_1_STATUS, this); lp_var_t device2Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_2_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_2_STATUS, this); lp_var_t device3Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_3_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_3_STATUS, this); lp_var_t device4Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_4_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_4_STATUS, this); lp_var_t device5Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_5_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_5_STATUS, this); lp_var_t device6Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_6_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_6_STATUS, this); lp_var_t device7Status = - lp_var_t(sid.objectId, P60System::PDU1_DEVICE_7_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_DEVICE_7_STATUS, this); /** Number of reboots triggered by the ground watchdog */ lp_var_t gndWdtReboots = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CNT_GND, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CNT_GND, this); /** Number of reboots triggered through the I2C watchdog. Not relevant for EIVE. */ lp_var_t i2cWdtReboots = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CNT_I2C, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CNT_I2C, this); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CNT_CAN, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CNT_CAN, this); /** Number of reboots triggered through the CSP watchdog */ lp_var_t csp1WdtReboots = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CNT_CSP1, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CNT_CSP1, this); lp_var_t csp2WdtReboots = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CNT_CSP2, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CNT_CSP2, this); /** Ground watchdog remaining seconds before rebooting */ lp_var_t groundWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU1_WDT_GND_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_GND_LEFT, this); /** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */ lp_var_t i2cWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU1_WDT_I2C_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_I2C_LEFT, this); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CAN_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CAN_LEFT, this); /** CSP watchdogs remaining pings before rebooting. */ lp_var_t csp2WatchdogPingsLeft = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CSP_LEFT1, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CSP_LEFT1, this); lp_var_t csp1WatchdogPingsLeft = - lp_var_t(sid.objectId, P60System::PDU1_WDT_CSP_LEFT2, this); + lp_var_t(sid.objectId, P60System::pool::PDU1_WDT_CSP_LEFT2, this); }; } // namespace PDU1 @@ -867,163 +728,166 @@ class PDU2HkTableDataset : public StaticLocalDataSet { /** Measured output currents */ lp_var_t currentOutQ7S = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_Q7S, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_Q7S, this); lp_var_t currentOutPayloadPCDUCh1 = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, this); lp_var_t currentOutReactionWheels = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_RW, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_RW, this); lp_var_t currentOutTCSBoardHeaterIn = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, this); lp_var_t currentOutSUSRedundant = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_SUS_REDUNDANT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_SUS_REDUNDANT, this); lp_var_t currentOutDeplMechanism = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this); lp_var_t currentOutPayloadPCDUCh6 = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this); lp_var_t currentOutACSBoardSideB = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this); lp_var_t currentOutPayloadCamera = - lp_var_t(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this); /** Measured voltage of output channels */ lp_var_t voltageOutQ7S = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_Q7S, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_Q7S, this); lp_var_t voltageOutPayloadPCDUCh1 = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, this); lp_var_t voltageOutReactionWheels = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_RW, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_RW, this); lp_var_t voltageOutTCSBoardHeaterIn = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this); lp_var_t voltageOutSUSRedundant = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this); lp_var_t voltageOutDeplMechanism = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this); lp_var_t voltageOutPayloadPCDUCh6 = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this); lp_var_t voltageOutACSBoardSideB = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this); lp_var_t voltageOutPayloadCamera = - lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this); /** Measured VCC */ - lp_var_t vcc = lp_var_t(sid.objectId, P60System::PDU2_VCC, this); + lp_var_t vcc = lp_var_t(sid.objectId, P60System::pool::PDU2_VCC, this); /** Measured VBAT */ - lp_var_t vbat = lp_var_t(sid.objectId, P60System::PDU2_VBAT, this); + lp_var_t vbat = lp_var_t(sid.objectId, P60System::pool::PDU2_VBAT, this); lp_var_t temperature = - lp_var_t(sid.objectId, P60System::PDU2_TEMPERATURE, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_TEMPERATURE, this); /** Output converter enable status */ lp_var_t converterEnable1 = - lp_var_t(sid.objectId, P60System::PDU2_CONV_EN_1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CONV_EN_1, this); lp_var_t converterEnable2 = - lp_var_t(sid.objectId, P60System::PDU2_CONV_EN_2, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CONV_EN_2, this); lp_var_t converterEnable3 = - lp_var_t(sid.objectId, P60System::PDU2_CONV_EN_3, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_CONV_EN_3, this); /** Output channels enable status */ lp_var_t outEnabledQ7S = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_Q7S, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_Q7S, this); lp_var_t outEnabledPlPCDUCh1 = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, this); lp_var_t outEnabledReactionWheels = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_RW, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_RW, this); lp_var_t outEnabledTCSBoardHeaterIn = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this); lp_var_t outEnabledSUSRedundant = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_SUS_REDUNDANT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_SUS_REDUNDANT, this); lp_var_t outEnabledDeplMechanism = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this); lp_var_t outEnabledPlPCDUCh6 = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this); lp_var_t outEnabledAcsBoardSideB = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this); lp_var_t outEnabledPayloadCamera = - lp_var_t(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_OUT_EN_PAYLOAD_CAMERA, this); - lp_var_t bootcause = lp_var_t(sid.objectId, P60System::PDU2_BOOTCAUSE, this); + lp_var_t bootcause = + lp_var_t(sid.objectId, P60System::pool::PDU2_BOOTCAUSE, this); /** Number of reboots */ - lp_var_t bootcount = lp_var_t(sid.objectId, P60System::PDU2_BOOTCNT, this); + lp_var_t bootcount = + lp_var_t(sid.objectId, P60System::pool::PDU2_BOOTCNT, this); /** Uptime in seconds */ - lp_var_t uptime = lp_var_t(sid.objectId, P60System::PDU2_UPTIME, this); + lp_var_t uptime = lp_var_t(sid.objectId, P60System::pool::PDU2_UPTIME, this); lp_var_t resetcause = - lp_var_t(sid.objectId, P60System::PDU2_RESETCAUSE, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_RESETCAUSE, this); /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ - lp_var_t battMode = lp_var_t(sid.objectId, P60System::PDU2_BATT_MODE, this); + lp_var_t battMode = + lp_var_t(sid.objectId, P60System::pool::PDU2_BATT_MODE, this); /** Number of detected latchups on each output channel */ lp_var_t latchupsQ7S = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_Q7S, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_Q7S, this); lp_var_t latchupsPayloadPcduCh1 = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, this); lp_var_t latchupsRw = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_RW, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_RW, this); lp_var_t latchupsTcsBoardHeaterIn = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, this); lp_var_t latchupsSusRedundant = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_SUS_REDUNDANT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_SUS_REDUNDANT, this); lp_var_t latchupsDeplMenchanism = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, this); lp_var_t latchupsPayloadPcduCh6 = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, this); lp_var_t latchupsAcsBoardSideB = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_ACS_BOARD_SIDE_B, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_ACS_BOARD_SIDE_B, this); lp_var_t latchupsPayloadCamera = - lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_PAYLOAD_CAMERA, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_LATCHUP_PAYLOAD_CAMERA, this); /** * There are 8 devices on the PDU. FRAM, ADCs, temperature sensor etc. Each device is * identified by an ID. Refer also to gs-man-nanopower-p60-pdu-200-1.pdf on pages 17 and 18. */ - lp_var_t device0 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_0, this); - lp_var_t device1 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_1, this); - lp_var_t device2 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_2, this); - lp_var_t device3 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_3, this); - lp_var_t device4 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_4, this); - lp_var_t device5 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_5, this); - lp_var_t device6 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_6, this); - lp_var_t device7 = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_7, this); + lp_var_t device0 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_0, this); + lp_var_t device1 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_1, this); + lp_var_t device2 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_2, this); + lp_var_t device3 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_3, this); + lp_var_t device4 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_4, this); + lp_var_t device5 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_5, this); + lp_var_t device6 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_6, this); + lp_var_t device7 = lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_7, this); /** The status of each device. 0 = None, 1 = Ok, 2 = Error, 3 = Not found */ lp_var_t device0Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_0_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_0_STATUS, this); lp_var_t device1Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_1_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_1_STATUS, this); lp_var_t device2Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_2_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_2_STATUS, this); lp_var_t device3Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_3_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_3_STATUS, this); lp_var_t device4Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_4_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_4_STATUS, this); lp_var_t device5Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_5_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_5_STATUS, this); lp_var_t device6Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_6_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_6_STATUS, this); lp_var_t device7Status = - lp_var_t(sid.objectId, P60System::PDU2_DEVICE_7_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_DEVICE_7_STATUS, this); /** Number of reboots triggered by the ground watchdog */ lp_var_t gndWdtReboots = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CNT_GND, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CNT_GND, this); /** Number of reboots triggered through the I2C watchdog. Not relevant for EIVE. */ lp_var_t i2cWdtReboots = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CNT_I2C, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CNT_I2C, this); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CNT_CAN, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CNT_CAN, this); /** Number of reboots triggered through the CSP watchdog */ lp_var_t csp1WdtReboots = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CNT_CSP1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CNT_CSP1, this); lp_var_t csp2WdtReboots = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CNT_CSP2, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CNT_CSP2, this); /** Ground watchdog remaining seconds before rebooting */ lp_var_t groundWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU2_WDT_GND_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_GND_LEFT, this); /** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */ lp_var_t i2cWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU2_WDT_I2C_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_I2C_LEFT, this); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CAN_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CAN_LEFT, this); /** CSP watchdog remaining pings before rebooting. */ lp_var_t csp1WatchdogPingsLeft = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CSP_LEFT1, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CSP_LEFT1, this); lp_var_t csp2WatchdogPingsLeft = - lp_var_t(sid.objectId, P60System::PDU2_WDT_CSP_LEFT2, this); + lp_var_t(sid.objectId, P60System::pool::PDU2_WDT_CSP_LEFT2, this); }; } // namespace PDU2 @@ -1049,124 +913,131 @@ class HkTableDataset : public StaticLocalDataSet { : StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) {} lp_var_t currentInChannel0 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL0, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL0, this); lp_var_t currentInChannel1 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL1, this); lp_var_t currentInChannel2 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL2, this); lp_var_t currentInChannel3 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL3, this); lp_var_t currentInChannel4 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL4, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL4, this); lp_var_t currentInChannel5 = - lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL5, this); + lp_var_t(sid.objectId, P60System::pool::ACU_CURRENT_IN_CHANNEL5, this); lp_var_t voltageInChannel0 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL0, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL0, this); lp_var_t voltageInChannel1 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL1, this); lp_var_t voltageInChannel2 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL2, this); lp_var_t voltageInChannel3 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL3, this); lp_var_t voltageInChannel4 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL4, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL4, this); lp_var_t voltageInChannel5 = - lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL5, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VOLTAGE_IN_CHANNEL5, this); - lp_var_t vcc = lp_var_t(sid.objectId, P60System::ACU_VCC, this); - lp_var_t vbat = lp_var_t(sid.objectId, P60System::ACU_VBAT, this); + lp_var_t vcc = lp_var_t(sid.objectId, P60System::pool::ACU_VCC, this); + lp_var_t vbat = lp_var_t(sid.objectId, P60System::pool::ACU_VBAT, this); lp_var_t temperature1 = - lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_TEMPERATURE_1, this); lp_var_t temperature2 = - lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_TEMPERATURE_2, this); lp_var_t temperature3 = - lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_TEMPERATURE_3, this); - lp_var_t mpptMode = lp_var_t(sid.objectId, P60System::ACU_MPPT_MODE, this); + lp_var_t mpptMode = + lp_var_t(sid.objectId, P60System::pool::ACU_MPPT_MODE, this); lp_var_t vboostInChannel0 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL0, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL0, this); lp_var_t vboostInChannel1 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL1, this); lp_var_t vboostInChannel2 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL2, this); lp_var_t vboostInChannel3 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL3, this); lp_var_t vboostInChannel4 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL4, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL4, this); lp_var_t vboostInChannel5 = - lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL5, this); + lp_var_t(sid.objectId, P60System::pool::ACU_VBOOST_CHANNEL5, this); lp_var_t powerInChannel0 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL0, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL0, this); lp_var_t powerInChannel1 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL1, this); lp_var_t powerInChannel2 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL2, this); lp_var_t powerInChannel3 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL3, this); lp_var_t powerInChannel4 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL4, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL4, this); lp_var_t powerInChannel5 = - lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL5, this); + lp_var_t(sid.objectId, P60System::pool::ACU_POWER_CHANNEL5, this); - lp_var_t dac0Enable = lp_var_t(sid.objectId, P60System::ACU_DAC_EN_0, this); - lp_var_t dac1Enable = lp_var_t(sid.objectId, P60System::ACU_DAC_EN_1, this); - lp_var_t dac2Enable = lp_var_t(sid.objectId, P60System::ACU_DAC_EN_2, this); + lp_var_t dac0Enable = + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_EN_0, this); + lp_var_t dac1Enable = + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_EN_1, this); + lp_var_t dac2Enable = + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_EN_2, this); lp_var_t dacRawChannelVal0 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_0, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_0, this); lp_var_t dacRawChannelVal1 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_1, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_1, this); lp_var_t dacRawChannelVal2 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_2, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_2, this); lp_var_t dacRawChannelVal3 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_3, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_3, this); lp_var_t dacRawChannelVal4 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_4, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_4, this); lp_var_t dacRawChannelVal5 = - lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_5, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DAC_RAW_5, this); - lp_var_t bootCause = lp_var_t(sid.objectId, P60System::ACU_BOOTCAUSE, this); - lp_var_t bootcnt = lp_var_t(sid.objectId, P60System::ACU_BOOTCNT, this); - lp_var_t uptime = lp_var_t(sid.objectId, P60System::ACU_UPTIME, this); + lp_var_t bootCause = + lp_var_t(sid.objectId, P60System::pool::ACU_BOOTCAUSE, this); + lp_var_t bootcnt = lp_var_t(sid.objectId, P60System::pool::ACU_BOOTCNT, this); + lp_var_t uptime = lp_var_t(sid.objectId, P60System::pool::ACU_UPTIME, this); lp_var_t resetCause = - lp_var_t(sid.objectId, P60System::ACU_RESET_CAUSE, this); - lp_var_t mpptTime = lp_var_t(sid.objectId, P60System::ACU_MPPT_TIME, this); + lp_var_t(sid.objectId, P60System::pool::ACU_RESET_CAUSE, this); + lp_var_t mpptTime = + lp_var_t(sid.objectId, P60System::pool::ACU_MPPT_TIME, this); lp_var_t mpptPeriod = - lp_var_t(sid.objectId, P60System::ACU_MPPT_PERIOD, this); + lp_var_t(sid.objectId, P60System::pool::ACU_MPPT_PERIOD, this); - lp_var_t device0 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_0, this); - lp_var_t device1 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_1, this); - lp_var_t device2 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_2, this); - lp_var_t device3 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_3, this); - lp_var_t device4 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_4, this); - lp_var_t device5 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_5, this); - lp_var_t device6 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_6, this); - lp_var_t device7 = lp_var_t(sid.objectId, P60System::ACU_DEVICE_7, this); + lp_var_t device0 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_0, this); + lp_var_t device1 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_1, this); + lp_var_t device2 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_2, this); + lp_var_t device3 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_3, this); + lp_var_t device4 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_4, this); + lp_var_t device5 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_5, this); + lp_var_t device6 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_6, this); + lp_var_t device7 = lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_7, this); lp_var_t device0Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_0_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_0_STATUS, this); lp_var_t device1Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_1_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_1_STATUS, this); lp_var_t device2Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_2_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_2_STATUS, this); lp_var_t device3Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_3_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_3_STATUS, this); lp_var_t device4Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_4_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_4_STATUS, this); lp_var_t device5Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_5_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_5_STATUS, this); lp_var_t device6Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_6_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_6_STATUS, this); lp_var_t device7Status = - lp_var_t(sid.objectId, P60System::ACU_DEVICE_7_STATUS, this); + lp_var_t(sid.objectId, P60System::pool::ACU_DEVICE_7_STATUS, this); - lp_var_t wdtCntGnd = lp_var_t(sid.objectId, P60System::ACU_WDT_CNT_GND, this); + lp_var_t wdtCntGnd = + lp_var_t(sid.objectId, P60System::pool::ACU_WDT_CNT_GND, this); lp_var_t wdtGndLeft = - lp_var_t(sid.objectId, P60System::ACU_WDT_GND_LEFT, this); + lp_var_t(sid.objectId, P60System::pool::ACU_WDT_GND_LEFT, this); }; } // namespace ACU diff --git a/tmtc b/tmtc index 5d9f0083..8f2ff303 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5d9f0083204ff7fcb8269241695aad3ef824f32c +Subproject commit 8f2ff3034fff627b807f32c02fd9e676126bae5f