eive-obsw/mission/devices/devicedefinitions/GomspaceDefinitions.h
Robin Mueller a362e71388
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
more useful PCDU printout
2022-03-14 17:41:06 +01:00

1174 lines
52 KiB
C++

#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <cstdint>
namespace GOMSPACE {
enum class Pdu { PDU1, PDU2 };
using ChannelSwitchHook = void (*)(Pdu pdu, uint8_t channel, bool on, void* args);
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..
* IDs above 50 are reserved for device specific commands.
*/
static const DeviceCommandId_t PING = 1; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t NONE = 2; // Set when no command is pending
static const DeviceCommandId_t REBOOT = 4; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t GNDWDT_RESET = 9; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_GET = 0; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t PARAM_SET = 255; //!< [EXPORT] : [COMMAND]
static const DeviceCommandId_t REQUEST_HK_TABLE = 16; //!< [EXPORT] : [COMMAND]
//!< [EXPORT] : [COMMAND] Print switch states, voltages and currents to the console
static const DeviceCommandId_t PRINT_SWITCH_V_I = 32;
static const DeviceCommandId_t PRINT_LATCHUPS = 33;
} // namespace GOMSPACE
namespace P60System {
enum P60SytemPoolIds : lp_id_t {
P60DOCK_CURRENT_ACU_VCC,
P60DOCK_CURRENT_PDU1_VCC,
P60DOCK_CURRENT_X3_IDLE_VCC,
P60DOCK_CURRENT_PDU2_VCC,
P60DOCK_CURRENT_ACU_VBAT,
P60DOCK_CURRENT_PDU1_VBAT,
P60DOCK_CURRENT_X3_IDLE_VBAT,
P60DOCK_CURRENT_PDU2_VBAT,
P60DOCK_CURRENT_STACK_VBAT,
P60DOCK_CURRENT_STACK_3V3,
P60DOCK_CURRENT_STACK_5V,
P60DOCK_CURRENT_GS3V3,
P60DOCK_CURRENT_GS5V,
P60DOCK_VOLTAGE_ACU_VCC,
P60DOCK_VOLTAGE_PDU1_VCC,
P60DOCK_VOLTAGE_X3_IDLE_VCC,
P60DOCK_VOLTAGE_PDU2_VCC,
P60DOCK_VOLTAGE_ACU_VBAT,
P60DOCK_VOLTAGE_PDU1_VBAT,
P60DOCK_VOLTAGE_X3_IDLE_VBAT,
P60DOCK_VOLTAGE_PDU2_VBAT,
P60DOCK_VOLTAGE_STACK_VBAT,
P60DOCK_VOLTAGE_STACK_3V3,
P60DOCK_VOLTAGE_STACK_5V,
P60DOCK_VOLTAGE_GS3V3,
P60DOCK_VOLTAGE_GS5V,
P60DOCK_OUTPUTENABLE_ACU_VCC,
P60DOCK_OUTPUTENABLE_PDU1_VCC,
P60DOCK_OUTPUTENABLE_X3_IDLE_VCC,
P60DOCK_OUTPUTENABLE_PDU2_VCC,
P60DOCK_OUTPUTENABLE_ACU_VBAT,
P60DOCK_OUTPUTENABLE_PDU1_VBAT,
P60DOCK_OUTPUTENABLE_X3_IDLE_VBAT,
P60DOCK_OUTPUTENABLE_PDU2_VBAT,
P60DOCK_OUTPUTENABLE_STACK_VBAT,
P60DOCK_OUTPUTENABLE_STACK_3V3,
P60DOCK_OUTPUTENABLE_STACK_5V,
P60DOCK_OUTPUTENABLE_GS3V3,
P60DOCK_OUTPUTENABLE_GS5V,
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,
P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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 {
enum SwitchChannels : uint8_t {
ACU = 0,
PDU1 = 1,
X3_IDLE = 2,
PDU2_VCC = 3,
ACU_VBAT = 4,
PDU1_VBAT = 5,
X3_IDLE_VBAT = 6,
PDU2_VBAT = 7,
STACK_VBAT = 8,
STACK_3V3 = 9,
STACK_5V = 10,
GS3V3 = 11,
GS5V = 12
};
/** Max reply size reached when requesting full hk table */
static const uint16_t MAX_REPLY_LENGTH = 407;
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;
/**
* 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;
/**
* @brief This class defines a dataset for the hk table of the P60 Dock.
* @details
* The GS port and X3 are not required for EIVE. X3 is another slot on the P60 dock and
* GS is required for a module from Gomspace which is not used.
*/
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)) {}
/** 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);
lp_var_t<int16_t> currentStackVbat =
lp_var_t<int16_t>(sid.objectId, 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);
lp_var_t<uint16_t> voltageStackVbat =
lp_var_t<uint16_t>(sid.objectId, 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);
lp_var_t<uint8_t> outputEnableStateStackVbat =
lp_var_t<uint8_t>(sid.objectId, 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);
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);
/** 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);
lp_var_t<uint16_t> latchupsStackVbat =
lp_var_t<uint16_t>(sid.objectId, 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);
lp_var_t<uint16_t> dockVbatVoltageValue =
lp_var_t<uint16_t>(sid.objectId, P60System::P60DOCK_VBAT_VALUE, this);
lp_var_t<int16_t> dockVccCurrent =
lp_var_t<int16_t>(sid.objectId, P60System::P60DOCK_VCC_CURRENT_VALUE, this);
// Difference between charge and discharge current
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);
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, P60System::P60DOCK_DEARM_STATUS, this);
/** Number of reboots due to gnd, i2c, csp watchdog timeout */
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);
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);
lp_var_t<int16_t> batteryDischargeCurrent =
lp_var_t<int16_t>(sid.objectId, 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);
};
} // namespace P60Dock
/**
* @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 PDU
namespace PDU1 {
static const uint32_t HK_TABLE_DATA_SET_ID = 0x1; // hk table has table id 4
enum SwitchChannels : uint8_t {
TCS_BOARD_3V3 = 0,
SYRLINKS = 1,
STR = 2,
MGT = 3,
SUS_NOMINAL = 4,
SOL_CELL_EXPERIMENT = 5,
PLOC = 6,
ACS_A_SIDE = 7,
UNUSED = 8
};
/**
* 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 = 0x4A;
static const uint16_t CONFIG_ADDRESS_OUT_EN_MGT = 0x4B;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL = 0x4C;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP = 0x4D;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PLOC = 0x4E;
static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A = 0x4F;
static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x50;
/**
* @brief This class defines a dataset for the hk table of the PDU1.
*/
class PDU1HkTableDataset : public StaticLocalDataSet<PDU::HK_TABLE_ENTRIES> {
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<int16_t> currentOutTCSBoard3V3 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_TCS_BOARD_3V3, this);
lp_var_t<int16_t> currentOutSyrlinks =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_SYRLINKS, this);
lp_var_t<int16_t> currentOutStarTracker =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_STAR_TRACKER, this);
lp_var_t<int16_t> currentOutMGT =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_MGT, this);
lp_var_t<int16_t> currentOutSUSNominal =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_SUS_NOMINAL, this);
lp_var_t<int16_t> currentOutSolarCellExp =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_SOLAR_CELL_EXP, this);
lp_var_t<int16_t> currentOutPLOC =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_PLOC, this);
lp_var_t<int16_t> currentOutACSBoardSideA =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_ACS_BOARD_SIDE_A, this);
lp_var_t<int16_t> currentOutChannel8 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_CURRENT_OUT_CHANNEL8, this);
/** Measured voltage of output channels */
lp_var_t<int16_t> voltageOutTCSBoard3V3 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_TCS_BOARD_3V3, this);
lp_var_t<int16_t> voltageOutSyrlinks =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SYRLINKS, this);
lp_var_t<int16_t> voltageOutStarTracker =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_STAR_TRACKER, this);
lp_var_t<int16_t> voltageOutMGT =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_MGT, this);
lp_var_t<int16_t> voltageOutSUSNominal =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SUS_NOMINAL, this);
lp_var_t<int16_t> voltageOutSolarCellExp =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_SOLAR_CELL_EXP, this);
lp_var_t<int16_t> voltageOutPLOC =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_PLOC, this);
lp_var_t<int16_t> voltageOutACSBoardSideA =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_ACS_BOARD_SIDE_A, this);
lp_var_t<int16_t> voltageOutChannel8 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VOLTAGE_OUT_CHANNEL8, this);
/** Measured VCC */
lp_var_t<int16_t> vcc = lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VCC, this);
/** Measured VBAT */
lp_var_t<int16_t> vbat = lp_var_t<int16_t>(sid.objectId, P60System::PDU1_VBAT, this);
lp_var_t<int16_t> temperature =
lp_var_t<int16_t>(sid.objectId, P60System::PDU1_TEMPERATURE, this);
/** Output converter enable status */
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);
/** Output channels enable status */
lp_var_t<uint8_t> outEnabledTCSBoard3V3 =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_TCS_BOARD_3V3, this);
lp_var_t<uint8_t> outEnabledSyrlinks =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_SYRLINKS, this);
lp_var_t<uint8_t> outEnabledStarTracker =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_STAR_TRACKER, this);
lp_var_t<uint8_t> outEnabledMGT =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_MGT, this);
lp_var_t<uint8_t> outEnabledSUSNominal =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_SUS_NOMINAL, this);
lp_var_t<uint8_t> outEnabledSolarCellExp =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_SOLAR_CELL_EXP, this);
lp_var_t<uint8_t> outEnabledPLOC =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_PLOC, this);
lp_var_t<uint8_t> outEnabledAcsBoardSideA =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_ACS_BOARD_SIDE_A, this);
lp_var_t<uint8_t> outEnabledChannel8 =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_OUT_EN_CHANNEL8, this);
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_BOOTCAUSE, this);
/** Number of reboots */
lp_var_t<uint32_t> bootcount = lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_BOOTCNT, this);
/** Uptime in seconds */
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_UPTIME, this);
lp_var_t<uint16_t> resetcause =
lp_var_t<uint16_t>(sid.objectId, P60System::PDU1_RESETCAUSE, this);
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_BATT_MODE, this);
/** 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);
/**
* 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, P60System::PDU1_DEVICE_0, this);
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_1, this);
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_2, this);
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_3, this);
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_4, this);
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_5, this);
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_6, this);
lp_var_t<uint8_t> device7 = lp_var_t<uint8_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<uint8_t> device0Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_0_STATUS, this);
lp_var_t<uint8_t> device1Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_1_STATUS, this);
lp_var_t<uint8_t> device2Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_2_STATUS, this);
lp_var_t<uint8_t> device3Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_3_STATUS, this);
lp_var_t<uint8_t> device4Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_4_STATUS, this);
lp_var_t<uint8_t> device5Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_5_STATUS, this);
lp_var_t<uint8_t> device6Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_6_STATUS, this);
lp_var_t<uint8_t> device7Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_DEVICE_7_STATUS, this);
/** Number of reboots triggered by the ground watchdog */
lp_var_t<uint32_t> gndWdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_WDT_CNT_GND, this);
/** 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, P60System::PDU1_WDT_CNT_I2C, this);
/** Number of reboots triggered through the CAN watchdog */
lp_var_t<uint32_t> canWdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_WDT_CNT_CAN, this);
/** Number of reboots triggered through the CSP watchdog */
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);
/** Ground watchdog remaining seconds before rebooting */
lp_var_t<uint32_t> groundWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_WDT_GND_LEFT, this);
/** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */
lp_var_t<uint32_t> i2cWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_WDT_I2C_LEFT, this);
/** CAN watchdog remaining seconds before rebooting. */
lp_var_t<uint32_t> canWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU1_WDT_CAN_LEFT, this);
/** CSP watchdogs remaining pings before rebooting. */
lp_var_t<uint8_t> csp2WatchdogPingsLeft =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp1WatchdogPingsLeft =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU1_WDT_CSP_LEFT2, this);
};
} // namespace PDU1
namespace PDU2 {
static const uint32_t HK_TABLE_DATA_SET_ID = 0x2;
enum SwitchChannels : uint8_t {
Q7S = 0,
PAYLOAD_PCDU_CH1 = 1,
RW = 2,
TCS_HEATER_IN = 3,
SUS_REDUNDANT = 4,
DEPY_MECHANISM = 5,
PAYLOAD_PCDU_CH6 = 6,
ACS_B_SIDE = 7,
PAYLOAD_CAMERA = 8
};
/**
* 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_CH6 = 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<PDU::HK_TABLE_ENTRIES> {
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<int16_t> currentOutQ7S =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_Q7S, this);
lp_var_t<int16_t> currentOutPayloadPCDUCh1 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH1, this);
lp_var_t<int16_t> currentOutReactionWheels =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_RW, this);
lp_var_t<int16_t> currentOutTCSBoardHeaterIn =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_TCS_BOARD_HEATER_IN, this);
lp_var_t<int16_t> currentOutSUSRedundant =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_SUS_REDUNDANT, this);
lp_var_t<int16_t> currentOutDeplMechanism =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_DEPLOYMENT_MECHANISM, this);
lp_var_t<int16_t> currentOutPayloadPCDUCh6 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_PCDU_CH6, this);
lp_var_t<int16_t> currentOutACSBoardSideB =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_ACS_BOARD_SIDE_B, this);
lp_var_t<int16_t> currentOutPayloadCamera =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_CURRENT_OUT_PAYLOAD_CAMERA, this);
/** Measured voltage of output channels */
lp_var_t<int16_t> voltageOutQ7S =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_Q7S, this);
lp_var_t<int16_t> voltageOutPayloadPCDUCh1 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH1, this);
lp_var_t<int16_t> voltageOutReactionWheels =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_RW, this);
lp_var_t<int16_t> voltageOutTCSBoardHeaterIn =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_TCS_BOARD_HEATER_IN, this);
lp_var_t<int16_t> voltageOutSUSRedundant =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_SUS_REDUNDANT, this);
lp_var_t<int16_t> voltageOutDeplMechanism =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_DEPLOYMENT_MECHANISM, this);
lp_var_t<int16_t> voltageOutPayloadPCDUCh6 =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_PCDU_CH6, this);
lp_var_t<int16_t> voltageOutACSBoardSideB =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_ACS_BOARD_SIDE_B, this);
lp_var_t<int16_t> voltageOutPayloadCamera =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VOLTAGE_OUT_PAYLOAD_CAMERA, this);
/** Measured VCC */
lp_var_t<int16_t> vcc = lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VCC, this);
/** Measured VBAT */
lp_var_t<int16_t> vbat = lp_var_t<int16_t>(sid.objectId, P60System::PDU2_VBAT, this);
lp_var_t<int16_t> temperature =
lp_var_t<int16_t>(sid.objectId, P60System::PDU2_TEMPERATURE, this);
/** Output converter enable status */
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);
/** Output channels enable status */
lp_var_t<uint8_t> outEnabledQ7S =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_Q7S, this);
lp_var_t<uint8_t> outEnabledPlPCDUCh1 =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH1, this);
lp_var_t<uint8_t> outEnabledReactionWheels =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_RW, this);
lp_var_t<uint8_t> outEnabledTCSBoardHeaterIn =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_TCS_BOARD_HEATER_IN, this);
lp_var_t<uint8_t> outEnabledSUSRedundant =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_SUS_REDUNDANT, this);
lp_var_t<uint8_t> outEnabledDeplMechanism =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_DEPLOYMENT_MECHANISM, this);
lp_var_t<uint8_t> outEnabledPlPCDUCh6 =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_PCDU_CH6, this);
lp_var_t<uint8_t> outEnabledAcsBoardSideB =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_ACS_BOARD_SIDE_B, this);
lp_var_t<uint8_t> outEnabledPayloadCamera =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_OUT_EN_PAYLOAD_CAMERA, this);
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_BOOTCAUSE, this);
/** Number of reboots */
lp_var_t<uint32_t> bootcount = lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_BOOTCNT, this);
/** Uptime in seconds */
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_UPTIME, this);
lp_var_t<uint16_t> resetcause =
lp_var_t<uint16_t>(sid.objectId, P60System::PDU2_RESETCAUSE, this);
/** Battery mode: 1 = Critical, 2 = Safe, 3 = Normal, 4 = Full */
lp_var_t<uint8_t> battMode = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_BATT_MODE, this);
/** Number of detected latchups on each output channel */
lp_var_t<uint16_t> latchupsQ7S =
lp_var_t<uint16_t>(sid.objectId, 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);
/**
* 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, P60System::PDU2_DEVICE_0, this);
lp_var_t<uint8_t> device1 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_1, this);
lp_var_t<uint8_t> device2 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_2, this);
lp_var_t<uint8_t> device3 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_3, this);
lp_var_t<uint8_t> device4 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_4, this);
lp_var_t<uint8_t> device5 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_5, this);
lp_var_t<uint8_t> device6 = lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_6, this);
lp_var_t<uint8_t> device7 = lp_var_t<uint8_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<uint8_t> device0Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_0_STATUS, this);
lp_var_t<uint8_t> device1Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_1_STATUS, this);
lp_var_t<uint8_t> device2Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_2_STATUS, this);
lp_var_t<uint8_t> device3Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_3_STATUS, this);
lp_var_t<uint8_t> device4Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_4_STATUS, this);
lp_var_t<uint8_t> device5Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_5_STATUS, this);
lp_var_t<uint8_t> device6Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_6_STATUS, this);
lp_var_t<uint8_t> device7Status =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_DEVICE_7_STATUS, this);
/** Number of reboots triggered by the ground watchdog */
lp_var_t<uint32_t> gndWdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_CNT_GND, this);
/** 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, P60System::PDU2_WDT_CNT_I2C, this);
/** Number of reboots triggered through the CAN watchdog */
lp_var_t<uint32_t> canWdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_CNT_CAN, this);
/** Number of reboots triggered through the CSP watchdog */
lp_var_t<uint32_t> csp1WdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_CNT_CSP1, this);
lp_var_t<uint32_t> csp2WdtReboots =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_CNT_CSP2, this);
/** Ground watchdog remaining seconds before rebooting */
lp_var_t<uint32_t> groundWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_GND_LEFT, this);
/** I2C watchdog remaining seconds before rebooting. Not relevant for EIVE. */
lp_var_t<uint32_t> i2cWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_I2C_LEFT, this);
/** CAN watchdog remaining seconds before rebooting. */
lp_var_t<uint32_t> canWatchdogSecondsLeft =
lp_var_t<uint32_t>(sid.objectId, P60System::PDU2_WDT_CAN_LEFT, this);
/** CSP watchdog remaining pings before rebooting. */
lp_var_t<uint8_t> csp1WatchdogPingsLeft =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_WDT_CSP_LEFT1, this);
lp_var_t<uint8_t> csp2WatchdogPingsLeft =
lp_var_t<uint8_t>(sid.objectId, P60System::PDU2_WDT_CSP_LEFT2, this);
};
} // namespace PDU2
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 = 262;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
static const uint8_t HK_TABLE_ENTRIES = 64;
static const uint16_t HK_TABLE_REPLY_SIZE = 262;
/**
* @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)) {}
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);
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);
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);
lp_var_t<uint8_t> mpptMode = lp_var_t<uint8_t>(sid.objectId, P60System::ACU_MPPT_MODE, this);
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);
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);
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);
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);
};
} // namespace ACU
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINITIONS_H_ */