#include <smart_dock.h>
|
enum | ConnectionState { CONN_DISCONNECTED = 0x00,
CONN_CONNECTING = 0x01,
CONN_CONNECTED = 0x02,
NUM_CONNECTION_STATES
} |
|
enum | ActuatorState { ACT_RETRACT = 0x00,
ACT_RETRACTING = 0x01,
ACT_DEPLOYED = 0x03
} |
|
enum | BerthCommand {
COMMAND_UNKNOWN,
COMMAND_SET_POWER_MODE_HIBERNATE,
COMMAND_SET_POWER_MODE_AWAKE_NOMINAL,
COMMAND_SET_POWER_MODE_AWAKE_SAFE,
COMMAND_SET_POWER_MODE_CRITICAL_FAULT,
COMMAND_CLEAR_TERMINATE,
COMMAND_CLEAR_FAULTS,
COMMAND_ENABLE_ALL_PAYLOADS,
COMMAND_DISABLE_ALL_PAYLOADS,
COMMAND_ENABLE_ALL_PMCS,
COMMAND_DISABLE_ALL_PMCS,
COMMAND_REBOOT,
NUM_COMMANDS
} |
|
enum | Berth { BERTH_1,
BERTH_2,
NUM_BERTHS
} |
|
enum | String : uint32_t { STRING_SW_VERSION,
STRING_BUILD,
STRING_SERIAL,
NUM_STRINGS
} |
|
enum | Channel : uint32_t {
CHANNEL_DEV_EN,
CHANNEL_EC_PWR_EN,
CHANNEL_DEV2_PWR_EN,
CHANNEL_DEV1_PWR_EN,
CHANNEL_RESERVED0,
CHANNEL_RESERVED1,
CHANNEL_RESERVED2,
CHANNEL_RESERVED3,
CHANNEL_ACT_SIGOUT2,
CHANNEL_ACT_SIGOUT1,
CHANNEL_AS2_PWR_EN,
CHANNEL_AS1_PWR_EN,
CHANNEL_FAN_EN,
CHANNEL_RESERVED4,
CHANNEL_RESERVED5,
CHANNEL_RESERVED6,
CHANNEL_LED_1,
CHANNEL_LED_2,
CHANNEL_LED_3,
CHANNEL_LED_4,
CHANNEL_LED_5,
CHANNEL_LED_6,
CHANNEL_RESERVED7,
CHANNEL_RESERVED8,
CHANNEL_RESERVED9,
CHANNEL_RESERVED10,
CHANNEL_RESERVED11,
CHANNEL_RESERVED12,
CHANNEL_RESERVED13,
CHANNEL_RESERVED14,
CHANNEL_RESERVED15,
CHANNEL_RESERVED16,
NUM_CHANNELS
} |
|
enum | Fault : uint32_t {
FAULT_OC_BERTH_1,
FAULT_OC_BERTH_2,
FAULT_OC_SYSTEM,
FAULT_OC_DOCK_PROCESSOR,
FAULT_OT_CHARGER,
FAULT_OT_ACTUATOR_1,
FAULT_OT_ACTUATOR_2,
FAULT_WDT1_EPS_REBOOT,
FAULT_WDT2_DOCKCTL_REBOOT,
FAULT_WDT3_DOCKPC_REBOOT,
FAULT_WDT4_DOCKCTL_REBOOT,
NUM_FAULTS
} |
|
enum | Housekeeping : uint32_t {
HK_FAN_MAG_I,
HK_CHR_V_V,
HK_CHR_T_PROTECT,
HK_VLIVE_I,
HK_MAIN5_PWR_I,
HK_DEV_I,
HK_EC_PWR_I,
HK_A_GND_V1,
HK_AS2_I,
HK_AS1_I,
HK_A_GND_V2,
HK_DEV1_T_PROTECT,
HK_DEV2_T_PROTECT,
HK_A_GND_V3,
HK_DEV2_I,
HK_DEV1_I,
NUM_HOUSEKEEPING
} |
|
enum | Led : uint32_t {
LED_1,
LED_2,
LED_3,
LED_4,
LED_5,
LED_6,
NUM_LEDS
} |
|
enum | LedMode : uint8_t {
LED_MODE_OFF,
LED_MODE_ON,
LED_MODE_BLINK_2HZ,
LED_MODE_BLINK_1HZ,
LED_MODE_BLINK_0_5HZ,
NUM_LED_MODES
} |
|
|
| SmartDock (const i2c::Device &i2c_dev) |
|
| ~SmartDock (void) |
|
bool | ClearFaults (void) |
|
bool | Reboot (void) |
|
bool | SendBerthCommand (uint32_t mask, BerthCommand const value) |
|
bool | GetStrings (uint32_t mask, std::map< String, std::string > &data) |
|
bool | GetHousekeeping (uint32_t mask, std::map< Housekeeping, double > &data) |
|
bool | GetFaults (uint32_t mask, std::map< Fault, bool > &data) |
|
bool | GetChannels (uint32_t mask, std::map< Channel, bool > &data) |
|
bool | GetBerthStates (uint32_t mask, std::map< Berth, BerthState > &data) |
|
bool | GetSystemState (DockState &data) |
|
bool | SetLeds (uint32_t mask, LedMode const value) |
|
bool | SetChannels (uint32_t mask, bool const value) |
|
|
static constexpr uint8_t | OFF = 0 |
|
static constexpr uint8_t | ON = 1 |
|
|
void | Sleep (uint32_t microseconds) |
|
uint16_t | Read (uint8_t *buff) |
|
uint16_t | Read (uint8_t *buff, uint16_t len) |
|
uint16_t | Write (uint8_t *buff, uint16_t len) |
|
uint8_t | ComputeChecksum (uint8_t *buf, size_t size) |
|
◆ ActuatorState
Enumerator |
---|
ACT_RETRACT | |
ACT_RETRACTING | |
ACT_DEPLOYED | |
◆ Berth
Enumerator |
---|
BERTH_1 | |
BERTH_2 | |
NUM_BERTHS | |
◆ BerthCommand
Enumerator |
---|
COMMAND_UNKNOWN | |
COMMAND_SET_POWER_MODE_HIBERNATE | |
COMMAND_SET_POWER_MODE_AWAKE_NOMINAL | |
COMMAND_SET_POWER_MODE_AWAKE_SAFE | |
COMMAND_SET_POWER_MODE_CRITICAL_FAULT | |
COMMAND_CLEAR_TERMINATE | |
COMMAND_CLEAR_FAULTS | |
COMMAND_ENABLE_ALL_PAYLOADS | |
COMMAND_DISABLE_ALL_PAYLOADS | |
COMMAND_ENABLE_ALL_PMCS | |
COMMAND_DISABLE_ALL_PMCS | |
COMMAND_REBOOT | |
NUM_COMMANDS | |
◆ Channel
Enumerator |
---|
CHANNEL_DEV_EN | |
CHANNEL_EC_PWR_EN | |
CHANNEL_DEV2_PWR_EN | |
CHANNEL_DEV1_PWR_EN | |
CHANNEL_RESERVED0 | |
CHANNEL_RESERVED1 | |
CHANNEL_RESERVED2 | |
CHANNEL_RESERVED3 | |
CHANNEL_ACT_SIGOUT2 | |
CHANNEL_ACT_SIGOUT1 | |
CHANNEL_AS2_PWR_EN | |
CHANNEL_AS1_PWR_EN | |
CHANNEL_FAN_EN | |
CHANNEL_RESERVED4 | |
CHANNEL_RESERVED5 | |
CHANNEL_RESERVED6 | |
CHANNEL_LED_1 | |
CHANNEL_LED_2 | |
CHANNEL_LED_3 | |
CHANNEL_LED_4 | |
CHANNEL_LED_5 | |
CHANNEL_LED_6 | |
CHANNEL_RESERVED7 | |
CHANNEL_RESERVED8 | |
CHANNEL_RESERVED9 | |
CHANNEL_RESERVED10 | |
CHANNEL_RESERVED11 | |
CHANNEL_RESERVED12 | |
CHANNEL_RESERVED13 | |
CHANNEL_RESERVED14 | |
CHANNEL_RESERVED15 | |
CHANNEL_RESERVED16 | |
NUM_CHANNELS | |
◆ ConnectionState
Enumerator |
---|
CONN_DISCONNECTED | |
CONN_CONNECTING | |
CONN_CONNECTED | |
NUM_CONNECTION_STATES | |
◆ Fault
Enumerator |
---|
FAULT_OC_BERTH_1 | |
FAULT_OC_BERTH_2 | |
FAULT_OC_SYSTEM | |
FAULT_OC_DOCK_PROCESSOR | |
FAULT_OT_CHARGER | |
FAULT_OT_ACTUATOR_1 | |
FAULT_OT_ACTUATOR_2 | |
FAULT_WDT1_EPS_REBOOT | |
FAULT_WDT2_DOCKCTL_REBOOT | |
FAULT_WDT3_DOCKPC_REBOOT | |
FAULT_WDT4_DOCKCTL_REBOOT | |
NUM_FAULTS | |
◆ Housekeeping
Enumerator |
---|
HK_FAN_MAG_I | |
HK_CHR_V_V | |
HK_CHR_T_PROTECT | |
HK_VLIVE_I | |
HK_MAIN5_PWR_I | |
HK_DEV_I | |
HK_EC_PWR_I | |
HK_A_GND_V1 | |
HK_AS2_I | |
HK_AS1_I | |
HK_A_GND_V2 | |
HK_DEV1_T_PROTECT | |
HK_DEV2_T_PROTECT | |
HK_A_GND_V3 | |
HK_DEV2_I | |
HK_DEV1_I | |
NUM_HOUSEKEEPING | |
◆ Led
Enumerator |
---|
LED_1 | |
LED_2 | |
LED_3 | |
LED_4 | |
LED_5 | |
LED_6 | |
NUM_LEDS | |
◆ LedMode
Enumerator |
---|
LED_MODE_OFF | |
LED_MODE_ON | |
LED_MODE_BLINK_2HZ | |
LED_MODE_BLINK_1HZ | |
LED_MODE_BLINK_0_5HZ | |
NUM_LED_MODES | |
◆ String
Enumerator |
---|
STRING_SW_VERSION | |
STRING_BUILD | |
STRING_SERIAL | |
NUM_STRINGS | |
◆ SmartDock()
smart_dock::SmartDock::SmartDock |
( |
const i2c::Device & |
i2c_dev | ) |
|
|
explicit |
◆ ~SmartDock()
smart_dock::SmartDock::~SmartDock |
( |
void |
| ) |
|
◆ ClearFaults()
bool smart_dock::SmartDock::ClearFaults |
( |
void |
| ) |
|
◆ ComputeChecksum()
uint8_t smart_dock::SmartDock::ComputeChecksum |
( |
uint8_t * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
protected |
◆ GetBerthStates()
bool smart_dock::SmartDock::GetBerthStates |
( |
uint32_t |
mask, |
|
|
std::map< Berth, BerthState > & |
data |
|
) |
| |
◆ GetChannels()
bool smart_dock::SmartDock::GetChannels |
( |
uint32_t |
mask, |
|
|
std::map< Channel, bool > & |
data |
|
) |
| |
◆ GetFaults()
bool smart_dock::SmartDock::GetFaults |
( |
uint32_t |
mask, |
|
|
std::map< Fault, bool > & |
data |
|
) |
| |
◆ GetHousekeeping()
bool smart_dock::SmartDock::GetHousekeeping |
( |
uint32_t |
mask, |
|
|
std::map< Housekeeping, double > & |
data |
|
) |
| |
◆ GetStrings()
bool smart_dock::SmartDock::GetStrings |
( |
uint32_t |
mask, |
|
|
std::map< String, std::string > & |
data |
|
) |
| |
◆ GetSystemState()
bool smart_dock::SmartDock::GetSystemState |
( |
DockState & |
data | ) |
|
◆ Read() [1/2]
uint16_t smart_dock::SmartDock::Read |
( |
uint8_t * |
buff | ) |
|
|
protected |
◆ Read() [2/2]
uint16_t smart_dock::SmartDock::Read |
( |
uint8_t * |
buff, |
|
|
uint16_t |
len |
|
) |
| |
|
protected |
◆ Reboot()
bool smart_dock::SmartDock::Reboot |
( |
void |
| ) |
|
◆ SendBerthCommand()
bool smart_dock::SmartDock::SendBerthCommand |
( |
uint32_t |
mask, |
|
|
BerthCommand const |
value |
|
) |
| |
◆ SetChannels()
bool smart_dock::SmartDock::SetChannels |
( |
uint32_t |
mask, |
|
|
bool const |
value |
|
) |
| |
◆ SetLeds()
bool smart_dock::SmartDock::SetLeds |
( |
uint32_t |
mask, |
|
|
LedMode const |
value |
|
) |
| |
◆ Sleep()
void smart_dock::SmartDock::Sleep |
( |
uint32_t |
microseconds | ) |
|
|
protected |
◆ Write()
uint16_t smart_dock::SmartDock::Write |
( |
uint8_t * |
buff, |
|
|
uint16_t |
len |
|
) |
| |
|
protected |
◆ DOCK_BERTH_ID_MAX
constexpr uint8_t smart_dock::SmartDock::DOCK_BERTH_ID_MAX = 2 |
|
staticconstexprprotected |
◆ DOCK_BERTH_ID_MIN
constexpr uint8_t smart_dock::SmartDock::DOCK_BERTH_ID_MIN = 1 |
|
staticconstexprprotected |
◆ I2C_BUF_MAX_LEN
constexpr size_t smart_dock::SmartDock::I2C_BUF_MAX_LEN = 256 |
|
staticconstexprprotected |
◆ I2C_CMD_CLR_HW_EXCEPTIONS
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_CLR_HW_EXCEPTIONS = 0x0B |
|
staticconstexprprotected |
◆ I2C_CMD_CLR_TERMINATE_EVT
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_CLR_TERMINATE_EVT = 0x42 |
|
staticconstexprprotected |
◆ I2C_CMD_ENTER_BOOTLOADER
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_ENTER_BOOTLOADER = 0x0E |
|
staticconstexprprotected |
◆ I2C_CMD_GET_BATTERY_STATUS
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_BATTERY_STATUS = 0x40 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_BUILD_TIME
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_BUILD_TIME = 0x03 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CHARGE_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_CHARGE_STATE = 0x46 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONN_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_CONN_STATE = 0x72 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONNECTED_EPS_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_CONNECTED_EPS_STATE = 0x71 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONNECTION_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_CONNECTION_STATE = 0x44 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_DIGITAL_TEMPS
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_DIGITAL_TEMPS = 0x0C |
|
staticconstexprprotected |
◆ I2C_CMD_GET_EPS_CMD
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_EPS_CMD = 0x75 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_EPS_POWER_MODE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_EPS_POWER_MODE = 0x48 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_HK
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_HK = 0x09 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_HW_EXCEPTIONS
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_HW_EXCEPTIONS = 0x0A |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SERIAL_NUMBER
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_SERIAL_NUMBER = 0x0D |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SW_STATES
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_SW_STATES = 0x06 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SW_VERSION
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_SW_VERSION = 0x02 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SYSTEM_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_GET_SYSTEM_STATE = 0x07 |
|
staticconstexprprotected |
◆ I2C_CMD_NONE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_NONE = 0x00 |
|
staticconstexprprotected |
◆ I2C_CMD_REBOOT
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_REBOOT = 0x0F |
|
staticconstexprprotected |
◆ I2C_CMD_RING_BUZZER
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_RING_BUZZER = 0x41 |
|
staticconstexprprotected |
◆ I2C_CMD_SEND_EPS_STATE_TO_DOCK
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SEND_EPS_STATE_TO_DOCK = 0xD0 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_CHARGE_STATE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SET_CHARGE_STATE = 0x45 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_EPS_CMD
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SET_EPS_CMD = 0x76 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_EPS_POWER_MODE
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SET_EPS_POWER_MODE = 0x47 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_LED_MODES
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SET_LED_MODES = 0x08 |
|
staticconstexprprotected |
◆ I2C_CMD_SW_OFF
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SW_OFF = 0x05 |
|
staticconstexprprotected |
◆ I2C_CMD_SW_ON
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_SW_ON = 0x04 |
|
staticconstexprprotected |
◆ I2C_CMD_UNDOCK
constexpr uint8_t smart_dock::SmartDock::I2C_CMD_UNDOCK = 0x43 |
|
staticconstexprprotected |
◆ I2C_RESP_ACK
constexpr uint8_t smart_dock::SmartDock::I2C_RESP_ACK = 0xEE |
|
staticconstexprprotected |
◆ I2C_RESP_NACK
constexpr uint8_t smart_dock::SmartDock::I2C_RESP_NACK = 0xFF |
|
staticconstexprprotected |
◆ kDockStateLength
constexpr size_t smart_dock::SmartDock::kDockStateLength = 19 |
|
staticconstexprprotected |
◆ OFF
constexpr uint8_t smart_dock::SmartDock::OFF = 0 |
|
staticconstexpr |
◆ ON
constexpr uint8_t smart_dock::SmartDock::ON = 1 |
|
staticconstexpr |
The documentation for this class was generated from the following files: