/* * 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 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; } /** * @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 = 140; static const uint16_t HK_TABLE_SIZE = 145; static const uint8_t HK_TABLE_ENTRIES = 60; enum PDUPoolIds: lp_id_t { 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, 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, 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_CSP, PDU1_WDT_GND_LEFT, PDU1_WDT_I2C_LEFT, PDU1_WDT_CAN_LEFT, PDU1_WDT_CSP_LEFT, 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, 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, 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_CSP, PDU2_WDT_GND_LEFT, PDU2_WDT_I2C_LEFT, PDU2_WDT_CAN_LEFT, PDU2_WDT_CSP_LEFT }; } 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, PDU1::HK_TABLE_DATA_SET_ID) { } PDU1HkTableDataset(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, PDU1::HK_TABLE_DATA_SET_ID)) { } /** Measured output currents */ lp_var_t currentOutTCSBoard3V3 = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_TCS_BOARD_3V3, this); lp_var_t currentOutSyrlinks = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_SYRLINKS, this); lp_var_t currentOutStarTracker = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_STAR_TRACKER, this); lp_var_t currentOutMGT = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_MGT, this); lp_var_t currentOutSUSNominal = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_SUS_NOMINAL, this); lp_var_t currentOutSolarCellExp = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, this); lp_var_t currentOutPLOC = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_PLOC, this); lp_var_t currentOutACSBoardSideA = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, this); lp_var_t currentOutChannel8 = lp_var_t(sid.objectId, PDU::PDU1_CURRENT_OUT_CHANNEL8, this); /** Measured voltage of output channels */ lp_var_t voltageOutTCSBoard3V3 = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, this); lp_var_t voltageOutSyrlinks = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_SYRLINKS, this); lp_var_t voltageOutStarTracker = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_STAR_TRACKER, this); lp_var_t voltageOutMGT = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_MGT, this); lp_var_t voltageOutSUSNominal = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_SUS_NOMINAL, this); lp_var_t voltageOutSolarCellExp = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, this); lp_var_t voltageOutPLOC = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_PLOC, this); lp_var_t voltageOutACSBoardSideA = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, this); lp_var_t voltageOutChannel8 = lp_var_t(sid.objectId, PDU::PDU1_VOLTAGE_OUT_CHANNEL8, this); /** Measured VCC */ lp_var_t vcc = lp_var_t(sid.objectId, PDU::PDU1_VCC, this); /** Measured VBAT */ lp_var_t vbat = lp_var_t(sid.objectId, PDU::PDU1_VBAT, this); lp_var_t temperature = lp_var_t(sid.objectId, PDU::PDU1_TEMPERATURE, this); /** Output converter enable status */ lp_var_t converterEnable = lp_var_t(sid.objectId, PDU::PDU1_CONV_EN, this); /** Output channels enable status */ lp_var_t outEnabledTCSBoard3V3 = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_TCS_BOARD_3V3, this); lp_var_t outEnabledSyrlinks = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_SYRLINKS, this); lp_var_t outEnabledStarTracker = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_STAR_TRACKER, this); lp_var_t outEnabledMGT = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_MGT, this); lp_var_t outEnabledSUSNominal = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_SUS_NOMINAL, this); lp_var_t outEnabledSolarCellExp = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_SOLAR_CELL_EXP, this); lp_var_t outEnabledPLOC = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_PLOC, this); lp_var_t outEnabledAcsBoardSideA = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_ACS_BOARD_SIDE_A, this); lp_var_t outEnabledChannel8 = lp_var_t(sid.objectId, PDU::PDU1_OUT_EN_CHANNEL8, this); lp_var_t bootcause = lp_var_t(sid.objectId, PDU::PDU1_BOOTCAUSE, this); /** Number of reboots */ lp_var_t bootcount = lp_var_t(sid.objectId, PDU::PDU1_BOOTCNT, this); /** Uptime in seconds */ lp_var_t uptime = lp_var_t(sid.objectId, PDU::PDU1_UPTIME, this); lp_var_t resetcause = lp_var_t(sid.objectId, PDU::PDU1_RESETCAUSE, this); /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ lp_var_t battMode = lp_var_t(sid.objectId, PDU::PDU1_BATT_MODE, 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, PDU::PDU1_DEVICE_0, this); lp_var_t device1 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_1, this); lp_var_t device2 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_2, this); lp_var_t device3 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_3, this); lp_var_t device4 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_4, this); lp_var_t device5 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_5, this); lp_var_t device6 = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_6, this); lp_var_t device7 = lp_var_t(sid.objectId, PDU::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, PDU::PDU1_DEVICE_0_STATUS, this); lp_var_t device1Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_1_STATUS, this); lp_var_t device2Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_2_STATUS, this); lp_var_t device3Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_3_STATUS, this); lp_var_t device4Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_4_STATUS, this); lp_var_t device5Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_5_STATUS, this); lp_var_t device6Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_6_STATUS, this); lp_var_t device7Status = lp_var_t(sid.objectId, PDU::PDU1_DEVICE_7_STATUS, this); /** Number of reboots triggered by the ground watchdog */ lp_var_t gndWdtReboots = lp_var_t(sid.objectId, PDU::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, PDU::PDU1_WDT_CNT_I2C, this); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = lp_var_t(sid.objectId, PDU::PDU1_WDT_CNT_CAN, this); /** Number of reboots triggered through the CSP watchdog */ lp_var_t cspWdtReboots = lp_var_t(sid.objectId, PDU::PDU1_WDT_CNT_CSP, this); /** Ground watchdog remaining seconds before rebooting */ lp_var_t groundWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU1_WDT_GND_LEFT, this); /** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */ lp_var_t i2cWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU1_WDT_I2C_LEFT, this); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU1_WDT_CAN_LEFT, this); /** CSP watchdog remaining seconds before rebooting. */ lp_var_t cspWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU1_WDT_CSP_LEFT, 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 = 0x50; static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN = 0x51; static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT = 0x52; static const uint16_t CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM = 0x53; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC = 0x54; static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B = 0x55; static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x56; /** * @brief This class defines a dataset for the hk table of the PDU2. */ class PDU2HkTableDataset: public StaticLocalDataSet { public: PDU2HkTableDataset(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, PDU2::HK_TABLE_DATA_SET_ID) { } PDU2HkTableDataset(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, PDU2::HK_TABLE_DATA_SET_ID)) { } /** Measured output currents */ lp_var_t currentOutQ7S = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_Q7S, this); lp_var_t currentOutPayloadPCDUCh1 = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, this); lp_var_t currentOutReactionWheels = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_RW, this); lp_var_t currentOutTCSBoardHeaterIn = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, this); lp_var_t currentOutSUSRedundant = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_SUS_REDUNDANT, this); lp_var_t currentOutDeplMechanism = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this); lp_var_t currentOutPayloadPCDUCh6 = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this); lp_var_t currentOutACSBoard = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this); lp_var_t currentOutPayloadCamera = lp_var_t(sid.objectId, PDU::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this); /** Measured voltage of output channels */ lp_var_t voltageOutQ7S = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_Q7S, this); lp_var_t voltageOutPayloadPCDUCh1 = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, this); lp_var_t voltageOutReactionWheels = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_RW, this); lp_var_t voltageOutTCSBoardHeaterIn = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this); lp_var_t voltageOutSUS = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this); lp_var_t voltageOutDeplMechanism = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this); lp_var_t voltageOutPayloadPCDUCh6 = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this); lp_var_t voltageOutACSBoard = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this); lp_var_t voltageOutPayloadCamera = lp_var_t(sid.objectId, PDU::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this); /** Measured VCC */ lp_var_t vcc = lp_var_t(sid.objectId, PDU::PDU2_VCC, this); /** Measured VBAT */ lp_var_t vbat = lp_var_t(sid.objectId, PDU::PDU2_VBAT, this); lp_var_t temperature = lp_var_t(sid.objectId, PDU::PDU2_TEMPERATURE, this); /** Output converter enable status */ lp_var_t converterEnable = lp_var_t(sid.objectId, PDU::PDU2_CONV_EN, this); /** Output channels enable status */ lp_var_t outEnabledQ7S = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_Q7S, this); lp_var_t outEnabledPlPCDUCh1 = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, this); lp_var_t outEnabledReactionWheels = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_RW, this); lp_var_t outEnabledTCSBoardHeaterIn = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this); lp_var_t outEnabledSUS = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_SUS_REDUNDANT, this); lp_var_t outEnabledDeplMechanism = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this); lp_var_t outEnabledPlPCDUCh6 = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this); lp_var_t outEnabledAcsBoard = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this); lp_var_t outEnabledPayloadCamera = lp_var_t(sid.objectId, PDU::PDU2_OUT_EN_PAYLOAD_CAMERA, this); lp_var_t bootcause = lp_var_t(sid.objectId, PDU::PDU2_BOOTCAUSE, this); /** Number of reboots */ lp_var_t bootcount = lp_var_t(sid.objectId, PDU::PDU2_BOOTCNT, this); /** Uptime in seconds */ lp_var_t uptime = lp_var_t(sid.objectId, PDU::PDU2_UPTIME, this); lp_var_t resetcause = lp_var_t(sid.objectId, PDU::PDU2_RESETCAUSE, this); /** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */ lp_var_t battMode = lp_var_t(sid.objectId, PDU::PDU2_BATT_MODE, 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, PDU::PDU2_DEVICE_0, this); lp_var_t device1 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_1, this); lp_var_t device2 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_2, this); lp_var_t device3 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_3, this); lp_var_t device4 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_4, this); lp_var_t device5 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_5, this); lp_var_t device6 = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_6, this); lp_var_t device7 = lp_var_t(sid.objectId, PDU::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, PDU::PDU2_DEVICE_0_STATUS, this); lp_var_t device1Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_1_STATUS, this); lp_var_t device2Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_2_STATUS, this); lp_var_t device3Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_3_STATUS, this); lp_var_t device4Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_4_STATUS, this); lp_var_t device5Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_5_STATUS, this); lp_var_t device6Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_6_STATUS, this); lp_var_t device7Status = lp_var_t(sid.objectId, PDU::PDU2_DEVICE_7_STATUS, this); /** Number of reboots triggered by the ground watchdog */ lp_var_t gndWdtReboots = lp_var_t(sid.objectId, PDU::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, PDU::PDU2_WDT_CNT_I2C, this); /** Number of reboots triggered through the CAN watchdog */ lp_var_t canWdtReboots = lp_var_t(sid.objectId, PDU::PDU2_WDT_CNT_CAN, this); /** Number of reboots triggered through the CSP watchdog */ lp_var_t cspWdtReboots = lp_var_t(sid.objectId, PDU::PDU2_WDT_CNT_CSP, this); /** Ground watchdog remaining seconds before rebooting */ lp_var_t groundWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU2_WDT_GND_LEFT, this); /** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */ lp_var_t i2cWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU2_WDT_I2C_LEFT, this); /** CAN watchdog remaining seconds before rebooting. */ lp_var_t canWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU2_WDT_CAN_LEFT, this); /** CSP watchdog remaining seconds before rebooting. */ lp_var_t cspWatchdogSecondsLeft = lp_var_t(sid.objectId, PDU::PDU2_WDT_CSP_LEFT, this); }; } namespace ACU { /* 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; } #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */