/* * GomspaceDefinitions.h * * @brief This file holds all definitions specific for devices from gomspace. * @date 20.12.2020 * @author J. Meier */ #ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ #include #include #include #include namespace GOMSPACE{ static const uint16_t IGNORE_CHECKSUM = 0xbb0; /** The size of the header of a gomspace CSP packet. */ static const uint8_t GS_HDR_LENGTH = 12; /** CSP port to ping gomspace devices. */ static const uint8_t PING_PORT = 1; static const uint8_t REBOOT_PORT = 4; /** CSP port of gomspace devices to request or set parameters */ static const uint8_t PARAM_PORT = 7; static const uint8_t P60_PORT_GNDWDT_RESET = 9; /* Device commands are derived from the rparam.h of the gomspace lib */ static const DeviceCommandId_t PING = 0x1; //!< [EXPORT] : [COMMAND] static const DeviceCommandId_t NONE = 0x2; // Set when no command is pending static const DeviceCommandId_t REBOOT = 0x4; //!< [EXPORT] : [COMMAND] static const DeviceCommandId_t GNDWDT_RESET = 0x9; //!< [EXPORT] : [COMMAND] static const DeviceCommandId_t PARAM_GET = 0x00; //!< [EXPORT] : [COMMAND] static const DeviceCommandId_t PARAM_SET = 0xFF; //!< [EXPORT] : [COMMAND] static const DeviceCommandId_t REQUEST_HK_TABLE = 0x10; //!< [EXPORT] : [COMMAND] } 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, P60DOCK_TEMPERATURE_1, P60DOCK_TEMPERATURE_2, P60DOCK_BOOT_CAUSE, P60DOCK_BOOT_CNT, P60DOCK_UPTIME, P60DOCK_RESETCAUSE, 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, 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, P60DOCK_DEVICE_TYPE_GROUP, P60DOCK_DEVICE_STATUS_GROUP, P60DOCK_DEARM_STATUS, P60DOCK_WDT_CNT_GND, P60DOCK_WDT_CNT_I2C, P60DOCK_WDT_CNT_CAN, P60DOCK_WDT_CNT_CSP_1, P60DOCK_WDT_CNT_CSP_2, P60DOCK_WDT_GND_LEFT, P60DOCK_WDT_I2C_LEFT, P60DOCK_WDT_CAN_LEFT, P60DOCK_WDT_CSP_LEFT_1, P60DOCK_WDT_CSP_LEFT_2, P60DOCK_BATT_CHARGE_CURRENT, P60DOCK_BATT_DISCHARGE_CURRENT, P60DOCK_ANT6_DEPL, P60DOCK_AR6_DEPL, PDU1_CURRENT_OUT_TCS_BOARD_3V3, PDU1_CURRENT_OUT_SYRLINKS, PDU1_CURRENT_OUT_STAR_TRACKER, PDU1_CURRENT_OUT_MGT, PDU1_CURRENT_OUT_SUS_NOMINAL, PDU1_CURRENT_OUT_SOLAR_CELL_EXP, PDU1_CURRENT_OUT_PLOC, PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, PDU1_CURRENT_OUT_CHANNEL8, PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, PDU1_VOLTAGE_OUT_SYRLINKS, PDU1_VOLTAGE_OUT_STAR_TRACKER, PDU1_VOLTAGE_OUT_MGT, PDU1_VOLTAGE_OUT_SUS_NOMINAL, PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, PDU1_VOLTAGE_OUT_PLOC, PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, PDU1_VOLTAGE_OUT_CHANNEL8, PDU1_VCC, PDU1_VBAT, PDU1_TEMPERATURE, PDU1_CONV_EN_1, PDU1_CONV_EN_2, PDU1_CONV_EN_3, PDU1_OUT_EN_TCS_BOARD_3V3, PDU1_OUT_EN_SYRLINKS, PDU1_OUT_EN_STAR_TRACKER, PDU1_OUT_EN_MGT, PDU1_OUT_EN_SUS_NOMINAL, PDU1_OUT_EN_SOLAR_CELL_EXP, PDU1_OUT_EN_PLOC, PDU1_OUT_EN_ACS_BOARD_SIDE_A, PDU1_OUT_EN_CHANNEL8, PDU1_BOOTCAUSE, PDU1_BOOTCNT, PDU1_UPTIME, PDU1_RESETCAUSE, PDU1_BATT_MODE, PDU1_LATCHUP_TCS_BOARD_3V3, PDU1_LATCHUP_SYRLINKS, PDU1_LATCHUP_STAR_TRACKER, PDU1_LATCHUP_MGT, PDU1_LATCHUP_SUS_NOMINAL, PDU1_LATCHUP_SOLAR_CELL_EXP, PDU1_LATCHUP_PLOC, PDU1_LATCHUP_ACS_BOARD_SIDE_A, PDU1_LATCHUP_CHANNEL8, PDU1_DEVICE_0, PDU1_DEVICE_1, PDU1_DEVICE_2, PDU1_DEVICE_3, PDU1_DEVICE_4, PDU1_DEVICE_5, PDU1_DEVICE_6, PDU1_DEVICE_7, PDU1_DEVICE_0_STATUS, PDU1_DEVICE_1_STATUS, PDU1_DEVICE_2_STATUS, PDU1_DEVICE_3_STATUS, PDU1_DEVICE_4_STATUS, PDU1_DEVICE_5_STATUS, PDU1_DEVICE_6_STATUS, PDU1_DEVICE_7_STATUS, PDU1_WDT_CNT_GND, PDU1_WDT_CNT_I2C, PDU1_WDT_CNT_CAN, PDU1_WDT_CNT_CSP1, PDU1_WDT_CNT_CSP2, PDU1_WDT_GND_LEFT, PDU1_WDT_I2C_LEFT, PDU1_WDT_CAN_LEFT, PDU1_WDT_CSP_LEFT1, PDU1_WDT_CSP_LEFT2, /** PDU2 Ids */ PDU2_CURRENT_OUT_Q7S, PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, PDU2_CURRENT_OUT_RW, PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, PDU2_CURRENT_OUT_SUS_REDUNDANT, PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, PDU2_CURRENT_OUT_PAYLOAD_CAMERA, PDU2_VOLTAGE_OUT_Q7S, PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, PDU2_VOLTAGE_OUT_RW, PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, PDU2_VOLTAGE_OUT_SUS_REDUNDANT, PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, PDU2_VCC, PDU2_VBAT, PDU2_TEMPERATURE, PDU2_CONV_EN_1, PDU2_CONV_EN_2, PDU2_CONV_EN_3, PDU2_OUT_EN_Q7S, PDU2_OUT_EN_PAYLOAD_PCDU_CH1, PDU2_OUT_EN_RW, PDU2_OUT_EN_TCS_BOARD_HEATER_IN, PDU2_OUT_EN_SUS_REDUNDANT, PDU2_OUT_EN_DEPLOYMENT_MECHANISM, PDU2_OUT_EN_PAYLOAD_PCDU_CH6, PDU2_OUT_EN_ACS_BOARD_SIDE_B, PDU2_OUT_EN_PAYLOAD_CAMERA, PDU2_BOOTCAUSE, PDU2_BOOTCNT, PDU2_UPTIME, PDU2_RESETCAUSE, PDU2_BATT_MODE, PDU2_LATCHUP_Q7S, PDU2_LATCHUP_PAYLOAD_PCDU_CH1, PDU2_LATCHUP_RW, PDU2_LATCHUP_TCS_BOARD_HEATER_IN, PDU2_LATCHUP_SUS_REDUNDANT, PDU2_LATCHUP_DEPLOYMENT_MECHANISM, PDU2_LATCHUP_PAYLOAD_PCDU_CH6, PDU2_LATCHUP_ACS_BOARD_SIDE_B, PDU2_LATCHUP_PAYLOAD_CAMERA, PDU2_DEVICE_0, PDU2_DEVICE_1, PDU2_DEVICE_2, PDU2_DEVICE_3, PDU2_DEVICE_4, PDU2_DEVICE_5, PDU2_DEVICE_6, PDU2_DEVICE_7, PDU2_DEVICE_0_STATUS, PDU2_DEVICE_1_STATUS, PDU2_DEVICE_2_STATUS, PDU2_DEVICE_3_STATUS, PDU2_DEVICE_4_STATUS, PDU2_DEVICE_5_STATUS, PDU2_DEVICE_6_STATUS, PDU2_DEVICE_7_STATUS, PDU2_WDT_CNT_GND, PDU2_WDT_CNT_I2C, PDU2_WDT_CNT_CAN, PDU2_WDT_CNT_CSP1, PDU2_WDT_CNT_CSP2, PDU2_WDT_GND_LEFT, PDU2_WDT_I2C_LEFT, PDU2_WDT_CAN_LEFT, PDU2_WDT_CSP_LEFT1, PDU2_WDT_CSP_LEFT2, /** ACU Ids */ ACU_CURRENT_IN_CHANNEL0, ACU_CURRENT_IN_CHANNEL1, ACU_CURRENT_IN_CHANNEL2, ACU_CURRENT_IN_CHANNEL3, ACU_CURRENT_IN_CHANNEL4, ACU_CURRENT_IN_CHANNEL5, ACU_VOLTAGE_IN_CHANNEL0, ACU_VOLTAGE_IN_CHANNEL1, ACU_VOLTAGE_IN_CHANNEL2, ACU_VOLTAGE_IN_CHANNEL3, ACU_VOLTAGE_IN_CHANNEL4, ACU_VOLTAGE_IN_CHANNEL5, ACU_VCC, ACU_VBAT, ACU_TEMPERATURE_1, ACU_TEMPERATURE_2, ACU_TEMPERATURE_3, ACU_MPPT_MODE, ACU_VBOOST_CHANNEL0, ACU_VBOOST_CHANNEL1, ACU_VBOOST_CHANNEL2, ACU_VBOOST_CHANNEL3, ACU_VBOOST_CHANNEL4, ACU_VBOOST_CHANNEL5, ACU_POWER_CHANNEL0, ACU_POWER_CHANNEL1, ACU_POWER_CHANNEL2, ACU_POWER_CHANNEL3, ACU_POWER_CHANNEL4, ACU_POWER_CHANNEL5, ACU_POWER_GROUP, ACU_DAC_EN_0, ACU_DAC_EN_1, ACU_DAC_EN_2, ACU_DAC_RAW_0, ACU_DAC_RAW_1, ACU_DAC_RAW_2, ACU_DAC_RAW_3, ACU_DAC_RAW_4, ACU_DAC_RAW_5, ACU_BOOTCAUSE, ACU_BOOTCNT, ACU_UPTIME, ACU_RESET_CAUSE, ACU_MPPT_TIME, ACU_MPPT_PERIOD, ACU_DEVICE_0, ACU_DEVICE_1, ACU_DEVICE_2, ACU_DEVICE_3, ACU_DEVICE_4, ACU_DEVICE_5, ACU_DEVICE_6, ACU_DEVICE_7, ACU_DEVICE_0_STATUS, ACU_DEVICE_1_STATUS, ACU_DEVICE_2_STATUS, ACU_DEVICE_3_STATUS, ACU_DEVICE_4_STATUS, ACU_DEVICE_5_STATUS, ACU_DEVICE_6_STATUS, ACU_DEVICE_7_STATUS, ACU_WDT_CNT_GND, ACU_WDT_GND_LEFT }; } namespace P60Dock { /* The maximum size of a reply from the P60 dock. Maximum size is reached * when retrieving the full parameter configuration table. 412 bytes of * payload data and 12 bytes of CSP header data. */ static const uint16_t MAX_REPLY_LENGTH = 424; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408; static const uint16_t MAX_HKTABLE_ADDRESS = 187; static const uint16_t HK_TABLE_SIZE = 188; static const uint8_t HK_TABLE_DATA_SET_ID = 0x3; static const uint8_t HK_TABLE_ENTRIES = 100; /** * @brief This class defines a dataset for the hk table of the P60 Dock. */ class HkTableDataset: public StaticLocalDataSet { public: HkTableDataset(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) { } HkTableDataset(object_id_t objectId): 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 currentStackVbata = 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); /** 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 voltageStackVbata = 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); /** 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 outputEnableStateStackVbata = 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_var_t temperature1 = lp_var_t(sid.objectId, P60System::P60DOCK_TEMPERATURE_1, this); lp_var_t temperature2 = lp_var_t(sid.objectId, P60System::P60DOCK_TEMPERATURE_2, this); lp_var_t bootcause = lp_var_t(sid.objectId, P60System::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 resetcause = lp_var_t(sid.objectId, P60System::P60DOCK_RESETCAUSE, this); lp_var_t battMode = lp_var_t(sid.objectId, P60System::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 converter5VStatus = lp_var_t(sid.objectId, P60System::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 latchupsStackVbata = 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_var_t vbatVoltageValue = lp_var_t(sid.objectId, P60System::P60DOCK_VBAT_VALUE, this); lp_var_t vccCurrent = lp_var_t(sid.objectId, P60System::P60DOCK_VCC_CURRENT_VALUE, this); lp_var_t batteryCurrent = lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_CURRENT, this); lp_var_t batteryVoltage = lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_VOLTAGE, this); lp_var_t batteryTemperature1 = lp_var_t(sid.objectId, P60System::P60DOCK_BATTERY_TEMPERATURE_1, this); lp_var_t batteryTemperature2 = lp_var_t(sid.objectId, P60System::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_var_t dearmStatus = lp_var_t(sid.objectId, P60System::P60DOCK_DEARM_STATUS, this); lp_var_t wdtCntGnd = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_GND, this); lp_var_t wdtCntI2c = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_I2C, this); lp_var_t wdtCntCan = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CNT_CAN, this); lp_var_t wdtCntCsp1 = lp_var_t(sid.objectId, P60System::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 wdtGndLeft = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_GND_LEFT, this); lp_var_t wdtI2cLeft = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_I2C_LEFT, this); lp_var_t wdtCanLeft = lp_var_t(sid.objectId, P60System::P60DOCK_WDT_CAN_LEFT, this); lp_var_t wdtCspLeft1 = lp_var_t(sid.objectId, P60System::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 batteryChargeCurrent = lp_var_t(sid.objectId, P60System::P60DOCK_BATT_CHARGE_CURRENT, this); lp_var_t batteryDishargeCurrent = 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); }; } /** * @brief Constants common for both PDU1 and PDU2. */ namespace PDU{ /** When retrieving full configuration parameter table */ static const uint16_t MAX_REPLY_LENGTH = 318; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316; static const uint16_t MAX_HKTABLE_ADDRESS = 141; /** The size of the csp reply containing the housekeeping table data */ static const uint16_t HK_TABLE_REPLY_SIZE = 303; static const uint8_t HK_TABLE_ENTRIES = 73; } namespace PDU1 { static const uint32_t HK_TABLE_DATA_SET_ID = 0x1; // hk table has table id 4 /** * Addresses within configuration table to enable or disable output channels. Refer also to * gs-man-nanopower-p60-pdu-200.pdf on page 16. */ static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3 = 0x48; static const uint16_t CONFIG_ADDRESS_OUT_EN_SYRLINKS = 0x49; static const uint16_t CONFIG_ADDRESS_OUT_EN_STAR_TRACKER = 0x50; static const uint16_t CONFIG_ADDRESS_OUT_EN_MGT = 0x51; static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL = 0x52; static const uint16_t CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP = 0x53; static const uint16_t CONFIG_ADDRESS_OUT_EN_PLOC = 0x54; static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A = 0x55; static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x56; /** * @brief This class defines a dataset for the hk table of the PDU1. */ class PDU1HkTableDataset : public StaticLocalDataSet { public: PDU1HkTableDataset(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) { } PDU1HkTableDataset(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) { } /** Measured output currents */ lp_var_t currentOutTCSBoard3V3 = lp_var_t(sid.objectId, P60System::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 currentOutStarTracker = lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_STAR_TRACKER, this); lp_var_t currentOutMGT = lp_var_t(sid.objectId, P60System::PDU1_CURRENT_OUT_MGT, this); lp_var_t currentOutSUSNominal = lp_var_t(sid.objectId, P60System::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 currentOutPLOC = lp_var_t(sid.objectId, P60System::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 currentOutChannel8 = lp_var_t(sid.objectId, P60System::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 voltageOutSyrlinks = lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SYRLINKS, this); lp_var_t voltageOutStarTracker = lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, this); lp_var_t voltageOutMGT = lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_MGT, this); lp_var_t voltageOutSUSNominal = lp_var_t(sid.objectId, P60System::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 voltageOutPLOC = lp_var_t(sid.objectId, P60System::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 voltageOutChannel8 = lp_var_t(sid.objectId, P60System::PDU1_VOLTAGE_OUT_CHANNEL8, this); /** Measured VCC */ lp_var_t vcc = lp_var_t(sid.objectId, P60System::PDU1_VCC, this); /** Measured VBAT */ lp_var_t vbat = lp_var_t(sid.objectId, P60System::PDU1_VBAT, this); lp_var_t temperature = lp_var_t(sid.objectId, P60System::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 converterEnable2 = lp_var_t(sid.objectId, P60System::PDU1_CONV_EN_2, this); lp_var_t converterEnable3 = lp_var_t(sid.objectId, P60System::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 outEnabledSyrlinks = lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_SYRLINKS, this); lp_var_t outEnabledStarTracker = lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_STAR_TRACKER, this); lp_var_t outEnabledMGT = lp_var_t(sid.objectId, P60System::PDU1_OUT_EN_MGT, this); lp_var_t outEnabledSUSNominal = lp_var_t(sid.objectId, P60System::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 outEnabledPLOC = lp_var_t(sid.objectId, P60System::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 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); /** Number of reboots */ lp_var_t bootcount = lp_var_t(sid.objectId, P60System::PDU1_BOOTCNT, this); /** Uptime in seconds */ lp_var_t uptime = lp_var_t(sid.objectId, P60System::PDU1_UPTIME, this); lp_var_t resetcause = lp_var_t(sid.objectId, P60System::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); /** 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 latchupsSyrlinks = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SYRLINKS, this); lp_var_t latchupsStarTracker = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_STAR_TRACKER, this); lp_var_t latchupsMgt = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_MGT, this); lp_var_t latchupsSusNominal = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SUS_NOMINAL, this); lp_var_t latchupsSolarCellExp = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_SOLAR_CELL_EXP, this); lp_var_t latchupsPloc = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_PLOC, this); lp_var_t latchupsAcsBoardSideA = lp_var_t(sid.objectId, P60System::PDU1_LATCHUP_ACS_BOARD_SIDE_A, this); lp_var_t latchupsChannel8 = lp_var_t(sid.objectId, P60System::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); /** 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 device1Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_1_STATUS, this); lp_var_t device2Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_2_STATUS, this); lp_var_t device3Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_3_STATUS, this); lp_var_t device4Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_4_STATUS, this); lp_var_t device5Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_5_STATUS, this); lp_var_t device6Status = lp_var_t(sid.objectId, P60System::PDU1_DEVICE_6_STATUS, this); lp_var_t device7Status = lp_var_t(sid.objectId, P60System::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); /** 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); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = lp_var_t(sid.objectId, P60System::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 csp2WdtReboots = lp_var_t(sid.objectId, P60System::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); /** 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); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = lp_var_t(sid.objectId, P60System::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 csp1WatchdogPingsLeft = lp_var_t(sid.objectId, P60System::PDU1_WDT_CSP_LEFT2, this); }; } namespace PDU2 { static const uint32_t HK_TABLE_DATA_SET_ID = 0x2; /** * Addresses within configuration table to enable or disable output channels. Refer also to * gs-man-nanopower-p60-pdu-200.pdf on page 16. */ static const uint16_t CONFIG_ADDRESS_OUT_EN_Q7S = 0x48; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1 = 0x49; static const uint16_t CONFIG_ADDRESS_OUT_EN_RW = 0x4A; static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN = 0x4B; static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT = 0x4C; static const uint16_t CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM = 0x4D; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC = 0x4E; static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B = 0x4F; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50; /** * @brief This class defines a dataset for the hk table of the PDU2. */ class PDU2HkTableDataset: public StaticLocalDataSet { public: PDU2HkTableDataset(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) { } PDU2HkTableDataset(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) { } /** Measured output currents */ lp_var_t currentOutQ7S = lp_var_t(sid.objectId, P60System::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 currentOutReactionWheels = lp_var_t(sid.objectId, P60System::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 currentOutSUSRedundant = lp_var_t(sid.objectId, P60System::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 currentOutPayloadPCDUCh6 = lp_var_t(sid.objectId, P60System::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 currentOutPayloadCamera = lp_var_t(sid.objectId, P60System::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 voltageOutPayloadPCDUCh1 = lp_var_t(sid.objectId, P60System::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 voltageOutTCSBoardHeaterIn = lp_var_t(sid.objectId, P60System::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 voltageOutDeplMechanism = lp_var_t(sid.objectId, P60System::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 voltageOutACSBoardSideB = lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this); lp_var_t voltageOutPayloadCamera = lp_var_t(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this); /** Measured VCC */ lp_var_t vcc = lp_var_t(sid.objectId, P60System::PDU2_VCC, this); /** Measured VBAT */ lp_var_t vbat = lp_var_t(sid.objectId, P60System::PDU2_VBAT, this); lp_var_t temperature = lp_var_t(sid.objectId, P60System::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 converterEnable2 = lp_var_t(sid.objectId, P60System::PDU2_CONV_EN_2, this); lp_var_t converterEnable3 = lp_var_t(sid.objectId, P60System::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 outEnabledPlPCDUCh1 = lp_var_t(sid.objectId, P60System::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 outEnabledTCSBoardHeaterIn = lp_var_t(sid.objectId, P60System::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 outEnabledDeplMechanism = lp_var_t(sid.objectId, P60System::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 outEnabledAcsBoardSideB = lp_var_t(sid.objectId, P60System::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 bootcause = lp_var_t(sid.objectId, P60System::PDU2_BOOTCAUSE, this); /** Number of reboots */ lp_var_t bootcount = lp_var_t(sid.objectId, P60System::PDU2_BOOTCNT, this); /** Uptime in seconds */ lp_var_t uptime = lp_var_t(sid.objectId, P60System::PDU2_UPTIME, this); lp_var_t resetcause = lp_var_t(sid.objectId, P60System::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); /** 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 latchupsPayloadPcduCh1 = lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, this); lp_var_t latchupsRw = lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_RW, this); lp_var_t latchupsTcsBoardHeaterIn = lp_var_t(sid.objectId, P60System::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 latchupsDeplMenchanism = lp_var_t(sid.objectId, P60System::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, this); lp_var_t latchupsPayloadPcduCh6 = lp_var_t(sid.objectId, P60System::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 latchupsPayloadCamera = lp_var_t(sid.objectId, P60System::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); /** 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 device1Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_1_STATUS, this); lp_var_t device2Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_2_STATUS, this); lp_var_t device3Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_3_STATUS, this); lp_var_t device4Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_4_STATUS, this); lp_var_t device5Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_5_STATUS, this); lp_var_t device6Status = lp_var_t(sid.objectId, P60System::PDU2_DEVICE_6_STATUS, this); lp_var_t device7Status = lp_var_t(sid.objectId, P60System::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); /** 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); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = lp_var_t(sid.objectId, P60System::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 csp2WdtReboots = lp_var_t(sid.objectId, P60System::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); /** 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); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = lp_var_t(sid.objectId, P60System::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 csp2WatchdogPingsLeft = lp_var_t(sid.objectId, P60System::PDU2_WDT_CSP_LEFT2, this); }; } namespace ACU { static const uint32_t HK_TABLE_DATA_SET_ID = 0x4; /* When receiving full housekeeping (telemetry) table */ static const uint16_t MAX_REPLY_LENGTH = 124; static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26; static const uint16_t MAX_HKTABLE_ADDRESS = 120; static const uint16_t HK_TABLE_SIZE = 125; static const uint8_t HK_TABLE_ENTRIES = 64; /** * @brief This class defines a dataset for the hk table of the ACU. */ class HkTableDataset: public StaticLocalDataSet { public: HkTableDataset(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) { } HkTableDataset(object_id_t objectId): 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 currentInChannel1 = lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL1, this); lp_var_t currentInChannel2 = lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL2, this); lp_var_t currentInChannel3 = lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL3, this); lp_var_t currentInChannel4 = lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL4, this); lp_var_t currentInChannel5 = lp_var_t(sid.objectId, P60System::ACU_CURRENT_IN_CHANNEL5, this); lp_var_t voltageInChannel0 = lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL0, this); lp_var_t voltageInChannel1 = lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL1, this); lp_var_t voltageInChannel2 = lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL2, this); lp_var_t voltageInChannel3 = lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL3, this); lp_var_t voltageInChannel4 = lp_var_t(sid.objectId, P60System::ACU_VOLTAGE_IN_CHANNEL4, this); lp_var_t voltageInChannel5 = lp_var_t(sid.objectId, P60System::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 temperature1 = lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_1, this); lp_var_t temperature2 = lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_2, this); lp_var_t temperature3 = lp_var_t(sid.objectId, P60System::ACU_TEMPERATURE_3, this); lp_var_t mpptMode = lp_var_t(sid.objectId, P60System::ACU_MPPT_MODE, this); lp_var_t vboostInChannel0 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL0, this); lp_var_t vboostInChannel1 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL1, this); lp_var_t vboostInChannel2 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL2, this); lp_var_t vboostInChannel3 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL3, this); lp_var_t vboostInChannel4 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL4, this); lp_var_t vboostInChannel5 = lp_var_t(sid.objectId, P60System::ACU_VBOOST_CHANNEL5, this); lp_var_t powerInChannel0 = lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL0, this); lp_var_t powerInChannel1 = lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL1, this); lp_var_t powerInChannel2 = lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL2, this); lp_var_t powerInChannel3 = lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL3, this); lp_var_t powerInChannel4 = lp_var_t(sid.objectId, P60System::ACU_POWER_CHANNEL4, this); lp_var_t powerInChannel5 = lp_var_t(sid.objectId, P60System::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 dacRawChannelVal0 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_0, this); lp_var_t dacRawChannelVal1 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_1, this); lp_var_t dacRawChannelVal2 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_2, this); lp_var_t dacRawChannelVal3 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_3, this); lp_var_t dacRawChannelVal4 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_4, this); lp_var_t dacRawChannelVal5 = lp_var_t(sid.objectId, P60System::ACU_DAC_RAW_5, this); lp_var_t bootCause = lp_var_t(sid.objectId, P60System::ACU_BOOTCAUSE, 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 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 mpptPeriod = lp_var_t(sid.objectId, P60System::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 device0Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_0_STATUS, this); lp_var_t device1Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_1_STATUS, this); lp_var_t device2Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_2_STATUS, this); lp_var_t device3Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_3_STATUS, this); lp_var_t device4Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_4_STATUS, this); lp_var_t device5Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_5_STATUS, this); lp_var_t device6Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_6_STATUS, this); lp_var_t device7Status = lp_var_t(sid.objectId, P60System::ACU_DEVICE_7_STATUS, this); lp_var_t wdtCntGnd = lp_var_t(sid.objectId, P60System::ACU_WDT_CNT_GND, this); lp_var_t wdtGndLeft = lp_var_t(sid.objectId, P60System::ACU_WDT_GND_LEFT, this); }; } #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */