add new APID defs

This commit is contained in:
Robin Müller 2022-11-07 09:26:36 +01:00
parent 2b9afbedff
commit bb2f8edc77
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 80 additions and 0 deletions

View File

@ -15,6 +15,23 @@
namespace supv {
typedef struct
{
// The most significant bit of msec value is set to 0x80 to indicate that full
// time and data information is transmitted, when the time has been synced with
// the reference. If the time has not been synced with reference, then the most
// significant bit is set to 0x00. Only the most significant bit is used for
// this purpose (bit 15 of the field tm_msec)
uint16_t tm_msec; // miliseconds 0-999;
uint8_t tm_sec; // seconds after the minute, 0 to 60
// (0 - 60 allows for the occasional leap second)
uint8_t tm_min; // minutes after the hour, 0 to 59
uint8_t tm_hour; // hours since midnight, 0 to 23
uint8_t tm_mday; // day of the month, 1 to 31
uint8_t tm_mon; // months 1 to 12
uint8_t tm_year; // years since 1900
} tas_time_t;
/** Command IDs */
static const DeviceCommandId_t NONE = 0;
static const DeviceCommandId_t GET_HK_REPORT = 1;
@ -104,6 +121,64 @@ static const uint16_t APID_DATA_LOGGER_DATA = 0x20D;
// 2 bits APID SRC, 00 for OBC, 2 bits APID DEST, 01 for SUPV, 7 bits CMD ID -> Mask 0x080
static constexpr uint16_t APID_TC_SUPV_MASK = 0x080;
static constexpr uint16_t APID_TMTC_MAN = 0x00;
static constexpr uint16_t APID_HK = 0x01;
static constexpr uint16_t APID_BOOT_MAN = 0x02;
static constexpr uint16_t APID_LATCHUP_MON = 0x03;
static constexpr uint16_t APID_ADC_MON = 0x04;
static constexpr uint16_t APID_MEM_MAN = 0x05;
static constexpr uint16_t APID_DATA_LOGGER = 0x06;
static constexpr uint16_t APID_WDOG_MAN = 0x07;
enum class HkServiceIds: uint8_t {
ENABLE = 0x01,
SET_PERIOD = 0x02,
GET_REPORT = 0x03,
GET_HARDFAULTS_REPORT = 0x04,
};
enum class TmtcServiceIds: uint8_t {
TIME_REF = 0x03,
GET_SUPV_VERSION = 0x05,
RUN_AUTO_EM_TEST = 0x08,
SET_GPIO = 0x0E,
READ_GPIO = 0x0F,
GET_MPSOC_POWER_INFO = 0x10
};
enum class BootManServiceIds: uint8_t {
START_MPSOC = 0x01,
SHUTDOWN_MPSOC = 0x02,
SELECT_IMAGE = 0x03,
SET_BOOT_TIMEOUT = 0x04,
SET_MAX_REBOOT_TRIES = 0x05,
RESET_MPSOC = 0x06,
RESET_PL = 0x07,
GET_BOOT_STATUS_REPORT = 0x08,
PREPARE_UPDATE = 0x09,
SHUTDOWN_TIMEOUT = 0x0B,
FACTORY_FLASH = 0x0C
};
enum class LatchupMonServiceIds: uint8_t {
ENABLE = 0x01,
DISABLE = 0x02,
SET_ALERT_LIMIT = 0x04,
GET_STATUS_REPORT = 0x06
};
// Right now, none of the commands seem to be implemented, but still
// keep the enum here in case some are added
enum class AdcMonServiceIds: uint8_t {};
enum class DataLoggerServiceIds: uint8_t {
FACTORY_RESET = 0x07
};
// Right now, none of the commands seem to be implemented, but still
// keep the enum here in case some are added
enum class WdogManServiceIds: uint8_t {};
static const uint16_t APID_START_MPSOC = 0xA1;
static const uint16_t APID_SHUTWOWN_MPSOC = 0xA2;
static const uint16_t APID_SEL_MPSOC_BOOT_IMAGE = 0xA3;
@ -302,6 +377,11 @@ class SupvTcBase : public ploc::SpTcBase {
public:
SupvTcBase(SupvTcParams params) : ploc::SpTcBase(params) {}
SupvTcBase(SupvTcParams params, uint16_t apid, uint16_t seqCount)
: ploc::SpTcBase(params, apid, seqCount) {
}
private:
};