Merge remote-tracking branch 'origin' into meier/mpsoc-commands
This commit is contained in:
commit
64d0ca491a
17
.flake8
Normal file
17
.flake8
Normal file
@ -0,0 +1,17 @@
|
||||
[flake8]
|
||||
max-line-length = 100
|
||||
ignore = D203, W503
|
||||
per-file-ignores =
|
||||
*/__init__.py: F401
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
docs/conf.py,
|
||||
old,
|
||||
build,
|
||||
dist,
|
||||
venv
|
||||
max-complexity = 10
|
||||
extend-ignore =
|
||||
# See https://github.com/PyCQA/pycodestyle/issues/373
|
||||
E203,
|
@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||
<option name="PARAMETERS" value="cfdp filetest/obsw_update.bin /tmp/obsw_update.bin -d 0.3" />
|
||||
<option name="PARAMETERS" value="cfdp filetest/obsw_update.bin /tmp/obsw_update.bin -d 0.1" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
24
.run/CFDP Test File Small Closure.run.xml
Normal file
24
.run/CFDP Test File Small Closure.run.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="CFDP Test File Small Closure" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||
<option name="PARAMETERS" value="cfdp filetest/cfdp_test.txt /tmp/cfdp_test.txt -d 0.2" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
78
CHANGELOG.md
78
CHANGELOG.md
@ -10,6 +10,83 @@ list yields a list of all related PRs for each release.
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Fixed
|
||||
|
||||
- Correction for ACS CTRL raw data requests HK type
|
||||
|
||||
# [v2.16.1] 2023-02-24
|
||||
|
||||
- Updated CSVs for new persistent TM store
|
||||
|
||||
# [v2.16.0] 2023-02-23
|
||||
|
||||
## Added
|
||||
|
||||
- PDEC parameter commands to change size of positive and negative window of AD frames.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Added missing skip directive for private resultcode.
|
||||
|
||||
# [v2.15.2] 2023-02-23
|
||||
|
||||
- Update of generated returnvalue and event files.
|
||||
|
||||
# [v2.15.1] 2023-02-23
|
||||
|
||||
- Actually use `tmtccmd` 4.1 in requirements.
|
||||
- Remove `setup.cfg` completely
|
||||
|
||||
# [v2.15.0] 2023-02-23
|
||||
|
||||
tmtccmd version v4.1.1
|
||||
|
||||
## Changed
|
||||
|
||||
- Moved to `pyproject.toml` package file
|
||||
|
||||
## Fixed
|
||||
|
||||
- Correction in `tmtccmd` dependency, added missing function
|
||||
|
||||
# [v2.14.0] 2023-02-22
|
||||
|
||||
## Changed
|
||||
|
||||
- Generated CSV files for PDEC handler
|
||||
|
||||
# [v2.13.0] 2023-02-21
|
||||
|
||||
tmtccmd version 4.0.0
|
||||
|
||||
Added `python-dateutil` dependency for time prompts.
|
||||
|
||||
## Added
|
||||
|
||||
- Basic persistent TM store commanding
|
||||
- System and TCS system announce mode commands
|
||||
|
||||
## Changed
|
||||
|
||||
- IMTQ set IDs.
|
||||
- Significantly improved IMTQ module and also updated it to refactored OBSW IMTQ handlers.
|
||||
- Update of generated CSVs: Explicit no description strings
|
||||
|
||||
# [v2.12.7] 2023-02-17
|
||||
|
||||
- Re-run generators
|
||||
- Small fix for HK parsing, faulty printout
|
||||
|
||||
# [v2.12.6] 2023-02-14
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed GPS processed set output
|
||||
|
||||
## Added
|
||||
|
||||
- Added command to request switcher set from PCDU handler.
|
||||
|
||||
# [v2.12.5] 2023-02-13
|
||||
|
||||
## Added
|
||||
@ -124,7 +201,6 @@ tmtccmd v4.0.0rc0
|
||||
|
||||
## Added
|
||||
|
||||
- Added command to request switcher set from PCDU handler.
|
||||
- Star Tracker: Add commands to update default datarate.
|
||||
|
||||
## Changed
|
||||
|
@ -1,12 +1,12 @@
|
||||
__version__ = "2.12.5"
|
||||
__version__ = "2.16.1"
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
SW_NAME = "eive-tmtc"
|
||||
VERSION_MAJOR = 2
|
||||
VERSION_MINOR = 12
|
||||
VERSION_REVISION = 5
|
||||
VERSION_MINOR = 16
|
||||
VERSION_REVISION = 1
|
||||
|
||||
EIVE_TMTC_ROOT = Path(__file__).parent
|
||||
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
||||
|
@ -36,6 +36,7 @@ class CustomServiceList(str, enum.Enum):
|
||||
POWER = "power"
|
||||
ACU = "acu"
|
||||
ACS = "acs"
|
||||
GYRO = "gyro"
|
||||
COM_SS = "com"
|
||||
BPX_BATTERY = "bpx"
|
||||
HEATER = "heater"
|
||||
|
@ -1,112 +1,117 @@
|
||||
Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2205;0x089d;STORING_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2211;0x08a3;INIT_DONE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2214;0x08a6;DELETION_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2201;0x0899;STORE_WRITE_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2202;0x089a;STORE_SEND_READ_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2203;0x089b;STORE_READ_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2204;0x089c;UNEXPECTED_MSG;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2205;0x089d;STORING_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2206;0x089e;TM_DUMP_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2207;0x089f;STORE_INIT_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2208;0x08a0;STORE_INIT_EMPTY;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2210;0x08a2;STORE_INITIALIZE;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2211;0x08a3;INIT_DONE;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2212;0x08a4;DUMP_FINISHED;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2213;0x08a5;DELETION_FINISHED;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2214;0x08a6;DELETION_FAILED;LOW;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;No description;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
2600;0x0a28;GET_DATA_FAILED;LOW;No description;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
2601;0x0a29;STORE_DATA_FAILED;LOW;No description;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
|
||||
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
5000;0x1388;HEATER_ON;INFO;;fsfw/src/fsfw/thermal/Heater.h
|
||||
5001;0x1389;HEATER_OFF;INFO;;fsfw/src/fsfw/thermal/Heater.h
|
||||
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw/src/fsfw/thermal/Heater.h
|
||||
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7401;0x1ce9;MODE_INFO;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7506;0x1d52;HEALTH_INFO;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7509;0x1d55;OVERWRITING_HEALTH;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7600;0x1db0;HANDLE_PACKET_FAILED;LOW;;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
4201;0x1069;FUSE_CURRENT_HIGH;LOW;No description;fsfw/src/fsfw/power/Fuse.h
|
||||
4202;0x106a;FUSE_WENT_OFF;LOW;No description;fsfw/src/fsfw/power/Fuse.h
|
||||
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
|
||||
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
|
||||
4300;0x10cc;SWITCH_WENT_OFF;LOW;No description;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
5000;0x1388;HEATER_ON;INFO;No description;fsfw/src/fsfw/thermal/Heater.h
|
||||
5001;0x1389;HEATER_OFF;INFO;No description;fsfw/src/fsfw/thermal/Heater.h
|
||||
5002;0x138a;HEATER_TIMEOUT;LOW;No description;fsfw/src/fsfw/thermal/Heater.h
|
||||
5003;0x138b;HEATER_STAYED_ON;LOW;No description;fsfw/src/fsfw/thermal/Heater.h
|
||||
5004;0x138c;HEATER_STAYED_OFF;LOW;No description;fsfw/src/fsfw/thermal/Heater.h
|
||||
5200;0x1450;TEMP_SENSOR_HIGH;LOW;No description;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5201;0x1451;TEMP_SENSOR_LOW;LOW;No description;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;No description;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
|
||||
5901;0x170d;COMPONENT_TEMP_LOW;LOW;No description;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;No description;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;No description;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;No description;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;No description;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;No description;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;No description;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;No description;fsfw/src/fsfw/fdir/FailureIsolationBase.h
|
||||
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;No description;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;No description;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;No description;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;No description;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
7400;0x1ce8;CHANGING_MODE;INFO;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7401;0x1ce9;MODE_INFO;INFO;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7402;0x1cea;FALLBACK_FAILED;HIGH;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7404;0x1cec;CANT_KEEP_MODE;HIGH;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7406;0x1cee;FORCING_MODE;MEDIUM;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7407;0x1cef;MODE_CMD_REJECTED;LOW;No description;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
7506;0x1d52;HEALTH_INFO;INFO;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7508;0x1d54;CHILD_PROBLEMS;LOW;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7509;0x1d55;OVERWRITING_HEALTH;LOW;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7510;0x1d56;TRYING_RECOVERY;MEDIUM;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7511;0x1d57;RECOVERY_STEP;MEDIUM;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7512;0x1d58;RECOVERY_DONE;MEDIUM;No description;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
7600;0x1db0;HANDLE_PACKET_FAILED;LOW;No description;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8901;0x22c5;CLOCK_DUMP;INFO;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8902;0x22c6;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8901;0x22c5;CLOCK_DUMP;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8902;0x22c6;CLOCK_SET_FAILURE;LOW;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
||||
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||
10800;0x2a30;STORE_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10801;0x2a31;MSG_QUEUE_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10802;0x2a32;SERIALIZATION_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;;mission/acsDefs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;;mission/acsDefs.h
|
||||
9700;0x25e4;TEST;INFO;No description;fsfw/src/fsfw/pus/Service17Test.h
|
||||
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;No description;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||
10800;0x2a30;STORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10801;0x2a31;MSG_QUEUE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;No description;mission/acsDefs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;No description;mission/acsDefs.h
|
||||
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;No description;mission/acsDefs.h
|
||||
11203;0x2bc3;MEKF_INVALID_INFO;INFO;No description;mission/acsDefs.h
|
||||
11204;0x2bc4;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acsDefs.h
|
||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11303;0x2c27;FDIR_REACTION_IGNORED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11400;0x2c88;GPIO_PULL_HIGH_FAILED;LOW;;mission/devices/HeaterHandler.h
|
||||
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;;mission/devices/HeaterHandler.h
|
||||
11402;0x2c8a;HEATER_WENT_ON;INFO;;mission/devices/HeaterHandler.h
|
||||
11403;0x2c8b;HEATER_WENT_OFF;INFO;;mission/devices/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;;mission/devices/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
|
||||
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;;mission/devices/HeaterHandler.h
|
||||
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;;mission/devices/HeaterHandler.h
|
||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11303;0x2c27;FDIR_REACTION_IGNORED;MEDIUM;No description;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11400;0x2c88;GPIO_PULL_HIGH_FAILED;LOW;No description;mission/devices/HeaterHandler.h
|
||||
11401;0x2c89;GPIO_PULL_LOW_FAILED;LOW;No description;mission/devices/HeaterHandler.h
|
||||
11402;0x2c8a;HEATER_WENT_ON;INFO;No description;mission/devices/HeaterHandler.h
|
||||
11403;0x2c8b;HEATER_WENT_OFF;INFO;No description;mission/devices/HeaterHandler.h
|
||||
11404;0x2c8c;SWITCH_ALREADY_ON;LOW;No description;mission/devices/HeaterHandler.h
|
||||
11405;0x2c8d;SWITCH_ALREADY_OFF;LOW;No description;mission/devices/HeaterHandler.h
|
||||
11406;0x2c8e;MAIN_SWITCH_TIMEOUT;MEDIUM;No description;mission/devices/HeaterHandler.h
|
||||
11407;0x2c8f;FAULTY_HEATER_WAS_ON;LOW;No description;mission/devices/HeaterHandler.h
|
||||
11500;0x2cec;BURN_PHASE_START;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11501;0x2ced;BURN_PHASE_DONE;INFO;P1: Burn duration in milliseconds, P2: Dry run flag;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11502;0x2cee;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11503;0x2cef;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11504;0x2cf0;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11505;0x2cf1;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11506;0x2cf2;DEPL_SA1_GPIO_SWTICH_OFF_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11507;0x2cf3;DEPL_SA2_GPIO_SWTICH_OFF_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11508;0x2cf4;AUTONOMOUS_DEPLOYMENT_COMPLETED;INFO;;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11502;0x2cee;MAIN_SWITCH_ON_TIMEOUT;LOW;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11503;0x2cef;MAIN_SWITCH_OFF_TIMEOUT;LOW;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11504;0x2cf0;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11505;0x2cf1;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11506;0x2cf2;DEPL_SA1_GPIO_SWTICH_OFF_FAILED;HIGH;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11507;0x2cf3;DEPL_SA2_GPIO_SWTICH_OFF_FAILED;HIGH;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11508;0x2cf4;AUTONOMOUS_DEPLOYMENT_COMPLETED;INFO;No description;mission/devices/SolarArrayDeploymentHandler.h
|
||||
11601;0x2d51;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux/devices/ploc/PlocMPSoCHandler.h
|
||||
11602;0x2d52;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
||||
11603;0x2d53;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
|
||||
@ -121,31 +126,32 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
11706;0x2dba;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/ImtqHandler.h
|
||||
11707;0x2dbb;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/ImtqHandler.h
|
||||
11708;0x2dbc;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission/devices/ImtqHandler.h
|
||||
11801;0x2e19;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission/devices/devicedefinitions/RwDefinitions.h
|
||||
11802;0x2e1a;RESET_OCCURED;LOW;;mission/devices/devicedefinitions/RwDefinitions.h
|
||||
11901;0x2e7d;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
|
||||
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
|
||||
11801;0x2e19;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission/devices/devicedefinitions/rwHelpers.h
|
||||
11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/devices/devicedefinitions/rwHelpers.h
|
||||
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
|
||||
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
|
||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
||||
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/fs/SdCardManager.h
|
||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/fs/SdCardManager.h
|
||||
12100;0x2f44;SANITIZATION_FAILED;LOW;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;No description;bsp_q7s/fs/SdCardManager.h
|
||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
||||
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
|
||||
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;;linux/ipcore/PdecHandler.h
|
||||
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/PdecHandler.h
|
||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/PdecHandler.h
|
||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h
|
||||
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h
|
||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
||||
12407;0x3077;POLL_SYSCALL_ERROR_PDEC;MEDIUM;;linux/ipcore/PdecHandler.h
|
||||
12408;0x3078;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;;linux/ipcore/PdecHandler.h
|
||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
||||
@ -161,11 +167,11 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12512;0x30e0;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux/devices/startracker/StrHelper.h
|
||||
12513;0x30e1;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux/devices/startracker/StrHelper.h
|
||||
12514;0x30e2;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/devices/startracker/StrHelper.h
|
||||
12515;0x30e3;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux/devices/startracker/StrHelper.h
|
||||
12516;0x30e4;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux/devices/startracker/StrHelper.h
|
||||
12515;0x30e3;STR_HELPER_SENDING_PACKET_FAILED;LOW;No description;linux/devices/startracker/StrHelper.h
|
||||
12516;0x30e4;STR_HELPER_REQUESTING_MSG_FAILED;LOW;No description;linux/devices/startracker/StrHelper.h
|
||||
12600;0x3138;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12601;0x3139;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12602;0x313a;MPSOC_SENDING_COMMAND_FAILED;LOW;No description;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12603;0x313b;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12604;0x313c;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12605;0x313d;MPSOC_MISSING_ACK;LOW;Did not receive acknowledgment report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
@ -175,8 +181,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;No description;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;No description;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h
|
||||
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||
@ -189,15 +195,15 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
12709;0x31a5;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||
12710;0x31a6;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||
12711;0x31a7;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/objects/AcsBoardAssembly.h
|
||||
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/objects/AcsBoardAssembly.h
|
||||
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/objects/AcsBoardAssembly.h
|
||||
12800;0x3200;TRANSITION_OTHER_SIDE_FAILED;HIGH;No description;mission/system/objects/AcsBoardAssembly.h
|
||||
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/objects/AcsBoardAssembly.h
|
||||
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/objects/AcsBoardAssembly.h
|
||||
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/objects/AcsBoardAssembly.h
|
||||
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/objects/SusAssembly.h
|
||||
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/objects/SusAssembly.h
|
||||
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/objects/SusAssembly.h
|
||||
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;No description;mission/system/objects/SusAssembly.h
|
||||
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/objects/SusAssembly.h
|
||||
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/objects/SusAssembly.h
|
||||
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/objects/SusAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;;mission/system/objects/TcsBoardAssembly.h
|
||||
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/objects/TcsBoardAssembly.h
|
||||
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/devices/devicedefinitions/GPSDefinitions.h
|
||||
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/devices/devicedefinitions/GPSDefinitions.h
|
||||
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
|
||||
@ -211,9 +217,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13617;0x3531;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13618;0x3532;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13619;0x3533;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||
@ -225,33 +231,34 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
13625;0x3539;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13626;0x353a;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13627;0x353b;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13630;0x353e;SUPV_UPDATE_PROGRESS;INFO;Will be triggered every 5 percent of the update progress. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13631;0x353f;HDLC_FRAME_REMOVAL_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13632;0x3540;HDLC_CRC_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13700;0x3584;FDIR_REACTION_IGNORED;MEDIUM;;mission/devices/devicedefinitions/SyrlinksDefinitions.h
|
||||
13631;0x353f;HDLC_FRAME_REMOVAL_ERROR;INFO;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13632;0x3540;HDLC_CRC_ERROR;INFO;No description;linux/devices/ploc/PlocSupvUartMan.h
|
||||
13700;0x3584;FDIR_REACTION_IGNORED;MEDIUM;No description;mission/devices/devicedefinitions/SyrlinksDefinitions.h
|
||||
13701;0x3585;TX_ON;INFO;Transmitter is on now. P1: Submode, P2: Current default datarate.;mission/devices/devicedefinitions/SyrlinksDefinitions.h
|
||||
13702;0x3586;TX_OFF;INFO;Transmitter is off now.;mission/devices/devicedefinitions/SyrlinksDefinitions.h
|
||||
13800;0x35e8;MISSING_PACKET;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13901;0x364d;SET_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||
13902;0x364e;GET_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||
13904;0x3650;WRITE_CONFIGFILE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||
13905;0x3651;READ_CONFIGFILE_FAILED;MEDIUM;;mission/utility/GlobalConfigHandler.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||
13800;0x35e8;MISSING_PACKET;LOW;No description;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;No description;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;No description;mission/devices/devicedefinitions/ScexDefinitions.h
|
||||
13901;0x364d;SET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13902;0x364e;GET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13904;0x3650;WRITE_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
13905;0x3651;READ_CONFIGFILE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
|
||||
14000;0x36b0;ALLOC_FAILURE;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14001;0x36b1;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||
14003;0x36b3;REBOOT_HW;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;;mission/controller/ThermalController.h
|
||||
14103;0x3717;PLOC_OVERHEATING;HIGH;;mission/controller/ThermalController.h
|
||||
14104;0x3718;OBC_OVERHEATING;HIGH;;mission/controller/ThermalController.h
|
||||
14105;0x3719;HPA_OVERHEATING;HIGH;;mission/controller/ThermalController.h
|
||||
14106;0x371a;PLPCDU_OVERHEATING;HIGH;;mission/controller/ThermalController.h
|
||||
14100;0x3714;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/tmtc/PersistentTmStore.h
|
||||
14200;0x3778;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14201;0x3779;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14202;0x377a;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14203;0x377b;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14204;0x377c;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14205;0x377d;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
14206;0x377e;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
|
|
@ -3,7 +3,7 @@ import os
|
||||
|
||||
from eive_tmtc import EIVE_TMTC_ROOT
|
||||
from tmtccmd.fsfw import parse_fsfw_events_csv
|
||||
from tmtccmd.pus.s5_event import EventDictT
|
||||
from tmtccmd.pus.s5_fsfw_event import EventDictT
|
||||
|
||||
DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "config/events.csv"
|
||||
__EVENT_DICT = None
|
||||
|
@ -29,6 +29,7 @@
|
||||
0x44120350;RW4
|
||||
0x44130001;STAR_TRACKER
|
||||
0x44130045;GPS_CONTROLLER
|
||||
0x44140013;IMTQ_POLLING
|
||||
0x44140014;IMTQ_HANDLER
|
||||
0x442000A1;PCDU_HANDLER
|
||||
0x44250000;P60DOCK_HANDLER
|
||||
@ -76,7 +77,7 @@
|
||||
0x49010005;GPIO_IF
|
||||
0x49010006;SCEX_UART_READER
|
||||
0x49020004;SPI_MAIN_COM_IF
|
||||
0x49020005;SPI_RW_COM_IF
|
||||
0x49020005;RW_POLLING_TASK
|
||||
0x49020006;SPI_RTD_COM_IF
|
||||
0x49030003;UART_COM_IF
|
||||
0x49040002;I2C_COM_IF
|
||||
@ -101,6 +102,7 @@
|
||||
0x53000008;PUS_SERVICE_8_FUNCTION_MGMT
|
||||
0x53000009;PUS_SERVICE_9_TIME_MGMT
|
||||
0x53000011;PUS_SERVICE_11_TC_SCHEDULER
|
||||
0x53000015;PUS_SERVICE_15_TM_STORAGE
|
||||
0x53000017;PUS_SERVICE_17_TEST
|
||||
0x53000020;PUS_SERVICE_20_PARAMETERS
|
||||
0x53000200;PUS_SERVICE_200_MODE_MGMT
|
||||
@ -147,6 +149,11 @@
|
||||
0x73010002;PL_SUBSYSTEM
|
||||
0x73010003;TCS_SUBSYSTEM
|
||||
0x73010004;COM_SUBSYSTEM
|
||||
0x73020001;MISC_TM_STORE
|
||||
0x73020002;OK_TM_STORE
|
||||
0x73020003;NOT_OK_TM_STORE
|
||||
0x73020004;HK_TM_STORE
|
||||
0x73030000;CFDP_TM_STORE
|
||||
0x73500000;CCSDS_IP_CORE_BRIDGE
|
||||
0x90000003;THERMAL_TEMP_INSERTER
|
||||
0xFFFFFFFF;NO_OBJECT
|
||||
|
|
File diff suppressed because it is too large
Load Diff
@ -23,14 +23,6 @@ def get_eive_service_op_code_dict() -> TmtcDefinitionWrapper:
|
||||
return def_wrapper
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add("0", "PDEC Handler: Print CLCW")
|
||||
oce.add("1", "PDEC Handler: Print PDEC monitor")
|
||||
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_str_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
|
@ -3,6 +3,7 @@
|
||||
import logging
|
||||
from typing import cast
|
||||
|
||||
from eive_tmtc.tmtc.acs.gyros import handle_gyr_cmd
|
||||
from eive_tmtc.tmtc.power.power import pack_power_commands
|
||||
from eive_tmtc.tmtc.tcs.rtd import pack_rtd_commands
|
||||
from eive_tmtc.tmtc.payload.scex import pack_scex_cmds
|
||||
@ -14,9 +15,6 @@ from tmtccmd.tc.decorator import (
|
||||
route_to_registered_service_handlers,
|
||||
ServiceProviderParams,
|
||||
)
|
||||
from tmtccmd.tc.pus_5_event import (
|
||||
pack_generic_service_5_test_into,
|
||||
)
|
||||
|
||||
from eive_tmtc.tmtc.misc.s200_test import pack_service_200_test_into
|
||||
from eive_tmtc.tmtc.power.p60dock import pack_p60dock_cmds
|
||||
@ -34,6 +32,7 @@ from eive_tmtc.tmtc.com.ccsds_handler import pack_ccsds_handler_test
|
||||
from eive_tmtc.tmtc.core import pack_core_commands
|
||||
from eive_tmtc.tmtc.acs.star_tracker import pack_star_tracker_commands
|
||||
from eive_tmtc.tmtc.com.syrlinks_handler import pack_syrlinks_command
|
||||
from eive_tmtc.tmtc.com.pdec_handler import pack_pdec_handler_test
|
||||
from eive_tmtc.tmtc.acs.acs_board import pack_acs_command
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.config.object_ids import (
|
||||
@ -83,8 +82,6 @@ def handle_default_procedure(
|
||||
service = info.service
|
||||
op_code = info.op_code
|
||||
obj_id_man = get_object_ids()
|
||||
if service == CoreServiceList.SERVICE_5.value:
|
||||
return pack_generic_service_5_test_into(q=queue_helper)
|
||||
if service == CoreServiceList.SERVICE_200.value:
|
||||
return pack_service_200_test_into(q=queue_helper)
|
||||
if service == CustomServiceList.P60DOCK.value:
|
||||
@ -174,7 +171,7 @@ def handle_default_procedure(
|
||||
object_id=object_id, q=queue_helper, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.PDEC_HANDLER.value:
|
||||
return pack_ccsds_handler_test(
|
||||
return pack_pdec_handler_test(
|
||||
object_id=PDEC_HANDLER_ID, q=queue_helper, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.SYRLINKS.value:
|
||||
@ -182,6 +179,8 @@ def handle_default_procedure(
|
||||
return pack_syrlinks_command(
|
||||
object_id=object_id, q=queue_helper, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.GYRO.value:
|
||||
return handle_gyr_cmd(q=queue_helper, op_code=op_code)
|
||||
if service == CustomServiceList.PROCEDURE.value:
|
||||
return pack_proc_commands(q=queue_helper, op_code=op_code)
|
||||
if service == CustomServiceList.PL_PCDU.value:
|
||||
|
@ -397,9 +397,9 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCode.MGT_FT:
|
||||
key = KAI.MGT_FT[0]
|
||||
imtq_pairs = [
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_NO_TORQUE),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_NO_TORQUE),
|
||||
]
|
||||
diag_list = [
|
||||
True,
|
||||
@ -444,9 +444,9 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
(oids.GPS_CONTROLLER, GpsSetIds.HK),
|
||||
]
|
||||
imtq_pairs = [
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_NO_TORQUE),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_NO_TORQUE),
|
||||
]
|
||||
d_side_and_imtq_pairs = a_side_pairs + b_side_pairs + imtq_pairs
|
||||
diag_list = [
|
||||
|
@ -41,12 +41,13 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
pw.printer.file_logger.info(
|
||||
f"{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}: {generic_event_string}"
|
||||
)
|
||||
specific_handler = True
|
||||
specific_handler = False
|
||||
if info.name == "MODE_TRANSITION_FAILED":
|
||||
reason = generic_retval_printout(event_def.param1)
|
||||
for string in reason:
|
||||
pw.dlog(f"Reason from event parameter 1: {string}")
|
||||
pw.dlog(f"Mode, sequence or table: {event_def.param2:#08x}")
|
||||
specific_handler = True
|
||||
if info.name == "SUPV_UPDATE_PROGRESS" or info.name == "WRITE_MEMORY_FAILED":
|
||||
additional_event_info = f"Additional info: {info.info}"
|
||||
context = (
|
||||
@ -55,7 +56,9 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
)
|
||||
pw.dlog(additional_event_info)
|
||||
pw.dlog(context)
|
||||
specific_handler = True
|
||||
if info.name == "MODE_INFO":
|
||||
specific_handler = True
|
||||
mode_name = "Unknown"
|
||||
if obj_name == "ACS_SUBSYSTEM":
|
||||
acs_mode = AcsMode(event_def.param1)
|
||||
@ -74,9 +77,11 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
mode_name = "Normal"
|
||||
elif event_def.param1 == Mode.RAW:
|
||||
mode_name = "Raw"
|
||||
pw.dlog(f"Mode Number {event_def.param1}, Mode Name {mode_name}")
|
||||
pw.dlog(f"Submode: {event_def.param2}")
|
||||
elif info.name == "VERSION_INFO":
|
||||
pw.dlog(
|
||||
f"Mode Number {event_def.param1}, Mode Name {mode_name}, Submode: {event_def.param2}"
|
||||
)
|
||||
if info.name == "VERSION_INFO":
|
||||
specific_handler = True
|
||||
ver_major = (event_def.param1 >> 24) & 0xFF
|
||||
ver_minor = (event_def.param1 >> 16) & 0xFF
|
||||
ver_rev = (event_def.param1 >> 8) & 0xFF
|
||||
@ -89,26 +94,31 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
pw.dlog(f"Version {version_string}")
|
||||
if has_git_sha:
|
||||
pw.dlog(f"Git SHA first four letters: {git_sha}")
|
||||
elif info.name == "CLOCK_SET":
|
||||
if info.name == "CLOCK_SET":
|
||||
specific_handler = True
|
||||
old_time = event_def.param1
|
||||
new_time = event_def.param2
|
||||
old_time_dt = datetime.datetime.fromtimestamp(old_time, datetime.timezone.utc)
|
||||
new_time_dt = datetime.datetime.fromtimestamp(new_time, datetime.timezone.utc)
|
||||
pw.dlog(f"Old time (UTC): {old_time_dt}")
|
||||
pw.dlog(f"New time (UTC): {new_time_dt}")
|
||||
elif info.name == "CLOCK_DUMP":
|
||||
if info.name == "CLOCK_DUMP":
|
||||
specific_handler = True
|
||||
# param 1 is timeval seconds, param 2 is timeval subsecond milliseconds
|
||||
time = event_def.param1 + event_def.param2 / 1000.0
|
||||
time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc)
|
||||
pw.dlog(f"Current time: {time_dt}")
|
||||
elif info.name == "HEALTH_INFO":
|
||||
if info.name == "HEALTH_INFO":
|
||||
specific_handler = True
|
||||
health = FsfwHealth(event_def.param1)
|
||||
pw.dlog(f"{obj_name}: {health!r}")
|
||||
else:
|
||||
specific_handler = False
|
||||
if info.info != "":
|
||||
additional_event_info = f"Additional info: {info.info} | P1: {event_def.param1} | P2: {event_def.param2}"
|
||||
pw.dlog(additional_event_info)
|
||||
if info.name == "CHANGING_MODE":
|
||||
mode = event_def.param1
|
||||
submode = event_def.param2
|
||||
pw.dlog(f"Mode Number {mode}, Submode: {submode}")
|
||||
if not specific_handler:
|
||||
additional_event_info = f"Additional info: {info.info} | P1: {event_def.param1} | P2: {event_def.param2}"
|
||||
pw.dlog(additional_event_info)
|
||||
if not specific_handler:
|
||||
# printer.handle_long_tm_print(packet_if=tm.pus_tm, info_if=tm.pus_tm)
|
||||
pass
|
||||
|
@ -24,6 +24,7 @@ from eive_tmtc.tmtc.power.tm import (
|
||||
handle_pdu_data,
|
||||
handle_p60_hk_data,
|
||||
handle_acu_hk_data,
|
||||
handle_pcdu_hk,
|
||||
)
|
||||
from eive_tmtc.tmtc.acs.imtq import (
|
||||
ImtqSetId,
|
||||
@ -31,6 +32,7 @@ from eive_tmtc.tmtc.acs.imtq import (
|
||||
handle_eng_set,
|
||||
handle_calibrated_mtm_measurement,
|
||||
handle_raw_mtm_measurement,
|
||||
handle_imtq_hk,
|
||||
)
|
||||
from eive_tmtc.pus_tm.defs import FsfwTmTcPrinter
|
||||
from eive_tmtc.tmtc.core import handle_core_hk_data
|
||||
@ -92,26 +94,17 @@ def handle_regular_hk_print(
|
||||
set_id = hk_packet.set_id
|
||||
"""This function is called when a Service 3 Housekeeping packet is received."""
|
||||
if objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:
|
||||
handle_rw_hk_data(printer, object_id, set_id, hk_data)
|
||||
return handle_rw_hk_data(printer, object_id, set_id, hk_data)
|
||||
elif objb == obj_ids.SYRLINKS_HANDLER_ID:
|
||||
handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
return handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.IMTQ_HANDLER_ID:
|
||||
if (set_id >= ImtqSetId.POSITIVE_X_TEST) and (
|
||||
set_id <= ImtqSetId.NEGATIVE_Z_TEST
|
||||
):
|
||||
return handle_self_test_data(printer, hk_data)
|
||||
elif set_id == ImtqSetId.ENG_HK_SET:
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetId.CAL_MTM_SET:
|
||||
return handle_calibrated_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.RAW_MTM_SET:
|
||||
return handle_raw_mtm_measurement(printer, hk_data)
|
||||
else:
|
||||
_LOGGER.info("Service 3 TM: IMTQ handler reply with unknown set id")
|
||||
return handle_imtq_hk(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.GPS_CONTROLLER:
|
||||
return handle_gps_data(printer=printer, hk_data=hk_data)
|
||||
elif objb == obj_ids.PCDU_HANDLER_ID:
|
||||
return handle_pcdu_hk(printer=printer, set_id=set_id, hk_data=hk_data)
|
||||
elif objb == obj_ids.BPX_HANDLER_ID:
|
||||
handle_bpx_hk_data(hk_data=hk_data, set_id=set_id, printer=printer)
|
||||
return handle_bpx_hk_data(hk_data=hk_data, set_id=set_id, printer=printer)
|
||||
elif objb == obj_ids.CORE_CONTROLLER_ID:
|
||||
return handle_core_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.PDU_1_HANDLER_ID:
|
||||
@ -144,18 +137,18 @@ def handle_regular_hk_print(
|
||||
obj_ids.SUS_10_R_LOC_XMYBZF_PT_ZF,
|
||||
obj_ids.SUS_11_R_LOC_XBYMZB_PT_ZB,
|
||||
]:
|
||||
handle_sus_hk(
|
||||
return handle_sus_hk(
|
||||
object_id=object_id, hk_data=hk_data, printer=printer, set_id=set_id
|
||||
)
|
||||
elif objb == obj_ids.P60_DOCK_HANDLER:
|
||||
handle_p60_hk_data(printer=printer, set_id=set_id, hk_data=hk_data)
|
||||
return handle_p60_hk_data(printer=printer, set_id=set_id, hk_data=hk_data)
|
||||
elif objb in [
|
||||
obj_ids.GYRO_0_ADIS_HANDLER_ID,
|
||||
obj_ids.GYRO_1_L3G_HANDLER_ID,
|
||||
obj_ids.GYRO_2_ADIS_HANDLER_ID,
|
||||
obj_ids.GYRO_3_L3G_HANDLER_ID,
|
||||
]:
|
||||
handle_gyros_hk_data(
|
||||
return handle_gyros_hk_data(
|
||||
object_id=object_id, hk_data=hk_data, printer=printer, set_id=set_id
|
||||
)
|
||||
elif objb in [
|
||||
@ -164,19 +157,19 @@ def handle_regular_hk_print(
|
||||
obj_ids.MGM_2_LIS3_HANDLER_ID,
|
||||
obj_ids.MGM_3_RM3100_HANDLER_ID,
|
||||
]:
|
||||
handle_mgm_hk_data(
|
||||
return handle_mgm_hk_data(
|
||||
object_id=object_id, hk_data=hk_data, printer=printer, set_id=set_id
|
||||
)
|
||||
elif objb == obj_ids.PL_PCDU_ID:
|
||||
handle_plpcdu_hk(set_id=set_id, hk_data=hk_data, printer=printer)
|
||||
return handle_plpcdu_hk(set_id=set_id, hk_data=hk_data, printer=printer)
|
||||
elif objb == obj_ids.THERMAL_CONTROLLER_ID:
|
||||
handle_thermal_controller_hk_data(
|
||||
return handle_thermal_controller_hk_data(
|
||||
object_id=object_id, printer=printer, set_id=set_id, hk_data=hk_data
|
||||
)
|
||||
elif objb == obj_ids.PLOC_SUPV_ID:
|
||||
handle_supv_hk_data(set_id=set_id, hk_data=hk_data, printer=printer)
|
||||
return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, printer=printer)
|
||||
elif objb == obj_ids.ACS_CONTROLLER:
|
||||
handle_acs_ctrl_hk_data(printer, set_id, hk_data)
|
||||
return handle_acs_ctrl_hk_data(printer, set_id, hk_data)
|
||||
else:
|
||||
_LOGGER.info(
|
||||
f"Service 3 TM: Parsing for object {object_id} and set ID {set_id} "
|
||||
|
@ -4,3 +4,4 @@ from .test import add_test_defs
|
||||
from .time import add_time_cmds
|
||||
from .health import add_health_cmd_defs
|
||||
from .system import add_system_cmd_defs
|
||||
from .tm_store import add_persistent_tm_store_cmd_defs
|
||||
|
@ -0,0 +1 @@
|
||||
from .gyros import add_gyr_cmd_defs
|
@ -273,7 +273,7 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
||||
elif op_code in OpCodes.REQUEST_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.REQUEST_RAW_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET))
|
||||
create_request_one_diag_command(make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.ENABLE_RAW_GYR_HK)
|
||||
@ -668,6 +668,7 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||
fmt_vec, hk_data[current_idx : current_idx + inc_len_vec]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_vec
|
||||
velo = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
@ -679,7 +680,7 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog(f"GPS Longitude: {long} [rad]")
|
||||
pw.dlog(f"GPS Position: {pos} [m]")
|
||||
pw.dlog(f"GPS Velocity: {velo} [m/s]")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=4)
|
||||
|
||||
|
||||
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
||||
|
@ -1,13 +1,41 @@
|
||||
import enum
|
||||
import logging
|
||||
import struct
|
||||
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_201_fsfw_health import pack_set_health_cmd_data, FsfwHealth
|
||||
from tmtccmd.pus.s201_fsfw_health import Subservice
|
||||
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
OpCodeEntry,
|
||||
TmtcDefinitionWrapper,
|
||||
)
|
||||
from eive_tmtc.config.object_ids import (
|
||||
GYRO_0_ADIS_HANDLER_ID,
|
||||
GYRO_1_L3G_HANDLER_ID,
|
||||
GYRO_2_ADIS_HANDLER_ID,
|
||||
GYRO_3_L3G_HANDLER_ID,
|
||||
)
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class OpCode:
|
||||
NML = "normal"
|
||||
OFF = "off"
|
||||
CORE_HK = "core_hk"
|
||||
CFG_HK = "cfg_hk"
|
||||
SET_FAULTY = "set_faulty"
|
||||
|
||||
|
||||
class AdisGyroSetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
CFG_HK = 1
|
||||
@ -17,6 +45,65 @@ class L3gGyroSetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
|
||||
|
||||
class GyrSel(enum.IntEnum):
|
||||
GYR_0_ADIS = 0
|
||||
GYR_1_L3G = 1
|
||||
GYR_2_ADIS = 2
|
||||
GYR_3_L3G = 3
|
||||
|
||||
|
||||
GYR_SEL_DICT = {
|
||||
GyrSel.GYR_0_ADIS: ("GYRO_0_ADIS", GYRO_0_ADIS_HANDLER_ID),
|
||||
GyrSel.GYR_1_L3G: ("GYRO_1_L3G", GYRO_1_L3G_HANDLER_ID),
|
||||
GyrSel.GYR_2_ADIS: ("GYRO_2_ADIS", GYRO_2_ADIS_HANDLER_ID),
|
||||
GyrSel.GYR_3_L3G: ("GYRO_3_L3G", GYRO_3_L3G_HANDLER_ID),
|
||||
}
|
||||
|
||||
|
||||
def handle_gyr_cmd(q: DefaultPusQueueHelper, op_code: str):
|
||||
print("Please select the Gyro Device")
|
||||
for (k, v) in GYR_SEL_DICT.items():
|
||||
print(f"{k}: {v[0]}")
|
||||
sel_idx = int(input("Select gyro device by index: "))
|
||||
gyr_info = GYR_SEL_DICT[GyrSel(sel_idx)]
|
||||
gyr_obj_id = gyr_info[1]
|
||||
is_adis = False
|
||||
if sel_idx == GyrSel.GYR_0_ADIS or sel_idx == GyrSel.GYR_2_ADIS:
|
||||
is_adis = True
|
||||
core_hk_id = AdisGyroSetId.CORE_HK
|
||||
else:
|
||||
core_hk_id = L3gGyroSetId.CORE_HK
|
||||
if op_code == OpCode.NML:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} NORMAL mode")
|
||||
q.add_pus_tc(create_mode_command(gyr_obj_id, Mode.NORMAL, 0))
|
||||
if op_code == OpCode.OFF:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} OFF mode")
|
||||
q.add_pus_tc(create_mode_command(gyr_obj_id, Mode.OFF, 0))
|
||||
elif op_code == OpCode.CORE_HK:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} Core HK")
|
||||
q.add_pus_tc(create_request_one_hk_command(make_sid(gyr_obj_id, core_hk_id)))
|
||||
elif op_code == OpCode.CFG_HK:
|
||||
if not is_adis:
|
||||
raise ValueError("No config HK for L3 device")
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} CFG HK")
|
||||
q.add_pus_tc(
|
||||
create_request_one_hk_command(make_sid(gyr_obj_id, AdisGyroSetId.CFG_HK))
|
||||
)
|
||||
elif op_code == OpCode.SET_FAULTY:
|
||||
q.add_log_cmd(f"Gyro {gyr_info[0]} set faulty")
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
service=201,
|
||||
subservice=Subservice.TC_SET_HEALTH,
|
||||
app_data=pack_set_health_cmd_data(object_id=gyr_obj_id, health=FsfwHealth.FAULTY)
|
||||
)
|
||||
)
|
||||
else:
|
||||
logging.getLogger(__name__).warning(
|
||||
f"invalid op code {op_code} for gyro command"
|
||||
)
|
||||
|
||||
|
||||
def handle_gyros_hk_data(
|
||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||
):
|
||||
@ -43,24 +130,36 @@ def handle_adis_gyro_hk(
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!ddddddf"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(angVelocX, angVelocY, angVelocZ, accelX, accelY, accelZ, temp) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
(
|
||||
ang_veloc_x,
|
||||
ang_veloc_y,
|
||||
ang_veloc_z,
|
||||
accel_x,
|
||||
accel_y,
|
||||
accel_z,
|
||||
temp,
|
||||
) = struct.unpack(fmt_str, hk_data[0 : 0 + inc_len])
|
||||
pw.dlog(f"Received ADIS1650X Gyro HK data from object {object_id}")
|
||||
pw.dlog(
|
||||
f"Angular Velocities (degrees per second): X {angVelocX} | "
|
||||
f"Y {angVelocY} | Z {angVelocZ}"
|
||||
f"Angular Velocities (degrees per second): X {ang_veloc_x} | "
|
||||
f"Y {ang_veloc_y} | Z {ang_veloc_z}"
|
||||
)
|
||||
pw.dlog(f"Acceleration (m/s^2): X {accelX} | Y {accelY} | Z {accelZ}")
|
||||
pw.dlog(f"Acceleration (m/s^2): X {accel_x} | Y {accel_y} | Z {accel_z}")
|
||||
pw.dlog(f"Temperature {temp} C")
|
||||
if set_id == AdisGyroSetId.CFG_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!HBHH"
|
||||
fmt_str = "!HBHHH"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(diag_stat_reg, filter_setting, msc_ctrl_reg, dec_rate_reg) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
print(len(hk_data))
|
||||
(
|
||||
diag_stat_reg,
|
||||
filter_setting,
|
||||
range_mdl,
|
||||
msc_ctrl_reg,
|
||||
dec_rate_reg,
|
||||
) = struct.unpack(fmt_str, hk_data[0 : 0 + inc_len])
|
||||
pw.dlog(f"Diagnostic Status Register {diag_stat_reg:#018b}")
|
||||
pw.dlog(f"Range MDL {range_mdl}")
|
||||
pw.dlog(f"Filter Settings {filter_setting:#010b}")
|
||||
pw.dlog(f"Miscellaneous Control Register {msc_ctrl_reg:#018b}")
|
||||
pw.dlog(f"Decimation Rate {dec_rate_reg:#06x}")
|
||||
@ -82,3 +181,14 @@ def handle_l3g_gyro_hk(
|
||||
f"Y {angVelocY} | Z {angVelocZ}"
|
||||
)
|
||||
pw.dlog(f"Temperature {temp} °C")
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_gyr_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCode.CORE_HK, info="Request Core HK")
|
||||
oce.add(keys=OpCode.CFG_HK, info="Request CFG HK")
|
||||
oce.add(keys=OpCode.NML, info="Normal Mode")
|
||||
oce.add(keys=OpCode.OFF, info="Off Mode")
|
||||
oce.add(keys=OpCode.SET_FAULTY, info="Set Faulty")
|
||||
defs.add_service(CustomServiceList.GYRO, info="Gyro", op_code_entry=oce)
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 25.03.2021
|
||||
"""
|
||||
import logging
|
||||
import struct
|
||||
from typing import List
|
||||
|
||||
@ -27,23 +28,40 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class OpCode:
|
||||
ON = ["on"]
|
||||
NORMAL = ["normal"]
|
||||
OFF = ["off"]
|
||||
SET_DIPOLE = ["set_dipole"]
|
||||
ON = "on"
|
||||
NORMAL = "normal"
|
||||
OFF = "off"
|
||||
SET_DIPOLE = "set_dipole"
|
||||
REQUEST_ENG_HK = "hk_os_eng_hk"
|
||||
REQUEST_MGM_RAW = "hk_os_mgm_raw"
|
||||
POS_X_SELF_TEST = "self_test_pos_x"
|
||||
NEG_X_SELF_TEST = "self_test_neg_x"
|
||||
POS_Y_SELF_TEST = "self_test_pos_y"
|
||||
NEG_Y_SELF_TEST = "self_test_neg_y"
|
||||
POS_Z_SELF_TEST = "self_test_pos_z"
|
||||
NEG_Z_SELF_TEST = "self_test_neg_z"
|
||||
|
||||
|
||||
class ImtqSetId:
|
||||
ENG_HK_SET = 1
|
||||
CAL_MTM_SET = 2
|
||||
RAW_MTM_SET = 3
|
||||
POSITIVE_X_TEST = 4
|
||||
NEGATIVE_X_TEST = 5
|
||||
POSITIVE_Y_TEST = 6
|
||||
NEGATIVE_Y_TEST = 7
|
||||
POSITIVE_Z_TEST = 8
|
||||
NEGATIVE_Z_TEST = 9
|
||||
ENG_HK_NO_TORQUE = 1
|
||||
RAW_MTM_NO_TORQUE = 2
|
||||
ENG_HK_SET_WITH_TORQUE = 3
|
||||
RAW_MTM_WITH_TORQUE = 4
|
||||
STATUS_SET = 5
|
||||
DIPOLES = 6
|
||||
|
||||
CAL_MTM_SET = 9
|
||||
POSITIVE_X_TEST = 10
|
||||
NEGATIVE_X_TEST = 11
|
||||
POSITIVE_Y_TEST = 12
|
||||
NEGATIVE_Y_TEST = 13
|
||||
POSITIVE_Z_TEST = 14
|
||||
NEGATIVE_Z_TEST = 15
|
||||
SELF_TEST_SET = 16
|
||||
|
||||
|
||||
class ImtqActionId:
|
||||
@ -66,17 +84,17 @@ def add_imtq_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(OpCode.OFF, "Mode Off")
|
||||
oce.add(OpCode.ON, "Mode On")
|
||||
oce.add(OpCode.NORMAL, "Mode Normal")
|
||||
oce.add("3", "IMTQ perform pos X self test")
|
||||
oce.add("4", "IMTQ perform neg X self test")
|
||||
oce.add("5", "IMTQ perform pos Y self test")
|
||||
oce.add("6", "IMTQ perform neg Y self test")
|
||||
oce.add("7", "IMTQ perform pos Z self test")
|
||||
oce.add("8", "IMTQ perform neg Z self test")
|
||||
oce.add(OpCode.REQUEST_ENG_HK, "Request Engineering HK One Shot")
|
||||
oce.add(OpCode.REQUEST_MGM_RAW, "Request MGM Raw HK One Shot")
|
||||
oce.add(OpCode.POS_X_SELF_TEST, "IMTQ perform pos X self test")
|
||||
oce.add(OpCode.NEG_X_SELF_TEST, "IMTQ perform neg X self test")
|
||||
oce.add(OpCode.POS_Y_SELF_TEST, "IMTQ perform pos Y self test")
|
||||
oce.add(OpCode.NEG_Y_SELF_TEST, "IMTQ perform neg Y self test")
|
||||
oce.add(OpCode.POS_Z_SELF_TEST, "IMTQ perform pos Z self test")
|
||||
oce.add(OpCode.NEG_Z_SELF_TEST, "IMTQ perform neg Z self test")
|
||||
oce.add(OpCode.SET_DIPOLE, "IMTQ command dipole")
|
||||
oce.add("10", "IMTQ get commanded dipole")
|
||||
oce.add("11", "IMTQ get engineering hk set")
|
||||
oce.add("12", "IMTQ get calibrated MTM measurement one shot")
|
||||
oce.add("13", "IMTQ get raw MTM measurement one shot")
|
||||
defs.add_service(CustomServiceList.IMTQ.value, "IMQT Device", oce)
|
||||
|
||||
|
||||
@ -85,19 +103,19 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
f"Testing ISIS IMTQ handler with object id: {object_id.as_hex_string}"
|
||||
)
|
||||
|
||||
if op_code in OpCode.OFF:
|
||||
if op_code == OpCode.OFF:
|
||||
q.add_log_cmd("IMTQ: Set mode off")
|
||||
command = pack_mode_data(object_id.as_bytes, Mode.OFF, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code in OpCode.ON:
|
||||
if op_code == OpCode.ON:
|
||||
q.add_log_cmd("IMTQ: Set mode on")
|
||||
command = pack_mode_data(object_id.as_bytes, Mode.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code in OpCode.NORMAL:
|
||||
if op_code == OpCode.NORMAL:
|
||||
q.add_log_cmd("IMTQ: Mode Normal")
|
||||
command = pack_mode_data(object_id.as_bytes, Mode.NORMAL, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code == "3":
|
||||
if op_code == OpCode.POS_X_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform positive x self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_x_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -110,7 +128,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_X_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "4":
|
||||
if op_code == OpCode.NEG_X_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform negative x self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_x_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -121,7 +139,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.NEGATIVE_X_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "5":
|
||||
if op_code == OpCode.POS_Y_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform positive y self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_y_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -133,7 +151,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "6":
|
||||
if op_code == OpCode.NEG_Y_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform negative y self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_y_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -146,7 +164,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.NEGATIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "7":
|
||||
if op_code == OpCode.POS_Z_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform positive z self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_z_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -159,7 +177,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "8":
|
||||
if op_code == OpCode.NEG_Z_SELF_TEST:
|
||||
q.add_log_cmd("IMTQ: Perform negative z self test")
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_z_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
@ -195,11 +213,13 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
command = object_id.as_bytes + ImtqActionId.get_commanded_dipole
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
if op_code == "11":
|
||||
if op_code == OpCode.REQUEST_ENG_HK:
|
||||
q.add_log_cmd("IMTQ: Get engineering hk set")
|
||||
q.add_pus_tc(
|
||||
generate_one_diag_command(
|
||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.ENG_HK_SET)
|
||||
sid=make_sid(
|
||||
object_id=object_id.as_bytes, set_id=ImtqSetId.ENG_HK_NO_TORQUE
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -211,11 +231,13 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
)
|
||||
)
|
||||
|
||||
if op_code == "13":
|
||||
if op_code == OpCode.REQUEST_MGM_RAW:
|
||||
q.add_log_cmd("IMTQ: Get raw MTM hk set")
|
||||
q.add_pus_tc(
|
||||
generate_one_diag_command(
|
||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_SET)
|
||||
sid=make_sid(
|
||||
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_NO_TORQUE
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -262,6 +284,14 @@ def raise_dipole_error(dipole_str: str, value: int):
|
||||
)
|
||||
|
||||
|
||||
STATUS_HEADERS = [
|
||||
"Status Byte Mode",
|
||||
"Status Byte Error",
|
||||
"Status Byte Config",
|
||||
"Status Byte Uptime [s]",
|
||||
]
|
||||
|
||||
|
||||
ENG_HK_HEADERS = [
|
||||
"Digital Voltage [mV]",
|
||||
"Analog Voltage [mV]",
|
||||
@ -277,6 +307,39 @@ ENG_HK_HEADERS = [
|
||||
]
|
||||
|
||||
|
||||
def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
|
||||
if set_id == ImtqSetId.SELF_TEST_SET:
|
||||
return handle_self_test_data(printer, hk_data)
|
||||
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
|
||||
_LOGGER.info("Found engineering HK without torque")
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetId.ENG_HK_SET_WITH_TORQUE:
|
||||
_LOGGER.info("Found engineering HK during torque")
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetId.CAL_MTM_SET:
|
||||
return handle_calibrated_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.RAW_MTM_NO_TORQUE:
|
||||
_LOGGER.info("Found raw MTM measurement without torque")
|
||||
return handle_raw_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.RAW_MTM_WITH_TORQUE:
|
||||
_LOGGER.info("Found raw MTM measurement during torque")
|
||||
return handle_raw_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.STATUS_SET:
|
||||
return handle_status_set(printer, hk_data)
|
||||
else:
|
||||
_LOGGER.warning(
|
||||
f"IMTQ handler HK reply with unknown or unimplemented set id {set_id}"
|
||||
)
|
||||
|
||||
|
||||
def unpack_status_set(hk_data: bytes) -> List:
|
||||
status_mode = hk_data[0]
|
||||
status_error = hk_data[1]
|
||||
status_conf = hk_data[2]
|
||||
status_uptime = struct.unpack("!I", hk_data[3:7])[0]
|
||||
return [status_mode, status_error, status_conf, status_uptime]
|
||||
|
||||
|
||||
def unpack_eng_hk(hk_data: bytes) -> List:
|
||||
digital_voltage = struct.unpack("!H", hk_data[0:2])[0]
|
||||
analog_voltage = struct.unpack("!H", hk_data[2:4])[0]
|
||||
@ -311,8 +374,19 @@ def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
validity_buffer = hk_data[32:]
|
||||
|
||||
num_of_vars = len(ENG_HK_HEADERS)
|
||||
pw.dlog(str(ENG_HK_HEADERS))
|
||||
pw.dlog(str(content_list))
|
||||
for k, v in zip(ENG_HK_HEADERS, content_list):
|
||||
pw.dlog(f"{k.ljust(30)}: {v}")
|
||||
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=num_of_vars)
|
||||
|
||||
|
||||
def handle_status_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
content_list = unpack_status_set(hk_data)
|
||||
validity_buffer = hk_data[7:]
|
||||
|
||||
num_of_vars = 4
|
||||
for k, v in zip(STATUS_HEADERS, content_list):
|
||||
pw.dlog(f"{k.ljust(30)}: {v}")
|
||||
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=num_of_vars)
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ def handle_mgm_rm3100_hk_data(
|
||||
fmt_str = f"!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(field_x, field_y, field_z) = struct.unpack(fmt_str, hk_data[0 : 0 + inc_len])
|
||||
pw.dlog(f"Received MGM LIS3 from object {object_id}")
|
||||
pw.dlog(f"Received MGM RM3100 from object {object_id}")
|
||||
pw.dlog(
|
||||
f"Field strengths in micro Tesla X {field_x} | Y {field_y} | Z {field_z}"
|
||||
)
|
||||
|
@ -4,6 +4,7 @@
|
||||
@author J. Meier
|
||||
@date 20.06.2021
|
||||
"""
|
||||
import enum
|
||||
import struct
|
||||
from typing import List
|
||||
|
||||
@ -64,7 +65,7 @@ class InfoAss:
|
||||
ALL_SPEED_OFF = "Speed down to 0"
|
||||
|
||||
|
||||
class RwSetId:
|
||||
class RwSetId(enum.IntEnum):
|
||||
STATUS_SET_ID = 4
|
||||
TEMPERATURE_SET_ID = 8
|
||||
LAST_RESET = 2
|
||||
|
@ -1,3 +1,4 @@
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
@ -5,7 +6,7 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class SetId:
|
||||
class SetId(enum.IntEnum):
|
||||
HK = 3
|
||||
|
||||
|
||||
|
@ -8,6 +8,22 @@
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
from tmtccmd.tc.pus_20_fsfw_param import (
|
||||
create_load_param_cmd
|
||||
)
|
||||
|
||||
from tmtccmd.pus.s20_fsfw_param_defs import (
|
||||
create_scalar_u8_parameter
|
||||
)
|
||||
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
TmtcDefinitionWrapper,
|
||||
OpCodeEntry,
|
||||
)
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
|
||||
|
||||
class CommandId:
|
||||
# prints the clcw to the console. Useful for debugging
|
||||
@ -16,15 +32,71 @@ class CommandId:
|
||||
PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
|
||||
|
||||
class ParameterId:
|
||||
POSITIVE_WINDOW = 0
|
||||
NEGATIVE_WINDOW = 1
|
||||
|
||||
|
||||
class OpCode:
|
||||
PRINT_CLCW = "print_clcw"
|
||||
PRINT_MON_REG = "print_mon_reg"
|
||||
POSITIVE_WINDOW = "positive_window"
|
||||
NEGATIVE_WINDOW = "negative_window"
|
||||
|
||||
|
||||
class Info:
|
||||
PRINT_CLCW = "Will cause the OBSW to print the current CLCW to the debug console"
|
||||
PRINT_MON_REG = "Will cause the OBSW to print the PDEC monitor register to the console"
|
||||
POSITIVE_WINDOW = "Change positive window parameter for AD frames"
|
||||
NEGATIVE_WINDOW = "Change negative window parameter for AD frames"
|
||||
|
||||
|
||||
def pack_pdec_handler_test(
|
||||
object_id: bytearray, q: DefaultPusQueueHelper, op_code: str
|
||||
):
|
||||
q.add_log_cmd(f"Testing PDEC handler with object id: {object_id.hex()}")
|
||||
if op_code == "0":
|
||||
q.add_log_cmd("PDEC Handler: Print CLCW")
|
||||
prefix = "PDEC Handler "
|
||||
if op_code == OpCode.PRINT_CLCW:
|
||||
q.add_log_cmd(f"{prefix}: {Info.PRINT_CLCW}")
|
||||
command = object_id + CommandId.PRINT_CLCW
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "1":
|
||||
q.add_log_cmd("PDEC Handler: Print PDEC monitor register")
|
||||
if op_code == OpCode.PRINT_MON_REG:
|
||||
q.add_log_cmd(f"{prefix}: {Info.PRINT_MON_REG}")
|
||||
command = object_id + CommandId.PRINT_PDEC_MON
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == OpCode.POSITIVE_WINDOW:
|
||||
q.add_log_cmd(f"{prefix}: {Info.POSITIVE_WINDOW}")
|
||||
pw = int(input("Specify positive window to set: "))
|
||||
q.add_pus_tc(
|
||||
create_load_param_cmd(
|
||||
create_scalar_u8_parameter(
|
||||
object_id,
|
||||
0,
|
||||
ParameterId.POSITIVE_WINDOW,
|
||||
pw,
|
||||
).pack()
|
||||
)
|
||||
)
|
||||
if op_code == OpCode.NEGATIVE_WINDOW:
|
||||
q.add_log_cmd(f"{prefix}: {Info.NEGATIVE_WINDOW}")
|
||||
nw = int(input("Specify negative window to set: "))
|
||||
q.add_pus_tc(
|
||||
create_load_param_cmd(
|
||||
create_scalar_u8_parameter(
|
||||
object_id,
|
||||
0,
|
||||
ParameterId.NEGATIVE_WINDOW,
|
||||
nw,
|
||||
).pack()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCode.PRINT_CLCW, Info.PRINT_CLCW)
|
||||
oce.add(OpCode.PRINT_MON_REG, Info.PRINT_MON_REG)
|
||||
oce.add(OpCode.POSITIVE_WINDOW, Info.POSITIVE_WINDOW)
|
||||
oce.add(OpCode.NEGATIVE_WINDOW, Info.NEGATIVE_WINDOW)
|
||||
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
|
||||
|
@ -21,9 +21,12 @@ from tmtccmd.tc.pus_20_fsfw_param import (
|
||||
pack_scalar_u8_parameter_app_data,
|
||||
)
|
||||
|
||||
from tmtccmd.pus.s20_fsfw_param import create_scalar_u32_parameter
|
||||
|
||||
|
||||
class ParameterId(enum.IntEnum):
|
||||
DATARATE = 0
|
||||
TRANSMITTER_TIMEOUT = 1
|
||||
|
||||
|
||||
class Submode(enum.IntEnum):
|
||||
@ -42,6 +45,7 @@ class OpCode:
|
||||
TX_AND_RX_CARRIER_WAVE = "rx_and_tx_carrier_wave"
|
||||
UPDATE_DEFAULT_DATARATE_LOW = "update_default_rate_low"
|
||||
UPDATE_DEFAULT_DATARATE_HIGH = "update_default_rate_high"
|
||||
CHANGE_TRANSMITTER_TIMEOUT = "change_transmitter_timeout"
|
||||
READ_MODE = "read_mode"
|
||||
ANNOUNCE_MODE = "announce_mode"
|
||||
ANNOUNCE_MODE_RECURSIVE = "announce_mode_recursive"
|
||||
@ -55,6 +59,7 @@ class Info:
|
||||
TX_AND_RX_CARRIER_WAVE = "Syrlinks with TX carrier wave"
|
||||
UPDATE_DEFAULT_DATARATE_LOW = "Configure default low datarate (BPSK modulation)"
|
||||
UPDATE_DEFAULT_DATARATE_HIGH = "Configure default high datarate (0QPSK modulation)"
|
||||
CHANGE_TRANSMITTER_TIMEOUT = "Changes the transmitter timeout"
|
||||
READ_MODE = "Read Mode"
|
||||
ANNOUNCE_MODE = "Announce Mode"
|
||||
ANNOUNCE_MODE_RECURSIVE = "Announce mode recursively"
|
||||
@ -112,6 +117,19 @@ def build_com_subsystem_cmd(p: ServiceProviderParams):
|
||||
q.add_pus_tc(
|
||||
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_CARRIER_WAVE, 0)
|
||||
)
|
||||
elif o == OpCode.CHANGE_TRANSMITTER_TIMEOUT:
|
||||
timeout = int(input("Specify timeout to set [ms]: "))
|
||||
q.add_log_cmd(Info.CHANGE_TRANSMITTER_TIMEOUT)
|
||||
q.add_pus_tc(
|
||||
create_load_param_cmd(
|
||||
create_scalar_u32_parameter(
|
||||
COM_SUBSYSTEM_ID,
|
||||
0,
|
||||
ParameterId.TRANSMITTER_TIMEOUT,
|
||||
timeout,
|
||||
).pack()
|
||||
)
|
||||
)
|
||||
elif o == OpCode.READ_MODE:
|
||||
q.add_log_cmd(Info.READ_MODE)
|
||||
q.add_pus_tc(create_read_mode_command(COM_SUBSYSTEM_ID))
|
||||
@ -132,6 +150,7 @@ def add_com_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(OpCode.TX_AND_RX_DEF_RATE, Info.TX_AND_RX_DEF_DATARATE)
|
||||
oce.add(OpCode.UPDATE_DEFAULT_DATARATE_LOW, Info.UPDATE_DEFAULT_DATARATE_LOW)
|
||||
oce.add(OpCode.UPDATE_DEFAULT_DATARATE_HIGH, Info.UPDATE_DEFAULT_DATARATE_HIGH)
|
||||
oce.add(OpCode.CHANGE_TRANSMITTER_TIMEOUT, Info.CHANGE_TRANSMITTER_TIMEOUT)
|
||||
oce.add(OpCode.READ_MODE, Info.READ_MODE)
|
||||
oce.add(OpCode.ANNOUNCE_MODE, Info.ANNOUNCE_MODE)
|
||||
oce.add(OpCode.ANNOUNCE_MODE_RECURSIVE, Info.ANNOUNCE_MODE_RECURSIVE)
|
||||
|
@ -34,7 +34,7 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class SetId:
|
||||
class SetId(enum.IntEnum):
|
||||
RX_REGISTERS_DATASET = 1
|
||||
TX_REGISTERS_DATASET = 2
|
||||
TEMPERATURE_SET_ID = 3
|
||||
|
@ -130,7 +130,7 @@ class SupvActionId:
|
||||
MEM_CHECK = 61
|
||||
|
||||
|
||||
class SetIds:
|
||||
class SetIds(enum.IntEnum):
|
||||
HK_REPORT = 102
|
||||
BOOT_STATUS_REPORT = 103
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
@ -19,7 +20,7 @@ from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservices
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class BpxSetId:
|
||||
class BpxSetId(enum.IntEnum):
|
||||
GET_HK_SET = 0
|
||||
GET_CFG_SET = 5
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import enum
|
||||
import struct
|
||||
from typing import List
|
||||
|
||||
@ -52,6 +53,7 @@ class GsInfo:
|
||||
class PowerInfo:
|
||||
INFO_CORE = "Core Information"
|
||||
INFO_AUX = "Auxiliary Information"
|
||||
SWITCHER_HK = "Switcher State Information"
|
||||
INFO_ALL = "All Information"
|
||||
REQUEST_SWITCHER_SET = "Request Switcher Information"
|
||||
ENABLE_INFO_HK = "Enable Core Info HK"
|
||||
@ -102,7 +104,7 @@ class PowerOpCodes:
|
||||
|
||||
REBOOT = ["reboot"]
|
||||
INFO_CORE = ["info"]
|
||||
REQUEST_SWITCHER_SET = ["request_switchers"]
|
||||
SWITCHER_HK = ["switcher_states"]
|
||||
ENABLE_INFO_HK = ["info_hk_on"]
|
||||
DISABLE_INFO_HK = ["info_hk_off"]
|
||||
INFO_AUX = ["info_aux"]
|
||||
@ -115,7 +117,7 @@ class PowerOpCodes:
|
||||
PRINT_LATCHUPS = ["print_latchups"]
|
||||
|
||||
|
||||
class SetId:
|
||||
class SetId(enum.IntEnum):
|
||||
CORE = 1
|
||||
AUX = 2
|
||||
CONFIG = 3
|
||||
|
@ -13,7 +13,6 @@ from eive_tmtc.config.object_ids import (
|
||||
ACU_HANDLER_ID,
|
||||
PDU_1_HANDLER_ID,
|
||||
PDU_2_HANDLER_ID,
|
||||
PCDU_HANDLER_ID,
|
||||
get_object_ids,
|
||||
)
|
||||
from eive_tmtc.tmtc.power.pdu1 import (
|
||||
@ -29,10 +28,15 @@ from eive_tmtc.tmtc.power.pdu2 import (
|
||||
add_pdu2_cmds,
|
||||
)
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from eive_tmtc.config.object_ids import PCDU_HANDLER_ID
|
||||
|
||||
from eive_tmtc.tmtc.power.p60dock import P60OpCode, P60Info, p60_dock_req_hk_cmds
|
||||
from eive_tmtc.tmtc.power.acu import add_acu_cmds, acu_req_hk_cmds
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_diag_command, make_sid
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
create_request_one_diag_command,
|
||||
make_sid,
|
||||
create_request_one_hk_command,
|
||||
)
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
@ -41,9 +45,20 @@ class SetId(enum.IntEnum):
|
||||
SWITCHER_SET = 0
|
||||
|
||||
|
||||
class PcduSetIds(enum.IntEnum):
|
||||
SWITCHER_SET = 0
|
||||
|
||||
|
||||
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pdu1_switch_cmds(q, op_code)
|
||||
pdu2_switch_cmds(q, op_code)
|
||||
if op_code in PowerOpCodes.SWITCHER_HK:
|
||||
q.add_log_cmd("Requesting switcher state HK")
|
||||
q.add_pus_tc(
|
||||
create_request_one_diag_command(
|
||||
make_sid(PCDU_HANDLER_ID, PcduSetIds.SWITCHER_SET)
|
||||
)
|
||||
)
|
||||
if op_code in PowerOpCodes.INFO_CORE:
|
||||
pdu1_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
pdu2_req_hk_cmds(q, PowerOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||
@ -73,13 +88,6 @@ def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_reset_gnd_wdt_cmd(q, "PDU1", oids[PDU_1_HANDLER_ID])
|
||||
pack_reset_gnd_wdt_cmd(q, "PDU2", oids[PDU_2_HANDLER_ID])
|
||||
q.add_wait_seconds(5.0)
|
||||
elif op_code in PowerOpCodes.REQUEST_SWITCHER_SET:
|
||||
q.add_log_cmd("PCDU: Requesting Switcher Set")
|
||||
q.add_pus_tc(
|
||||
create_request_one_diag_command(
|
||||
make_sid(PCDU_HANDLER_ID, SetId.SWITCHER_SET)
|
||||
)
|
||||
)
|
||||
if q.empty():
|
||||
logging.getLogger(__name__).info(
|
||||
f"Queue is empty, no stack for op code {op_code}"
|
||||
@ -105,10 +113,10 @@ def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu1_common_defs(oce)
|
||||
add_pdu2_common_defs(oce)
|
||||
oce.add(keys=PowerOpCodes.SWITCHER_HK, info=PowerInfo.SWITCHER_HK)
|
||||
oce.add(keys=PowerOpCodes.INFO_ALL, info=PowerInfo.INFO_ALL)
|
||||
oce.add(keys=PowerOpCodes.INFO_CORE, info=PowerInfo.INFO_CORE)
|
||||
oce.add(keys=PowerOpCodes.INFO_AUX, info=PowerInfo.INFO_AUX)
|
||||
oce.add(keys=PowerOpCodes.REQUEST_SWITCHER_SET, info=PowerInfo.REQUEST_SWITCHER_SET)
|
||||
oce.add(keys=PowerOpCodes.RESET_ALL_GND_WDTS, info=PowerInfo.RESET_ALL_GND_WDTS)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.POWER.value,
|
||||
|
@ -7,6 +7,7 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
unpack_array_in_data,
|
||||
OBC_ENDIANNESS,
|
||||
)
|
||||
from eive_tmtc.tmtc.power.power import PcduSetIds
|
||||
from tmtccmd.util import ObjectIdBase
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
@ -554,3 +555,24 @@ def parse_name_list(data: bytes, name_len: int):
|
||||
idx += len(name)
|
||||
idx += 1
|
||||
return ch_list
|
||||
|
||||
|
||||
def handle_pcdu_hk(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog("Received PCDU HK")
|
||||
if set_id == PcduSetIds.SWITCHER_SET:
|
||||
current_idx = 0
|
||||
pdu1_vals = [hk_data[i] for i in range(len(PDU1_CHANNELS_NAMES))]
|
||||
current_idx += len(PDU1_CHANNELS_NAMES)
|
||||
pdu2_vals = [hk_data[i + current_idx] for i in range(len(PDU2_CHANNELS_NAMES))]
|
||||
current_idx += len(PDU2_CHANNELS_NAMES)
|
||||
p60_stack_val = hk_data[current_idx]
|
||||
current_idx += 1
|
||||
pw.dlog("PDU1 Switcher States")
|
||||
for name, val in zip(PDU1_CHANNELS_NAMES, pdu1_vals):
|
||||
pw.dlog(f"{name.ljust(25)}: {val}")
|
||||
pw.dlog("PDU2 Switcher States")
|
||||
for name, val in zip(PDU2_CHANNELS_NAMES, pdu2_vals):
|
||||
pw.dlog(f"{name.ljust(25)}: {val}")
|
||||
pw.dlog(f"{'P60 Dock 5V Stack'.ljust(25)}: {p60_stack_val}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], 3)
|
||||
|
@ -7,18 +7,24 @@ from tmtccmd.config.tmtc import (
|
||||
)
|
||||
from tmtccmd.tc import service_provider
|
||||
from eive_tmtc.config.object_ids import EIVE_SYSTEM_ID
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import (
|
||||
create_mode_command,
|
||||
Mode,
|
||||
create_announce_mode_recursive_command,
|
||||
)
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
|
||||
|
||||
class OpCode:
|
||||
SAFE_MODE = "safe"
|
||||
IDLE_MODE = "idle"
|
||||
ANNOUNCE_MODES = "announce_modes"
|
||||
|
||||
|
||||
class Info:
|
||||
SAFE_MODE = "Command System into Safe Mode"
|
||||
IDLE_MODE = "Command System into Idle Pointing Mode"
|
||||
ANNOUNCE_MODES = "Announce mode recursively"
|
||||
|
||||
|
||||
@service_provider(CustomServiceList.SYSTEM.value)
|
||||
@ -32,6 +38,9 @@ def build_system_cmds(p: ServiceProviderParams):
|
||||
elif o == OpCode.IDLE_MODE:
|
||||
q.add_log_cmd(f"{prefix}: {Info.IDLE_MODE}")
|
||||
q.add_pus_tc(create_mode_command(EIVE_SYSTEM_ID, AcsMode.IDLE, 0))
|
||||
elif o == OpCode.ANNOUNCE_MODES:
|
||||
q.add_log_cmd(f"{prefix}: {Info.ANNOUNCE_MODES}")
|
||||
q.add_pus_tc(create_announce_mode_recursive_command(EIVE_SYSTEM_ID))
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
@ -39,6 +48,7 @@ def add_system_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCode.SAFE_MODE, info=Info.SAFE_MODE)
|
||||
oce.add(keys=OpCode.IDLE_MODE, info=Info.IDLE_MODE)
|
||||
oce.add(keys=OpCode.ANNOUNCE_MODES, info=Info.ANNOUNCE_MODES)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.SYSTEM.value,
|
||||
info="EIVE system commands",
|
||||
|
@ -5,3 +5,4 @@ class CtrlSetId(enum.IntEnum):
|
||||
PRIMARY_SENSORS = 0
|
||||
DEVICE_SENSORS = 1
|
||||
SUS_TEMP_SENSORS = 2
|
||||
HEATER_INFO = 4
|
||||
|
@ -32,6 +32,18 @@ class Heater(enum.IntEnum):
|
||||
NUMBER_OF_SWITCHES = 8
|
||||
|
||||
|
||||
HEATER_LOCATION = [
|
||||
"OBC Board",
|
||||
"PLOC Processing Board",
|
||||
"ACS Board",
|
||||
"PCDU PDU",
|
||||
"Camera",
|
||||
"Startracker",
|
||||
"DRO",
|
||||
"HPA",
|
||||
]
|
||||
|
||||
|
||||
class OpCode:
|
||||
HEATER_CMD = ["switch_cmd"]
|
||||
HEATER_EXT_CTRL = ["set_ext_ctrl"]
|
||||
|
@ -9,8 +9,12 @@ from tmtccmd.config.tmtc import (
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_command
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
make_sid,
|
||||
generate_one_hk_command,
|
||||
create_request_one_diag_command,
|
||||
)
|
||||
|
||||
|
||||
class OpCodeSys:
|
||||
@ -19,6 +23,8 @@ class OpCodeSys:
|
||||
REQUEST_PRIMARY_TEMP_SET = ["temp"]
|
||||
REQUEST_DEVICE_TEMP_SET = ["temp_devs"]
|
||||
REQUEST_DEVICE_SUS_SET = ["temp_sus"]
|
||||
REQUEST_HEATER_INFO = "heater_info"
|
||||
ANNOUNCE_MODES = "announce_modes"
|
||||
|
||||
|
||||
class InfoSys:
|
||||
@ -27,6 +33,8 @@ class InfoSys:
|
||||
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
|
||||
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
|
||||
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
|
||||
REQUEST_HEATER_INFO = "Request heater information"
|
||||
ANNOUNCE_MODES = "Announce Modes recursively"
|
||||
|
||||
|
||||
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
@ -46,12 +54,22 @@ def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
make_sid(TCS_CONTROLLER, CtrlSetId.SUS_TEMP_SENSORS)
|
||||
)
|
||||
)
|
||||
if op_code == OpCodeSys.REQUEST_HEATER_INFO:
|
||||
q.add_log_cmd(InfoSys.REQUEST_HEATER_INFO)
|
||||
q.add_pus_tc(
|
||||
create_request_one_diag_command(
|
||||
make_sid(TCS_CONTROLLER, CtrlSetId.HEATER_INFO)
|
||||
)
|
||||
)
|
||||
if op_code in OpCodeSys.OFF:
|
||||
q.add_log_cmd(InfoSys.OFF)
|
||||
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.OFF, 0, q, InfoSys.OFF)
|
||||
if op_code in OpCodeSys.NML:
|
||||
q.add_log_cmd(InfoSys.NML)
|
||||
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF)
|
||||
if op_code == OpCodeSys.ANNOUNCE_MODES:
|
||||
q.add_log_cmd(InfoSys.ANNOUNCE_MODES)
|
||||
q.add_pus_tc(create_announce_mode_recursive_command(TCS_SUBSYSTEM_ID))
|
||||
pack_tcs_ass_cmds(q, op_code)
|
||||
|
||||
|
||||
@ -67,6 +85,8 @@ def add_tcs_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||
keys=OpCodeSys.REQUEST_DEVICE_TEMP_SET, info=InfoSys.REQUEST_DEVICE_TEMP_SET
|
||||
)
|
||||
oce.add(keys=OpCodeSys.REQUEST_DEVICE_SUS_SET, info=InfoSys.REQUEST_DEVICE_SUS_SET)
|
||||
oce.add(keys=OpCodeSys.REQUEST_HEATER_INFO, info=InfoSys.REQUEST_HEATER_INFO)
|
||||
oce.add(keys=OpCodeSys.ANNOUNCE_MODES, info=InfoSys.ANNOUNCE_MODES)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.TCS,
|
||||
info="TCS Board",
|
||||
|
@ -1,10 +1,16 @@
|
||||
import logging
|
||||
import pprint
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from tmtccmd.fsfw import validity_buffer_list
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from .defs import CtrlSetId
|
||||
from .heater import HEATER_LOCATION
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def handle_thermal_controller_hk_data(
|
||||
@ -22,7 +28,10 @@ def handle_thermal_controller_hk_data(
|
||||
pw.dlog("Received sensor temperature data")
|
||||
|
||||
# get all the floats
|
||||
tm_data = struct.unpack("!fffffffffffffffffffff", hk_data[: 21 * 4])
|
||||
fmt_str = "!fffffffffffffffffffff"
|
||||
fmt_len = struct.calcsize(fmt_str)
|
||||
tm_data = struct.unpack(fmt_str, hk_data[:fmt_len])
|
||||
valid_list = validity_buffer_list(hk_data[fmt_len:], 21)
|
||||
parsed_data = {
|
||||
"SENSOR_PLOC_HEATSPREADER": tm_data[0],
|
||||
"SENSOR_PLOC_MISSIONBOARD": tm_data[1],
|
||||
@ -46,14 +55,15 @@ def handle_thermal_controller_hk_data(
|
||||
"TMP1075 PL PCDU 1": tm_data[19],
|
||||
"TMP1075 IF BOARD": tm_data[20],
|
||||
}
|
||||
printer.file_logger.info(str(parsed_data))
|
||||
pp = pprint.PrettyPrinter(depth=4)
|
||||
pp.pprint(parsed_data)
|
||||
for idx, (k, v) in enumerate(parsed_data.items()):
|
||||
print(f"{str(k).ljust(30)}: Valid: {valid_list[idx]}, Value: {v}")
|
||||
elif set_id == CtrlSetId.DEVICE_SENSORS:
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog("Received device temperature data")
|
||||
fmt_str = "!fhhhhiiiifffhffffffffffffff"
|
||||
fmt_len = struct.calcsize(fmt_str)
|
||||
tm_data = struct.unpack(fmt_str, hk_data[:98])
|
||||
valid_list = validity_buffer_list(hk_data[fmt_len:], 25)
|
||||
parsed_data = {
|
||||
"Q7S_TEMPERATURE": tm_data[0],
|
||||
"BATTERY_TEMPERATURE_1": tm_data[1],
|
||||
@ -68,9 +78,7 @@ def handle_thermal_controller_hk_data(
|
||||
"SYRLINKS_POWER_AMPLIFIER_TEMPERATURE": tm_data[10],
|
||||
"SYRLINKS_BASEBAND_BOARD_TEMPERATURE": tm_data[11],
|
||||
"MGT_TEMPERATURE": tm_data[12],
|
||||
"ACU_TEMPERATURE_1": tm_data[13],
|
||||
"ACU_TEMPERATURE_2": tm_data[14],
|
||||
"ACU_TEMPERATURE_3": tm_data[15],
|
||||
"ACU_TEMPERATURES": (tm_data[13], tm_data[14], tm_data[15]),
|
||||
"PDU1_TEMPERATURE": tm_data[16],
|
||||
"PDU2_TEMPERATURE": tm_data[17],
|
||||
"P60DOCK_TEMPERATURE_1": tm_data[18],
|
||||
@ -79,18 +87,19 @@ def handle_thermal_controller_hk_data(
|
||||
"GYRO_1_TEMPERATURE": tm_data[21],
|
||||
"GYRO_2_TEMPERATURE": tm_data[22],
|
||||
"GYRO_3_TEMPERATURE": tm_data[23],
|
||||
"MGM_0_TEMPERATURE": tm_data[24],
|
||||
"MGM_1_TEMPERATURE": tm_data[25],
|
||||
"MGM_0_LIS3_TEMPERATURE": tm_data[24],
|
||||
"MGM_2_LIS3_TEMPERATURE": tm_data[25],
|
||||
"ADC_PL_PCDU_TEMPERATURE": tm_data[26],
|
||||
}
|
||||
printer.file_logger.info(str(parsed_data))
|
||||
pp = pprint.PrettyPrinter(depth=4)
|
||||
pp.pprint(parsed_data)
|
||||
for idx, (k, v) in enumerate(parsed_data.items()):
|
||||
print(f"{str(k).ljust(30)}: Valid: {valid_list[idx]}, Value: {v}")
|
||||
elif set_id == CtrlSetId.SUS_TEMP_SENSORS:
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog("Received SUS temperature data")
|
||||
fmt_str = "!ffffffffffffffffff"
|
||||
tm_data = struct.unpack(fmt_str, hk_data[: 4 * 18])
|
||||
fmt_str = "!ffffffffffff"
|
||||
fmt_len = struct.calcsize(fmt_str)
|
||||
tm_data = struct.unpack(fmt_str, hk_data[: 12 * 4])
|
||||
valid_list = validity_buffer_list(hk_data[fmt_len:], 12)
|
||||
parsed_data = {
|
||||
"SUS_0": tm_data[0],
|
||||
"SUS_1": tm_data[1],
|
||||
@ -105,6 +114,15 @@ def handle_thermal_controller_hk_data(
|
||||
"SUS_10": tm_data[10],
|
||||
"SUS_11": tm_data[11],
|
||||
}
|
||||
printer.file_logger.info(str(parsed_data))
|
||||
pp = pprint.PrettyPrinter(depth=4)
|
||||
pp.pprint(parsed_data)
|
||||
for idx, (k, v) in enumerate(parsed_data.items()):
|
||||
print(f"{str(k).ljust(30)}: Valid: {valid_list[idx]}, Value: {v}")
|
||||
elif set_id == CtrlSetId.HEATER_INFO:
|
||||
print("Heater Switch States")
|
||||
for i in range(8):
|
||||
print(
|
||||
f"{HEATER_LOCATION[i].ljust(25)}: {'On' if hk_data[i] == 1 else 'Off'}"
|
||||
)
|
||||
current_draw = struct.unpack("!H", hk_data[8:10])[0]
|
||||
print(f"Heater Power Channel Current Draw: {current_draw} mA")
|
||||
else:
|
||||
_LOGGER.warning(f"Unimplemented set ID {set_id}")
|
||||
|
@ -1,8 +1,179 @@
|
||||
import datetime
|
||||
import enum
|
||||
import logging
|
||||
import math
|
||||
import struct
|
||||
|
||||
from eive_tmtc.config.object_ids import (
|
||||
HK_TM_STORE,
|
||||
MISC_TM_STORE,
|
||||
OK_TM_STORE,
|
||||
NOT_OK_TM_STORE,
|
||||
CFDP_TM_STORE,
|
||||
get_object_ids,
|
||||
)
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider, OpCodeEntry
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from dateutil.parser import parse
|
||||
|
||||
from spacepackets.ecss import PusService # noqa
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.pus_15_tm_storage import Subservice
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class OpCode:
|
||||
RETRIEVAL_BY_TIME_RANGE = "retrieval_time_range"
|
||||
DELETE_UP_TO = "delete_up_to"
|
||||
|
||||
|
||||
class Info:
|
||||
RETRIEVAL_BY_TIME_RANGE = "Dump Telemetry Packets by time range"
|
||||
DELETE_UP_TO = "Delete Telemetry Packets up to time"
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@service_provider(CustomServiceList.TM_STORE)
|
||||
def pack_tm_store_commands(p: ServiceProviderParams):
|
||||
pass
|
||||
q = p.queue_helper
|
||||
o = p.op_code
|
||||
if o == OpCode.DELETE_UP_TO:
|
||||
obj_id, store_string = store_select_prompt()
|
||||
app_data = bytearray(obj_id.as_bytes)
|
||||
delete_up_to_time = time_prompt("Determining deletion end time")
|
||||
end_stamp = int(math.floor(delete_up_to_time.timestamp()))
|
||||
app_data.extend(struct.pack("!I", end_stamp))
|
||||
q.add_log_cmd(Info.DELETE_UP_TO)
|
||||
q.add_log_cmd(f"Selected Store: {obj_id}")
|
||||
q.add_log_cmd(f"Deletion up to time {delete_up_to_time}")
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
service=15, subservice=Subservice.DELETE_UP_TO, app_data=app_data
|
||||
)
|
||||
)
|
||||
elif o == OpCode.RETRIEVAL_BY_TIME_RANGE:
|
||||
q.add_log_cmd(Info.RETRIEVAL_BY_TIME_RANGE)
|
||||
obj_id, store_string = store_select_prompt()
|
||||
app_data = bytearray(obj_id.as_bytes)
|
||||
start_of_dump_time = time_prompt("Determining retrieval start time")
|
||||
start_stamp = int(math.floor(start_of_dump_time.timestamp()))
|
||||
end_of_dump_time = time_prompt("Determining retrieval end time")
|
||||
end_stamp = int(math.floor(end_of_dump_time.timestamp()))
|
||||
app_data.extend(struct.pack("!I", start_stamp))
|
||||
app_data.extend(struct.pack("!I", end_stamp))
|
||||
q.add_log_cmd(Info.RETRIEVAL_BY_TIME_RANGE)
|
||||
q.add_log_cmd(f"Selected Store: {obj_id}")
|
||||
q.add_log_cmd(
|
||||
f"Retrieval from time {start_of_dump_time} up to time {end_of_dump_time}"
|
||||
)
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
service=15,
|
||||
subservice=Subservice.RETRIEVAL_BY_TIME_RANGE,
|
||||
app_data=app_data,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_persistent_tm_store_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCode.DELETE_UP_TO, info=Info.DELETE_UP_TO)
|
||||
oce.add(keys=OpCode.RETRIEVAL_BY_TIME_RANGE, info=Info.RETRIEVAL_BY_TIME_RANGE)
|
||||
defs.add_service(
|
||||
CustomServiceList.TM_STORE, "Persistent TM Store", op_code_entry=oce
|
||||
)
|
||||
|
||||
|
||||
class TmStoreSelect(enum.IntEnum):
|
||||
OK_TM_STORE = 0
|
||||
NOT_OK_TM_STORE = 1
|
||||
MISC_TM_STORE = 2
|
||||
HK_TM_STORE = 3
|
||||
CFDP_TM_STORE = 4
|
||||
|
||||
|
||||
STORE_DICT = {
|
||||
TmStoreSelect.OK_TM_STORE: (OK_TM_STORE, "OK Store (Verification)"),
|
||||
TmStoreSelect.NOT_OK_TM_STORE: (
|
||||
NOT_OK_TM_STORE,
|
||||
"NOT OK Store (Events, Verification Failures..)",
|
||||
),
|
||||
TmStoreSelect.MISC_TM_STORE: (MISC_TM_STORE, "Miscellaneous Store"),
|
||||
TmStoreSelect.HK_TM_STORE: (HK_TM_STORE, "HK TM Store"),
|
||||
TmStoreSelect.CFDP_TM_STORE: (CFDP_TM_STORE, "CFDP TM Store"),
|
||||
}
|
||||
|
||||
|
||||
TIME_INPUT_DICT = {
|
||||
1: "Full manual input with dateutil.parser.parse",
|
||||
2: "Offset from now in seconds",
|
||||
}
|
||||
|
||||
|
||||
def time_prompt(info_str: str) -> datetime.datetime:
|
||||
print(f"{info_str}. Available time input types: ")
|
||||
for k, v in TIME_INPUT_DICT.items():
|
||||
print(f" {k}: {v}")
|
||||
while True:
|
||||
time_input_key = int(input("Please specify a time input type by key: "))
|
||||
if time_input_key not in TIME_INPUT_DICT.keys():
|
||||
_LOGGER.warning("Invalid key, try again")
|
||||
continue
|
||||
break
|
||||
if time_input_key == 1:
|
||||
return time_prompt_fully_manually()
|
||||
elif time_input_key == 2:
|
||||
return time_prompt_offset_from_now()
|
||||
|
||||
|
||||
def time_prompt_fully_manually() -> datetime.datetime:
|
||||
# TODO: Add support for offset from now in seconds
|
||||
time = parse(
|
||||
input(
|
||||
"Please enter the time in any format supported by dateutil.parser.parse\n"
|
||||
"Recommended format: UTC ISO format YYYY-MM-DDThh:mm:ssZ: "
|
||||
)
|
||||
)
|
||||
print(f"Parsed timestamp: {time}")
|
||||
return time
|
||||
|
||||
|
||||
def time_prompt_offset_from_now() -> datetime.datetime:
|
||||
seconds_offset = math.floor(
|
||||
float(
|
||||
input(
|
||||
"Please enter the time as a offset from now in seconds. Negative offset is allowed: "
|
||||
)
|
||||
)
|
||||
)
|
||||
time_now_with_offset = datetime.datetime.now(
|
||||
tz=datetime.timezone.utc
|
||||
) + datetime.timedelta(seconds=seconds_offset)
|
||||
print(f"Absolute resulting time: {time_now_with_offset}")
|
||||
return time_now_with_offset
|
||||
|
||||
|
||||
def store_select_prompt() -> (ObjectIdU32, str):
|
||||
obj_id_dict = get_object_ids()
|
||||
print("Available TM stores:")
|
||||
for k, v in STORE_DICT.items():
|
||||
print(f" {k}: {v[1]}")
|
||||
while True:
|
||||
target_index = int(
|
||||
input("Please enter the target store for the TM store transaction: ")
|
||||
)
|
||||
desc_and_obj_id = STORE_DICT.get(TmStoreSelect(target_index))
|
||||
if desc_and_obj_id is None:
|
||||
_LOGGER.warning("Invalid index. Try again")
|
||||
continue
|
||||
break
|
||||
obj_id_raw = desc_and_obj_id[0]
|
||||
obj_id = obj_id_dict.get(obj_id_raw)
|
||||
print(f"Selected store: {obj_id} ({desc_and_obj_id[1]})")
|
||||
return obj_id_dict.get(obj_id_raw), desc_and_obj_id[1]
|
||||
|
BIN
filetest/eive-sw-update.tar.xz
Normal file
BIN
filetest/eive-sw-update.tar.xz
Normal file
Binary file not shown.
48
pyproject.toml
Normal file
48
pyproject.toml
Normal file
@ -0,0 +1,48 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "eive-tmtc"
|
||||
description = "TMTC Commander EIVE"
|
||||
readme = "README.md"
|
||||
dynamic = ["version"]
|
||||
requires-python = ">=3.10"
|
||||
license = {text = "Apache-2.0"}
|
||||
authors = [
|
||||
{name = "Robin Mueller", email = "muellerr@irs.uni-stuttgart.de"},
|
||||
{name = "Jakob Meier", email = "meierj@irs.uni-stuttgart.de"},
|
||||
]
|
||||
keywords = ["eive", "space", "communication", "commanding"]
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Natural Language :: English",
|
||||
"Operating System :: POSIX",
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Topic :: Communications",
|
||||
"Topic :: Software Development :: Libraries",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: Scientific/Engineering"
|
||||
]
|
||||
dependencies = [
|
||||
"tmtccmd ~= 4.1",
|
||||
"python-dateutil ~= 2.8",
|
||||
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@<gitRev>#egg=tmtccmd
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://egit.irs.uni-stuttgart.de/eive/eive-tmtc"
|
||||
|
||||
[tool.setuptools]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "eive_tmtc.__version__"}
|
||||
|
||||
# Auto-Discovery is problematic for some reason, so use custom-discovery
|
||||
[tool.setuptools.packages]
|
||||
find = {}
|
53
setup.cfg
53
setup.cfg
@ -1,53 +0,0 @@
|
||||
[metadata]
|
||||
name = eive-tmtc
|
||||
description = TMTC Commander EIVE
|
||||
version = attr: eive_tmtc.__version__
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
license = Apache-2.0
|
||||
author = Robin Mueller, Jakob Meier
|
||||
author_email = muellerr@irs.uni-stuttgart.de
|
||||
platform = any
|
||||
|
||||
url = https://egit.irs.uni-stuttgart.de/eive/eive-tmtc
|
||||
classifiers =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Natural Language :: English
|
||||
Operating System :: POSIX
|
||||
Operating System :: Microsoft :: Windows
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Topic :: Communications
|
||||
Topic :: Software Development :: Libraries
|
||||
Topic :: Software Development :: Libraries :: Python Modules
|
||||
Topic :: Scientific/Engineering
|
||||
|
||||
[options]
|
||||
install_requires =
|
||||
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0rc2
|
||||
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@<gitRev>#egg=tmtccmd
|
||||
packages = find:
|
||||
python_requires = >=3.10
|
||||
include_package_data = True
|
||||
|
||||
[options.extras_require]
|
||||
mib =
|
||||
|
||||
[flake8]
|
||||
max-line-length = 100
|
||||
ignore = D203, W503
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
docs/conf.py,
|
||||
old,
|
||||
build,
|
||||
dist,
|
||||
venv
|
||||
max-complexity = 10
|
||||
extend-ignore =
|
||||
# See https://github.com/PyCQA/pycodestyle/issues/373
|
||||
E203,
|
18
tmtcc.py
18
tmtcc.py
@ -98,6 +98,7 @@ from eive_tmtc.pus_tm.factory_hook import pus_factory_hook
|
||||
from eive_tmtc.pus_tc.procedure_packer import handle_default_procedure
|
||||
|
||||
_LOGGER = APP_LOGGER
|
||||
_LOG_LEVEL = logging.INFO
|
||||
|
||||
# Put rotating file logger parameters here for quick changes
|
||||
ROTATING_TIMED_LOGGER_INTERVAL_WHEN = TimedLogWhen.PER_MINUTE
|
||||
@ -178,8 +179,15 @@ class PusHandler(SpecificApidHandlerBase):
|
||||
|
||||
|
||||
class UnknownApidHandler(GenericApidHandlerBase):
|
||||
def handle_tm(self, apid: int, _packet: bytes, _user_args: any):
|
||||
_LOGGER.warning(f"Packet with unknwon APID {apid} detected")
|
||||
def handle_tm(self, apid: int, packet: bytes, _user_args: any):
|
||||
_LOGGER.warning(
|
||||
f"Packet with unknown APID {apid} detected: {packet.hex(sep=',')}"
|
||||
)
|
||||
|
||||
|
||||
class CustomCcsdsTmHandler(CcsdsTmHandler):
|
||||
def user_hook(self, apid: int, packet: bytes):
|
||||
_LOGGER.debug(f"Received packet {packet.hex(sep=',')} with APID {apid}")
|
||||
|
||||
|
||||
class CfdpInCcsdsWrapper(SpecificApidHandlerBase):
|
||||
@ -363,7 +371,7 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
|
||||
remote_cfg = RemoteEntityCfg(
|
||||
closure_requested=False,
|
||||
entity_id=CFDP_REMOTE_ENTITY_ID,
|
||||
max_file_segment_len=1024,
|
||||
max_file_segment_len=990,
|
||||
check_limit=None,
|
||||
crc_on_transmission=False,
|
||||
crc_type=ChecksumType.CRC_32,
|
||||
@ -398,7 +406,7 @@ def setup_tmtc_handlers(
|
||||
verificator, _LOGGER, printer.file_logger
|
||||
)
|
||||
pus_handler = PusHandler(verification_wrapper, printer, raw_logger)
|
||||
ccsds_handler = CcsdsTmHandler(generic_handler=UnknownApidHandler(None))
|
||||
ccsds_handler = CustomCcsdsTmHandler(generic_handler=UnknownApidHandler(None))
|
||||
ccsds_handler.add_apid_handler(pus_handler)
|
||||
ccsds_handler.add_apid_handler(cfdp_in_ccsds_wrapper)
|
||||
seq_count_provider = PusFileSeqCountProvider()
|
||||
@ -433,6 +441,8 @@ def main():
|
||||
print(f"-- eive tmtc v{__version__} --")
|
||||
print(f"-- spacepackets v{spacepackets.__version__} --")
|
||||
add_colorlog_console_logger(_LOGGER)
|
||||
# TODO: -V CLI argument to enable this?
|
||||
_LOGGER.setLevel(_LOG_LEVEL)
|
||||
try:
|
||||
setup_wrapper = setup_params()
|
||||
except KeyboardInterrupt as e:
|
||||
|
Loading…
Reference in New Issue
Block a user