2020-12-20 13:31:44 +01:00
|
|
|
/*
|
|
|
|
* 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_
|
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
|
|
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
|
|
|
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
2020-12-20 13:31:44 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
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]
|
|
|
|
}
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
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,
|
2021-02-03 19:35:55 +01:00
|
|
|
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,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60DOCK_BOOT_CAUSE,
|
|
|
|
P60DOCK_BOOT_CNT,
|
|
|
|
P60DOCK_UPTIME,
|
|
|
|
P60DOCK_RESETCAUSE,
|
|
|
|
P60DOCK_BATT_MODE,
|
|
|
|
P60DOCK_HEATER_ON,
|
|
|
|
P60DOCK_CONV_5V_ENABLE_STATUS,
|
2021-02-03 19:35:55 +01:00
|
|
|
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,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60DOCK_VBAT_VALUE,
|
|
|
|
P60DOCK_VCC_CURRENT_VALUE,
|
|
|
|
P60DOCK_BATTERY_CURRENT,
|
|
|
|
P60DOCK_BATTERY_VOLTAGE,
|
2021-02-03 19:35:55 +01:00
|
|
|
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,
|
2021-02-03 08:09:54 +01:00
|
|
|
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,
|
2021-01-28 14:55:21 +01:00
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU1_CONV_EN_1,
|
|
|
|
PDU1_CONV_EN_2,
|
|
|
|
PDU1_CONV_EN_3,
|
2021-02-03 08:09:54 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
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,
|
2021-02-03 08:09:54 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU1_WDT_CNT_CSP1,
|
|
|
|
PDU1_WDT_CNT_CSP2,
|
2021-02-03 08:09:54 +01:00
|
|
|
PDU1_WDT_GND_LEFT,
|
|
|
|
PDU1_WDT_I2C_LEFT,
|
|
|
|
PDU1_WDT_CAN_LEFT,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU1_WDT_CSP_LEFT1,
|
|
|
|
PDU1_WDT_CSP_LEFT2,
|
2021-01-28 14:55:21 +01:00
|
|
|
|
2021-02-03 19:35:55 +01:00
|
|
|
/** PDU2 Ids */
|
2021-01-28 14:55:21 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU2_CONV_EN_1,
|
|
|
|
PDU2_CONV_EN_2,
|
|
|
|
PDU2_CONV_EN_3,
|
2021-01-28 14:55:21 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
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,
|
2021-01-28 14:55:21 +01:00
|
|
|
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,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU2_WDT_CNT_CSP1,
|
|
|
|
PDU2_WDT_CNT_CSP2,
|
2021-01-28 14:55:21 +01:00
|
|
|
PDU2_WDT_GND_LEFT,
|
|
|
|
PDU2_WDT_I2C_LEFT,
|
|
|
|
PDU2_WDT_CAN_LEFT,
|
2021-02-05 07:37:21 +01:00
|
|
|
PDU2_WDT_CSP_LEFT1,
|
|
|
|
PDU2_WDT_CSP_LEFT2,
|
2021-02-03 08:09:54 +01:00
|
|
|
|
2021-02-03 19:35:55 +01:00
|
|
|
/** 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,
|
2021-02-03 08:09:54 +01:00
|
|
|
ACU_VCC,
|
|
|
|
ACU_VBAT,
|
2021-02-03 19:35:55 +01:00
|
|
|
ACU_TEMPERATURE_1,
|
|
|
|
ACU_TEMPERATURE_2,
|
|
|
|
ACU_TEMPERATURE_3,
|
2021-02-03 08:09:54 +01:00
|
|
|
ACU_MPPT_MODE,
|
2021-02-03 19:35:55 +01:00
|
|
|
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_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,
|
2021-02-03 08:09:54 +01:00
|
|
|
ACU_BOOTCAUSE,
|
|
|
|
ACU_BOOTCNT,
|
|
|
|
ACU_UPTIME,
|
|
|
|
ACU_RESET_CAUSE,
|
|
|
|
ACU_MPPT_TIME,
|
|
|
|
ACU_MPPT_PERIOD,
|
2021-02-03 19:35:55 +01:00
|
|
|
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,
|
2021-02-03 08:09:54 +01:00
|
|
|
ACU_WDT_CNT_GND,
|
|
|
|
ACU_WDT_GND_LEFT
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace P60Dock {
|
2021-02-14 15:49:03 +01:00
|
|
|
|
|
|
|
/** Max reply size reached when requesting full hk table */
|
|
|
|
static const uint16_t MAX_REPLY_LENGTH = 407;
|
2021-02-03 08:09:54 +01:00
|
|
|
|
|
|
|
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;
|
2021-02-03 19:35:55 +01:00
|
|
|
static const uint8_t HK_TABLE_ENTRIES = 100;
|
2021-02-03 08:09:54 +01:00
|
|
|
|
2021-02-12 10:20:39 +01:00
|
|
|
/**
|
|
|
|
* Requesting the full housekeeping table from the P60 dock will generate a reply comprising
|
|
|
|
* 402 bytes of data.
|
|
|
|
*/
|
|
|
|
static const uint16_t HK_TABLE_REPLY_SIZE = 407;
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
/**
|
|
|
|
* @brief This class defines a dataset for the hk table of the P60 Dock.
|
|
|
|
*/
|
|
|
|
class HkTableDataset:
|
|
|
|
public StaticLocalDataSet<HK_TABLE_ENTRIES> {
|
|
|
|
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)) {
|
|
|
|
}
|
|
|
|
|
2021-02-03 19:35:55 +01:00
|
|
|
/** Measured output currents */
|
|
|
|
lp_var_t<int16_t> currentAcuVcc = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_ACU_VCC, this);
|
|
|
|
lp_var_t<int16_t> currentPdu1Vcc = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_PDU1_VCC, this);
|
|
|
|
lp_var_t<int16_t> currentX3IdleVcc = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_X3_IDLE_VCC, this);
|
|
|
|
lp_var_t<int16_t> currentPdu2Vcc = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_PDU2_VCC, this);
|
|
|
|
lp_var_t<int16_t> currentAcuVbat = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_ACU_VBAT, this);
|
|
|
|
lp_var_t<int16_t> currentPdu1Vbat = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_PDU1_VBAT, this);
|
|
|
|
lp_var_t<int16_t> currentX3IdleVbat = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_X3_IDLE_VBAT, this);
|
|
|
|
lp_var_t<int16_t> currentPdu2Vbat = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_PDU2_VBAT, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
lp_var_t<int16_t> currentStackVbat = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 19:35:55 +01:00
|
|
|
P60System::P60DOCK_CURRENT_STACK_VBAT, this);
|
|
|
|
lp_var_t<int16_t> currentStack3V3 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_STACK_3V3, this);
|
|
|
|
lp_var_t<int16_t> currentStack5V = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_STACK_5V, this);
|
|
|
|
lp_var_t<int16_t> currentGS3V3 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_GS3V3, this);
|
|
|
|
lp_var_t<int16_t> currentGS5V = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CURRENT_GS5V, this);
|
|
|
|
|
|
|
|
/** Measured output voltages */
|
|
|
|
lp_var_t<uint16_t> voltageAcuVcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_ACU_VCC, this);
|
|
|
|
lp_var_t<uint16_t> voltagePdu1Vcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_PDU1_VCC, this);
|
|
|
|
lp_var_t<uint16_t> voltageX3IdleVcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_X3_IDLE_VCC, this);
|
|
|
|
lp_var_t<uint16_t> voltagePdu2Vcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_PDU2_VCC, this);
|
|
|
|
lp_var_t<uint16_t> voltageAcuVbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_ACU_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> voltagePdu1Vbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_PDU1_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> voltageX3IdleVbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_X3_IDLE_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> voltagePdu2Vbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_PDU2_VBAT, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
lp_var_t<uint16_t> voltageStackVbat = lp_var_t<uint16_t>(sid.objectId,
|
2021-02-03 19:35:55 +01:00
|
|
|
P60System::P60DOCK_VOLTAGE_STACK_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> voltageStack3V3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_STACK_3V3, this);
|
|
|
|
lp_var_t<uint16_t> voltageStack5V = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_STACK_5V, this);
|
|
|
|
lp_var_t<uint16_t> voltageGS3V3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_GS3V3, this);
|
|
|
|
lp_var_t<uint16_t> voltageGS5V = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VOLTAGE_GS5V, this);
|
|
|
|
|
|
|
|
/** Output enable states */
|
|
|
|
lp_var_t<uint8_t> outputEnableStateAcuVcc = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_ACU_VCC, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStatePdu1Vcc = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_PDU1_VCC, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateX3IdleVcc = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VCC, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStatePdu2Vcc = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_PDU2_VCC, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateAcuVbat = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_ACU_VBAT, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStatePdu1Vbat = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_PDU1_VBAT, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateX3IdleVbat = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_X3_IDLE_VBAT, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStatePdu2Vbat = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_PDU2_VBAT, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
lp_var_t<uint8_t> outputEnableStateStackVbat = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 19:35:55 +01:00
|
|
|
P60System::P60DOCK_OUTPUTENABLE_STACK_VBAT, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateStack3V3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_STACK_3V3, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateStack5V = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_STACK_5V, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateGS3V3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_GS3V3, this);
|
|
|
|
lp_var_t<uint8_t> outputEnableStateGS5V = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_OUTPUTENABLE_GS5V, this);
|
|
|
|
|
|
|
|
lp_var_t<int16_t> temperature1 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_TEMPERATURE_1, this);
|
|
|
|
lp_var_t<int16_t> temperature2 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_TEMPERATURE_2, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BOOT_CAUSE, this);
|
|
|
|
lp_var_t<uint32_t> bootCount = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BOOT_CNT, this);
|
|
|
|
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_UPTIME, this);
|
|
|
|
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_RESETCAUSE, this);
|
|
|
|
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATT_MODE, this);
|
|
|
|
/** Battery heater control only possible on BP4 packs */
|
|
|
|
lp_var_t<uint8_t> heaterOn = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_HEATER_ON, this);
|
|
|
|
lp_var_t<uint8_t> converter5VStatus = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
/** Number of detected latchups on each output channel */
|
|
|
|
lp_var_t<uint16_t> latchupsAcuVcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_ACU_VCC, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPdu1Vcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_PDU1_VCC, this);
|
|
|
|
lp_var_t<uint16_t> latchupsX3IdleVcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_X3_IDLE_VCC, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPdu2Vcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_PDU2_VCC, this);
|
|
|
|
lp_var_t<uint16_t> latchupsAcuVbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_ACU_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPdu1Vbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_PDU1_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsX3IdleVbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_X3_IDLE_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPdu2Vbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_PDU2_VBAT, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
lp_var_t<uint16_t> latchupsStackVbat = lp_var_t<uint16_t>(sid.objectId,
|
2021-02-03 19:35:55 +01:00
|
|
|
P60System::P60DOCK_LATCHUP_STACK_VBAT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsStack3V3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_STACK_3V3, this);
|
|
|
|
lp_var_t<uint16_t> latchupsStack5V = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_STACK_5V, this);
|
|
|
|
lp_var_t<uint16_t> latchupsGS3V3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_GS3V3, this);
|
|
|
|
lp_var_t<uint16_t> latchupsGS5V = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_LATCHUP_GS5V, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint16_t> vbatVoltageValue = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VBAT_VALUE, this);
|
|
|
|
lp_var_t<int16_t> vccCurrent = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_VCC_CURRENT_VALUE, this);
|
|
|
|
lp_var_t<int16_t> batteryCurrent = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATTERY_CURRENT, this);
|
|
|
|
lp_var_t<uint16_t> batteryVoltage = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATTERY_VOLTAGE, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
lp_var_t<int16_t> batteryTemperature1 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATTERY_TEMPERATURE_1, this);
|
|
|
|
lp_var_t<int16_t> batteryTemperature2 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATTERY_TEMPERATURE_2, this);
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> device0 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_0, this);
|
|
|
|
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_1, this);
|
|
|
|
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_2, this);
|
|
|
|
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_3, this);
|
|
|
|
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_4, this);
|
|
|
|
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_5, this);
|
|
|
|
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_6, this);
|
|
|
|
lp_var_t<uint8_t> device7 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_7, this);
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> device0Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_0_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device1Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_1_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device2Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_2_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device3Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_3_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device4Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_4_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device5Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_5_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device6Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_6_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_DEVICE_7_STATUS, this);
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> dearmStatus = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::P60DOCK_DEARM_STATUS, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
|
|
|
|
/** Number of reboots due to gnd, i2c, csp watchdog timeout */
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint32_t> wdtCntGnd = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CNT_GND, this);
|
|
|
|
lp_var_t<uint32_t> wdtCntI2c = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CNT_I2C, this);
|
|
|
|
lp_var_t<uint32_t> wdtCntCan = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CNT_CAN, this);
|
|
|
|
lp_var_t<uint32_t> wdtCntCsp1 = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CNT_CSP_1, this);
|
|
|
|
lp_var_t<uint32_t> wdtCntCsp2 = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CNT_CSP_2, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint32_t> wdtGndLeft = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_GND_LEFT, this);
|
|
|
|
lp_var_t<uint32_t> wdtI2cLeft = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_I2C_LEFT, this);
|
|
|
|
lp_var_t<uint32_t> wdtCanLeft = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CAN_LEFT, this);
|
|
|
|
lp_var_t<uint8_t> wdtCspLeft1 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CSP_LEFT_1, this);
|
|
|
|
lp_var_t<uint8_t> wdtCspLeft2 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_WDT_CSP_LEFT_2, this);
|
|
|
|
lp_var_t<int16_t> batteryChargeCurrent = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_BATT_CHARGE_CURRENT, this);
|
2021-02-12 10:20:39 +01:00
|
|
|
lp_var_t<int16_t> batteryDischargeCurrent = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::P60DOCK_BATT_DISCHARGE_CURRENT, this);
|
|
|
|
lp_var_t<int8_t> ant6Depl = lp_var_t<int8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_ANT6_DEPL, this);
|
|
|
|
lp_var_t<int8_t> ar6Depl = lp_var_t<int8_t>(sid.objectId,
|
|
|
|
P60System::P60DOCK_AR6_DEPL, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
/**
|
|
|
|
* @brief Constants common for both PDU1 and PDU2.
|
|
|
|
*/
|
|
|
|
namespace PDU{
|
2021-02-05 07:37:21 +01:00
|
|
|
/** When retrieving full configuration parameter table */
|
2021-02-03 08:09:54 +01:00
|
|
|
static const uint16_t MAX_REPLY_LENGTH = 318;
|
|
|
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
|
2021-02-05 07:37:21 +01:00
|
|
|
static const uint16_t MAX_HKTABLE_ADDRESS = 141;
|
2021-02-06 16:13:31 +01:00
|
|
|
/** The size of the csp reply containing the housekeeping table data */
|
2021-02-05 07:37:21 +01:00
|
|
|
static const uint16_t HK_TABLE_REPLY_SIZE = 303;
|
2021-02-06 11:57:45 +01:00
|
|
|
static const uint8_t HK_TABLE_ENTRIES = 73;
|
2021-02-03 08:09:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
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 :
|
2021-02-06 11:57:45 +01:00
|
|
|
public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
|
2021-01-28 14:55:21 +01:00
|
|
|
public:
|
|
|
|
|
|
|
|
PDU1HkTableDataset(HasLocalDataPoolIF* owner):
|
2021-02-08 11:48:58 +01:00
|
|
|
StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) {
|
2021-01-28 14:55:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
PDU1HkTableDataset(object_id_t objectId):
|
2021-02-08 11:48:58 +01:00
|
|
|
StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) {
|
2021-01-28 14:55:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Measured output currents */
|
|
|
|
lp_var_t<int16_t> currentOutTCSBoard3V3 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_TCS_BOARD_3V3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutSyrlinks = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_SYRLINKS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutStarTracker = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_STAR_TRACKER, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutMGT = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_MGT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutSUSNominal = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_SUS_NOMINAL, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutSolarCellExp = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutPLOC = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_PLOC, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutACSBoardSideA = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutChannel8 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_CURRENT_OUT_CHANNEL8, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured voltage of output channels */
|
|
|
|
lp_var_t<int16_t> voltageOutTCSBoard3V3 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutSyrlinks = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_SYRLINKS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutStarTracker = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutMGT = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_MGT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutSUSNominal = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_SUS_NOMINAL, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutSolarCellExp = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutPLOC = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_PLOC, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutACSBoardSideA = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutChannel8 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VOLTAGE_OUT_CHANNEL8, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured VCC */
|
|
|
|
lp_var_t<int16_t> vcc = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VCC, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured VBAT */
|
|
|
|
lp_var_t<int16_t> vbat = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_VBAT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> temperature = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_TEMPERATURE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Output converter enable status */
|
2021-02-05 07:37:21 +01:00
|
|
|
lp_var_t<uint8_t> converterEnable1 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU1_CONV_EN_1, this);
|
|
|
|
lp_var_t<uint8_t> converterEnable2 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU1_CONV_EN_2, this);
|
|
|
|
lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU1_CONV_EN_3, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Output channels enable status */
|
|
|
|
lp_var_t<uint8_t> outEnabledTCSBoard3V3 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_TCS_BOARD_3V3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledSyrlinks = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_SYRLINKS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledStarTracker = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_STAR_TRACKER, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledMGT = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_MGT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledSUSNominal = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_SUS_NOMINAL, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledSolarCellExp = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_SOLAR_CELL_EXP, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledPLOC = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_PLOC, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledAcsBoardSideA = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_ACS_BOARD_SIDE_A, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledChannel8 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_OUT_EN_CHANNEL8, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_BOOTCAUSE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots */
|
|
|
|
lp_var_t<uint32_t> bootcount = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_BOOTCNT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Uptime in seconds */
|
|
|
|
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_UPTIME, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_RESETCAUSE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
|
|
|
|
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_BATT_MODE, this);
|
2021-02-05 07:37:21 +01:00
|
|
|
|
|
|
|
/** Number of detected latchups on each output channel */
|
|
|
|
lp_var_t<uint16_t> latchupsTcsBoard3V3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_TCS_BOARD_3V3, this);
|
|
|
|
lp_var_t<uint16_t> latchupsSyrlinks = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_SYRLINKS, this);
|
|
|
|
lp_var_t<uint16_t> latchupsStarTracker = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_STAR_TRACKER, this);
|
|
|
|
lp_var_t<uint16_t> latchupsMgt = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_MGT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsSusNominal = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_SUS_NOMINAL, this);
|
|
|
|
lp_var_t<uint16_t> latchupsSolarCellExp = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_SOLAR_CELL_EXP, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPloc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_PLOC, this);
|
|
|
|
lp_var_t<uint16_t> latchupsAcsBoardSideA = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_ACS_BOARD_SIDE_A, this);
|
|
|
|
lp_var_t<uint16_t> latchupsChannel8 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU1_LATCHUP_CHANNEL8, this);
|
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/**
|
|
|
|
* 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<uint8_t> device0 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_0, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_1, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_4, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_5, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_6, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device7 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_7, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** The status of each device. 0 = None, 1 = Ok, 2 = Error, 3 = Not found */
|
|
|
|
lp_var_t<uint8_t> device0Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_0_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device1Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_1_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device2Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_2_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device3Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_3_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device4Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_4_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device5Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_5_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device6Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_6_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_DEVICE_7_STATUS, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered by the ground watchdog */
|
|
|
|
lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_CNT_GND, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the I2C watchdog. Not relevant for EIVE. */
|
|
|
|
lp_var_t<uint32_t> i2cWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_CNT_I2C, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the CAN watchdog */
|
|
|
|
lp_var_t<uint32_t> canWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_CNT_CAN, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the CSP watchdog */
|
2021-02-05 07:37:21 +01:00
|
|
|
lp_var_t<uint32_t> csp1WdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::PDU1_WDT_CNT_CSP1, this);
|
|
|
|
lp_var_t<uint32_t> csp2WdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::PDU1_WDT_CNT_CSP2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Ground watchdog remaining seconds before rebooting */
|
|
|
|
lp_var_t<uint32_t> groundWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_GND_LEFT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */
|
|
|
|
lp_var_t<uint32_t> i2cWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_I2C_LEFT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** CAN watchdog remaining seconds before rebooting. */
|
|
|
|
lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU1_WDT_CAN_LEFT, this);
|
2021-02-05 07:37:21 +01:00
|
|
|
/** CSP watchdogs remaining pings before rebooting. */
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU1_WDT_CSP_LEFT1, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU1_WDT_CSP_LEFT2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
2021-02-11 08:19:48 +01:00
|
|
|
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;
|
2021-01-28 14:55:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This class defines a dataset for the hk table of the PDU2.
|
|
|
|
*/
|
|
|
|
class PDU2HkTableDataset:
|
2021-02-06 11:57:45 +01:00
|
|
|
public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
|
2021-01-28 14:55:21 +01:00
|
|
|
public:
|
|
|
|
|
|
|
|
PDU2HkTableDataset(HasLocalDataPoolIF* owner):
|
2021-02-03 19:35:55 +01:00
|
|
|
StaticLocalDataSet(owner, HK_TABLE_DATA_SET_ID) {
|
2021-01-28 14:55:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
PDU2HkTableDataset(object_id_t objectId):
|
2021-02-03 19:35:55 +01:00
|
|
|
StaticLocalDataSet(sid_t(objectId, HK_TABLE_DATA_SET_ID)) {
|
2021-01-28 14:55:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Measured output currents */
|
|
|
|
lp_var_t<int16_t> currentOutQ7S = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_Q7S, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutPayloadPCDUCh1 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutReactionWheels = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_RW, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutTCSBoardHeaterIn = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutSUSRedundant = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_SUS_REDUNDANT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutDeplMechanism = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<int16_t> currentOutACSBoardSideB = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> currentOutPayloadCamera = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured voltage of output channels */
|
|
|
|
lp_var_t<int16_t> voltageOutQ7S = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_Q7S, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutPayloadPCDUCh1 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutReactionWheels = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_RW, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutTCSBoardHeaterIn = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<int16_t> voltageOutSUSRedundant = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutDeplMechanism = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutPayloadPCDUCh6 = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<int16_t> voltageOutACSBoardSideB = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> voltageOutPayloadCamera = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured VCC */
|
|
|
|
lp_var_t<int16_t> vcc = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VCC, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Measured VBAT */
|
|
|
|
lp_var_t<int16_t> vbat = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_VBAT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<int16_t> temperature = lp_var_t<int16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_TEMPERATURE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Output converter enable status */
|
2021-02-05 07:37:21 +01:00
|
|
|
lp_var_t<uint8_t> converterEnable1 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU2_CONV_EN_1, this);
|
|
|
|
lp_var_t<uint8_t> converterEnable2 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU2_CONV_EN_2, this);
|
|
|
|
lp_var_t<uint8_t> converterEnable3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::PDU2_CONV_EN_3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Output channels enable status */
|
|
|
|
lp_var_t<uint8_t> outEnabledQ7S = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_Q7S, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledPlPCDUCh1 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledReactionWheels = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_RW, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledTCSBoardHeaterIn = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledSUSRedundant = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_SUS_REDUNDANT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledDeplMechanism = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledPlPCDUCh6 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledAcsBoardSideB = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> outEnabledPayloadCamera = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_BOOTCAUSE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots */
|
|
|
|
lp_var_t<uint32_t> bootcount = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_BOOTCNT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Uptime in seconds */
|
|
|
|
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_UPTIME, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_RESETCAUSE, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
|
|
|
|
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_BATT_MODE, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
/** Number of detected latchups on each output channel */
|
|
|
|
lp_var_t<uint16_t> latchupsQ7S = lp_var_t<uint16_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU2_LATCHUP_Q7S, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPayloadPcduCh1 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH1, this);
|
|
|
|
lp_var_t<uint16_t> latchupsRw = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_RW, this);
|
|
|
|
lp_var_t<uint16_t> latchupsTcsBoardHeaterIn = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_TCS_BOARD_HEATER_IN, this);
|
|
|
|
lp_var_t<uint16_t> latchupsSusRedundant = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_SUS_REDUNDANT, this);
|
|
|
|
lp_var_t<uint16_t> latchupsDeplMenchanism = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_DEPLOYMENT_MECHANISM, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPayloadPcduCh6 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_PAYLOAD_PCDU_CH6, this);
|
|
|
|
lp_var_t<uint16_t> latchupsAcsBoardSideB = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_ACS_BOARD_SIDE_B, this);
|
|
|
|
lp_var_t<uint16_t> latchupsPayloadCamera = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::PDU2_LATCHUP_PAYLOAD_CAMERA, this);
|
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/**
|
|
|
|
* 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<uint8_t> device0 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_0, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_1, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_3, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_4, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_5, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_6, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device7 = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_7, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** The status of each device. 0 = None, 1 = Ok, 2 = Error, 3 = Not found */
|
|
|
|
lp_var_t<uint8_t> device0Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_0_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device1Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_1_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device2Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_2_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device3Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_3_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device4Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_4_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device5Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_5_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device6Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_6_STATUS, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_DEVICE_7_STATUS, this);
|
2021-02-05 07:37:21 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered by the ground watchdog */
|
|
|
|
lp_var_t<uint32_t> gndWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_CNT_GND, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the I2C watchdog. Not relevant for EIVE. */
|
|
|
|
lp_var_t<uint32_t> i2cWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_CNT_I2C, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the CAN watchdog */
|
|
|
|
lp_var_t<uint32_t> canWdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_CNT_CAN, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Number of reboots triggered through the CSP watchdog */
|
2021-02-05 07:37:21 +01:00
|
|
|
lp_var_t<uint32_t> csp1WdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::PDU2_WDT_CNT_CSP1, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint32_t> csp2WdtReboots = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU2_WDT_CNT_CSP2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** Ground watchdog remaining seconds before rebooting */
|
|
|
|
lp_var_t<uint32_t> groundWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_GND_LEFT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */
|
|
|
|
lp_var_t<uint32_t> i2cWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_I2C_LEFT, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
/** CAN watchdog remaining seconds before rebooting. */
|
|
|
|
lp_var_t<uint32_t> canWatchdogSecondsLeft = lp_var_t<uint32_t>(sid.objectId,
|
2021-02-03 08:09:54 +01:00
|
|
|
P60System::PDU2_WDT_CAN_LEFT, this);
|
2021-02-05 07:37:21 +01:00
|
|
|
/** CSP watchdog remaining pings before rebooting. */
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> csp1WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU2_WDT_CSP_LEFT1, this);
|
2021-02-06 11:57:45 +01:00
|
|
|
lp_var_t<uint8_t> csp2WatchdogPingsLeft = lp_var_t<uint8_t>(sid.objectId,
|
2021-02-05 07:37:21 +01:00
|
|
|
P60System::PDU2_WDT_CSP_LEFT2, this);
|
2021-01-28 14:55:21 +01:00
|
|
|
};
|
2020-12-20 17:35:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
namespace ACU {
|
2021-02-03 08:09:54 +01:00
|
|
|
|
2021-02-03 19:35:55 +01:00
|
|
|
static const uint32_t HK_TABLE_DATA_SET_ID = 0x4;
|
2021-02-03 08:09:54 +01:00
|
|
|
|
2021-01-28 14:55:21 +01:00
|
|
|
/* When receiving full housekeeping (telemetry) table */
|
2021-02-14 12:07:18 +01:00
|
|
|
static const uint16_t MAX_REPLY_LENGTH = 262;
|
2020-12-20 17:35:03 +01:00
|
|
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
|
|
|
|
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
|
2021-02-03 19:35:55 +01:00
|
|
|
static const uint8_t HK_TABLE_ENTRIES = 64;
|
2021-02-14 11:40:40 +01:00
|
|
|
static const uint16_t HK_TABLE_REPLY_SIZE = 262;
|
2021-02-03 08:09:54 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief This class defines a dataset for the hk table of the ACU.
|
|
|
|
*/
|
|
|
|
class HkTableDataset:
|
|
|
|
public StaticLocalDataSet<HK_TABLE_ENTRIES> {
|
|
|
|
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)) {
|
|
|
|
}
|
|
|
|
|
2021-02-03 19:35:55 +01:00
|
|
|
lp_var_t<int16_t> currentInChannel0 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL0, this);
|
|
|
|
lp_var_t<int16_t> currentInChannel1 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL1, this);
|
|
|
|
lp_var_t<int16_t> currentInChannel2 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL2, this);
|
|
|
|
lp_var_t<int16_t> currentInChannel3 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL3, this);
|
|
|
|
lp_var_t<int16_t> currentInChannel4 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL4, this);
|
|
|
|
lp_var_t<int16_t> currentInChannel5 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_CURRENT_IN_CHANNEL5, this);
|
|
|
|
|
|
|
|
lp_var_t<uint16_t> voltageInChannel0 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL0, this);
|
|
|
|
lp_var_t<uint16_t> voltageInChannel1 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL1, this);
|
|
|
|
lp_var_t<uint16_t> voltageInChannel2 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL2, this);
|
|
|
|
lp_var_t<uint16_t> voltageInChannel3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL3, this);
|
|
|
|
lp_var_t<uint16_t> voltageInChannel4 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL4, this);
|
|
|
|
lp_var_t<uint16_t> voltageInChannel5 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VOLTAGE_IN_CHANNEL5, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint16_t> vcc = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VCC, this);
|
|
|
|
lp_var_t<uint16_t> vbat = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBAT, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
lp_var_t<int16_t> temperature1 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_TEMPERATURE_1, this);
|
|
|
|
lp_var_t<int16_t> temperature2 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_TEMPERATURE_2, this);
|
|
|
|
lp_var_t<int16_t> temperature3 = lp_var_t<int16_t>(sid.objectId,
|
|
|
|
P60System::ACU_TEMPERATURE_3, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint8_t> mpptMode = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_MPPT_MODE, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
lp_var_t<uint16_t> vboostInChannel0 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL0, this);
|
|
|
|
lp_var_t<uint16_t> vboostInChannel1 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL1, this);
|
|
|
|
lp_var_t<uint16_t> vboostInChannel2 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL2, this);
|
|
|
|
lp_var_t<uint16_t> vboostInChannel3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL3, this);
|
|
|
|
lp_var_t<uint16_t> vboostInChannel4 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL4, this);
|
|
|
|
lp_var_t<uint16_t> vboostInChannel5 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_VBOOST_CHANNEL5, this);
|
|
|
|
|
|
|
|
lp_var_t<uint16_t> powerInChannel0 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL0, this);
|
|
|
|
lp_var_t<uint16_t> powerInChannel1 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL1, this);
|
|
|
|
lp_var_t<uint16_t> powerInChannel2 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL2, this);
|
|
|
|
lp_var_t<uint16_t> powerInChannel3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL3, this);
|
|
|
|
lp_var_t<uint16_t> powerInChannel4 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL4, this);
|
|
|
|
lp_var_t<uint16_t> powerInChannel5 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_POWER_CHANNEL5, this);
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> dac0Enable = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_EN_0, this);
|
|
|
|
lp_var_t<uint8_t> dac1Enable = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_EN_1, this);
|
|
|
|
lp_var_t<uint8_t> dac2Enable = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_EN_2, this);
|
|
|
|
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal0 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_0, this);
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal1 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_1, this);
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal2 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_2, this);
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal3 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_3, this);
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal4 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_4, this);
|
|
|
|
lp_var_t<uint16_t> dacRawChannelVal5 = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_DAC_RAW_5, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint32_t> bootCause = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::ACU_BOOTCAUSE, this);
|
|
|
|
lp_var_t<uint32_t> bootcnt = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::ACU_BOOTCNT, this);
|
|
|
|
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::ACU_UPTIME, this);
|
|
|
|
lp_var_t<uint16_t> resetCause = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_RESET_CAUSE, this);
|
|
|
|
lp_var_t<uint16_t> mpptTime = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_MPPT_TIME, this);
|
|
|
|
lp_var_t<uint16_t> mpptPeriod = lp_var_t<uint16_t>(sid.objectId,
|
|
|
|
P60System::ACU_MPPT_PERIOD, this);
|
2021-02-03 19:35:55 +01:00
|
|
|
|
|
|
|
lp_var_t<uint8_t> device0 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_0, this);
|
|
|
|
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_1, this);
|
|
|
|
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_2, this);
|
|
|
|
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_3, this);
|
|
|
|
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_4, this);
|
|
|
|
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_5, this);
|
|
|
|
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_6, this);
|
|
|
|
lp_var_t<uint8_t> device7 = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_7, this);
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> device0Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_0_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device1Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_1_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device2Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_2_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device3Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_3_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device4Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_4_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device5Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_5_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device6Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_6_STATUS, this);
|
|
|
|
lp_var_t<uint8_t> device7Status = lp_var_t<uint8_t>(sid.objectId,
|
|
|
|
P60System::ACU_DEVICE_7_STATUS, this);
|
|
|
|
|
2021-02-03 08:09:54 +01:00
|
|
|
lp_var_t<uint32_t> wdtCntGnd = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::ACU_WDT_CNT_GND, this);
|
|
|
|
lp_var_t<uint32_t> wdtGndLeft = lp_var_t<uint32_t>(sid.objectId,
|
|
|
|
P60System::ACU_WDT_GND_LEFT, this);
|
|
|
|
};
|
2020-12-20 17:35:03 +01:00
|
|
|
}
|
|
|
|
|
2020-12-20 13:31:44 +01:00
|
|
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */
|