Compare commits
71 Commits
Author | SHA1 | Date | |
---|---|---|---|
a42cdcdfba | |||
9d835e5705 | |||
e7609f02b9 | |||
87f5bf83d1 | |||
0e9f7e6444 | |||
cae971e90b | |||
d294649916 | |||
d652c4663b | |||
677a0d70cc | |||
0390995773 | |||
bb66d15d1f | |||
1be338b272 | |||
5f3180dbc8 | |||
b018784a11 | |||
7c5f21e83c | |||
9d42005816 | |||
ecae444ee3 | |||
a994e87f8a | |||
87607aa681 | |||
7d2c639f01 | |||
d48e86f5fe | |||
efa778c0e8 | |||
1de02aab77 | |||
b032defa7c | |||
ef6a1bb263 | |||
40831064d6 | |||
dcd881bc14 | |||
ee2c4bb4c3 | |||
c4dbf3d8be | |||
a7326b95c4 | |||
5c675560ea | |||
825a1972c4 | |||
20c2f61555 | |||
00991b92f1 | |||
6385a4a7db | |||
383b32141c | |||
486b203534 | |||
e060b40b4b | |||
f02a2d402c | |||
178b624784 | |||
a3b77d2366 | |||
724abca8f1 | |||
30cf47365f | |||
83e5b9ebeb | |||
a55572db28 | |||
febf29e8a7 | |||
96e27e7163 | |||
21b57ab171 | |||
8c959a0b7f | |||
faf34fa6a3 | |||
20d72a40a7 | |||
5745973d3d | |||
622dfde84e | |||
4bf3e2e5e2 | |||
ab42ec65ff | |||
d67d4b07a2 | |||
9e68425058 | |||
50db0eb28d | |||
eee3168712 | |||
c4a444b319 | |||
c256da5b07 | |||
72230c613b | |||
56d0f26cbf | |||
56d163f710 | |||
15f7b23ac2 | |||
742a8a6ae4 | |||
c761262112 | |||
a1cc1aef94 | |||
d9fc58abed | |||
6e15281870 | |||
6308bbb3f0 |
7
.gitmodules
vendored
7
.gitmodules
vendored
@ -1,7 +0,0 @@
|
||||
[submodule "tmtccmd"]
|
||||
path = deps/tmtccmd
|
||||
url = https://github.com/robamu-org/tmtccmd.git
|
||||
|
||||
[submodule "spacepackets"]
|
||||
path = deps/spacepackets
|
||||
url = https://github.com/robamu-org/py-spacepackets.git
|
||||
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC MPSoC" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||
<configuration default="false" name="PLOC MPSoC with Listener" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@ -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="-s ploc_mpsoc -d 6" />
|
||||
<option name="PARAMETERS" value="-s ploc_mpsoc -l" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
19
CHANGELOG.md
19
CHANGELOG.md
@ -8,6 +8,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||
The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)
|
||||
list yields a list of all related PRs for each release.
|
||||
|
||||
# [v2.2.0] 16.01.2023
|
||||
|
||||
- A lot of consistency renaming: Single name for enums which are not flag enums,
|
||||
e.g `ActionId` instead of `ActionIds`
|
||||
- Updated required Python version to 3.10
|
||||
|
||||
# [v2.1.1] 12.01.2023
|
||||
|
||||
- Typo in `setup.cfg`, missing version prefix `v` for `tmtccmd`
|
||||
|
||||
# [v2.1.0] 12.01.2023
|
||||
|
||||
- Various refactoring and tweaks to allow easier integration into `eive-mib`.
|
||||
- Handle ACS CTRL HK sets.
|
||||
- Add reboot commands for PCDU modules.
|
||||
- Extend MPSoC commands.
|
||||
- Starting from now, more regular releases, especially on breaking changes. This is because
|
||||
this is now also a library with dependents.
|
||||
|
||||
# [v2.0.2] 01.12.2022
|
||||
|
||||
- Bumped dependencies, small fix to allow working script if PyQt is not installed
|
||||
|
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
@ -0,0 +1 @@
|
||||
recursive-include eive_tmtc/config *.csv
|
14
README.md
14
README.md
@ -19,13 +19,13 @@ were installed properly.
|
||||
Run CLI mode
|
||||
|
||||
```sh
|
||||
./tmtccli.py
|
||||
./tmtcc.py
|
||||
```
|
||||
|
||||
Run GUI mode
|
||||
|
||||
```sh
|
||||
./tmtcgui.py
|
||||
./tmtcc.py -g
|
||||
```
|
||||
|
||||
# <a id="venv"></a> Set up virtual environment
|
||||
@ -68,18 +68,10 @@ Assuming you are running in a virtual environment:
|
||||
1. Install `tmtccmd` for virtual environment. `-e` for interactive installation.
|
||||
|
||||
```sh
|
||||
cd tmtccmd
|
||||
cd deps/tmtccmd
|
||||
pip install -e .[gui]
|
||||
```
|
||||
|
||||
2. You can also install the `spacepackets` package locally/interactively
|
||||
Normally, it will be installed as a `tmtccmd` dependency.
|
||||
|
||||
```sh
|
||||
cd spacepackets
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
Alternatively you can also install the packages from PyPI completely, but the risk of
|
||||
incompatibilities will be high there
|
||||
|
||||
|
4
deps/.gitignore
vendored
Normal file
4
deps/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/*
|
||||
!/*.sh
|
||||
!/.gitignore
|
||||
|
3
deps/install_spacepackets.sh
vendored
Executable file
3
deps/install_spacepackets.sh
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
git clone https://github.com/us-irs/spacepackets-py.git
|
3
deps/install_tmtccmd.sh
vendored
Executable file
3
deps/install_tmtccmd.sh
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
git clone https://github.com/robamu-org/tmtccmd.git
|
1
deps/spacepackets
vendored
1
deps/spacepackets
vendored
Submodule deps/spacepackets deleted from 83622451c3
1
deps/tmtccmd
vendored
1
deps/tmtccmd
vendored
Submodule deps/tmtccmd deleted from 4ecbaee2a7
@ -2,10 +2,10 @@ from pathlib import Path
|
||||
|
||||
SW_NAME = "eive-tmtc"
|
||||
VERSION_MAJOR = 2
|
||||
VERSION_MINOR = 0
|
||||
VERSION_REVISION = 2
|
||||
VERSION_MINOR = 2
|
||||
VERSION_REVISION = 0
|
||||
|
||||
__version__ = "2.0.2"
|
||||
__version__ = "2.2.0"
|
||||
|
||||
EIVE_TMTC_ROOT = Path(__file__).parent
|
||||
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
||||
|
@ -6,7 +6,7 @@ from tmtccmd.fsfw import parse_fsfw_events_csv
|
||||
from tmtccmd.pus.pus_5_event import EventDictT
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "/config/events.csv"
|
||||
DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "config/events.csv"
|
||||
__EVENT_DICT = None
|
||||
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers definitions of global variables to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
import argparse
|
||||
|
||||
|
||||
# All globals can be added here and will be part of a globals dictionary.
|
||||
from config.definitions import CustomServiceList, PUS_APID
|
||||
from config.custom_mode_op import CustomModeList
|
||||
from tmtccmd.config.definitions import CoreComInterfaces
|
||||
from tmtccmd.config.globals import set_default_globals_pre_args_parsing
|
||||
from tmtccmd.logging import get_console_logger
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class CustomGlobalIds(enum.Enum):
|
||||
from enum import auto
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def set_globals_pre_args_parsing(gui: bool = False):
|
||||
set_default_globals_pre_args_parsing(
|
||||
gui=gui,
|
||||
tc_apid=PUS_APID,
|
||||
tm_apid=PUS_APID,
|
||||
com_if_id=CoreComInterfaces.TCPIP_UDP.value,
|
||||
)
|
@ -2,12 +2,13 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h
|
||||
0x5d00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||
0x52b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
||||
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
||||
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
||||
@ -25,8 +26,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4fa3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||
0x4fa4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||
0x4fa5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||
0x5d00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x51a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||
0x51a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||
0x51a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||
@ -44,42 +49,133 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x50a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||
0x50a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||
0x50a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cb1;CCS_BoardReadingNotFinished;;177;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf0;CCS_NsPositiveW;;240;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf1;CCS_NsNegativeW;;241;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf2;CCS_NsLockout;;242;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf3;CCS_FarmInLockout;;243;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf4;CCS_FarmInWait;;244;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce0;CCS_WrongSymbol;;224;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce1;CCS_DoubleStart;;225;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce2;CCS_StartSymbolMissed;;226;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce3;CCS_EndWithoutStart;;227;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce4;CCS_TooLarge;;228;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce5;CCS_TooShort;;229;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce6;CCS_WrongTfVersion;;230;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce7;CCS_WrongSpacecraftId;;231;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce8;CCS_NoValidFrameType;;232;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce9;CCS_CrcFailed;;233;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cea;CCS_VcNotFound;;234;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ceb;CCS_ForwardingFailed;;235;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cec;CCS_ContentTooLarge;;236;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ced;CCS_ResidualData;;237;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cee;CCS_DataCorrupted;;238;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cef;CCS_IllegalSegmentationFlag;;239;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd0;CCS_IllegalFlagCombination;;208;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x3b00;SPH_ConnBroken;;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
||||
0x3c00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||
0x3c01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||
0x3e00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3201;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||
0x3202;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||
0x3301;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3302;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3303;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3304;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x1e00;PUS_InvalidPusVersion;;0;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||
0x1e01;PUS_InvalidCrc16;;1;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||
0x2e01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2d01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x2801;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2802;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2803;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2804;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2805;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2806;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2401;MT_TooDetailedRequest;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2402;MT_TooGeneralRequest;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2403;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x3f01;DLEE_StreamTooShort;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x2f01;ASC_NoPacketFound;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2f02;ASC_PossiblePacketLoss;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2f03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x3a01;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
||||
0x3901;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3902;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3903;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3904;MUX_WrongAttributeSetting;;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3905;MUX_MutexAlreadyLocked;;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3906;MUX_MutexNotFound;;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3907;MUX_MutexMaxLocks;;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3908;MUX_CurrThreadAlreadyOwnsMutex;;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3909;MUX_CurrThreadDoesNotOwnMutex;;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x2901;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x29f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x29f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x3da0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||
0x3da1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d04;SS_TableOrSequenceLengthInvalid;;4;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d05;SS_SequenceDoesNotExist;;5;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d06;SS_TableContainsInvalidObjectId;;6;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d07;SS_FallbackSequenceDoesNotExist;;7;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d08;SS_NoTargetTable;;8;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d09;SS_SequenceOrTableTooLong;;9;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0b;SS_IsFallbackSequence;;11;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0c;SS_AccessDenied;;12;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b00;SB_ConnBroken;;0;SUBSYSTEM_BASE;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
||||
0x2a01;IEC_NoConfigurationTable;;1;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
0x2a02;IEC_NoCpuTable;;2;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
0x2a03;IEC_InvalidWorkspaceAddress;;3;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
@ -101,73 +197,26 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x2a13;IEC_ImplementationBlockingOperationCancel;;19;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
0x2a14;IEC_MutexObtainFromBadState;;20;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
0x2a15;IEC_UnlimitedAndMaximumIs0;;21;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x2e01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2e05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||
0x2d01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x2d08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||
0x3201;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||
0x3202;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||
0x3301;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3302;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3303;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x3304;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x4c00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||
0x4c01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||
0x1d01;ATC_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d02;ATC_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d03;ATC_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x2001;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2002;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2003;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2004;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2005;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2006;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2007;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2600;FDI_YourFault;;0;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||
0x2601;FDI_MyFault;;1;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||
0x2602;FDI_ConfirmLater;;2;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||
0x2201;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2202;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2203;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2204;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2205;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2206;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2207;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2101;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2102;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2103;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2104;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2105;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2106;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2107;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2108;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2109;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||
0x04e1;RMP_CommandNoDescriptorsAvailable;;225;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
0x04e2;RMP_CommandBufferFull;;226;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
0x04e3;RMP_CommandChannelOutOfRange;;227;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
@ -208,12 +257,35 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x040a;RMP_ReplyCommandNotImplementedOrNotAuthorised;;10;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
0x040b;RMP_ReplyRmwDataLengthError;;11;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
0x040c;RMP_ReplyInvalidTargetLogicalAddress;;12;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||
0x2801;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2802;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2803;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2804;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2805;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2806;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cb1;CCS_BoardReadingNotFinished;;177;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf0;CCS_NsPositiveW;;240;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf1;CCS_NsNegativeW;;241;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf2;CCS_NsLockout;;242;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf3;CCS_FarmInLockout;;243;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cf4;CCS_FarmInWait;;244;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce0;CCS_WrongSymbol;;224;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce1;CCS_DoubleStart;;225;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce2;CCS_StartSymbolMissed;;226;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce3;CCS_EndWithoutStart;;227;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce4;CCS_TooLarge;;228;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce5;CCS_TooShort;;229;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce6;CCS_WrongTfVersion;;230;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce7;CCS_WrongSpacecraftId;;231;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce8;CCS_NoValidFrameType;;232;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ce9;CCS_CrcFailed;;233;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cea;CCS_VcNotFound;;234;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ceb;CCS_ForwardingFailed;;235;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cec;CCS_ContentTooLarge;;236;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2ced;CCS_ResidualData;;237;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cee;CCS_DataCorrupted;;238;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cef;CCS_IllegalSegmentationFlag;;239;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd0;CCS_IllegalFlagCombination;;208;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||
0x38a1;SGP4_InvalidEccentricity;;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
0x38a2;SGP4_InvalidMeanMotion;;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
0x38a3;SGP4_InvalidPerturbationElements;;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
@ -222,125 +294,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x38a6;SGP4_SatelliteHasDecayed;;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
0x38b1;SGP4_TleTooOld;;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
0x38b2;SGP4_TleNotInitialized;;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||
0x2401;MT_NoPacketFound;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2402;MT_PossiblePacketLoss;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2403;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x3f01;DLEE_StreamTooShort;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x2f01;ASC_TooLongForTargetType;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||
0x2f02;ASC_InvalidCharacters;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||
0x2f03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
||||
0x3a01;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||
0x3901;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3902;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3903;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3904;MUX_WrongAttributeSetting;;4;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3905;MUX_MutexAlreadyLocked;;5;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3906;MUX_MutexNotFound;;6;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3907;MUX_MutexMaxLocks;;7;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3908;MUX_CurrThreadAlreadyOwnsMutex;;8;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3909;MUX_CurrThreadDoesNotOwnMutex;;9;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x390c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||
0x3b01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x3b02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x3b03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x1e00;PUS_InvalidPusVersion;;0;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||
0x1e01;PUS_InvalidCrc16;;1;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||
0x2901;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x29f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x29f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d04;SS_TableOrSequenceLengthInvalid;;4;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d05;SS_SequenceDoesNotExist;;5;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d06;SS_TableContainsInvalidObjectId;;6;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d07;SS_FallbackSequenceDoesNotExist;;7;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d08;SS_NoTargetTable;;8;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d09;SS_SequenceOrTableTooLong;;9;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0b;SS_IsFallbackSequence;;11;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0c;SS_AccessDenied;;12;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||
0x3e00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3c00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||
0x3c01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||
0x3da0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||
0x3da1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x3701;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
|
||||
0x1d01;ATC_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d02;ATC_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d03;ATC_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||
0x4c00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||
0x4c01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||
0x2001;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2002;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2003;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2004;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2005;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2006;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x2007;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||
0x2501;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
||||
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
0x4301;FILS_GenericDirError;;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
0x4302;FILS_FilesystemInactive;;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
@ -358,28 +311,10 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4318;FILS_DirectoryNotEmpty;;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
0x431e;FILS_SequencePacketMissingWrite;;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
0x431f;FILS_SequencePacketMissingRead;;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x3101;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3102;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3103;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3104;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3105;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3106;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3107;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x0601;PP_DoItMyself;;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
0x0602;PP_PointsToVariable;;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
0x0603;PP_PointsToMemory;;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
@ -394,16 +329,56 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||
0x1201;AB_NeedSecondStep;;1;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1202;AB_NeedToReconfigure;;2;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1203;AB_ModeFallback;;3;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1204;AB_ChildNotCommandable;;4;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1205;AB_NeedToChangeHealth;;5;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x12a1;AB_NotEnoughChildrenInCorrectState;;161;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||
0x3701;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
|
||||
0x2201;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2202;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2203;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2204;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2205;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2206;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2207;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2101;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2102;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2103;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2104;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2105;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2106;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2107;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2108;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x2109;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x210f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||
0x03a0;DHB_InvalidChannel;;160;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
0x03b0;DHB_AperiodicReply;;176;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
0x03b1;DHB_IgnoreReplyData;;177;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
@ -413,12 +388,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x03d0;DHB_NoSwitch;;208;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
0x03e0;DHB_ChildTimeout;;224;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
0x03e1;DHB_SwitchFailed;;225;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3404;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3405;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3406;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x1201;AB_NeedSecondStep;;1;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1202;AB_NeedToReconfigure;;2;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1203;AB_ModeFallback;;3;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1204;AB_ChildNotCommandable;;4;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x1205;AB_NeedToChangeHealth;;5;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x12a1;AB_NotEnoughChildrenInCorrectState;;161;ASSEMBLY_BASE;fsfw/src/fsfw/devicehandlers/AssemblyBase.h
|
||||
0x27a0;DHI_NoCommandData;;160;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
0x27a1;DHI_CommandNotSupported;;161;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
0x27a2;DHI_CommandAlreadySent;;162;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
@ -440,12 +415,37 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x27c3;DHI_DeviceReplyInvalid;;195;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
0x27d0;DHI_InvalidCommandParameter;;208;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
0x27d1;DHI_InvalidNumberOrLengthOfParameters;;209;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||
0x4500;HSPI_HalTimeoutRetval;;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4501;HSPI_HalBusyRetval;;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4502;HSPI_HalErrorRetval;;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3404;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3405;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x3406;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||
0x2501;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
||||
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||
0x3101;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3102;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3103;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3104;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3105;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3106;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3107;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||
0x3b01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x3b02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x3b03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||
0x4500;HSPI_OpeningFileFailed;;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4601;HURT_UartReadFailure;;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -462,8 +462,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
@ -474,4 +472,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||
|
|
@ -16,7 +16,7 @@ from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32, ObjectIdBase
|
||||
|
||||
|
||||
class GomspaceDeviceActionIds(enum.IntEnum):
|
||||
class GomspaceDeviceActionId(enum.IntEnum):
|
||||
PING = 1
|
||||
REBOOT = 4
|
||||
PARAM_GET = 0
|
||||
@ -64,7 +64,7 @@ class Channel:
|
||||
|
||||
def pack_request_config_command(object_id: bytes) -> PusTelecommand:
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.REQUEST_CONFIG_TABLE
|
||||
object_id=object_id, action_id=GomspaceDeviceActionId.REQUEST_CONFIG_TABLE
|
||||
)
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ def pack_get_param_command(
|
||||
app_data += struct.pack("!B", parameter_size)
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id,
|
||||
action_id=GomspaceDeviceActionIds.PARAM_GET,
|
||||
action_id=GomspaceDeviceActionId.PARAM_GET,
|
||||
user_data=app_data,
|
||||
)
|
||||
|
||||
@ -98,7 +98,7 @@ def pack_get_param_command(
|
||||
def pack_set_float_param_command(
|
||||
object_id: bytes, memory_address: bytes, parameter: float
|
||||
) -> PusTelecommand:
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(4)
|
||||
@ -111,7 +111,7 @@ def pack_set_float_param_command(
|
||||
def pack_set_u8_param_command(
|
||||
object_id: bytes, memory_address: bytes, parameter: int
|
||||
) -> PusTelecommand:
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(1)
|
||||
@ -124,7 +124,7 @@ def pack_set_u8_param_command(
|
||||
def pack_set_i8_param_command(
|
||||
object_id: bytes, memory_address: bytes, parameter: int
|
||||
) -> PusTelecommand:
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(1)
|
||||
@ -137,7 +137,7 @@ def pack_set_i8_param_command(
|
||||
def pack_set_u16_param_command(
|
||||
object_id: bytes, memory_address: bytes, parameter: int
|
||||
) -> PusTelecommand:
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(2)
|
||||
@ -150,7 +150,7 @@ def pack_set_u16_param_command(
|
||||
def pack_set_i16_param_command(
|
||||
object_id: bytes, memory_address: bytes, parameter: int
|
||||
) -> PusTelecommand:
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(2)
|
||||
@ -161,7 +161,7 @@ def pack_set_i16_param_command(
|
||||
|
||||
|
||||
def pack_set_u32_param_command(object_id: bytes, memory_address: bytes, parameter: int):
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(4)
|
||||
@ -172,7 +172,7 @@ def pack_set_u32_param_command(object_id: bytes, memory_address: bytes, paramete
|
||||
|
||||
|
||||
def pack_set_i32_param_command(object_id: bytes, memory_address: bytes, parameter: int):
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
action_id = GomspaceDeviceActionId.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(4)
|
||||
@ -226,7 +226,7 @@ def pack_ping_command(object_id: ObjectIdU32, data: bytearray) -> PusTelecommand
|
||||
"""
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes,
|
||||
action_id=GomspaceDeviceActionIds.PING,
|
||||
action_id=GomspaceDeviceActionId.PING,
|
||||
user_data=data,
|
||||
)
|
||||
|
||||
@ -236,7 +236,7 @@ def pack_gnd_wdt_reset_command(object_id: ObjectIdBase) -> PusTelecommand:
|
||||
@param object_id Object Id of the gomspace device handler.
|
||||
"""
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.WDT_RESET
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionId.WDT_RESET
|
||||
)
|
||||
|
||||
|
||||
@ -245,7 +245,7 @@ def pack_reboot_command(object_id: ObjectIdU32) -> PusTelecommand:
|
||||
@param object_id The object id of the gomspace device handler.
|
||||
"""
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REBOOT
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionId.REBOOT
|
||||
)
|
||||
|
||||
|
||||
@ -255,5 +255,5 @@ def pack_request_full_hk_table_command(object_id: ObjectIdU32) -> PusTelecommand
|
||||
@param object_id The object id of the gomspace device handler.
|
||||
"""
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REQUEST_HK_TABLE
|
||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionId.REQUEST_HK_TABLE
|
||||
)
|
||||
|
@ -1,5 +1,3 @@
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxOpCodes
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry, CoreServiceList
|
||||
from tmtccmd.config.tmtc import (
|
||||
@ -121,30 +119,13 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
|
||||
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=BpxOpCodes.HK, info="Request BPX HK")
|
||||
oce.add(keys=BpxOpCodes.RST_BOOT_CNT, info="Reset Boot Count")
|
||||
oce.add(keys=BpxOpCodes.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
|
||||
oce.add(
|
||||
keys=BpxOpCodes.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
|
||||
)
|
||||
oce.add(keys=BpxOpCodes.REBOOT, info="Reboot Command")
|
||||
defs.add_service(
|
||||
name=CustomServiceList.BPX_BATTERY.value,
|
||||
info="BPX Battery Handler",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_time_cmds(defs: TmtcDefinitionWrapper):
|
||||
from eive_tmtc.pus_tc.system.time import OpCodes, Info
|
||||
from eive_tmtc.pus_tc.system.time import OpCode, Info
|
||||
|
||||
oce = OpCodeEntry()
|
||||
oce.add(
|
||||
keys=OpCodes.SET_CURRENT_TIME,
|
||||
keys=OpCode.SET_CURRENT_TIME,
|
||||
info=Info.SET_CURRENT_TIME,
|
||||
)
|
||||
defs.add_service(
|
||||
@ -160,11 +141,11 @@ def add_system_cmds(defs: TmtcDefinitionWrapper):
|
||||
|
||||
oce = OpCodeEntry()
|
||||
oce.add(
|
||||
keys=controllers.OpCodes.THERMAL_CONTROLLER,
|
||||
keys=controllers.OpCode.THERMAL_CONTROLLER,
|
||||
info=controllers.Info.THERMAL_CONTROLLER,
|
||||
)
|
||||
oce.add(
|
||||
keys=controllers.OpCodes.CORE_CONTROLLER,
|
||||
keys=controllers.OpCode.CORE_CONTROLLER,
|
||||
info=controllers.Info.CORE_CONTROLLER,
|
||||
)
|
||||
defs.add_service(
|
||||
|
@ -1,61 +1,109 @@
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.config.object_ids import BPX_HANDLER_ID
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
TmtcDefinitionWrapper,
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Subservices as ModeSubservices
|
||||
|
||||
|
||||
class BpxSetIds:
|
||||
class BpxSetId:
|
||||
GET_HK_SET = 0
|
||||
GET_CFG_SET = 5
|
||||
|
||||
|
||||
class BpxActionIds:
|
||||
class BpxActionId:
|
||||
REBOOT = 2
|
||||
RESET_COUNTERS = 3
|
||||
SET_CFG = 4
|
||||
GET_CFG = 5
|
||||
|
||||
|
||||
class BpxOpCodes:
|
||||
class BpxOpCode:
|
||||
HK = ["0", "hk"]
|
||||
OFF = ["off"]
|
||||
ON = ["on"]
|
||||
RST_BOOT_CNT = ["1", "rst_boot_cnt"]
|
||||
REQUEST_CFG = ["2", "cfg"]
|
||||
REQUEST_CFG_HK = ["3", "cfg_hk"]
|
||||
REBOOT = ["4", "reboot"]
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=BpxOpCode.ON, info="On command")
|
||||
oce.add(keys=BpxOpCode.OFF, info="Off command")
|
||||
oce.add(keys=BpxOpCode.HK, info="Request BPX HK")
|
||||
oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count")
|
||||
oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
|
||||
oce.add(
|
||||
keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
|
||||
)
|
||||
oce.add(keys=BpxOpCode.REBOOT, info="Reboot Command")
|
||||
defs.add_service(
|
||||
name=CustomServiceList.BPX_BATTERY.value,
|
||||
info="BPX Battery Handler",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
@service_provider(CustomServiceList.BPX_BATTERY.value)
|
||||
def pack_bpx_commands(p: ServiceProviderParams):
|
||||
op_code = p.op_code
|
||||
q = p.queue_helper
|
||||
if op_code in BpxOpCodes.HK:
|
||||
if op_code in BpxOpCode.HK:
|
||||
q.add_log_cmd("Requesting BPX battery HK set")
|
||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_HK_SET)
|
||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_HK_SET)
|
||||
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||
if op_code in BpxOpCodes.RST_BOOT_CNT:
|
||||
if op_code in BpxOpCode.OFF:
|
||||
q.add_log_cmd("Off mode")
|
||||
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Modes.OFF, 0)
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
service=200,
|
||||
subservice=ModeSubservices.TC_MODE_COMMAND,
|
||||
app_data=mode_cmd,
|
||||
)
|
||||
)
|
||||
if op_code in BpxOpCode.ON:
|
||||
q.add_log_cmd("On mode")
|
||||
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Modes.ON, 0)
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
service=200,
|
||||
subservice=ModeSubservices.TC_MODE_COMMAND,
|
||||
app_data=mode_cmd,
|
||||
)
|
||||
)
|
||||
if op_code in BpxOpCode.RST_BOOT_CNT:
|
||||
q.add_log_cmd("Resetting reboot counters")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionId.RESET_COUNTERS
|
||||
)
|
||||
)
|
||||
if op_code in BpxOpCodes.REQUEST_CFG:
|
||||
if op_code in BpxOpCode.REQUEST_CFG:
|
||||
q.add_log_cmd("Requesting configuration struct")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionId.GET_CFG
|
||||
)
|
||||
)
|
||||
if op_code in BpxOpCodes.REQUEST_CFG_HK:
|
||||
if op_code in BpxOpCode.REQUEST_CFG_HK:
|
||||
q.add_log_cmd("Requesting configuration struct HK")
|
||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_CFG_SET)
|
||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_CFG_SET)
|
||||
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||
if op_code in BpxOpCodes.REBOOT:
|
||||
if op_code in BpxOpCode.REBOOT:
|
||||
q.add_log_cmd("Rebooting BPX battery")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT
|
||||
)
|
||||
make_fsfw_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.REBOOT)
|
||||
)
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 20.11.2021
|
||||
"""
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
@ -12,7 +13,7 @@ from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class CommandIds:
|
||||
class CommandId(enum.IntEnum):
|
||||
# Configures input rate of syrlinks to 400 Khz (results in downlink rate of 200 kbps)
|
||||
SET_LOW_RATE = 0
|
||||
# Configures input rate of syrlinks to 2000 Khz (results in downlink rate of 1000 kbps)
|
||||
@ -39,42 +40,42 @@ def pack_ccsds_handler_test(
|
||||
q.add_log_cmd(f"Testing CCSDS handler with object id: {object_id.as_hex_string}")
|
||||
if op_code == "0":
|
||||
q.add_log_cmd("CCSDS Handler: Set low rate")
|
||||
command = obyt + struct.pack("!I", CommandIds.SET_LOW_RATE)
|
||||
command = obyt + struct.pack("!I", CommandId.SET_LOW_RATE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "1":
|
||||
q.add_log_cmd("CCSDS Handler: Set high rate")
|
||||
command = obyt + struct.pack("!I", CommandIds.SET_HIGH_RATE)
|
||||
command = obyt + struct.pack("!I", CommandId.SET_HIGH_RATE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "2":
|
||||
q.add_log_cmd("CCSDS Handler: Enables the transmitter")
|
||||
command = obyt + struct.pack("!I", CommandIds.EN_TRANSMITTER)
|
||||
command = obyt + struct.pack("!I", CommandId.EN_TRANSMITTER)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "3":
|
||||
q.add_log_cmd("CCSDS Handler: Disables the transmitter")
|
||||
command = obyt + struct.pack("!I", CommandIds.DIS_TRANSMITTER)
|
||||
command = obyt + struct.pack("!I", CommandId.DIS_TRANSMITTER)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "4":
|
||||
q.add_log_cmd("CCSDS Handler: Set arbitrary bitrate")
|
||||
bitrate = int(input("Specify bit rate (bps): "))
|
||||
command = (
|
||||
obyt
|
||||
+ struct.pack("!I", CommandIds.ARBITRARY_BITRATE)
|
||||
+ struct.pack("!I", CommandId.ARBITRARY_BITRATE)
|
||||
+ struct.pack("!I", bitrate)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "5":
|
||||
q.add_log_cmd("CCSDS Handler: Enable tx clock manipulator")
|
||||
command = obyt + struct.pack("!I", CommandIds.ENABLE_TX_CLK_MANIPULATOR)
|
||||
command = obyt + struct.pack("!I", CommandId.ENABLE_TX_CLK_MANIPULATOR)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "6":
|
||||
q.add_log_cmd("CCSDS Handler: Disable tx clock manipulator")
|
||||
command = obyt + struct.pack("!I", CommandIds.DISABLE_TX_CLK_MANIPULATOR)
|
||||
command = obyt + struct.pack("!I", CommandId.DISABLE_TX_CLK_MANIPULATOR)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "7":
|
||||
q.add_log_cmd("CCSDS Handler: Update tx data on rising edge of tx clock")
|
||||
command = obyt + struct.pack("!I", CommandIds.UPDATE_ON_RISING_EDGE)
|
||||
command = obyt + struct.pack("!I", CommandId.UPDATE_ON_RISING_EDGE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("CCSDS Handler: Update tx data on falling edge of tx clock")
|
||||
command = obyt + struct.pack("!I", CommandIds.UPDATE_ON_FALLING_EDGE)
|
||||
command = obyt + struct.pack("!I", CommandId.UPDATE_ON_FALLING_EDGE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
@ -11,7 +11,7 @@ from tmtccmd.logging import get_console_logger
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
REQ_OS_HK = ["0", "hk-os"]
|
||||
RESET_GNSS = ["5", "reset"]
|
||||
|
||||
@ -21,15 +21,15 @@ class Info:
|
||||
RESET_GNSS = "Reset GNSS using reset pin"
|
||||
|
||||
|
||||
class SetIds:
|
||||
class SetId:
|
||||
HK = 0
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def add_gps_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.RESET_GNSS, info=Info.RESET_GNSS)
|
||||
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||
oce.add(keys=OpCode.RESET_GNSS, info=Info.RESET_GNSS)
|
||||
oce.add(keys=OpCode.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.GPS_CTRL.value,
|
||||
info="GPS/GNSS Controller",
|
||||
@ -38,11 +38,11 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper):
|
||||
|
||||
|
||||
def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCodes.RESET_GNSS:
|
||||
if op_code in OpCode.RESET_GNSS:
|
||||
# TODO: This needs to be re-implemented
|
||||
LOGGER.warning("Reset pin handling needs to be re-implemented")
|
||||
if op_code in OpCodes.REQ_OS_HK:
|
||||
if op_code in OpCode.REQ_OS_HK:
|
||||
q.add_log_cmd(f"GMSS: {Info.REQ_OS_HK}")
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(sid=make_sid(object_id=object_id, set_id=SetIds.HK))
|
||||
generate_one_hk_command(sid=make_sid(object_id=object_id, set_id=SetId.HK))
|
||||
)
|
||||
|
@ -1,10 +1,10 @@
|
||||
import enum
|
||||
|
||||
|
||||
class AdisGyroSetIds(enum.IntEnum):
|
||||
class AdisGyroSetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
CFG_HK = 1
|
||||
|
||||
|
||||
class L3gGyroSetIds(enum.IntEnum):
|
||||
class L3gGyroSetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
|
@ -20,7 +20,7 @@ from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class SwitchNumbers:
|
||||
class SwitchNumber(enum.IntEnum):
|
||||
HEATER_0_OBC_BRD = 0
|
||||
HEATER_1_PLOC_PROC_BRD = 1
|
||||
HEATER_2_ACS_BRD = 2
|
||||
@ -32,7 +32,7 @@ class SwitchNumbers:
|
||||
NUMBER_OF_SWITCHES = 8
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
HEATER_CMD = ["0", "switch-cmd"]
|
||||
HEATER_EXT_CTRL = ["1", "set-ext-ctrl"]
|
||||
HEATER_FAULTY_CMD = ["2", "set-faulty"]
|
||||
@ -57,10 +57,10 @@ class ActionIds(enum.IntEnum):
|
||||
@tmtc_definitions_provider
|
||||
def add_heater_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.HEATER_CMD, info=Info.HEATER_CMD)
|
||||
oce.add(keys=OpCodes.HEATER_HEALTHY_CMD, info=Info.HEATER_HEALTHY_CMD)
|
||||
oce.add(keys=OpCodes.HEATER_EXT_CTRL, info=Info.HEATER_EXT_CTRL)
|
||||
oce.add(keys=OpCodes.HEATER_FAULTY_CMD, info=Info.HEATER_FAULTY_CMD)
|
||||
oce.add(keys=OpCode.HEATER_CMD, info=Info.HEATER_CMD)
|
||||
oce.add(keys=OpCode.HEATER_HEALTHY_CMD, info=Info.HEATER_HEALTHY_CMD)
|
||||
oce.add(keys=OpCode.HEATER_EXT_CTRL, info=Info.HEATER_EXT_CTRL)
|
||||
oce.add(keys=OpCode.HEATER_FAULTY_CMD, info=Info.HEATER_FAULTY_CMD)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.HEATER.value,
|
||||
info="Heater Device",
|
||||
@ -69,7 +69,7 @@ def add_heater_cmds(defs: TmtcDefinitionWrapper):
|
||||
|
||||
|
||||
def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelper):
|
||||
if op_code in OpCodes.HEATER_CMD:
|
||||
if op_code in OpCode.HEATER_CMD:
|
||||
q.add_log_cmd("Heater Switching")
|
||||
heater_number = prompt_heater()
|
||||
while True:
|
||||
@ -89,7 +89,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelpe
|
||||
debug_string = f"Switching heater {heater_number} {act_str}"
|
||||
q.add_log_cmd(debug_string)
|
||||
q.add_pus_tc(pack_switch_heater_command(object_id, heater_number, action))
|
||||
if op_code in OpCodes.HEATER_EXT_CTRL:
|
||||
if op_code in OpCode.HEATER_EXT_CTRL:
|
||||
heater_number = prompt_heater()
|
||||
obj_id = heater_idx_to_obj(heater_number)
|
||||
health_cmd(
|
||||
@ -99,7 +99,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelpe
|
||||
health_str="External Control",
|
||||
heater_idx=heater_number,
|
||||
)
|
||||
if op_code in OpCodes.HEATER_FAULTY_CMD:
|
||||
if op_code in OpCode.HEATER_FAULTY_CMD:
|
||||
heater_number = prompt_heater()
|
||||
obj_id = heater_idx_to_obj(heater_number)
|
||||
health_cmd(
|
||||
@ -109,7 +109,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelpe
|
||||
health_str="Faulty",
|
||||
heater_idx=heater_number,
|
||||
)
|
||||
if op_code in OpCodes.HEATER_HEALTHY_CMD:
|
||||
if op_code in OpCode.HEATER_HEALTHY_CMD:
|
||||
heater_number = prompt_heater()
|
||||
obj_id = heater_idx_to_obj(heater_number)
|
||||
health_cmd(
|
||||
@ -165,7 +165,7 @@ def prompt_heater() -> int:
|
||||
print("Heater number not a digit")
|
||||
continue
|
||||
heater_number = int(heater_number)
|
||||
if heater_number >= SwitchNumbers.NUMBER_OF_SWITCHES or heater_number < 0:
|
||||
if heater_number >= SwitchNumber.NUMBER_OF_SWITCHES or heater_number < 0:
|
||||
print("Invalid heater switch number")
|
||||
continue
|
||||
break
|
||||
|
@ -1,9 +1,9 @@
|
||||
import enum
|
||||
|
||||
|
||||
class MgmLis3SetIds(enum.IntEnum):
|
||||
class MgmLis3SetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
|
||||
|
||||
class MgmRm3100SetIds(enum.IntEnum):
|
||||
class MgmRm3100SetId(enum.IntEnum):
|
||||
CORE_HK = 0
|
||||
|
@ -9,7 +9,7 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
|
||||
class CommandIds:
|
||||
class CommandId:
|
||||
# prints the clcw to the console. Useful for debugging
|
||||
PRINT_CLCW = bytearray([0x0, 0x0, 0x0, 0x0])
|
||||
# Print PDEC monitor register
|
||||
@ -22,9 +22,9 @@ def pack_pdec_handler_test(
|
||||
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")
|
||||
command = object_id + CommandIds.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")
|
||||
command = object_id + CommandIds.PRINT_PDEC_MON
|
||||
command = object_id + CommandId.PRINT_PDEC_MON
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
@ -31,7 +31,7 @@ from eive_tmtc.config.object_ids import PL_PCDU_ID
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
SWITCH_HPA_ON_PROC = ["0", "proc_hpa"]
|
||||
SWITCH_ON = ["2", "on"]
|
||||
SWITCH_OFF = ["3", "off"]
|
||||
@ -70,7 +70,7 @@ class Info:
|
||||
DISABLE_HK = "Disable HK"
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
class SetId(enum.IntEnum):
|
||||
ADC = 0
|
||||
|
||||
|
||||
@ -124,63 +124,63 @@ class ParamIds(enum.IntEnum):
|
||||
@tmtc_definitions_provider
|
||||
def add_pl_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.SWITCH_HPA_ON_PROC, info=Info.SWITCH_HPA_ON_PROC)
|
||||
oce.add(keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON)
|
||||
oce.add(keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||
oce.add(keys=OpCodes.NORMAL_SSR, info=Info.NORMAL_SSR)
|
||||
oce.add(keys=OpCodes.NORMAL_DRO, info=Info.NORMAL_DRO)
|
||||
oce.add(keys=OpCodes.NORMAL_X8, info=Info.NORMAL_X8)
|
||||
oce.add(keys=OpCodes.NORMAL_TX, info=Info.NORMAL_TX)
|
||||
oce.add(keys=OpCodes.NORMAL_MPA, info=Info.NORMAL_MPA)
|
||||
oce.add(keys=OpCodes.NORMAL_HPA, info=Info.NORMAL_HPA)
|
||||
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_HK, info=Info.ENABLE_HK)
|
||||
oce.add(keys=OpCode.SWITCH_HPA_ON_PROC, info=Info.SWITCH_HPA_ON_PROC)
|
||||
oce.add(keys=OpCode.SWITCH_ON, info=Info.SWITCH_ON)
|
||||
oce.add(keys=OpCode.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||
oce.add(keys=OpCode.NORMAL_SSR, info=Info.NORMAL_SSR)
|
||||
oce.add(keys=OpCode.NORMAL_DRO, info=Info.NORMAL_DRO)
|
||||
oce.add(keys=OpCode.NORMAL_X8, info=Info.NORMAL_X8)
|
||||
oce.add(keys=OpCode.NORMAL_TX, info=Info.NORMAL_TX)
|
||||
oce.add(keys=OpCode.NORMAL_MPA, info=Info.NORMAL_MPA)
|
||||
oce.add(keys=OpCode.NORMAL_HPA, info=Info.NORMAL_HPA)
|
||||
oce.add(keys=OpCode.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||
oce.add(keys=OpCode.ENABLE_HK, info=Info.ENABLE_HK)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE,
|
||||
keys=OpCode.INJECT_SSR_TO_DRO_FAILURE,
|
||||
info="Inject failure SSR to DRO transition",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_DRO_TO_X8_FAILURE,
|
||||
keys=OpCode.INJECT_DRO_TO_X8_FAILURE,
|
||||
info="Inject failure in DRO to X8 transition",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_X8_TO_TX_FAILURE,
|
||||
keys=OpCode.INJECT_X8_TO_TX_FAILURE,
|
||||
info="Inject failure in X8 to TX transition",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_TX_TO_MPA_FAILURE,
|
||||
keys=OpCode.INJECT_TX_TO_MPA_FAILURE,
|
||||
info="Inject failure in TX to MPA transition",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.INJECT_MPA_TO_HPA_FAILURE,
|
||||
keys=OpCode.INJECT_MPA_TO_HPA_FAILURE,
|
||||
info="Inject failure in MPA to HPA transition",
|
||||
)
|
||||
oce.add(keys=OpCodes.INJECT_ALL_ON_FAILURE, info="Inject failure in all on mode")
|
||||
oce.add(keys=OpCode.INJECT_ALL_ON_FAILURE, info="Inject failure in all on mode")
|
||||
defs.add_service(CustomServiceList.PL_PCDU.value, "PL PCDU", oce)
|
||||
|
||||
|
||||
def pack_pl_pcdu_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCodes.SWITCH_ON:
|
||||
if op_code in OpCode.SWITCH_ON:
|
||||
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_ON, mode=Modes.ON, submode=0)
|
||||
if op_code in OpCodes.SWITCH_OFF:
|
||||
if op_code in OpCode.SWITCH_OFF:
|
||||
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_OFF, mode=Modes.OFF, submode=0)
|
||||
if op_code in OpCodes.ENABLE_HK:
|
||||
if op_code in OpCode.ENABLE_HK:
|
||||
interval = float(
|
||||
input("Please enter HK collection interval in floating point seconds: ")
|
||||
)
|
||||
cmds = enable_periodic_hk_command_with_interval(
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetIds.ADC), interval_seconds=interval
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetId.ADC), interval_seconds=interval
|
||||
)
|
||||
q.add_log_cmd(f"Enable PL PCDU HK with interval of {interval} seconds")
|
||||
for cmd in cmds:
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in OpCodes.DISABLE_HK:
|
||||
if op_code in OpCode.DISABLE_HK:
|
||||
cmd = disable_periodic_hk_command(
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetIds.ADC)
|
||||
diag=True, sid=make_sid(PL_PCDU_ID, SetId.ADC)
|
||||
)
|
||||
q.add_log_cmd("Disabling PL PCDU HK")
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in OpCodes.NORMAL_SSR:
|
||||
if op_code in OpCode.NORMAL_SSR:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_SSR,
|
||||
@ -189,51 +189,51 @@ def pack_pl_pcdu_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON
|
||||
),
|
||||
)
|
||||
if op_code in OpCodes.NORMAL_DRO:
|
||||
if op_code in OpCode.NORMAL_DRO:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_DRO,
|
||||
mode=Modes.NORMAL,
|
||||
submode=submode_mask_to_submode(NormalSubmodesMask.DRO_ON),
|
||||
)
|
||||
if op_code in OpCodes.NORMAL_X8:
|
||||
if op_code in OpCode.NORMAL_X8:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_X8,
|
||||
mode=Modes.NORMAL,
|
||||
submode=submode_mask_to_submode(NormalSubmodesMask.X8_ON),
|
||||
)
|
||||
if op_code in OpCodes.NORMAL_TX:
|
||||
if op_code in OpCode.NORMAL_TX:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_TX,
|
||||
mode=Modes.NORMAL,
|
||||
submode=submode_mask_to_submode(NormalSubmodesMask.TX_ON),
|
||||
)
|
||||
if op_code in OpCodes.NORMAL_MPA:
|
||||
if op_code in OpCode.NORMAL_MPA:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_MPA,
|
||||
mode=Modes.NORMAL,
|
||||
submode=submode_mask_to_submode(NormalSubmodesMask.MPA_ON),
|
||||
)
|
||||
if op_code in OpCodes.NORMAL_HPA:
|
||||
if op_code in OpCode.NORMAL_HPA:
|
||||
pack_pl_pcdu_mode_cmd(
|
||||
q=q,
|
||||
info=Info.NORMAL_HPA,
|
||||
mode=Modes.NORMAL,
|
||||
submode=submode_mask_to_submode(NormalSubmodesMask.HPA_ON),
|
||||
)
|
||||
if op_code in OpCodes.REQ_OS_HK:
|
||||
if op_code in OpCode.REQ_OS_HK:
|
||||
q.add_log_cmd(f"PL PCDU: {Info.REQ_OS_HK}")
|
||||
q.add_pus_tc(
|
||||
generate_one_diag_command(
|
||||
sid=make_sid(object_id=PL_PCDU_ID, set_id=SetIds.ADC)
|
||||
sid=make_sid(object_id=PL_PCDU_ID, set_id=SetId.ADC)
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.SWITCH_HPA_ON_PROC:
|
||||
if op_code in OpCode.SWITCH_HPA_ON_PROC:
|
||||
hpa_on_procedure(q)
|
||||
if op_code in OpCodes.INJECT_ALL_ON_FAILURE:
|
||||
if op_code in OpCode.INJECT_ALL_ON_FAILURE:
|
||||
pack_failure_injection_cmd(
|
||||
q=q,
|
||||
param_id=ParamIds.INJECT_ALL_ON_FAILURE,
|
||||
|
@ -18,11 +18,11 @@ from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class SetIds:
|
||||
class SetId:
|
||||
HK = 3
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
ON = ["0", "on"]
|
||||
NORMAL = ["1", "normal"]
|
||||
OFF = ["2", "off"]
|
||||
@ -40,7 +40,7 @@ class Info:
|
||||
DEBUG_OFF = "Switch debug output off"
|
||||
|
||||
|
||||
class CommandIds:
|
||||
class CommandId:
|
||||
START_CONVERSIONS = 2
|
||||
READ_CONVERSIONS = 3
|
||||
ENABLE_DEBUG_OUTPUT = 4
|
||||
@ -50,12 +50,12 @@ class CommandIds:
|
||||
@tmtc_definitions_provider
|
||||
def add_rad_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(info=Info.ON, keys=OpCodes.ON)
|
||||
oce.add(info=Info.OFF, keys=OpCodes.OFF)
|
||||
oce.add(info=Info.NORMAL, keys=OpCodes.NORMAL)
|
||||
oce.add(info=Info.REQ_OS_HK, keys=OpCodes.REQ_HK_ONCE)
|
||||
oce.add(info=Info.DEBUG_ON, keys=OpCodes.DEBUG_ON)
|
||||
oce.add(info=Info.DEBUG_OFF, keys=OpCodes.DEBUG_OFF)
|
||||
oce.add(info=Info.ON, keys=OpCode.ON)
|
||||
oce.add(info=Info.OFF, keys=OpCode.OFF)
|
||||
oce.add(info=Info.NORMAL, keys=OpCode.NORMAL)
|
||||
oce.add(info=Info.REQ_OS_HK, keys=OpCode.REQ_HK_ONCE)
|
||||
oce.add(info=Info.DEBUG_ON, keys=OpCode.DEBUG_ON)
|
||||
oce.add(info=Info.DEBUG_OFF, keys=OpCode.DEBUG_OFF)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.RAD_SENSOR.value,
|
||||
info="Radiation Sensor",
|
||||
@ -68,26 +68,24 @@ def pack_rad_sensor_test_into(
|
||||
):
|
||||
q.add_log_cmd(f"Commanding Radiation sensor handler {object_id}")
|
||||
|
||||
if op_code in OpCodes.ON:
|
||||
if op_code in OpCode.ON:
|
||||
rad_sensor_mode_cmd(object_id, Modes.ON, Info.ON, q)
|
||||
if op_code in OpCodes.NORMAL:
|
||||
if op_code in OpCode.NORMAL:
|
||||
rad_sensor_mode_cmd(object_id, Modes.NORMAL, Info.NORMAL, q)
|
||||
if op_code in OpCodes.OFF:
|
||||
if op_code in OpCode.OFF:
|
||||
rad_sensor_mode_cmd(object_id, Modes.OFF, Info.OFF, q)
|
||||
if op_code in OpCodes.REQ_HK_ONCE:
|
||||
if op_code in OpCode.REQ_HK_ONCE:
|
||||
q.add_log_cmd(f"Rad sensor: {Info.REQ_OS_HK}")
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(sid=make_sid(object_id.as_bytes, set_id=SetIds.HK))
|
||||
generate_one_hk_command(sid=make_sid(object_id.as_bytes, set_id=SetId.HK))
|
||||
)
|
||||
if op_code in OpCodes.DEBUG_ON:
|
||||
if op_code in OpCode.DEBUG_ON:
|
||||
q.add_log_cmd(f"Rad sensor: {Info.DEBUG_ON}")
|
||||
command = object_id.as_bytes + struct.pack("!I", CommandIds.ENABLE_DEBUG_OUTPUT)
|
||||
command = object_id.as_bytes + struct.pack("!I", CommandId.ENABLE_DEBUG_OUTPUT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.DEBUG_OFF:
|
||||
if op_code in OpCode.DEBUG_OFF:
|
||||
q.add_log_cmd(f"Rad sensor: {Info.DEBUG_OFF}")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", CommandIds.DISABLE_DEBUG_OUTPUT
|
||||
)
|
||||
command = object_id.as_bytes + struct.pack("!I", CommandId.DISABLE_DEBUG_OUTPUT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.pus_tc.devs.pdec_handler import CommandIds
|
||||
from eive_tmtc.pus_tc.devs.pdec_handler import CommandId
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
@ -32,7 +32,7 @@ RTD_IDS = [
|
||||
]
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
ON = ["0", "on"]
|
||||
OFF = ["1", "off"]
|
||||
NORMAL = ["2", "normal"]
|
||||
@ -49,9 +49,9 @@ class Info:
|
||||
@tmtc_definitions_provider
|
||||
def specify_rtd_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.ON, info=Info.ON)
|
||||
oce.add(keys=OpCodes.NORMAL, info=Info.NORMAL)
|
||||
oce.add(keys=OpCodes.OFF, info=Info.OFF)
|
||||
oce.add(keys=OpCode.ON, info=Info.ON)
|
||||
oce.add(keys=OpCode.NORMAL, info=Info.NORMAL)
|
||||
oce.add(keys=OpCode.OFF, info=Info.OFF)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.RTD.value, info="RTD commands", op_code_entry=oce
|
||||
)
|
||||
@ -67,7 +67,7 @@ def pack_rtd_commands(
|
||||
tgt_rtd_idx = prompt_rtd_idx()
|
||||
object_id_dict = get_object_ids()
|
||||
object_id = object_id_dict.get(RTD_IDS[tgt_rtd_idx])
|
||||
if op_code in OpCodes.ON:
|
||||
if op_code in OpCode.ON:
|
||||
app_data = pack_mode_data(
|
||||
object_id=object_id.as_bytes, mode=Modes.ON, submode=0
|
||||
)
|
||||
@ -76,7 +76,7 @@ def pack_rtd_commands(
|
||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.NORMAL:
|
||||
if op_code in OpCode.NORMAL:
|
||||
app_data = pack_mode_data(
|
||||
object_id=object_id.as_bytes, mode=Modes.NORMAL, submode=0
|
||||
)
|
||||
@ -85,7 +85,7 @@ def pack_rtd_commands(
|
||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.OFF:
|
||||
if op_code in OpCode.OFF:
|
||||
app_data = pack_mode_data(
|
||||
object_id=object_id.as_bytes, mode=Modes.OFF, submode=0
|
||||
)
|
||||
@ -94,8 +94,8 @@ def pack_rtd_commands(
|
||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.CONFIG_CMD:
|
||||
command = object_id.as_bytes + CommandIds.PRINT_CLCW
|
||||
if op_code in OpCode.CONFIG_CMD:
|
||||
command = object_id.as_bytes + CommandId.PRINT_CLCW
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ from eive_tmtc.config.object_ids import SCEX_HANDLER_ID
|
||||
USE_SCEX_CONF_FILE = True
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
PING = ["0", "ping"]
|
||||
ION_CMD = ["1", "ion"]
|
||||
TEMP_CMD = ["2", "temp"]
|
||||
@ -30,7 +30,7 @@ class OpCodes:
|
||||
SWITCH_OFF = ["8", "off"]
|
||||
|
||||
|
||||
class ActionIds(enum.IntEnum):
|
||||
class ActionId(enum.IntEnum):
|
||||
PING = 7
|
||||
ION_CMD = 4
|
||||
TEMP_CMD = 3
|
||||
@ -58,16 +58,16 @@ class Info:
|
||||
@tmtc_definitions_provider
|
||||
def add_scex_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.PING, info=Info.PING)
|
||||
oce.add(keys=OpCodes.ION_CMD, info=Info.ION_CMD)
|
||||
oce.add(keys=OpCodes.TEMP_CMD, info=Info.TEMP_CMD)
|
||||
oce.add(keys=OpCodes.EXP_STATUS_CMD, info=Info.EXP_STATUS_CMD)
|
||||
oce.add(keys=OpCodes.ONE_CELLS_CMD, info=Info.ONE_CELLS_CMD)
|
||||
oce.add(keys=OpCode.PING, info=Info.PING)
|
||||
oce.add(keys=OpCode.ION_CMD, info=Info.ION_CMD)
|
||||
oce.add(keys=OpCode.TEMP_CMD, info=Info.TEMP_CMD)
|
||||
oce.add(keys=OpCode.EXP_STATUS_CMD, info=Info.EXP_STATUS_CMD)
|
||||
oce.add(keys=OpCode.ONE_CELLS_CMD, info=Info.ONE_CELLS_CMD)
|
||||
|
||||
oce.add(keys=OpCodes.ALL_CELLS_CMD, info=Info.ALL_CELLS_CMD)
|
||||
oce.add(keys=OpCodes.FRAM, info=Info.FRAM)
|
||||
oce.add(keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON)
|
||||
oce.add(keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||
oce.add(keys=OpCode.ALL_CELLS_CMD, info=Info.ALL_CELLS_CMD)
|
||||
oce.add(keys=OpCode.FRAM, info=Info.FRAM)
|
||||
oce.add(keys=OpCode.SWITCH_ON, info=Info.SWITCH_ON)
|
||||
oce.add(keys=OpCode.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||
|
||||
defs.add_service(
|
||||
name=CustomServiceList.SCEX.value, info="SCEX Device", op_code_entry=oce
|
||||
@ -78,7 +78,7 @@ def add_scex_cmds(defs: TmtcDefinitionWrapper):
|
||||
def pack_scex_cmds(p: ServiceProviderParams):
|
||||
op_code = p.op_code
|
||||
q = p.queue_helper
|
||||
if op_code in OpCodes.SWITCH_ON:
|
||||
if op_code in OpCode.SWITCH_ON:
|
||||
q.add_log_cmd(Info.SWITCH_ON)
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
@ -87,7 +87,7 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data=pack_mode_data(SCEX_HANDLER_ID, Modes.ON, 0),
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.SWITCH_OFF:
|
||||
if op_code in OpCode.SWITCH_OFF:
|
||||
q.add_log_cmd(Info.SWITCH_OFF)
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
@ -96,30 +96,28 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data=pack_mode_data(SCEX_HANDLER_ID, Modes.OFF, 0),
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.PING:
|
||||
if op_code in OpCode.PING:
|
||||
q.add_log_cmd(Info.PING)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.PING, app_data))
|
||||
if op_code in OpCodes.ION_CMD:
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.PING, app_data))
|
||||
if op_code in OpCode.ION_CMD:
|
||||
q.add_log_cmd(Info.ION_CMD)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ION_CMD, app_data))
|
||||
if op_code in OpCodes.TEMP_CMD:
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.ION_CMD, app_data))
|
||||
if op_code in OpCode.TEMP_CMD:
|
||||
q.add_log_cmd(Info.TEMP_CMD)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.TEMP_CMD, app_data)
|
||||
)
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.TEMP_CMD, app_data))
|
||||
|
||||
if op_code in OpCodes.EXP_STATUS_CMD:
|
||||
if op_code in OpCode.EXP_STATUS_CMD:
|
||||
q.add_log_cmd(Info.EXP_STATUS_CMD)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.EXP_STATUS_CMD, app_data)
|
||||
)
|
||||
|
||||
# one cell
|
||||
if op_code in OpCodes.ONE_CELLS_CMD:
|
||||
if op_code in OpCode.ONE_CELLS_CMD:
|
||||
q.add_log_cmd(Info.ONE_CELLS_CMD)
|
||||
app_data = bytearray([0])
|
||||
|
||||
@ -164,10 +162,10 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data.append(dac_weight3[cn])
|
||||
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.ONE_CELLS_CMD, app_data)
|
||||
)
|
||||
|
||||
if op_code in OpCodes.ALL_CELLS_CMD:
|
||||
if op_code in OpCode.ALL_CELLS_CMD:
|
||||
q.add_log_cmd(Info.ALL_CELLS_CMD)
|
||||
app_data = bytearray([0])
|
||||
|
||||
@ -196,13 +194,13 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data.append(dac_weight3[cn])
|
||||
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.ALL_CELLS_CMD, app_data)
|
||||
)
|
||||
|
||||
if op_code in OpCodes.FRAM:
|
||||
if op_code in OpCode.FRAM:
|
||||
q.add_log_cmd(Info.FRAM)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.FRAM, app_data))
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionId.FRAM, app_data))
|
||||
|
||||
|
||||
def append_16_bit_val(packet: bytearray, val: int):
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 14.08.2021
|
||||
"""
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
@ -19,7 +20,7 @@ from eive_tmtc.utility.input_helper import InputHelper
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class StarTrackerActionIds:
|
||||
class StarTrackerActionId(enum.IntEnum):
|
||||
PING = 0
|
||||
BOOT = 1
|
||||
REQ_VERSION = 2
|
||||
@ -183,57 +184,57 @@ def pack_star_tracker_commands(
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == "5":
|
||||
q.add_log_cmd("Star tracker: Ping")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.PING)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.PING)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "6":
|
||||
q.add_log_cmd("Star tracker: Switch to bootloader program")
|
||||
data = obyt + struct.pack(
|
||||
"!I", StarTrackerActionIds.SWITCH_TO_BOOTLOADER_PROGRAM
|
||||
"!I", StarTrackerActionId.SWITCH_TO_BOOTLOADER_PROGRAM
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "7":
|
||||
q.add_log_cmd("Star tracker: Temperature request")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_TEMPERATURE)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_TEMPERATURE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("Star tracker: Request version")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_VERSION)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_VERSION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "9":
|
||||
q.add_log_cmd("Star tracker: Request interface")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_INTERFACE)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_INTERFACE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "10":
|
||||
q.add_log_cmd("Star tracker: Request power")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_POWER)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_POWER)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "11":
|
||||
q.add_log_cmd("Star tracker: Set subscription parameters")
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.SUBSCRIPTION)
|
||||
+ struct.pack("!I", StarTrackerActionId.SUBSCRIPTION)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "12":
|
||||
q.add_log_cmd("Star tracker: Boot")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.BOOT)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.BOOT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "13":
|
||||
q.add_log_cmd("Star tracker: Request time")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_TIME)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_TIME)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "14":
|
||||
q.add_log_cmd("Star tracker: Request solution")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_SOLUTION)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_SOLUTION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "15":
|
||||
q.add_log_cmd("Star tracker: Upload image")
|
||||
image = get_upload_image()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.UPLOAD_IMAGE)
|
||||
+ bytearray(image, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -244,7 +245,7 @@ def pack_star_tracker_commands(
|
||||
path = FileDefs.download_path
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_IMAGE)
|
||||
+ bytearray(path, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -253,7 +254,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.LIMITS)
|
||||
+ struct.pack("!I", StarTrackerActionId.LIMITS)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -262,7 +263,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.TRACKING)
|
||||
+ struct.pack("!I", StarTrackerActionId.TRACKING)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -271,7 +272,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.MOUNTING)
|
||||
+ struct.pack("!I", StarTrackerActionId.MOUNTING)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -280,7 +281,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CAMERA)
|
||||
+ struct.pack("!I", StarTrackerActionId.CAMERA)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -289,7 +290,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CENTROIDING)
|
||||
+ struct.pack("!I", StarTrackerActionId.CENTROIDING)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -298,7 +299,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.LISA)
|
||||
+ struct.pack("!I", StarTrackerActionId.LISA)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -307,7 +308,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.MATCHING)
|
||||
+ struct.pack("!I", StarTrackerActionId.MATCHING)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -316,7 +317,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.VALIDATION)
|
||||
+ struct.pack("!I", StarTrackerActionId.VALIDATION)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -325,7 +326,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.ALGO)
|
||||
+ struct.pack("!I", StarTrackerActionId.ALGO)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -334,37 +335,37 @@ def pack_star_tracker_commands(
|
||||
actionid = int(input("Specify parameter ID (take image - 4): "))
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.TAKE_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.TAKE_IMAGE)
|
||||
+ struct.pack("!B", actionid)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "28":
|
||||
q.add_log_cmd("Star tracker: Stop str helper")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.STOP_STR_HELPER)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.STOP_STR_HELPER)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "30":
|
||||
q.add_log_cmd("Star tracker: Set name of download image")
|
||||
filename = input("Specify download image name: ")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CHANGE_DOWNLOAD_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.CHANGE_DOWNLOAD_IMAGE)
|
||||
+ bytearray(filename, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "31":
|
||||
q.add_log_cmd("Star tracker: Request histogram")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_HISTOGRAM)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_HISTOGRAM)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "32":
|
||||
q.add_log_cmd("Star tracker: Request contrast")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_CONTRAST)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_CONTRAST)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "33":
|
||||
q.add_log_cmd("Star tracker: Set json filename")
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.SET_JSON_FILE_NAME)
|
||||
+ struct.pack("!I", StarTrackerActionId.SET_JSON_FILE_NAME)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -377,7 +378,7 @@ def pack_star_tracker_commands(
|
||||
filename = input("Specify filename: ")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.SET_FLASH_READ_FILENAME)
|
||||
+ struct.pack("!I", StarTrackerActionId.SET_FLASH_READ_FILENAME)
|
||||
+ bytearray(filename, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -390,7 +391,7 @@ def pack_star_tracker_commands(
|
||||
unix_time = 1640783543
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.SET_TIME)
|
||||
+ struct.pack("!I", StarTrackerActionId.SET_TIME)
|
||||
+ struct.pack("!Q", unix_time)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -399,7 +400,7 @@ def pack_star_tracker_commands(
|
||||
id = 0
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_CENTROID)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_CENTROID)
|
||||
+ struct.pack("!B", id)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -408,7 +409,7 @@ def pack_star_tracker_commands(
|
||||
id = 0
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_MATCHED_STAR)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_MATCHED_STAR)
|
||||
+ struct.pack("!B", id)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -417,7 +418,7 @@ def pack_star_tracker_commands(
|
||||
id = 0
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_DBIMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_DBIMAGE)
|
||||
+ struct.pack("!B", id)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -427,7 +428,7 @@ def pack_star_tracker_commands(
|
||||
type = 1 # 0 - normal, 1 - fast
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_BLOBPIXEL)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_BLOBPIXEL)
|
||||
+ struct.pack("!B", id)
|
||||
+ struct.pack("!B", type)
|
||||
)
|
||||
@ -438,7 +439,7 @@ def pack_star_tracker_commands(
|
||||
length = int(input("Size to download: "))
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_FPGA_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_FPGA_IMAGE)
|
||||
+ struct.pack("!I", position)
|
||||
+ struct.pack("!I", length)
|
||||
+ bytearray(FileDefs.downloadFpgaImagePath, "utf-8")
|
||||
@ -448,7 +449,7 @@ def pack_star_tracker_commands(
|
||||
q.add_log_cmd("Star tracker: Change donwload FPGA image file name")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CHANGE_FPGA_DOWNLOAD_FILE)
|
||||
+ struct.pack("!I", StarTrackerActionId.CHANGE_FPGA_DOWNLOAD_FILE)
|
||||
+ bytearray(FileDefs.downloadFpgaImageName, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -456,7 +457,7 @@ def pack_star_tracker_commands(
|
||||
q.add_log_cmd("Star tracker: Upload FPGA image")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_FPGA_IMAGE)
|
||||
+ struct.pack("!I", StarTrackerActionId.UPLOAD_FPGA_IMAGE)
|
||||
+ bytearray(FileDefs.uploadFpgaImageName, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -465,28 +466,28 @@ def pack_star_tracker_commands(
|
||||
id = 3
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.FPGA_ACTION)
|
||||
+ struct.pack("!I", StarTrackerActionId.FPGA_ACTION)
|
||||
+ struct.pack("!B", id)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "48":
|
||||
q.add_log_cmd("Star tracker: Unlock")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.UNLOCK)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.UNLOCK)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "49":
|
||||
q.add_log_cmd("Star tracker: Request camera parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_CAMERA_PARAMS)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_CAMERA_PARAMS)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "50":
|
||||
q.add_log_cmd("Star tracker: Request limits")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_LIMITS)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_LIMITS)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "51":
|
||||
q.add_log_cmd("Star tracker: Set image processor parameters")
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.IMAGE_PROCESSOR)
|
||||
+ struct.pack("!I", StarTrackerActionId.IMAGE_PROCESSOR)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -494,7 +495,7 @@ def pack_star_tracker_commands(
|
||||
q.add_log_cmd("Star tracker: EGSE load ground config camera parameters")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CAMERA)
|
||||
+ struct.pack("!I", StarTrackerActionId.CAMERA)
|
||||
+ bytearray(FileDefs.egse_ground_config, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -502,64 +503,64 @@ def pack_star_tracker_commands(
|
||||
q.add_log_cmd("Star tracker: EGSE load flight config camera parameters")
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.CAMERA)
|
||||
+ struct.pack("!I", StarTrackerActionId.CAMERA)
|
||||
+ bytearray(FileDefs.egse_flight_config, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "54":
|
||||
q.add_log_cmd("Star tracker: Request log level parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_LOG_LEVEL)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_LOG_LEVEL)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "55":
|
||||
q.add_log_cmd("Star tracker: Request mounting parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_MOUNTING)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_MOUNTING)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "56":
|
||||
q.add_log_cmd("Star tracker: Request image processor parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_IMAGE_PROCESSOR)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_IMAGE_PROCESSOR)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "57":
|
||||
q.add_log_cmd("Star tracker: Request centroiding parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_CENTROIDING)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_CENTROIDING)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "58":
|
||||
q.add_log_cmd("Star tracker: Request lisa parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_LISA)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_LISA)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "59":
|
||||
q.add_log_cmd("Star tracker: Request matching parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_MATCHING)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_MATCHING)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "60":
|
||||
q.add_log_cmd("Star tracker: Request tracking parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_TRACKING)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_TRACKING)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "61":
|
||||
q.add_log_cmd("Star tracker: Request validation parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_VALIDATION)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_VALIDATION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "62":
|
||||
q.add_log_cmd("Star tracker: Request algo parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_ALGO)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_ALGO)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "63":
|
||||
q.add_log_cmd("Star tracker: Request subscription parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_SUBSCRIPTION)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_SUBSCRIPTION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "64":
|
||||
q.add_log_cmd("Star tracker: Request log subscription parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_LOG_SUBSCRIPTION)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_LOG_SUBSCRIPTION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "65":
|
||||
q.add_log_cmd("Star tracker: Request debug camera parameters")
|
||||
data = obyt + struct.pack("!I", StarTrackerActionIds.REQ_DEBUG_CAMERA)
|
||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_DEBUG_CAMERA)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "66":
|
||||
q.add_log_cmd("Star tracker: Set log level parameters")
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.LOGLEVEL)
|
||||
+ struct.pack("!I", StarTrackerActionId.LOGLEVEL)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -569,7 +570,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.LOG_SUBSCRIPTION)
|
||||
+ struct.pack("!I", StarTrackerActionId.LOG_SUBSCRIPTION)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -578,7 +579,7 @@ def pack_star_tracker_commands(
|
||||
json_file = get_config_file()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.DEBUG_CAMERA)
|
||||
+ struct.pack("!I", StarTrackerActionId.DEBUG_CAMERA)
|
||||
+ bytearray(json_file, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
@ -587,20 +588,20 @@ def pack_star_tracker_commands(
|
||||
firmware = get_firmware()
|
||||
data = (
|
||||
obyt
|
||||
+ struct.pack("!I", StarTrackerActionIds.FIRMWARE_UPDATE)
|
||||
+ struct.pack("!I", StarTrackerActionId.FIRMWARE_UPDATE)
|
||||
+ bytearray(firmware, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "70":
|
||||
q.add_log_cmd("Star tracker: Disable timestamp generation")
|
||||
command = obyt + struct.pack(
|
||||
"!I", StarTrackerActionIds.DISBALE_TIMESTAMP_GENERATION
|
||||
"!I", StarTrackerActionId.DISBALE_TIMESTAMP_GENERATION
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "71":
|
||||
q.add_log_cmd("Star tracker: Enable timestamp generation")
|
||||
command = obyt + struct.pack(
|
||||
"!I", StarTrackerActionIds.ENABLE_TIMESTAMP_GENERATION
|
||||
"!I", StarTrackerActionId.ENABLE_TIMESTAMP_GENERATION
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
@ -613,7 +614,7 @@ def pack_read_command(object_id: bytes) -> bytearray:
|
||||
path = FileDefs.download_path
|
||||
data = (
|
||||
object_id
|
||||
+ struct.pack("!I", StarTrackerActionIds.FLASH_READ)
|
||||
+ struct.pack("!I", StarTrackerActionId.FLASH_READ)
|
||||
+ struct.pack("!B", start_region)
|
||||
+ struct.pack("!I", size)
|
||||
+ bytearray(path, "utf-8")
|
||||
@ -627,7 +628,7 @@ def pack_checksum_command(object_id: bytes) -> bytearray:
|
||||
size = PartitionSize.STAR_TRACKER_FIRMWARE
|
||||
data = (
|
||||
object_id
|
||||
+ struct.pack("!I", StarTrackerActionIds.CHECKSUM)
|
||||
+ struct.pack("!I", StarTrackerActionId.CHECKSUM)
|
||||
+ struct.pack("!B", start_region)
|
||||
+ struct.pack("!I", address)
|
||||
+ struct.pack("!I", size)
|
||||
|
@ -1,2 +1,2 @@
|
||||
class SetIds:
|
||||
class SetId:
|
||||
HK = 3
|
||||
|
@ -5,6 +5,8 @@
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
import enum
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
@ -20,20 +22,33 @@ import struct
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class SetIds:
|
||||
class SetId:
|
||||
RX_REGISTERS_DATASET = 1
|
||||
TX_REGISTERS_DATASET = 2
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
OFF = "off"
|
||||
ON = "on"
|
||||
NORMAL = "nml"
|
||||
STANDBY = "standby"
|
||||
STANDBY = "set_tx_standby"
|
||||
SET_CW = "set_tx_carrier_wave"
|
||||
MODULATION = "modulation"
|
||||
HK_RX_REGS = "hk_rx_regs"
|
||||
HK_TX_REGS = "hk_tx_regs"
|
||||
TX_STATUS = "tx_status"
|
||||
RX_STATUS = "rx_status"
|
||||
|
||||
|
||||
class CommandIds:
|
||||
class Info:
|
||||
HK_RX_REGS = "Request RX register set"
|
||||
HK_TX_REGS = "Request TX register set"
|
||||
TX_STATUS = "Read TX status (always read in normal mode)"
|
||||
RX_STATUS = "Read RX status (always read in normal mode)"
|
||||
SET_CW = "Set TX carrier wave"
|
||||
|
||||
|
||||
class CommandId(enum.IntEnum):
|
||||
READ_RX_STATUS_REGISTERS = 2
|
||||
SET_TX_MODE_STANDBY = 3
|
||||
SET_TX_MODE_MODULATION = 4
|
||||
@ -54,18 +69,20 @@ class CommandIds:
|
||||
@tmtc_definitions_provider
|
||||
def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCodes.OFF, "Syrlinks Handler: Set mode off")
|
||||
oce.add(OpCodes.ON, "Syrlinks Handler: Set mode on")
|
||||
oce.add(OpCodes.NORMAL, "Syrlinks Handler: Set mode normal")
|
||||
oce.add(OpCodes.STANDBY, "Syrlinks Handler: Set TX standby")
|
||||
oce.add(OpCodes.MODULATION, "Syrlinks Handler: Set TX modulation")
|
||||
oce.add("5", "Syrlinks Handler: Set TX carrier wave")
|
||||
oce.add("6", "Syrlinks Handler: Read TX status")
|
||||
oce.add(OpCode.OFF, "Syrlinks Handler: Set mode off")
|
||||
oce.add(OpCode.ON, "Syrlinks Handler: Set mode on")
|
||||
oce.add(OpCode.NORMAL, "Syrlinks Handler: Set mode normal")
|
||||
oce.add(OpCode.STANDBY, "Syrlinks Handler: Set TX standby")
|
||||
oce.add(OpCode.MODULATION, "Syrlinks Handler: Set TX modulation")
|
||||
oce.add(OpCode.HK_RX_REGS, Info.HK_RX_REGS)
|
||||
oce.add(OpCode.HK_TX_REGS, Info.HK_TX_REGS)
|
||||
oce.add(OpCode.SET_CW, Info.SET_CW)
|
||||
oce.add(OpCode.TX_STATUS, Info.TX_STATUS)
|
||||
oce.add(OpCode.RX_STATUS, Info.RX_STATUS)
|
||||
oce.add("7", "Syrlinks Handler: Read TX waveform")
|
||||
oce.add("8", "Syrlinks Handler: Read TX AGC value high byte")
|
||||
oce.add("9", "Syrlinks Handler: Read TX AGC value low byte")
|
||||
oce.add("12", "Syrlinks Handler: Write LCL config")
|
||||
oce.add("13", "Syrlinks Handler: Read RX status registers")
|
||||
oce.add("14", "Syrlinks Handler: Read LCL config register")
|
||||
oce.add("15", "Syrlinks Handler: Set waveform OQPSK")
|
||||
oce.add("16", "Syrlinks Handler: Set waveform BPSK")
|
||||
@ -79,84 +96,85 @@ def pack_syrlinks_command(
|
||||
object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str
|
||||
):
|
||||
obyt = object_id.as_bytes
|
||||
prefix = "Syrlinks"
|
||||
q.add_log_cmd(f"Testing Syrlinks with object id: {object_id.as_hex_string}")
|
||||
if op_code == OpCodes.OFF:
|
||||
q.add_log_cmd("Syrlinks: Set mode off")
|
||||
if op_code == OpCode.OFF:
|
||||
q.add_log_cmd(f"{prefix}: Set mode off")
|
||||
data = pack_mode_data(obyt, Modes.OFF, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == OpCodes.ON:
|
||||
q.add_log_cmd("Syrlinks: Set mode on")
|
||||
if op_code == OpCode.ON:
|
||||
q.add_log_cmd(f"{prefix}: Set mode on")
|
||||
data = pack_mode_data(obyt, Modes.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == OpCodes.NORMAL:
|
||||
q.add_log_cmd("Syrlinks: Mode Normal")
|
||||
if op_code == OpCode.NORMAL:
|
||||
q.add_log_cmd(f"{prefix}: Mode Normal")
|
||||
data = pack_mode_data(obyt, Modes.NORMAL, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == OpCodes.STANDBY:
|
||||
q.add_log_cmd("syrlinks: Set TX mode standby")
|
||||
data = obyt + struct.pack("!I", CommandIds.SET_TX_MODE_STANDBY)
|
||||
if op_code == OpCode.STANDBY:
|
||||
q.add_log_cmd(f"{prefix}: Set TX mode standby")
|
||||
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_STANDBY)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == OpCodes.MODULATION:
|
||||
q.add_log_cmd("syrlinks: Set TX mode modulation")
|
||||
data = obyt + struct.pack("!I", CommandIds.SET_TX_MODE_MODULATION)
|
||||
if op_code == OpCode.MODULATION:
|
||||
q.add_log_cmd(f"{prefix}: Set TX mode modulation")
|
||||
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_MODULATION)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "5":
|
||||
q.add_log_cmd("syrlinks: Set TX mode CW")
|
||||
data = obyt + struct.pack("!I", CommandIds.SET_TX_MODE_CW)
|
||||
if op_code in OpCode.SET_CW:
|
||||
q.add_log_cmd(f"{prefix}: {Info.SET_CW}")
|
||||
data = obyt + struct.pack("!I", CommandId.SET_TX_MODE_CW)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "6":
|
||||
q.add_log_cmd("Syrlinks: Get RX Registers")
|
||||
sid = make_sid(obyt, SetIds.RX_REGISTERS_DATASET)
|
||||
if op_code in OpCode.HK_RX_REGS:
|
||||
q.add_log_cmd(f"{prefix}: {Info.HK_RX_REGS}")
|
||||
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
if op_code == "7":
|
||||
q.add_log_cmd("Syrlinks: Get TX Registers")
|
||||
sid = make_sid(obyt, SetIds.TX_REGISTERS_DATASET)
|
||||
if op_code in OpCode.HK_TX_REGS:
|
||||
q.add_log_cmd(f"{prefix}: {Info.HK_TX_REGS}")
|
||||
sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("Syrlinks: Read TX status")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_TX_STATUS)
|
||||
if op_code in OpCode.TX_STATUS:
|
||||
q.add_log_cmd(f"{prefix}: {Info.TX_STATUS}")
|
||||
command = obyt + struct.pack("!I", CommandId.READ_TX_STATUS)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "9":
|
||||
q.add_log_cmd("Syrlinks: Read TX waveform")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_TX_WAVEFORM)
|
||||
command = obyt + struct.pack("!I", CommandId.READ_TX_WAVEFORM)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "10":
|
||||
q.add_log_cmd("Syrlinks: Read TX AGC value high byte")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_TX_AGC_VALUE_HIGH_BYTE)
|
||||
command = obyt + struct.pack("!I", CommandId.READ_TX_AGC_VALUE_HIGH_BYTE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "11":
|
||||
q.add_log_cmd("Syrlinks: Read TX AGC value low byte")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_TX_AGC_VALUE_LOW_BYTE)
|
||||
command = obyt + struct.pack("!I", CommandId.READ_TX_AGC_VALUE_LOW_BYTE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "12":
|
||||
q.add_log_cmd("Syrlinks: Write LCL config")
|
||||
command = obyt + struct.pack("!I", CommandIds.WRITE_LCL_CONFIG)
|
||||
command = obyt + struct.pack("!I", CommandId.WRITE_LCL_CONFIG)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "13":
|
||||
q.add_log_cmd("Syrlinks: Read RX status registers")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_RX_STATUS_REGISTERS)
|
||||
command = obyt + struct.pack("!I", CommandId.READ_RX_STATUS_REGISTERS)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "14":
|
||||
q.add_log_cmd("Syrlinks: Read LCL config register")
|
||||
command = obyt + struct.pack("!I", CommandIds.READ_LCL_CONFIG_REGISTER)
|
||||
command = obyt + struct.pack("!I", CommandId.READ_LCL_CONFIG_REGISTER)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "15":
|
||||
q.add_log_cmd("Syrlinks: Set waveform OQPSK")
|
||||
command = obyt + struct.pack("!I", CommandIds.SET_WAVEFORM_OQPSK)
|
||||
command = obyt + struct.pack("!I", CommandId.SET_WAVEFORM_OQPSK)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "16":
|
||||
q.add_log_cmd("Syrlinks: Set waveform BPSK")
|
||||
command = obyt + struct.pack("!I", CommandIds.SET_WAVEFORM_BPSK)
|
||||
command = obyt + struct.pack("!I", CommandId.SET_WAVEFORM_BPSK)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "17":
|
||||
q.add_log_cmd("Syrlinks: Set second config")
|
||||
command = obyt + struct.pack("!I", CommandIds.SET_SECOND_CONFIG)
|
||||
command = obyt + struct.pack("!I", CommandId.SET_SECOND_CONFIG)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "18":
|
||||
q.add_log_cmd("Syrlinks: Enable debug printout")
|
||||
command = obyt + struct.pack("!I", CommandIds.ENABLE_DEBUG)
|
||||
command = obyt + struct.pack("!I", CommandId.ENABLE_DEBUG)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "19":
|
||||
q.add_log_cmd("Syrlinks: Disable debug printout")
|
||||
command = obyt + struct.pack("!I", CommandIds.DISABLE_DEBUG)
|
||||
command = obyt + struct.pack("!I", CommandId.DISABLE_DEBUG)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
@ -28,7 +28,7 @@ class Tmp1075TestProcedure:
|
||||
set_mode_on = False # If mode is MODE_ON, temperature will only be read on command
|
||||
|
||||
|
||||
class Tmp1075ActionIds:
|
||||
class Tmp1075ActionId:
|
||||
get_temp = bytearray([0x0, 0x0, 0x0, 0x01])
|
||||
start_adc_conversion = bytearray([0x0, 0x0, 0x0, 0x02])
|
||||
|
||||
@ -42,11 +42,11 @@ def pack_tmp1075_test_into(
|
||||
obyt = object_id.as_bytes
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.start_adc_conversion:
|
||||
q.add_log_cmd("TMP1075: Starting new temperature conversion")
|
||||
command = obyt + Tmp1075ActionIds.start_adc_conversion
|
||||
command = obyt + Tmp1075ActionId.start_adc_conversion
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.get_temp:
|
||||
q.add_log_cmd("TMP1075: Read temperature")
|
||||
command = obyt + Tmp1075ActionIds.get_temp
|
||||
command = obyt + Tmp1075ActionId.get_temp
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
if Tmp1075TestProcedure.set_mode_normal:
|
||||
|
@ -37,7 +37,7 @@ from eive_tmtc.tmtc.acs.reaction_wheels import (
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import pack_rad_sensor_test_into
|
||||
from eive_tmtc.tmtc.payload.ploc_memory_dumper import pack_ploc_memory_dumper_cmd
|
||||
from eive_tmtc.pus_tc.devs.ccsds_handler import pack_ccsds_handler_test
|
||||
from eive_tmtc.pus_tc.system.core import pack_core_commands
|
||||
from eive_tmtc.tmtc.core import pack_core_commands
|
||||
from eive_tmtc.pus_tc.devs.star_tracker import pack_star_tracker_commands
|
||||
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import pack_syrlinks_command
|
||||
from eive_tmtc.pus_tc.devs.gps import pack_gps_command
|
||||
|
@ -8,8 +8,7 @@ from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
THERMAL_CONTROLLER = [obj_ids.THERMAL_CONTROLLER_ID.hex(), "ctrl-th"]
|
||||
CORE_CONTROLLER = [obj_ids.CORE_CONTROLLER_ID.hex(), "ctrl-core"]
|
||||
|
||||
@ -25,12 +24,14 @@ def pack_cmd_ctrl_to_prompted_mode(
|
||||
from eive_tmtc.pus_tc.prompt_parameters import (
|
||||
prompt_parameters_cli,
|
||||
)
|
||||
|
||||
param_list = [
|
||||
{"name": "Mode", "defaultValue": "2"},
|
||||
{"name": "Submode", "defaultValue": "0"},
|
||||
]
|
||||
if gui:
|
||||
from eive_tmtc.pus_tc.prompt_parameters import prompt_parameters_gui
|
||||
|
||||
parameters = prompt_parameters_gui(param_list)
|
||||
else:
|
||||
parameters = prompt_parameters_cli(param_list)
|
||||
@ -88,7 +89,7 @@ def get_object_from_op_code(op_code: str):
|
||||
except:
|
||||
pass
|
||||
|
||||
if op_code in OpCodes.THERMAL_CONTROLLER:
|
||||
if op_code in OpCode.THERMAL_CONTROLLER:
|
||||
return obj_ids.THERMAL_CONTROLLER_ID
|
||||
if op_code in OpCodes.CORE_CONTROLLER:
|
||||
if op_code in OpCode.CORE_CONTROLLER:
|
||||
return obj_ids.CORE_CONTROLLER_ID
|
||||
|
@ -19,22 +19,22 @@ from tmtccmd.tc.pus_11_tc_sched import (
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import *
|
||||
|
||||
import eive_tmtc.config.object_ids as oids
|
||||
from eive_tmtc.pus_tc.system.tcs import OpCodes as TcsOpCodes
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxSetIds
|
||||
from eive_tmtc.pus_tc.system.core import SetIds as CoreSetIds
|
||||
from eive_tmtc.tmtc.power.common_power import SetIds as GsSetIds
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import SetIds as RadSetIds
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmLis3SetIds as MgmLis3SetIds_0_2
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmRm3100SetIds as MgmRm3100SetIds_1_3
|
||||
from eive_tmtc.pus_tc.devs.gyros import AdisGyroSetIds as AdisGyroSetIds_0_2
|
||||
from eive_tmtc.pus_tc.devs.gyros import L3gGyroSetIds as L3gGyroSetIds_1_3
|
||||
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import SetIds as SyrlinksSetIds
|
||||
from eive_tmtc.pus_tc.devs.gps import SetIds as GpsSetIds
|
||||
from eive_tmtc.tmtc.acs.imtq import ImtqSetIds
|
||||
from eive_tmtc.pus_tc.devs.sus import SetIds
|
||||
from eive_tmtc.pus_tc.system.tcs import OpCode as TcsOpCodes
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxSetId
|
||||
from eive_tmtc.tmtc.core import SetId as CoreSetIds
|
||||
from eive_tmtc.tmtc.power.common_power import SetId as GsSetIds
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import SetId as RadSetIds
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmLis3SetId as MgmLis3SetIds_0_2
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmRm3100SetId as MgmRm3100SetIds_1_3
|
||||
from eive_tmtc.pus_tc.devs.gyros import AdisGyroSetId as AdisGyroSetIds_0_2
|
||||
from eive_tmtc.pus_tc.devs.gyros import L3gGyroSetId as L3gGyroSetIds_1_3
|
||||
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import SetId as SyrlinksSetIds
|
||||
from eive_tmtc.pus_tc.devs.gps import SetId as GpsSetIds
|
||||
from eive_tmtc.tmtc.acs.imtq import ImtqSetId
|
||||
from eive_tmtc.pus_tc.devs.sus import SetId
|
||||
from eive_tmtc.pus_tc.devs.star_tracker import SetIds as StrSetIds
|
||||
from eive_tmtc.tmtc.acs.reaction_wheels import (
|
||||
RwSetIds,
|
||||
RwSetId,
|
||||
rw_speed_up_cmd_consec,
|
||||
rw_speed_down_cmd_consec,
|
||||
)
|
||||
@ -49,7 +49,7 @@ from eive_tmtc.pus_tc.devs.star_tracker import pack_star_tracker_commands
|
||||
from eive_tmtc.tmtc.acs.reaction_wheels import pack_rw_ass_cmds, pack_set_speed_command
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
"""FT: Functional Test"""
|
||||
|
||||
TV_SETUP_TCS_FT_ON = ["s", "tcs-ft-on"]
|
||||
@ -93,34 +93,34 @@ KAI = KeyAndInfo
|
||||
|
||||
PROC_INFO_DICT = {
|
||||
KAI.TV_SETUP_TCS_FT_ON[0]: [
|
||||
OpCodes.TV_SETUP_TCS_FT_ON,
|
||||
OpCode.TV_SETUP_TCS_FT_ON,
|
||||
KAI.TV_SETUP_TCS_FT_ON[1],
|
||||
120.0,
|
||||
10.0,
|
||||
],
|
||||
KAI.TV_TEARDOWN_TCS_FT_OFF[0]: [
|
||||
OpCodes.TV_TEARDOWN_TCS_FT_OFF,
|
||||
OpCode.TV_TEARDOWN_TCS_FT_OFF,
|
||||
KAI.TV_TEARDOWN_TCS_FT_OFF[1],
|
||||
120.0,
|
||||
10.0,
|
||||
],
|
||||
KAI.BAT_FT[0]: [OpCodes.BAT_FT, KAI.BAT_FT[1], 120.0, 10.0],
|
||||
KAI.CORE_FT[0]: [OpCodes.CORE_FT, KAI.CORE_FT[1], 120.0, 10.0],
|
||||
KAI.PCDU_FT[0]: [OpCodes.PCDU_FT, KAI.PCDU_FT[1], 120.0, 10.0],
|
||||
KAI.RAD_SEN_FT[0]: [OpCodes.RAD_SEN_FT, KAI.RAD_SEN_FT[1], 120.0, 10.0],
|
||||
KAI.ACS_FT[0]: [OpCodes.ACS_FT, KAI.ACS_FT[1], 120.0, 10.0],
|
||||
KAI.MGT_FT[0]: [OpCodes.MGT_FT, KAI.MGT_FT[1], 120.0, 10.0],
|
||||
KAI.BAT_FT[0]: [OpCode.BAT_FT, KAI.BAT_FT[1], 120.0, 10.0],
|
||||
KAI.CORE_FT[0]: [OpCode.CORE_FT, KAI.CORE_FT[1], 120.0, 10.0],
|
||||
KAI.PCDU_FT[0]: [OpCode.PCDU_FT, KAI.PCDU_FT[1], 120.0, 10.0],
|
||||
KAI.RAD_SEN_FT[0]: [OpCode.RAD_SEN_FT, KAI.RAD_SEN_FT[1], 120.0, 10.0],
|
||||
KAI.ACS_FT[0]: [OpCode.ACS_FT, KAI.ACS_FT[1], 120.0, 10.0],
|
||||
KAI.MGT_FT[0]: [OpCode.MGT_FT, KAI.MGT_FT[1], 120.0, 10.0],
|
||||
# collection_time for KAI.MGT_FT_DP maybe be reduced as a full 120
|
||||
# seconds is not needed after MGTs are tested
|
||||
KAI.MGT_FT_DP[0]: [OpCodes.MGT_FT_DP, KAI.MGT_FT_DP[1], 10.0, 10.0],
|
||||
KAI.SUS_FT[0]: [OpCodes.SUS_FT, KAI.SUS_FT[1], 120.0, 10.0],
|
||||
KAI.STR_FT[0]: [OpCodes.STR_FT, KAI.STR_FT[1], 120.0, 10.0],
|
||||
KAI.MGT_FT_DP[0]: [OpCode.MGT_FT_DP, KAI.MGT_FT_DP[1], 10.0, 10.0],
|
||||
KAI.SUS_FT[0]: [OpCode.SUS_FT, KAI.SUS_FT[1], 120.0, 10.0],
|
||||
KAI.STR_FT[0]: [OpCode.STR_FT, KAI.STR_FT[1], 120.0, 10.0],
|
||||
# collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120
|
||||
# seconds is not needed after RWs are tested
|
||||
KAI.RW_FT_ONE_RW[0]: [OpCodes.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0],
|
||||
KAI.RW_FT_ONE_RW[0]: [OpCode.RW_FT_ONE_RW, KAI.RW_FT_ONE_RW[1], 10.0, 1.0],
|
||||
# collection_time for KAI.RW_FT_ONE_RW maybe be reduced as a full 120
|
||||
# seconds is not needed after RWs are tested
|
||||
KAI.RW_FT_TWO_RWS[0]: [OpCodes.RW_FT_TWO_RWS, KAI.RW_FT_TWO_RWS[1], 10.0, 1.0],
|
||||
KAI.RW_FT_TWO_RWS[0]: [OpCode.RW_FT_TWO_RWS, KAI.RW_FT_TWO_RWS[1], 10.0, 1.0],
|
||||
}
|
||||
|
||||
|
||||
@ -223,12 +223,12 @@ def pack_generic_hk_listening_cmds(
|
||||
def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
sid_list = []
|
||||
obj_id_dict = get_object_ids()
|
||||
if op_code in OpCodes.RESET_SCHED:
|
||||
if op_code in OpCode.RESET_SCHED:
|
||||
q.add_log_cmd("Resetting/Clearing TC schedule")
|
||||
q.add_pus_tc(generate_reset_tc_sched_cmd())
|
||||
if op_code in OpCodes.BAT_FT:
|
||||
if op_code in OpCode.BAT_FT:
|
||||
key = KAI.BAT_FT[0]
|
||||
sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET))
|
||||
sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetId.GET_HK_SET))
|
||||
diag_list = [False]
|
||||
pack_generic_hk_listening_cmds(
|
||||
q=q,
|
||||
@ -238,7 +238,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
cfg=GenericHkListeningCfg.default(),
|
||||
)
|
||||
|
||||
if op_code in OpCodes.CORE_FT:
|
||||
if op_code in OpCode.CORE_FT:
|
||||
key = KAI.CORE_FT[0]
|
||||
sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK))
|
||||
diag_list = [False]
|
||||
@ -250,7 +250,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
cfg=GenericHkListeningCfg.default(),
|
||||
)
|
||||
|
||||
if op_code in OpCodes.PCDU_FT:
|
||||
if op_code in OpCode.PCDU_FT:
|
||||
key = KAI.PCDU_FT[0]
|
||||
pcdu_pairs = [
|
||||
(oids.P60_DOCK_HANDLER, GsSetIds.CORE),
|
||||
@ -286,7 +286,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
cfg=GenericHkListeningCfg.default(),
|
||||
)
|
||||
|
||||
if op_code in OpCodes.RAD_SEN_FT:
|
||||
if op_code in OpCode.RAD_SEN_FT:
|
||||
key = KAI.RAD_SEN_FT[0]
|
||||
sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.HK))
|
||||
diag_list = [False]
|
||||
@ -298,18 +298,18 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
cfg=GenericHkListeningCfg.default(),
|
||||
)
|
||||
|
||||
if op_code in OpCodes.TV_SETUP_TCS_FT_ON:
|
||||
if op_code in OpCode.TV_SETUP_TCS_FT_ON:
|
||||
# Enable scheduling
|
||||
q.add_pus_tc(generate_enable_tc_sched_cmd())
|
||||
# check whether tcs_assembly also has to be commanded to NORMAL Mode
|
||||
pack_tcs_sys_commands(q=q, op_code=TcsOpCodes.TCS_BOARD_ASS_NORMAL[0])
|
||||
pack_cmd_ctrl_to_nml(q=q, object_id=obj_id_dict.get(oids.THERMAL_CONTROLLER_ID))
|
||||
|
||||
if op_code in OpCodes.TV_TEARDOWN_TCS_FT_OFF:
|
||||
if op_code in OpCode.TV_TEARDOWN_TCS_FT_OFF:
|
||||
# TCS board should always be on anyway, do not command it off here
|
||||
pack_cmd_ctrl_to_off(q=q, object_id=obj_id_dict.get(oids.THERMAL_CONTROLLER_ID))
|
||||
|
||||
if op_code in OpCodes.ACS_FT:
|
||||
if op_code in OpCode.ACS_FT:
|
||||
key = KAI.ACS_FT[0]
|
||||
a_side_pairs = [
|
||||
(oids.MGM_0_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK),
|
||||
@ -392,12 +392,12 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
pack_acs_command(q=q, op_code="acs-off")
|
||||
|
||||
if op_code in OpCodes.MGT_FT:
|
||||
if op_code in OpCode.MGT_FT:
|
||||
key = KAI.MGT_FT[0]
|
||||
imtq_pairs = [
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_SET),
|
||||
]
|
||||
diag_list = [
|
||||
True,
|
||||
@ -425,7 +425,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="0")
|
||||
|
||||
if op_code in OpCodes.MGT_FT_DP:
|
||||
if op_code in OpCode.MGT_FT_DP:
|
||||
key = KAI.MGT_FT_DP[0]
|
||||
a_side_pairs = [
|
||||
(oids.MGM_0_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK),
|
||||
@ -442,9 +442,9 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
(oids.GPS_CONTROLLER, GpsSetIds.HK),
|
||||
]
|
||||
imtq_pairs = [
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.ENG_HK_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.CAL_MTM_SET),
|
||||
(oids.IMTQ_HANDLER_ID, ImtqSetId.RAW_MTM_SET),
|
||||
]
|
||||
d_side_and_imtq_pairs = a_side_pairs + b_side_pairs + imtq_pairs
|
||||
diag_list = [
|
||||
@ -487,7 +487,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, q=q, op_code="0")
|
||||
pack_acs_command(q=q, op_code="acs-off")
|
||||
|
||||
if op_code in OpCodes.SUS_FT:
|
||||
if op_code in OpCode.SUS_FT:
|
||||
key = KAI.SUS_FT[0]
|
||||
|
||||
pack_sus_cmds(q=q, op_code="sus-nom")
|
||||
@ -519,7 +519,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
# SUSs
|
||||
for nom_sus in sus_n_ids:
|
||||
sid_list.append(make_sid(nom_sus, SetIds.HK))
|
||||
sid_list.append(make_sid(nom_sus, SetId.HK))
|
||||
pack_generic_hk_listening_cmds(
|
||||
q=q,
|
||||
proc_key=key,
|
||||
@ -543,7 +543,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
# SUSs
|
||||
for red_sus in sus_r_ids:
|
||||
sid_list.append(make_sid(red_sus, SetIds.HK))
|
||||
sid_list.append(make_sid(red_sus, SetId.HK))
|
||||
pack_generic_hk_listening_cmds(
|
||||
q=q,
|
||||
proc_key=key,
|
||||
@ -558,9 +558,9 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
# SUSs
|
||||
for nom_sus in sus_n_ids:
|
||||
sid_list.append(make_sid(nom_sus, SetIds.HK))
|
||||
sid_list.append(make_sid(nom_sus, SetId.HK))
|
||||
for red_sus in sus_r_ids:
|
||||
sid_list.append(make_sid(red_sus, SetIds.HK))
|
||||
sid_list.append(make_sid(red_sus, SetId.HK))
|
||||
diag_list = [
|
||||
True,
|
||||
True,
|
||||
@ -585,7 +585,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
pack_acs_command(q=q, op_code="sus-off")
|
||||
|
||||
if op_code in OpCodes.SYRLINKS_FT:
|
||||
if op_code in OpCode.SYRLINKS_FT:
|
||||
key = KAI.SYRLINKS_FT[0]
|
||||
sid_list = [
|
||||
make_sid(oids.SYRLINKS_HANDLER_ID, SyrlinksSetIds.RX_REGISTERS_DATASET),
|
||||
@ -599,7 +599,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
diag_list=[False],
|
||||
cfg=GenericHkListeningCfg.default(),
|
||||
)
|
||||
if op_code in OpCodes.STR_FT:
|
||||
if op_code in OpCode.STR_FT:
|
||||
key = KAI.STR_FT[0]
|
||||
|
||||
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, op_code="2")
|
||||
@ -617,21 +617,21 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
|
||||
pack_star_tracker_commands(object_id=oids.STAR_TRACKER_ID, q=q, op_code="3")
|
||||
|
||||
if op_code in OpCodes.RW_FT_ONE_RW:
|
||||
if op_code in OpCode.RW_FT_ONE_RW:
|
||||
key = KAI.RW_FT_ONE_RW[0]
|
||||
rw_pairs = [
|
||||
(oids.RW1_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW1_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW1_ID, RwSetIds.TM_SET),
|
||||
(oids.RW2_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW2_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW2_ID, RwSetIds.TM_SET),
|
||||
(oids.RW3_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW3_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW3_ID, RwSetIds.TM_SET),
|
||||
(oids.RW4_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW4_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW4_ID, RwSetIds.TM_SET),
|
||||
(oids.RW1_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW1_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW1_ID, RwSetId.TM_SET),
|
||||
(oids.RW2_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW2_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW2_ID, RwSetId.TM_SET),
|
||||
(oids.RW3_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW3_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW3_ID, RwSetId.TM_SET),
|
||||
(oids.RW4_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW4_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW4_ID, RwSetId.TM_SET),
|
||||
]
|
||||
diag_list = [
|
||||
True,
|
||||
@ -666,25 +666,25 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, q=q, op_code="off")
|
||||
|
||||
# ass command with 2 rws to speed
|
||||
if op_code in OpCodes.RW_FT_TWO_RWS:
|
||||
if op_code in OpCode.RW_FT_TWO_RWS:
|
||||
key = KAI.RW_FT_TWO_RWS[0]
|
||||
rw_pairs = [
|
||||
(oids.RW1_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW1_ID, RwSetIds.TEMPERATURE_SET_ID),
|
||||
(oids.RW1_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW1_ID, RwSetIds.TM_SET),
|
||||
(oids.RW2_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW2_ID, RwSetIds.TEMPERATURE_SET_ID),
|
||||
(oids.RW2_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW2_ID, RwSetIds.TM_SET),
|
||||
(oids.RW3_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW3_ID, RwSetIds.TEMPERATURE_SET_ID),
|
||||
(oids.RW3_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW3_ID, RwSetIds.TM_SET),
|
||||
(oids.RW4_ID, RwSetIds.STATUS_SET_ID),
|
||||
(oids.RW4_ID, RwSetIds.TEMPERATURE_SET_ID),
|
||||
(oids.RW4_ID, RwSetIds.LAST_RESET),
|
||||
(oids.RW4_ID, RwSetIds.TM_SET),
|
||||
(oids.RW1_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW1_ID, RwSetId.TEMPERATURE_SET_ID),
|
||||
(oids.RW1_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW1_ID, RwSetId.TM_SET),
|
||||
(oids.RW2_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW2_ID, RwSetId.TEMPERATURE_SET_ID),
|
||||
(oids.RW2_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW2_ID, RwSetId.TM_SET),
|
||||
(oids.RW3_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW3_ID, RwSetId.TEMPERATURE_SET_ID),
|
||||
(oids.RW3_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW3_ID, RwSetId.TM_SET),
|
||||
(oids.RW4_ID, RwSetId.STATUS_SET_ID),
|
||||
(oids.RW4_ID, RwSetId.TEMPERATURE_SET_ID),
|
||||
(oids.RW4_ID, RwSetId.LAST_RESET),
|
||||
(oids.RW4_ID, RwSetId.TM_SET),
|
||||
]
|
||||
diag_list = [
|
||||
False,
|
||||
|
@ -14,7 +14,7 @@ from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
|
||||
from eive_tmtc.config.object_ids import TCS_BOARD_ASS_ID, TCS_CONTROLLER
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
TCS_BOARD_ASS_NORMAL = ["0", "normal"]
|
||||
TCS_BOARD_ASS_OFF = ["1", "off"]
|
||||
REQUEST_SENSOR_TEMP_SET = ["2", "temps"]
|
||||
@ -26,7 +26,7 @@ class Info:
|
||||
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
class SetId(enum.IntEnum):
|
||||
PRIMARY_SENSORS = 0
|
||||
DEVICE_SENSORS = 1
|
||||
SUS_TEMP_SENSORS = 2
|
||||
@ -36,14 +36,14 @@ class SetIds(enum.IntEnum):
|
||||
def add_tcs_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(
|
||||
keys=OpCodes.TCS_BOARD_ASS_NORMAL,
|
||||
keys=OpCode.TCS_BOARD_ASS_NORMAL,
|
||||
info=Info.TCS_BOARD_ASS_NORMAL,
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.TCS_BOARD_ASS_OFF,
|
||||
keys=OpCode.TCS_BOARD_ASS_OFF,
|
||||
info=Info.TCS_BOARD_ASS_OFF,
|
||||
)
|
||||
oce.add(keys=OpCodes.REQUEST_SENSOR_TEMP_SET, info=Info.REQUEST_SENSOR_TEMP_SET)
|
||||
oce.add(keys=OpCode.REQUEST_SENSOR_TEMP_SET, info=Info.REQUEST_SENSOR_TEMP_SET)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.TCS.value,
|
||||
info="TCS Board Assembly",
|
||||
@ -52,15 +52,15 @@ def add_tcs_cmds(defs: TmtcDefinitionWrapper):
|
||||
|
||||
|
||||
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCodes.REQUEST_SENSOR_TEMP_SET:
|
||||
sensor_set_sid = make_sid(TCS_CONTROLLER, SetIds.PRIMARY_SENSORS)
|
||||
if op_code in OpCode.REQUEST_SENSOR_TEMP_SET:
|
||||
sensor_set_sid = make_sid(TCS_CONTROLLER, SetId.PRIMARY_SENSORS)
|
||||
q.add_log_cmd(Info.REQUEST_SENSOR_TEMP_SET)
|
||||
q.add_pus_tc(generate_one_hk_command(sensor_set_sid))
|
||||
pack_tcs_ass_cmds(q, op_code)
|
||||
|
||||
|
||||
def pack_tcs_ass_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
||||
if op_code in OpCode.TCS_BOARD_ASS_NORMAL:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=TCS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
@ -68,7 +68,7 @@ def pack_tcs_ass_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
q=q,
|
||||
info=Info.TCS_BOARD_ASS_NORMAL,
|
||||
)
|
||||
if op_code in OpCodes.TCS_BOARD_ASS_OFF:
|
||||
if op_code in OpCode.TCS_BOARD_ASS_OFF:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=TCS_BOARD_ASS_ID,
|
||||
mode=Modes.OFF,
|
||||
|
@ -11,7 +11,7 @@ from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
SET_CURRENT_TIME = ["0", "set-curr-time"]
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import struct
|
||||
from eive_tmtc.config.object_ids import *
|
||||
from eive_tmtc.tmtc.acs.imtq import ImtqActionIds
|
||||
from eive_tmtc.tmtc.acs.imtq import ImtqActionId
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.tmtc.payload.ploc_mpsoc import PlocReplyIds
|
||||
from eive_tmtc.tmtc.payload.ploc_supervisor import SupvActionIds
|
||||
from eive_tmtc.pus_tc.devs.star_tracker import StarTrackerActionIds
|
||||
from eive_tmtc.tmtc.payload.ploc_supervisor import SupvActionId
|
||||
from eive_tmtc.pus_tc.devs.star_tracker import StarTrackerActionId
|
||||
from eive_tmtc.tmtc.power.tm import handle_get_param_data_reply
|
||||
from tmtccmd.logging import get_console_logger
|
||||
from tmtccmd.tm import Service8FsfwTm
|
||||
@ -52,7 +52,7 @@ def handle_action_reply(
|
||||
def handle_imtq_replies(
|
||||
action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray
|
||||
):
|
||||
if action_id == struct.unpack("!I", ImtqActionIds.get_commanded_dipole)[0]:
|
||||
if action_id == struct.unpack("!I", ImtqActionId.get_commanded_dipole)[0]:
|
||||
header_list = [
|
||||
"Commanded X-Dipole",
|
||||
"Commanded Y-Dipole",
|
||||
@ -99,14 +99,14 @@ def handle_ploc_replies(
|
||||
def handle_supervisor_replies(
|
||||
action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray
|
||||
):
|
||||
if action_id == SupvActionIds.DUMP_MRAM:
|
||||
if action_id == SupvActionId.DUMP_MRAM:
|
||||
header_list = ["MRAM Dump"]
|
||||
content_list = [custom_data[: len(custom_data)]]
|
||||
print(header_list)
|
||||
print(content_list)
|
||||
printer.file_logger.info(header_list)
|
||||
printer.file_logger.info(content_list)
|
||||
elif action_id == SupvActionIds.READ_GPIO:
|
||||
elif action_id == SupvActionId.READ_GPIO:
|
||||
header_list = ["GPIO state"]
|
||||
content_list = [struct.unpack("!H", custom_data[:2])[0]]
|
||||
print(header_list)
|
||||
@ -118,7 +118,7 @@ def handle_supervisor_replies(
|
||||
def handle_startracker_replies(
|
||||
action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray
|
||||
):
|
||||
if action_id == StarTrackerActionIds.CHECKSUM:
|
||||
if action_id == StarTrackerActionId.CHECKSUM:
|
||||
if len(custom_data) != 5:
|
||||
LOGGER.warning(
|
||||
"Star tracker reply has invalid length {0}".format(len(custom_data))
|
||||
|
@ -1,13 +1,27 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxSetIds
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxSetId
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
HEADER_LIST = [
|
||||
"Charge Current",
|
||||
"Discharge Current",
|
||||
"Heater Current",
|
||||
"Battery Voltage",
|
||||
"Batt Temp 1",
|
||||
"Batt Temp 2",
|
||||
"Batt Temp 3",
|
||||
"Batt Temp 4",
|
||||
"Reboot Counter",
|
||||
"Boot Cause",
|
||||
]
|
||||
|
||||
|
||||
def handle_bpx_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
if set_id == BpxSetIds.GET_HK_SET:
|
||||
if set_id == BpxSetId.GET_HK_SET:
|
||||
fmt_str = "!HHHHhhhhIB"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(
|
||||
@ -22,18 +36,6 @@ def handle_bpx_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
reboot_cntr,
|
||||
boot_cause,
|
||||
) = struct.unpack(fmt_str, hk_data[0:inc_len])
|
||||
header_list = [
|
||||
"Charge Current",
|
||||
"Discharge Current",
|
||||
"Heater Current",
|
||||
"Battery Voltage",
|
||||
"Batt Temp 1",
|
||||
"Batt Temp 2",
|
||||
"Batt Temp 3",
|
||||
"Batt Temp 4",
|
||||
"Reboot Counter",
|
||||
"Boot Cause",
|
||||
]
|
||||
content_list = [
|
||||
charge_current,
|
||||
discharge_current,
|
||||
@ -47,10 +49,10 @@ def handle_bpx_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
boot_cause,
|
||||
]
|
||||
validity_buffer = hk_data[inc_len:]
|
||||
pw.dlog(str(header_list))
|
||||
pw.dlog(str(HEADER_LIST))
|
||||
pw.dlog(str(content_list))
|
||||
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=10)
|
||||
elif set_id == BpxSetIds.GET_CFG_SET:
|
||||
elif set_id == BpxSetId.GET_CFG_SET:
|
||||
battheat_mode = hk_data[0]
|
||||
battheat_low = struct.unpack("!b", hk_data[1:2])[0]
|
||||
battheat_high = struct.unpack("!b", hk_data[2:3])[0]
|
||||
|
@ -4,7 +4,7 @@ from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
from eive_tmtc.pus_tc.devs.gyros import L3gGyroSetIds, AdisGyroSetIds
|
||||
from eive_tmtc.pus_tc.devs.gyros import L3gGyroSetId, AdisGyroSetId
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ def handle_gyros_hk_data(
|
||||
def handle_adis_gyro_hk(
|
||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||
):
|
||||
if set_id == AdisGyroSetIds.CORE_HK:
|
||||
if set_id == AdisGyroSetId.CORE_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!ddddddf"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
@ -44,7 +44,7 @@ def handle_adis_gyro_hk(
|
||||
)
|
||||
pw.dlog(f"Acceleration (m/s^2): X {accelX} | Y {accelY} | Z {accelZ}")
|
||||
pw.dlog(f"Temperature {temp} C")
|
||||
if set_id == AdisGyroSetIds.CFG_HK:
|
||||
if set_id == AdisGyroSetId.CFG_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!HBHH"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
@ -60,7 +60,7 @@ def handle_adis_gyro_hk(
|
||||
def handle_l3g_gyro_hk(
|
||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||
):
|
||||
if set_id == L3gGyroSetIds.CORE_HK:
|
||||
if set_id == L3gGyroSetId.CORE_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!ffff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmRm3100SetIds, MgmLis3SetIds
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmRm3100SetId, MgmLis3SetId
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
@ -26,7 +26,7 @@ def handle_mgm_hk_data(
|
||||
def handle_mgm_lis3_hk_data(
|
||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||
):
|
||||
if set_id == MgmLis3SetIds.CORE_HK:
|
||||
if set_id == MgmLis3SetId.CORE_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!ffff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
@ -43,7 +43,7 @@ def handle_mgm_lis3_hk_data(
|
||||
def handle_mgm_rm3100_hk_data(
|
||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||
):
|
||||
if set_id == MgmRm3100SetIds.CORE_HK:
|
||||
if set_id == MgmRm3100SetId.CORE_HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = f"!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
|
@ -2,7 +2,7 @@ import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tc.devs.plpcdu import SetIds
|
||||
from eive_tmtc.pus_tc.devs.plpcdu import SetId
|
||||
|
||||
|
||||
ADC_CHANNELS_NAMED = [
|
||||
@ -22,7 +22,7 @@ ADC_CHANNELS_NAMED = [
|
||||
|
||||
|
||||
def handle_plpcdu_hk(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.ADC:
|
||||
if set_id == SetId.ADC:
|
||||
pw = PrintWrapper(printer)
|
||||
current_idx = 0
|
||||
pw.dlog("Received PL PCDU ADC HK data")
|
||||
|
@ -2,11 +2,11 @@ import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import SetIds
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import SetId
|
||||
|
||||
|
||||
def handle_rad_sensor_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.HK:
|
||||
if set_id == SetId.HK:
|
||||
pw = PrintWrapper(printer)
|
||||
current_idx = 0
|
||||
pw.dlog("Received Radiation Sensor HK data")
|
||||
|
@ -1,7 +1,7 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tc.devs.sus import SetIds
|
||||
from eive_tmtc.pus_tc.devs.sus import SetId
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
@ -11,7 +11,7 @@ def handle_sus_hk(
|
||||
):
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog(f"Received SUS HK data from {object_id}")
|
||||
if set_id == SetIds.HK:
|
||||
if set_id == SetId.HK:
|
||||
current_idx = 0
|
||||
temperature = struct.unpack("!f", hk_data[current_idx : current_idx + 4])[0]
|
||||
current_idx += 4
|
||||
|
@ -1,14 +1,14 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import SetIds
|
||||
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import SetId
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
def handle_syrlinks_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.RX_REGISTERS_DATASET:
|
||||
if set_id == SetId.RX_REGISTERS_DATASET:
|
||||
return handle_syrlinks_rx_registers_dataset(printer, hk_data)
|
||||
elif set_id == SetIds.TX_REGISTERS_DATASET:
|
||||
elif set_id == SetId.TX_REGISTERS_DATASET:
|
||||
return handle_syrlinks_tx_registers_dataset(printer, hk_data)
|
||||
else:
|
||||
pw = PrintWrapper(printer)
|
||||
|
@ -4,7 +4,7 @@ from eive_tmtc.config.events import get_event_dict
|
||||
from eive_tmtc.config.object_ids import get_object_ids
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
|
||||
from eive_tmtc.tmtc.acs.acs_subsystem import AcsModes
|
||||
from eive_tmtc.tmtc.acs.acs_subsystem import AcsMode
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||
|
||||
from tmtccmd.tm import Service5Tm
|
||||
@ -57,13 +57,13 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||
if obj_name == "ACS_SUBSYSTEM":
|
||||
if tm.param_1 == Modes.OFF:
|
||||
mode_name = "Off"
|
||||
elif tm.param_1 == AcsModes.IDLE:
|
||||
elif tm.param_1 == AcsMode.IDLE:
|
||||
mode_name = "Idle"
|
||||
elif tm.param_1 == AcsModes.DETUMBLE:
|
||||
elif tm.param_1 == AcsMode.DETUMBLE:
|
||||
mode_name = "Detumble"
|
||||
elif tm.param_1 == AcsModes.SAFE:
|
||||
elif tm.param_1 == AcsMode.SAFE:
|
||||
mode_name = "Safe"
|
||||
elif tm.param_1 == AcsModes.TARGET_PT:
|
||||
elif tm.param_1 == AcsMode.TARGET_PT:
|
||||
mode_name = "Target Pointing"
|
||||
else:
|
||||
if tm.param_1 == Modes.OFF:
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""HK Handling for EIVE OBSW"""
|
||||
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
|
||||
from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_mgm_data
|
||||
from eive_tmtc.tmtc.acs.acs_ctrl import handle_raw_mgm_data, handle_acs_ctrl_hk_data
|
||||
from eive_tmtc.pus_tm.devs.plpcdu import handle_plpcdu_hk
|
||||
from eive_tmtc.pus_tm.devs.rad_sensor import handle_rad_sensor_data
|
||||
from eive_tmtc.pus_tm.devs.sus import handle_sus_hk
|
||||
@ -25,14 +25,14 @@ from eive_tmtc.tmtc.power.tm import (
|
||||
)
|
||||
from eive_tmtc.pus_tm.devs.syrlinks import handle_syrlinks_hk_data
|
||||
from eive_tmtc.tmtc.acs.imtq import (
|
||||
ImtqSetIds,
|
||||
ImtqSetId,
|
||||
handle_self_test_data,
|
||||
handle_eng_set,
|
||||
handle_calibrated_mtm_measurement,
|
||||
handle_raw_mtm_measurement,
|
||||
)
|
||||
from eive_tmtc.pus_tm.defs import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tm.system.core import handle_core_hk_data
|
||||
from eive_tmtc.tmtc.core import handle_core_hk_data
|
||||
from eive_tmtc.pus_tm.devs.mgms import handle_mgm_hk_data
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
|
||||
@ -95,15 +95,15 @@ def handle_regular_hk_print(
|
||||
elif objb == obj_ids.SYRLINKS_HANDLER_ID:
|
||||
handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.IMTQ_HANDLER_ID:
|
||||
if (set_id >= ImtqSetIds.POSITIVE_X_TEST) and (
|
||||
set_id <= ImtqSetIds.NEGATIVE_Z_TEST
|
||||
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 == ImtqSetIds.ENG_HK_SET:
|
||||
elif set_id == ImtqSetId.ENG_HK_SET:
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetIds.CAL_MTM_SET:
|
||||
elif set_id == ImtqSetId.CAL_MTM_SET:
|
||||
return handle_calibrated_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetIds.RAW_MTM_SET:
|
||||
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")
|
||||
@ -175,7 +175,7 @@ def handle_regular_hk_print(
|
||||
elif objb == obj_ids.PLOC_SUPV_ID:
|
||||
handle_supv_hk_data(set_id=set_id, hk_data=hk_data, printer=printer)
|
||||
elif objb == obj_ids.ACS_CONTROLLER:
|
||||
handle_acs_ctrl_mgm_data(printer, hk_data)
|
||||
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} "
|
||||
|
@ -1,21 +0,0 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tc.system.core import SetIds
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
def handle_core_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(temperature, ps_voltage, pl_voltage) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
printout = (
|
||||
f"Chip Temperature [°C] {temperature} | PS Voltage [mV] {ps_voltage} | "
|
||||
f"PL Voltage [mV] {pl_voltage}"
|
||||
)
|
||||
pw.dlog(printout)
|
||||
printer.print_validity_buffer(validity_buffer=hk_data[inc_len:], num_vars=3)
|
@ -7,7 +7,7 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
class SetId(enum.IntEnum):
|
||||
SENSOR_TEMPERATURE_SET = 0
|
||||
DEVICE_TEMPERATURE_SET = 1
|
||||
SUS_TEMPERATURE_SET = 2
|
||||
@ -23,12 +23,12 @@ def handle_thermal_controller_hk_data(
|
||||
if TCP_TEMP_DEV_SERVER:
|
||||
TCP_TEMP_DEV_SERVER = TmTcpServer("localhost", 7306)
|
||||
"""
|
||||
if set_id == SetIds.SENSOR_TEMPERATURE_SET:
|
||||
if set_id == SetId.SENSOR_TEMPERATURE_SET:
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog("Received sensor temperature data")
|
||||
|
||||
# get all the floats
|
||||
tm_data = struct.unpack("!ffffffffffffffffff", hk_data[: 18 * 4])
|
||||
tm_data = struct.unpack("!fffffffffffffffffffff", hk_data[: 21 * 4])
|
||||
parsed_data = {
|
||||
"SENSOR_PLOC_HEATSPREADER": tm_data[0],
|
||||
"SENSOR_PLOC_MISSIONBOARD": tm_data[1],
|
||||
@ -46,8 +46,11 @@ def handle_thermal_controller_hk_data(
|
||||
"SENSOR_PLPCDU_HEATSPREADER": tm_data[13],
|
||||
"SENSOR_TCS_BOARD": tm_data[14],
|
||||
"SENSOR_MAGNETTORQUER": tm_data[15],
|
||||
"TMP1075 1": tm_data[16],
|
||||
"TMP1075 2": tm_data[17],
|
||||
"TMP1075 TCS 0": tm_data[16],
|
||||
"TMP1075 TCS 1": tm_data[17],
|
||||
"TMP1075 PL PCDU 0": tm_data[18],
|
||||
"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)
|
||||
@ -55,7 +58,7 @@ def handle_thermal_controller_hk_data(
|
||||
# tcp_server_sensor_temperatures.report_parsed_hk_data(
|
||||
# object_id, set_id, parsed_data
|
||||
# )
|
||||
elif set_id == SetIds.DEVICE_TEMPERATURE_SET:
|
||||
elif set_id == SetId.DEVICE_TEMPERATURE_SET:
|
||||
pw = PrintWrapper(printer)
|
||||
pw.dlog("Received device temperature data")
|
||||
fmt_str = "!fhhhhiiiifffhffffffffffffff"
|
||||
@ -96,7 +99,7 @@ def handle_thermal_controller_hk_data(
|
||||
# tcp_server_device_temperatures.report_parsed_hk_data(
|
||||
# object_id, set_id, parsed_data
|
||||
# )
|
||||
elif set_id == SetIds.SUS_TEMPERATURE_SET:
|
||||
elif set_id == SetId.SUS_TEMPERATURE_SET:
|
||||
pass
|
||||
# pw = PrintWrapper(printer)
|
||||
# pw.dlog("Received SUS temperature data")
|
||||
|
@ -24,7 +24,7 @@ class AcsOpCodes:
|
||||
ACS_ASS_DUAL_ON = ["6", "do"]
|
||||
|
||||
|
||||
class DualSideSubmodes(enum.IntEnum):
|
||||
class DualSideSubmode(enum.IntEnum):
|
||||
A_SIDE = 0
|
||||
B_SIDE = 1
|
||||
DUAL_SIDE = 2
|
||||
@ -35,7 +35,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
submode=DualSideSubmode.A_SIDE,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly A side",
|
||||
)
|
||||
@ -43,7 +43,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
submode=DualSideSubmode.B_SIDE,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly B side",
|
||||
)
|
||||
@ -51,7 +51,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.DUAL_SIDE,
|
||||
submode=DualSideSubmode.DUAL_SIDE,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly dual mode",
|
||||
)
|
||||
@ -59,7 +59,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
submode=DualSideSubmode.A_SIDE,
|
||||
q=q,
|
||||
info="Switching ACS board assembly A side on",
|
||||
)
|
||||
@ -67,7 +67,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
submode=DualSideSubmode.B_SIDE,
|
||||
q=q,
|
||||
info="Switching ACS board assembly B side on",
|
||||
)
|
||||
@ -75,7 +75,7 @@ def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
submode=DualSideSubmode.B_SIDE,
|
||||
q=q,
|
||||
info="Switching ACS board assembly dual side on",
|
||||
)
|
||||
|
@ -13,6 +13,7 @@ from tmtccmd.config.tmtc import (
|
||||
TmtcDefinitionWrapper,
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.tc.pus_20_params import pack_scalar_boolean_parameter_app_data
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
@ -23,23 +24,87 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
)
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
MGM_SET = 0
|
||||
class SetId(enum.IntEnum):
|
||||
MGM_RAW_SET = 0
|
||||
MGM_PROC_SET = 1
|
||||
SUS_RAW_SET = 2
|
||||
SUS_PROC_SET = 3
|
||||
GYR_RAW_SET = 4
|
||||
GYR_PROC_SET = 5
|
||||
GPS_PROC_SET = 6
|
||||
MEKF_DATA = 7
|
||||
CTRL_VAL_DATA = 8
|
||||
ACTUATOR_CMD_DATA = 9
|
||||
|
||||
|
||||
class OpCodes:
|
||||
REQUEST_MGM_HK = ["0", "req-mgm-hk"]
|
||||
ENABLE_MGM_HK = ["1", "enable-mgm-hk"]
|
||||
DISABLE_MGM_HK = ["1", "disable-mgm-hk"]
|
||||
REQUEST_RAW_MGM_HK = ["0", "mgm_raw_hk"]
|
||||
ENABLE_RAW_MGM_HK = ["1", "enable_mgm_raw_hk"]
|
||||
DISABLE_RAW_MGM_HK = ["2", "disable_mgm_raw_hk"]
|
||||
REQUEST_PROC_MGM_HK = ["3", "mgm_proc_hk"]
|
||||
ENABLE_PROC_MGM_HK = ["4", "enable_mgm_proc_hk"]
|
||||
DISABLE_PROC_MGM_HK = ["5", "disable_mgm_proc_hk"]
|
||||
REQUEST_RAW_SUS_HK = ["6", "sus_raw_hk"]
|
||||
ENABLE_RAW_SUS_HK = ["7", "enable_sus_raw_hk"]
|
||||
DISABLE_RAW_SUS_HK = ["8", "disable_sus_raw_hk"]
|
||||
REQUEST_PROC_SUS_HK = ["9", "sus_proc_hk"]
|
||||
ENABLE_PROC_SUS_HK = ["10", "enable_sus_proc_hk"]
|
||||
DISABLE_PROC_SUS_HK = ["11", "disable_sus_proc_hk"]
|
||||
REQUEST_RAW_GYR_HK = ["12", "gyr_raw_hk"]
|
||||
ENABLE_RAW_GYR_HK = ["13", "enable_gyr_raw_hk"]
|
||||
DISABLE_RAW_GYR_HK = ["14", "disable_gyr_raw_hk"]
|
||||
REQUEST_PROC_GYR_HK = ["15", "gyr_proc_hk"]
|
||||
ENABLE_PROC_GYR_HK = ["16", "enable_gyr_proc_hk"]
|
||||
DISABLE_PROC_GYR_HK = ["17", "disable_gyr_proc_hk"]
|
||||
REQUEST_PROC_GPS_HK = ["18", "gps_proc_hk"]
|
||||
ENABLE_PROC_GPS_HK = ["19", "enable_gps_proc_hk"]
|
||||
DISABLE_PROC_GPS_HK = ["20", "disable_gps_proc_hk"]
|
||||
REQUEST_MEKF_HK = ["21", "mekf_hk"]
|
||||
ENABLE_MEKF_HK = ["22", "enable_mekf_hk"]
|
||||
DISABLE_MEKF_HK = ["23", "disable_mekf_hk"]
|
||||
REQUEST_CTRL_VAL_HK = ["24", "ctrl_val_hk"]
|
||||
ENABLE_CTRL_VAL_HK = ["25", "enable_ctrl_val_hk"]
|
||||
DISABLE_CTRL_VAL_HK = ["26", "disable_ctrl_val_hk"]
|
||||
REQUEST_ACT_CMD_HK = ["27", "act_cmd_hk"]
|
||||
ENABLE_ACT_CMD_HK = ["28", "enable act_cmd_hk"]
|
||||
DISABLE_ACT_CMD_HK = ["29", "disable act_cmd_hk"]
|
||||
|
||||
|
||||
class Info:
|
||||
REQUEST_MGM_HK = "Request MGM HK once"
|
||||
ENABLE_MGM_HK = "Enable MGM HK data generation"
|
||||
DISABLE_MGM_HK = "Disable MGM HK data generation"
|
||||
REQUEST_RAW_MGM_HK = "Request Raw MGM HK once"
|
||||
ENABLE_RAW_MGM_HK = "Enable Raw MGM HK data generation"
|
||||
DISABLE_RAW_MGM_HK = "Disable Raw MGM HK data generation"
|
||||
REQUEST_PROC_MGM_HK = "Request Processed MGM HK"
|
||||
ENABLE_PROC_MGM_HK = "Enable Processed MGM HK data generation"
|
||||
DISABLE_PROC_MGM_HK = "Disable Processed MGM HK data generation"
|
||||
REQUEST_RAW_SUS_HK = "Request Raw SUS HK"
|
||||
ENABLE_RAW_SUS_HK = "Enable Raw SUS HK data generation"
|
||||
DISABLE_RAW_SUS_HK = "Disable Raw SUS HK data generation"
|
||||
REQUEST_PROC_SUS_HK = "Request Processed SUS HK"
|
||||
ENABLE_PROC_SUS_HK = "Enable Processed SUS HK data generation"
|
||||
DISABLE_PROC_SUS_HK = "Disable Processed MGM HK data generation"
|
||||
REQUEST_RAW_GYR_HK = "Request Raw GYR HK"
|
||||
ENABLE_RAW_GYR_HK = "Enable Raw GYR HK data generation"
|
||||
DISABLE_RAW_GYR_HK = "Disable Raw GYR HK data generation"
|
||||
REQUEST_PROC_GYR_HK = "Request Processed GYR HK"
|
||||
ENABLE_PROC_GYR_HK = "Enable Processed GYR HK data generation"
|
||||
DISABLE_PROC_GYR_HK = "Disable Processed GYR HK data generation"
|
||||
REQUEST_PROC_GPS_HK = "Request Processed GPS HK"
|
||||
ENABLE_PROC_GPS_HK = "Enable Processed GPS HK data generation"
|
||||
DISABLE_PROC_GPS_HK = "Disable Processed GPS HK data generation"
|
||||
REQUEST_MEKF_HK = "Request MEKF HK"
|
||||
ENABLE_MEKF_HK = "Enable MEKF HK data generation"
|
||||
DISABLE_MEKF_HK = "Disable MEKF HK data generation"
|
||||
REQUEST_CTRL_VAL_HK = "Request Control Values HK"
|
||||
ENABLE_CTRL_VAL_HK = "Enable Control Values HK data generation"
|
||||
DISABLE_CTRL_VAL_HK = "Disable Control Values HK data generation"
|
||||
REQUEST_ACT_CMD_HK = "Request Actuator Commands HK"
|
||||
ENABLE_ACT_CMD_HK = "Enable Actuator Commands HK data generation"
|
||||
DISABLE_ACT_CMD_HK = "Disable Actuator Commands HK data generation"
|
||||
|
||||
|
||||
PERFORM_MGM_CALIBRATION = False
|
||||
@ -57,9 +122,36 @@ if PERFORM_MGM_CALIBRATION:
|
||||
@tmtc_definitions_provider
|
||||
def acs_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.REQUEST_MGM_HK, info=Info.REQUEST_MGM_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_MGM_HK, info=Info.ENABLE_MGM_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_MGM_HK, info=Info.DISABLE_MGM_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_RAW_MGM_HK, info=Info.REQUEST_RAW_MGM_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_RAW_MGM_HK, info=Info.ENABLE_RAW_MGM_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_RAW_MGM_HK, info=Info.DISABLE_RAW_MGM_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_PROC_MGM_HK, info=Info.REQUEST_PROC_MGM_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_PROC_MGM_HK, info=Info.ENABLE_PROC_MGM_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_PROC_MGM_HK, info=Info.DISABLE_PROC_MGM_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_RAW_SUS_HK, info=Info.REQUEST_RAW_SUS_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_RAW_SUS_HK, info=Info.ENABLE_RAW_SUS_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_RAW_SUS_HK, info=Info.DISABLE_RAW_SUS_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_PROC_SUS_HK, info=Info.REQUEST_PROC_SUS_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_PROC_SUS_HK, info=Info.ENABLE_PROC_SUS_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_PROC_SUS_HK, info=Info.DISABLE_PROC_SUS_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_RAW_GYR_HK, info=Info.REQUEST_RAW_GYR_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_RAW_GYR_HK, info=Info.ENABLE_RAW_GYR_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_RAW_GYR_HK, info=Info.DISABLE_RAW_GYR_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_PROC_GYR_HK, info=Info.REQUEST_PROC_GYR_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_PROC_GYR_HK, info=Info.ENABLE_PROC_GYR_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_PROC_GYR_HK, info=Info.DISABLE_PROC_GYR_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_PROC_GPS_HK, info=Info.REQUEST_PROC_GPS_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_PROC_GPS_HK, info=Info.ENABLE_PROC_GPS_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_PROC_GPS_HK, info=Info.DISABLE_PROC_GPS_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_MEKF_HK, info=Info.REQUEST_MEKF_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_MEKF_HK, info=Info.ENABLE_MEKF_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_MEKF_HK, info=Info.DISABLE_MEKF_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_CTRL_VAL_HK, info=Info.REQUEST_CTRL_VAL_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_CTRL_VAL_HK, info=Info.ENABLE_CTRL_VAL_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_CTRL_VAL_HK, info=Info.DISABLE_CTRL_VAL_HK)
|
||||
oce.add(keys=OpCodes.REQUEST_ACT_CMD_HK, info=Info.REQUEST_ACT_CMD_HK)
|
||||
oce.add(keys=OpCodes.ENABLE_ACT_CMD_HK, info=Info.ENABLE_ACT_CMD_HK)
|
||||
oce.add(keys=OpCodes.DISABLE_ACT_CMD_HK, info=Info.DISABLE_ACT_CMD_HK)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.ACS_CTRL.value, info="ACS Controller", op_code_entry=oce
|
||||
)
|
||||
@ -69,25 +161,285 @@ def acs_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
def pack_acs_ctrl_command(p: ServiceProviderParams):
|
||||
op_code = p.op_code
|
||||
q = p.queue_helper
|
||||
sid = make_sid(ACS_CONTROLLER, SetIds.MGM_SET)
|
||||
if op_code in OpCodes.REQUEST_MGM_HK:
|
||||
q.add_log_cmd(Info.REQUEST_MGM_HK)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
elif op_code in OpCodes.ENABLE_MGM_HK:
|
||||
q.add_log_cmd(Info.ENABLE_MGM_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(False, sid, 2.0)
|
||||
if op_code in OpCodes.REQUEST_RAW_MGM_HK:
|
||||
q.add_log_cmd(Info.REQUEST_RAW_MGM_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.MGM_RAW_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_RAW_MGM_HK:
|
||||
q.add_log_cmd(Info.ENABLE_RAW_MGM_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MGM_RAW_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_MGM_HK:
|
||||
q.add_log_cmd(Info.DISABLE_MGM_HK)
|
||||
q.add_pus_tc(disable_periodic_hk_command(False, sid))
|
||||
elif op_code in OpCodes.DISABLE_RAW_MGM_HK:
|
||||
q.add_log_cmd(Info.DISABLE_RAW_MGM_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MGM_RAW_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_PROC_MGM_HK:
|
||||
q.add_log_cmd(Info.REQUEST_PROC_MGM_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.MGM_PROC_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_PROC_MGM_HK:
|
||||
q.add_log_cmd(Info.ENABLE_PROC_MGM_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MGM_PROC_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_PROC_MGM_HK:
|
||||
q.add_log_cmd(Info.DISABLE_PROC_MGM_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MGM_PROC_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_RAW_SUS_HK:
|
||||
q.add_log_cmd(Info.REQUEST_RAW_SUS_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.SUS_RAW_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_RAW_SUS_HK:
|
||||
q.add_log_cmd(Info.ENABLE_RAW_SUS_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.SUS_RAW_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_RAW_SUS_HK:
|
||||
q.add_log_cmd(Info.DISABLE_RAW_SUS_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.SUS_RAW_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_PROC_SUS_HK:
|
||||
q.add_log_cmd(Info.REQUEST_PROC_SUS_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.SUS_PROC_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_PROC_SUS_HK:
|
||||
q.add_log_cmd(Info.ENABLE_PROC_SUS_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.SUS_PROC_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_PROC_SUS_HK:
|
||||
q.add_log_cmd(Info.DISABLE_PROC_SUS_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.SUS_PROC_SET)
|
||||
)
|
||||
)
|
||||
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))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.ENABLE_RAW_GYR_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_RAW_GYR_HK:
|
||||
q.add_log_cmd(Info.DISABLE_RAW_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_PROC_GYR_HK:
|
||||
q.add_log_cmd(Info.REQUEST_PROC_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.GYR_PROC_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_PROC_GYR_HK:
|
||||
q.add_log_cmd(Info.ENABLE_PROC_GYR_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_PROC_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_PROC_GYR_HK:
|
||||
q.add_log_cmd(Info.DISABLE_PROC_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_PROC_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_PROC_GPS_HK:
|
||||
q.add_log_cmd(Info.REQUEST_PROC_GPS_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.GPS_PROC_SET))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_PROC_GPS_HK:
|
||||
q.add_log_cmd(Info.ENABLE_PROC_GPS_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GPS_PROC_SET), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_PROC_GPS_HK:
|
||||
q.add_log_cmd(Info.DISABLE_PROC_GPS_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.GPS_PROC_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_MEKF_HK:
|
||||
q.add_log_cmd(Info.REQUEST_MEKF_HK)
|
||||
q.add_pus_tc(generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.MEKF_DATA)))
|
||||
elif op_code in OpCodes.ENABLE_MEKF_HK:
|
||||
q.add_log_cmd(Info.ENABLE_MEKF_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_MEKF_HK:
|
||||
q.add_log_cmd(Info.DISABLE_MEKF_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_CTRL_VAL_HK:
|
||||
q.add_log_cmd(Info.REQUEST_CTRL_VAL_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.CTRL_VAL_DATA))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_CTRL_VAL_HK:
|
||||
q.add_log_cmd(Info.ENABLE_CTRL_VAL_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.CTRL_VAL_DATA), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_CTRL_VAL_HK:
|
||||
q.add_log_cmd(Info.DISABLE_CTRL_VAL_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.CTRL_VAL_DATA)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.REQUEST_ACT_CMD_HK:
|
||||
q.add_log_cmd(Info.REQUEST_ACT_CMD_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.ACTUATOR_CMD_DATA))
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_ACT_CMD_HK:
|
||||
q.add_log_cmd(Info.ENABLE_ACT_CMD_HK)
|
||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.ACTUATOR_CMD_DATA), 2.0
|
||||
)
|
||||
q.add_pus_tc(cmd_tuple[0])
|
||||
q.add_pus_tc(cmd_tuple[1])
|
||||
elif op_code in OpCodes.DISABLE_ACT_CMD_HK:
|
||||
q.add_log_cmd(Info.DISABLE_ACT_CMD_HK)
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
False, make_sid(ACS_CONTROLLER, SetId.ACTUATOR_CMD_DATA)
|
||||
)
|
||||
)
|
||||
else:
|
||||
LOGGER.info(f"Unknown op code {op_code}")
|
||||
|
||||
|
||||
def handle_acs_ctrl_mgm_data(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
current_idx = 0
|
||||
def handle_acs_ctrl_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
match set_id:
|
||||
case SetId.MGM_RAW_SET:
|
||||
handle_raw_mgm_data(pw, hk_data)
|
||||
case SetId.MGM_PROC_SET:
|
||||
handle_mgm_data_processed(pw, hk_data)
|
||||
case SetId.SUS_RAW_SET:
|
||||
handle_acs_ctrl_sus_raw_data(pw, hk_data)
|
||||
case SetId.SUS_PROC_SET:
|
||||
handle_acs_ctrl_sus_processed_data(pw, hk_data)
|
||||
case SetId.GYR_RAW_SET:
|
||||
handle_gyr_data_raw(pw, hk_data)
|
||||
case SetId.GYR_PROC_SET:
|
||||
handle_gyr_data_processed(pw, hk_data)
|
||||
case SetId.GPS_PROC_SET:
|
||||
handle_gps_data_processed(pw, hk_data)
|
||||
case SetId.MEKF_DATA:
|
||||
handle_mekf_data(pw, hk_data)
|
||||
case SetId.CTRL_VAL_DATA:
|
||||
handle_ctrl_val_data(pw, hk_data)
|
||||
case SetId.ACTUATOR_CMD_DATA:
|
||||
handle_act_cmd_data(pw, hk_data)
|
||||
|
||||
|
||||
def handle_acs_ctrl_sus_raw_data(pw: PrintWrapper, hk_data: bytes):
|
||||
if len(hk_data) < 6 * 2 * 12:
|
||||
pw.dlog(
|
||||
f"SUS Raw dataset with size {len(hk_data)} does not have expected size"
|
||||
f" of {6 * 2 * 12} bytes"
|
||||
)
|
||||
return
|
||||
current_idx = 0
|
||||
vec_fmt = "["
|
||||
for _ in range(5):
|
||||
vec_fmt += "{:#06x}, "
|
||||
vec_fmt += "{:#06x}]"
|
||||
for idx in range(12):
|
||||
fmt_str = "!HHHHHH"
|
||||
length = struct.calcsize(fmt_str)
|
||||
sus_list = struct.unpack(fmt_str, hk_data[current_idx : current_idx + length])
|
||||
sus_list_formatted = vec_fmt.format(*sus_list)
|
||||
current_idx += length
|
||||
pw.dlog(f"SUS {idx} RAW: {sus_list_formatted}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=12)
|
||||
|
||||
|
||||
def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes):
|
||||
if len(hk_data) < 3 * 4 * 12 + 3 * 8 * 3:
|
||||
pw.dlog(
|
||||
f"SUS Processed dataset with size {len(hk_data)} does not have expected size"
|
||||
f" of {3 * 4 * 12 + 3 * 8 * 3} bytes"
|
||||
)
|
||||
return
|
||||
current_idx = 0
|
||||
for idx in range(12):
|
||||
fmt_str = "!fff"
|
||||
length = struct.calcsize(fmt_str)
|
||||
sus_list = struct.unpack(fmt_str, hk_data[current_idx : current_idx + length])
|
||||
sus_list_formatted = [f"{val:8.3f}" for val in sus_list]
|
||||
current_idx += length
|
||||
pw.dlog(f"SUS {idx} CALIB: {sus_list_formatted}")
|
||||
fmt_str = "!ddd"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
sus_vec_tot = list(
|
||||
struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
|
||||
)
|
||||
sus_vec_tot = [f"{val:8.3f}" for val in {sus_vec_tot}]
|
||||
current_idx += inc_len
|
||||
pw.dlog(f"SUS Vector Total: {sus_vec_tot}")
|
||||
sus_vec_tot_deriv = struct.unpack(
|
||||
fmt_str, hk_data[current_idx : current_idx + inc_len]
|
||||
)
|
||||
sus_vec_tot_deriv = [f"{val:8.3f}" for val in {sus_vec_tot_deriv}]
|
||||
current_idx += inc_len
|
||||
pw.dlog(f"SUS Vector Derivative: {sus_vec_tot_deriv}")
|
||||
sun_ijk_model = list(
|
||||
struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
|
||||
)
|
||||
sun_ijk_model = [f"{val:8.3f}" for val in {sun_ijk_model}]
|
||||
current_idx += inc_len
|
||||
pw.dlog(f"SUS ijk Model: {sun_ijk_model}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=15)
|
||||
|
||||
|
||||
def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
|
||||
current_idx = 0
|
||||
|
||||
if len(hk_data) < 61:
|
||||
pw.dlog(
|
||||
@ -124,15 +476,15 @@ def handle_acs_ctrl_mgm_data(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
float_str_fmt = "[{:8.3f}, {:8.3f}, {:8.3f}]"
|
||||
for mgm_entry in mgm_lists[0:4]:
|
||||
formatted_list.append(float_str_fmt.format(*mgm_entry))
|
||||
formatted_list.append(hk_data[current_idx])
|
||||
formatted_list.append(float_str_fmt.format(*mgm_lists[4]))
|
||||
formatted_list.append(hk_data[current_idx])
|
||||
print_str_list = [
|
||||
"ACS Board MGM 0 LIS3MDL",
|
||||
"ACS Board MGM 1 RM3100",
|
||||
"ACS Board MGM 2 LIS3MDL",
|
||||
"ACS Board MGM 3 RM3100",
|
||||
"IMTQ Actuation Status:",
|
||||
"IMTQ MGM:",
|
||||
"IMTQ Actuation Status:",
|
||||
]
|
||||
for entry in zip(print_str_list, formatted_list):
|
||||
pw.dlog(f"{entry[0].ljust(28)}: {entry[1]}")
|
||||
@ -140,6 +492,240 @@ def handle_acs_ctrl_mgm_data(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
if PERFORM_MGM_CALIBRATION:
|
||||
perform_mgm_calibration(pw, mgm_0_lis3_floats_ut)
|
||||
assert current_idx == 61
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=6)
|
||||
|
||||
|
||||
def handle_mgm_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received Processed MGM Set")
|
||||
fmt_str = "!fffffddd"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
if len(hk_data) < inc_len:
|
||||
pw.dlog("Recieved HK set too small")
|
||||
return
|
||||
current_idx = 0
|
||||
for i in range(5):
|
||||
fmt_str = "!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
mgm_vec = struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
|
||||
mgm_vec = [f"{val:8.3f}" for val in mgm_vec]
|
||||
pw.dlog(f"MGM {i}: {mgm_vec}")
|
||||
fmt_str = "!ddd"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
mgm_vec_tot = struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
|
||||
mgm_vec_tot = [f"{val:8.3f}" for val in mgm_vec_tot]
|
||||
current_idx += inc_len
|
||||
pw.dlog(f"MGM Total Vec: {mgm_vec_tot}")
|
||||
mgm_vec_tot_deriv = struct.unpack(
|
||||
fmt_str, hk_data[current_idx : current_idx + inc_len]
|
||||
)
|
||||
mgm_vec_tot_deriv = [f"{val:8.3f}" for val in mgm_vec_tot_deriv]
|
||||
pw.dlog(f"MGM Total Vec Deriv: {mgm_vec_tot_deriv}")
|
||||
current_idx += inc_len
|
||||
mag_igrf_model = struct.unpack(
|
||||
fmt_str, hk_data[current_idx : current_idx + inc_len]
|
||||
)
|
||||
mag_igrf_model = [f"{val:8.3f}" for val in mag_igrf_model]
|
||||
pw.dlog(f"MAG IGRF Model: {mag_igrf_model}")
|
||||
current_idx += inc_len
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=8)
|
||||
|
||||
|
||||
def handle_gyr_data_raw(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received GYR Raw Set with rotation rates in deg per second")
|
||||
float_fmt = "!fff"
|
||||
double_fmt = "!ddd"
|
||||
inc_len_flt = struct.calcsize(float_fmt)
|
||||
inc_len_double = struct.calcsize(double_fmt)
|
||||
if len(hk_data) < 2 * inc_len_double + 2 * inc_len_flt:
|
||||
pw.dlog("HK data too small")
|
||||
return
|
||||
current_idx = 0
|
||||
float_str_fmt = "[{:8.3f}, {:8.3f}, {:8.3f}]"
|
||||
gyr_0_adis = struct.unpack(
|
||||
double_fmt, hk_data[current_idx : current_idx + inc_len_double]
|
||||
)
|
||||
current_idx += inc_len_double
|
||||
gyr_1_l3 = struct.unpack(
|
||||
float_fmt, hk_data[current_idx : current_idx + inc_len_flt]
|
||||
)
|
||||
current_idx += inc_len_flt
|
||||
gyr_2_adis = struct.unpack(
|
||||
double_fmt, hk_data[current_idx : current_idx + inc_len_double]
|
||||
)
|
||||
current_idx += inc_len_double
|
||||
gyr_3_l3 = struct.unpack(
|
||||
float_fmt, hk_data[current_idx : current_idx + inc_len_flt]
|
||||
)
|
||||
current_idx += inc_len_flt
|
||||
pw.dlog(f"{'GYR 0 ADIS'.ljust(15)}: {float_str_fmt.format(*gyr_0_adis)}")
|
||||
pw.dlog(f"{'GYR 1 L3'.ljust(15)}: {float_str_fmt.format(*gyr_1_l3)}")
|
||||
pw.dlog(f"{'GYR 2 ADIS'.ljust(15)}: {float_str_fmt.format(*gyr_2_adis)}")
|
||||
pw.dlog(f"{'GYR 3 L3'.ljust(15)}: {float_str_fmt.format(*gyr_3_l3)}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], 4)
|
||||
|
||||
|
||||
GYR_NAMES = ["GYR 0 ADIS", "GYR 1 L3", "GYR 2 ADIS", "GYR 3 L3"]
|
||||
|
||||
|
||||
def handle_gyr_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received GYR Processed Set with rotation rates in deg per second")
|
||||
fmt_str = "!ddd"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
current_idx = 0
|
||||
for i in range(4):
|
||||
gyr_vec = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_str, hk_data[current_idx : current_idx + inc_len]
|
||||
)
|
||||
]
|
||||
pw.dlog(f"{GYR_NAMES[i]}: {gyr_vec}")
|
||||
current_idx += inc_len
|
||||
gyr_vec_tot = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
|
||||
]
|
||||
pw.dlog(f"GYR Vec Total: {gyr_vec_tot}")
|
||||
current_idx += inc_len
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=5)
|
||||
|
||||
|
||||
def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received GPS Processed Set")
|
||||
fmt_scalar = "!d"
|
||||
fmt_vec = "!ddd"
|
||||
inc_len_scalar = struct.calcsize(fmt_scalar)
|
||||
inc_len_vec = struct.calcsize(fmt_vec)
|
||||
if len(hk_data) < 2 * inc_len_scalar + inc_len_vec:
|
||||
pw.dlog("Received HK set too small")
|
||||
return
|
||||
current_idx = 0
|
||||
lat = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_scalar, hk_data[current_idx : current_idx + inc_len_scalar]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_scalar
|
||||
long = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_scalar, hk_data[current_idx : current_idx + inc_len_scalar]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_scalar
|
||||
velo = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_vec, hk_data[current_idx : current_idx + inc_len_vec]
|
||||
)
|
||||
]
|
||||
pw.dlog(f"GPS Latitude: {lat} [rad]")
|
||||
pw.dlog(f"GPS Longitude: {long} [rad]")
|
||||
pw.dlog(f"GPS Velocity: {velo} [m/s]")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||
|
||||
|
||||
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received MEKF Set")
|
||||
fmt_quat = "!dddd"
|
||||
fmt_vec = "!ddd"
|
||||
inc_len_quat = struct.calcsize(fmt_quat)
|
||||
inc_len_vec = struct.calcsize(fmt_vec)
|
||||
if len(hk_data) < inc_len_quat + inc_len_vec:
|
||||
pw.dlog("Received HK set too small")
|
||||
return
|
||||
current_idx = 0
|
||||
quat = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_quat, hk_data[current_idx : current_idx + inc_len_quat]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_quat
|
||||
rate = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_vec, hk_data[current_idx : current_idx + inc_len_vec]
|
||||
)
|
||||
]
|
||||
pw.dlog(f"MEKF Quaternion: {quat}")
|
||||
pw.dlog(f"MEKF Rotational Rate: {rate}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=2)
|
||||
|
||||
|
||||
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received CTRL Values Set")
|
||||
fmt_quat = "!dddd"
|
||||
fmt_scalar = "!d"
|
||||
inc_len_quat = struct.calcsize(fmt_quat)
|
||||
inc_len_scalar = struct.calcsize(fmt_scalar)
|
||||
if len(hk_data) < 2 * inc_len_quat + inc_len_scalar:
|
||||
pw.dlog("Received HK set too small")
|
||||
return
|
||||
current_idx = 0
|
||||
tgt_quat = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_quat, hk_data[current_idx : current_idx + inc_len_quat]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_quat
|
||||
err_quat = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_quat, hk_data[current_idx : current_idx + inc_len_quat]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_quat
|
||||
err_ang = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_scalar, hk_data[current_idx : current_idx + inc_len_scalar]
|
||||
)
|
||||
]
|
||||
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
|
||||
pw.dlog(f"Control Values Error Quaternion: {err_quat}")
|
||||
pw.dlog(f"Control Values Error Angle: {err_ang} [rad]")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||
|
||||
|
||||
def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):
|
||||
pw.dlog("Received Actuator Command Values Set")
|
||||
fmt_vec4_double = "!dddd"
|
||||
fmt_vec4_int32 = "!iiii"
|
||||
fmt_vec3_int16 = "!hhh"
|
||||
inc_len_vec4_double = struct.calcsize(fmt_vec4_double)
|
||||
inc_len_vec4_int32 = struct.calcsize(fmt_vec4_int32)
|
||||
inc_len_vec3_int16 = struct.calcsize(fmt_vec3_int16)
|
||||
if len(hk_data) < inc_len_vec4_double + inc_len_vec4_int32 + inc_len_vec3_int16:
|
||||
pw.dlog("Received HK set too small")
|
||||
return
|
||||
current_idx = 0
|
||||
rw_tgt_torque = [
|
||||
f"{val:8.3f}"
|
||||
for val in struct.unpack(
|
||||
fmt_vec4_double, hk_data[current_idx : current_idx + inc_len_vec4_double]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_vec4_double
|
||||
rw_tgt_speed = [
|
||||
f"{val:d}"
|
||||
for val in struct.unpack(
|
||||
fmt_vec4_int32, hk_data[current_idx : current_idx + inc_len_vec4_int32]
|
||||
)
|
||||
]
|
||||
current_idx += inc_len_vec4_int32
|
||||
mtq_tgt_dipole = [
|
||||
f"{val:d}"
|
||||
for val in struct.unpack(
|
||||
fmt_vec3_int16, hk_data[current_idx : current_idx + inc_len_vec3_int16]
|
||||
)
|
||||
]
|
||||
pw.dlog(f"Actuator Commands RW Target Torque: {rw_tgt_torque}")
|
||||
pw.dlog(f"Actuator Commands RW Target Speed: {rw_tgt_speed}")
|
||||
pw.dlog(f"Actuator Commands MTQ Target Dipole: {mtq_tgt_dipole}")
|
||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||
|
||||
|
||||
def perform_mgm_calibration(pw: PrintWrapper, mgm_tuple: Tuple):
|
||||
@ -150,7 +736,8 @@ def perform_mgm_calibration(pw: PrintWrapper, mgm_tuple: Tuple):
|
||||
reply = CALIBR_SOCKET.recv(1024)
|
||||
if len(reply) != 2:
|
||||
pw.dlog(
|
||||
f"MGM calibration: Reply received command {declare_api_cmd} has invalid length {len(reply)}"
|
||||
f"MGM calibration: Reply received command {declare_api_cmd} has"
|
||||
f" invalid length {len(reply)}"
|
||||
)
|
||||
return
|
||||
else:
|
||||
@ -167,7 +754,8 @@ def perform_mgm_calibration(pw: PrintWrapper, mgm_tuple: Tuple):
|
||||
reply = CALIBR_SOCKET.recv(1024)
|
||||
if len(reply) != 2:
|
||||
pw.dlog(
|
||||
f"MGM calibration: Reply received command magnetometer_field has invalid length {len(reply)}"
|
||||
f"MGM calibration: Reply received command magnetometer_field has invalid "
|
||||
f"length {len(reply)}"
|
||||
)
|
||||
return
|
||||
else:
|
||||
|
@ -15,7 +15,7 @@ from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
|
||||
|
||||
class OpCodes(str, enum.Enum):
|
||||
class OpCode(str, enum.Enum):
|
||||
OFF = "off"
|
||||
SAFE = "safe"
|
||||
DETUMBLE = "detumble"
|
||||
@ -24,7 +24,7 @@ class OpCodes(str, enum.Enum):
|
||||
REPORT_ALL_MODES = "all_modes"
|
||||
|
||||
|
||||
class AcsModes(enum.IntEnum):
|
||||
class AcsMode(enum.IntEnum):
|
||||
OFF = 0
|
||||
SAFE = 1 << 24
|
||||
DETUMBLE = 2 << 24
|
||||
@ -42,10 +42,10 @@ class Info(str, enum.Enum):
|
||||
|
||||
|
||||
HANDLER_LIST: Dict[str, Tuple[int, str]] = {
|
||||
OpCodes.OFF: (AcsModes.OFF, Info.OFF),
|
||||
OpCodes.IDLE: (AcsModes.IDLE, Info.IDLE),
|
||||
OpCodes.SAFE: (AcsModes.SAFE, Info.SAFE),
|
||||
OpCodes.DETUMBLE: (AcsModes.DETUMBLE, Info.DETUMBLE),
|
||||
OpCode.OFF: (AcsMode.OFF, Info.OFF),
|
||||
OpCode.IDLE: (AcsMode.IDLE, Info.IDLE),
|
||||
OpCode.SAFE: (AcsMode.SAFE, Info.SAFE),
|
||||
OpCode.DETUMBLE: (AcsMode.DETUMBLE, Info.DETUMBLE),
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ def build_acs_subsystem_cmd(p: ServiceProviderParams):
|
||||
op_code = p.op_code
|
||||
q = p.queue_helper
|
||||
info_prefix = "ACS Subsystem"
|
||||
if op_code in OpCodes.REPORT_ALL_MODES:
|
||||
if op_code in OpCode.REPORT_ALL_MODES:
|
||||
q.add_log_cmd(f"{info_prefix}: {Info.REPORT_ALL_MODES}")
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
@ -78,8 +78,8 @@ def build_acs_subsystem_cmd(p: ServiceProviderParams):
|
||||
@tmtc_definitions_provider
|
||||
def add_acs_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCodes.OFF, Info.OFF)
|
||||
oce.add(OpCodes.SAFE, Info.SAFE)
|
||||
oce.add(OpCodes.IDLE, Info.IDLE)
|
||||
oce.add(OpCodes.REPORT_ALL_MODES, Info.REPORT_ALL_MODES)
|
||||
oce.add(OpCode.OFF, Info.OFF)
|
||||
oce.add(OpCode.SAFE, Info.SAFE)
|
||||
oce.add(OpCode.IDLE, Info.IDLE)
|
||||
oce.add(OpCode.REPORT_ALL_MODES, Info.REPORT_ALL_MODES)
|
||||
defs.add_service(CustomServiceList.ACS_SS, "ACS Subsystem", oce)
|
||||
|
@ -6,6 +6,7 @@
|
||||
@date 25.03.2021
|
||||
"""
|
||||
import struct
|
||||
from typing import List
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
@ -26,14 +27,14 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
ON = ["on"]
|
||||
NORMAL = ["normal"]
|
||||
OFF = ["off"]
|
||||
SET_DIPOLE = ["set_dipole"]
|
||||
|
||||
|
||||
class ImtqSetIds:
|
||||
class ImtqSetId:
|
||||
ENG_HK_SET = 1
|
||||
CAL_MTM_SET = 2
|
||||
RAW_MTM_SET = 3
|
||||
@ -45,7 +46,7 @@ class ImtqSetIds:
|
||||
NEGATIVE_Z_TEST = 9
|
||||
|
||||
|
||||
class ImtqActionIds:
|
||||
class ImtqActionId:
|
||||
start_actuation_dipole = bytearray([0x0, 0x0, 0x0, 0x02])
|
||||
get_commanded_dipole = bytearray([0x0, 0x0, 0x0, 0x03])
|
||||
perform_positive_x_test = bytearray([0x0, 0x0, 0x0, 0x07])
|
||||
@ -62,16 +63,16 @@ class ImtqActionIds:
|
||||
@tmtc_definitions_provider
|
||||
def add_imtq_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCodes.OFF, "Mode Off")
|
||||
oce.add(OpCodes.ON, "Mode On")
|
||||
oce.add(OpCodes.NORMAL, "Mode Normal")
|
||||
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(OpCodes.SET_DIPOLE, "IMTQ command dipole")
|
||||
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")
|
||||
@ -84,92 +85,92 @@ 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 OpCodes.OFF:
|
||||
if op_code in OpCode.OFF:
|
||||
q.add_log_cmd("IMTQ: Set mode off")
|
||||
command = pack_mode_data(object_id.as_bytes, Modes.OFF, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code in OpCodes.ON:
|
||||
if op_code in OpCode.ON:
|
||||
q.add_log_cmd("IMTQ: Set mode on")
|
||||
command = pack_mode_data(object_id.as_bytes, Modes.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code in OpCodes.NORMAL:
|
||||
if op_code in OpCode.NORMAL:
|
||||
q.add_log_cmd("IMTQ: Mode Normal")
|
||||
command = pack_mode_data(object_id.as_bytes, Modes.NORMAL, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code == "3":
|
||||
q.add_log_cmd("IMTQ: Perform positive x self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_positive_x_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_x_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Initiate reading of positive x self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Request dataset with positive x self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_X_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_X_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "4":
|
||||
q.add_log_cmd("IMTQ: Perform negative x self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_negative_x_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_x_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_log_cmd("IMTQ: Initiate reading of negative x self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_log_cmd("IMTQ: Request dataset with negative x self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_X_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.NEGATIVE_X_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "5":
|
||||
q.add_log_cmd("IMTQ: Perform positive y self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_positive_y_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_y_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_log_cmd("IMTQ: Initiate reading of positive y self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Request dataset with positive y self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_Y_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "6":
|
||||
q.add_log_cmd("IMTQ: Perform negative y self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_negative_y_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_y_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Initiate reading of negative y self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Request dataset with negative y self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_Y_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.NEGATIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "7":
|
||||
q.add_log_cmd("IMTQ: Perform positive z self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_positive_z_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_positive_z_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Initiate reading of positive z self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
|
||||
q.add_log_cmd("IMTQ: Request dataset with positive z self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_Y_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.POSITIVE_Y_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("IMTQ: Perform negative z self test")
|
||||
command = object_id.as_bytes + ImtqActionIds.perform_negative_z_test
|
||||
command = object_id.as_bytes + ImtqActionId.perform_negative_z_test
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_log_cmd("IMTQ: Initiate reading of negative z self test results")
|
||||
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||
command = object_id.as_bytes + ImtqActionId.read_self_test_results
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_log_cmd("IMTQ: Request dataset with negative z self test results")
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_Z_TEST)
|
||||
sid = make_sid(object_id.as_bytes, ImtqSetId.NEGATIVE_Z_TEST)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
if op_code in OpCodes.SET_DIPOLE:
|
||||
if op_code in OpCode.SET_DIPOLE:
|
||||
x_dipole = int(input("Specify X dipole [range [0, 2000] * 10^-4 * Am^2]: "))
|
||||
y_dipole = int(input("Specify Y dipole [range [0, 2000] * 10^-4 * Am^2]: "))
|
||||
z_dipole = int(input("Specify Z dipole [range [0, 2000] * 10^-4 * Am^2]: "))
|
||||
@ -191,14 +192,14 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
|
||||
if op_code == "10":
|
||||
q.add_log_cmd("IMTQ: Get commanded dipole")
|
||||
command = object_id.as_bytes + ImtqActionIds.get_commanded_dipole
|
||||
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":
|
||||
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=ImtqSetIds.ENG_HK_SET)
|
||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.ENG_HK_SET)
|
||||
)
|
||||
)
|
||||
|
||||
@ -206,9 +207,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
q.add_log_cmd("IMTQ: Get calibrated MTM hk set")
|
||||
q.add_pus_tc(
|
||||
generate_one_diag_command(
|
||||
sid=make_sid(
|
||||
object_id=object_id.as_bytes, set_id=ImtqSetIds.CAL_MTM_SET
|
||||
)
|
||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.CAL_MTM_SET)
|
||||
)
|
||||
)
|
||||
|
||||
@ -216,9 +215,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
||||
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=ImtqSetIds.RAW_MTM_SET
|
||||
)
|
||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_SET)
|
||||
)
|
||||
)
|
||||
|
||||
@ -235,7 +232,7 @@ def pack_dipole_command(
|
||||
When set to 0, the dipole will be generated until a new dipole actuation
|
||||
command is sent.
|
||||
"""
|
||||
action_id = ImtqActionIds.start_actuation_dipole
|
||||
action_id = ImtqActionId.start_actuation_dipole
|
||||
command = object_id + action_id
|
||||
x_dipole = int(round(x_dipole))
|
||||
y_dipole = int(round(y_dipole))
|
||||
@ -265,21 +262,22 @@ def raise_dipole_error(dipole_str: str, value: int):
|
||||
)
|
||||
|
||||
|
||||
def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
header_list = [
|
||||
"Digital Voltage [mV]",
|
||||
"Analog Voltage [mV]",
|
||||
"Digital Current [mA]",
|
||||
"Analog Current [mA]",
|
||||
"Coil Current X [mA]",
|
||||
"Coil Current Y [mA]",
|
||||
"Coil Current Z [mA]",
|
||||
"Coil X Temperature [°C]",
|
||||
"Coil Y Temperature [°C]",
|
||||
"Coil Z Temperature [°C]",
|
||||
"MCU Temperature [°C]",
|
||||
]
|
||||
ENG_HK_HEADERS = [
|
||||
"Digital Voltage [mV]",
|
||||
"Analog Voltage [mV]",
|
||||
"Digital Current [mA]",
|
||||
"Analog Current [mA]",
|
||||
"Coil Current X [mA]",
|
||||
"Coil Current Y [mA]",
|
||||
"Coil Current Z [mA]",
|
||||
"Coil X Temperature [°C]",
|
||||
"Coil Y Temperature [°C]",
|
||||
"Coil Z Temperature [°C]",
|
||||
"MCU Temperature [°C]",
|
||||
]
|
||||
|
||||
|
||||
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]
|
||||
digital_current = struct.unpack("!f", hk_data[4:8])[0]
|
||||
@ -291,8 +289,6 @@ def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
coil_y_temperature = struct.unpack("!h", hk_data[26:28])[0]
|
||||
coil_z_temperature = struct.unpack("!h", hk_data[28:30])[0]
|
||||
mcu_temperature = struct.unpack("!h", hk_data[30:32])[0]
|
||||
|
||||
validity_buffer = hk_data[32:]
|
||||
content_list = [
|
||||
digital_voltage,
|
||||
analog_voltage,
|
||||
@ -306,8 +302,16 @@ def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
coil_z_temperature,
|
||||
mcu_temperature,
|
||||
]
|
||||
num_of_vars = len(header_list)
|
||||
pw.dlog(str(header_list))
|
||||
return content_list
|
||||
|
||||
|
||||
def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
pw = PrintWrapper(printer)
|
||||
content_list = unpack_eng_hk(hk_data)
|
||||
validity_buffer = hk_data[32:]
|
||||
|
||||
num_of_vars = len(ENG_HK_HEADERS)
|
||||
pw.dlog(str(ENG_HK_HEADERS))
|
||||
pw.dlog(str(content_list))
|
||||
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=num_of_vars)
|
||||
|
||||
|
@ -26,7 +26,7 @@ from tmtccmd.util import ObjectIdU32
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
class OpCodesDevs:
|
||||
class OpCodesDev:
|
||||
SPEED = ["0", "speed"]
|
||||
ON = ["1", "on"]
|
||||
NML = ["2", "nml"]
|
||||
@ -37,7 +37,7 @@ class OpCodesDevs:
|
||||
DISABLE_STATUS_HK = ["7", "disable_status_hk"]
|
||||
|
||||
|
||||
class InfoDevs:
|
||||
class InfoDev:
|
||||
SPEED = "Set speed"
|
||||
ON = "Set On"
|
||||
NML = "Set Normal"
|
||||
@ -64,14 +64,14 @@ class InfoAss:
|
||||
ALL_SPEED_OFF = "Speed down to 0"
|
||||
|
||||
|
||||
class RwSetIds:
|
||||
class RwSetId:
|
||||
STATUS_SET_ID = 4
|
||||
TEMPERATURE_SET_ID = 8
|
||||
LAST_RESET = 2
|
||||
TM_SET = 9
|
||||
|
||||
|
||||
class RwCommandIds:
|
||||
class RwCommandId:
|
||||
RESET_MCU = bytearray([0x0, 0x0, 0x0, 0x01])
|
||||
# Reads status information from reaction wheel into dataset with id 4
|
||||
GET_RW_STATUS = bytearray([0x0, 0x0, 0x0, 0x04])
|
||||
@ -94,14 +94,14 @@ class RampTime:
|
||||
@tmtc_definitions_provider
|
||||
def add_rw_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(info=InfoDevs.SPEED, keys=OpCodesDevs.SPEED)
|
||||
oce.add(info=InfoDevs.ON, keys=OpCodesDevs.ON)
|
||||
oce.add(info=InfoDevs.OFF, keys=OpCodesDevs.OFF)
|
||||
oce.add(info=InfoDevs.NML, keys=OpCodesDevs.NML)
|
||||
oce.add(info=InfoDevs.GET_STATUS, keys=OpCodesDevs.GET_STATUS)
|
||||
oce.add(info=InfoDevs.GET_TM, keys=OpCodesDevs.GET_TM)
|
||||
oce.add(info=InfoDevs.ENABLE_STATUS_HK, keys=OpCodesDevs.ENABLE_STATUS_HK)
|
||||
oce.add(info=InfoDevs.DISABLE_STATUS_HK, keys=OpCodesDevs.DISABLE_STATUS_HK)
|
||||
oce.add(info=InfoDev.SPEED, keys=OpCodesDev.SPEED)
|
||||
oce.add(info=InfoDev.ON, keys=OpCodesDev.ON)
|
||||
oce.add(info=InfoDev.OFF, keys=OpCodesDev.OFF)
|
||||
oce.add(info=InfoDev.NML, keys=OpCodesDev.NML)
|
||||
oce.add(info=InfoDev.GET_STATUS, keys=OpCodesDev.GET_STATUS)
|
||||
oce.add(info=InfoDev.GET_TM, keys=OpCodesDev.GET_TM)
|
||||
oce.add(info=InfoDev.ENABLE_STATUS_HK, keys=OpCodesDev.ENABLE_STATUS_HK)
|
||||
oce.add(info=InfoDev.DISABLE_STATUS_HK, keys=OpCodesDev.DISABLE_STATUS_HK)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.REACTION_WHEEL_1.value,
|
||||
info="Reaction Wheel 1",
|
||||
@ -138,56 +138,56 @@ def add_rw_cmds(defs: TmtcDefinitionWrapper):
|
||||
def pack_single_rw_test_into(
|
||||
object_id: bytes, rw_idx: int, q: DefaultPusQueueHelper, op_code: str
|
||||
):
|
||||
if op_code in OpCodesDevs.SPEED:
|
||||
if op_code in OpCodesDev.SPEED:
|
||||
speed, ramp_time = prompt_speed_ramp_time()
|
||||
q.add_log_cmd(
|
||||
f"RW {rw_idx}: {InfoDevs.SPEED} with target "
|
||||
f"RW {rw_idx}: {InfoDev.SPEED} with target "
|
||||
f"speed {speed / 10.0} RPM and {ramp_time} ms ramp time"
|
||||
)
|
||||
q.add_pus_tc(pack_set_speed_command(object_id, speed, ramp_time))
|
||||
|
||||
if op_code in OpCodesDevs.ON:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.ON}")
|
||||
if op_code in OpCodesDev.ON:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.ON}")
|
||||
mode_data = pack_mode_data(object_id, Modes.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||
|
||||
if op_code in OpCodesDevs.NML:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.NML}")
|
||||
if op_code in OpCodesDev.NML:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.NML}")
|
||||
mode_data = pack_mode_data(object_id, Modes.NORMAL, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||
|
||||
if op_code in OpCodesDevs.OFF:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.OFF}")
|
||||
if op_code in OpCodesDev.OFF:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.OFF}")
|
||||
mode_data = pack_mode_data(object_id, Modes.OFF, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||
|
||||
if op_code in OpCodesDevs.GET_TM:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.GET_TM}")
|
||||
if op_code in OpCodesDev.GET_TM:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.GET_TM}")
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(
|
||||
sid=make_sid(object_id=object_id, set_id=RwSetIds.TM_SET)
|
||||
sid=make_sid(object_id=object_id, set_id=RwSetId.TM_SET)
|
||||
)
|
||||
)
|
||||
if op_code in OpCodesDevs.GET_STATUS:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.GET_STATUS}")
|
||||
if op_code in OpCodesDev.GET_STATUS:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.GET_STATUS}")
|
||||
q.add_pus_tc(
|
||||
generate_one_diag_command(
|
||||
sid=make_sid(object_id=object_id, set_id=RwSetIds.STATUS_SET_ID)
|
||||
sid=make_sid(object_id=object_id, set_id=RwSetId.STATUS_SET_ID)
|
||||
)
|
||||
)
|
||||
if op_code in OpCodesDevs.ENABLE_STATUS_HK:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.ENABLE_STATUS_HK}")
|
||||
if op_code in OpCodesDev.ENABLE_STATUS_HK:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.ENABLE_STATUS_HK}")
|
||||
interval = float(input("Please enter HK interval in floating point seconds: "))
|
||||
cmds = enable_periodic_hk_command_with_interval(
|
||||
True, make_sid(object_id, RwSetIds.STATUS_SET_ID), interval
|
||||
True, make_sid(object_id, RwSetId.STATUS_SET_ID), interval
|
||||
)
|
||||
for cmd in cmds:
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in OpCodesDevs.DISABLE_STATUS_HK:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.DISABLE_STATUS_HK}")
|
||||
if op_code in OpCodesDev.DISABLE_STATUS_HK:
|
||||
q.add_log_cmd(f"RW {rw_idx}: {InfoDev.DISABLE_STATUS_HK}")
|
||||
q.add_pus_tc(
|
||||
disable_periodic_hk_command(
|
||||
True, make_sid(object_id, RwSetIds.STATUS_SET_ID)
|
||||
True, make_sid(object_id, RwSetId.STATUS_SET_ID)
|
||||
)
|
||||
)
|
||||
|
||||
@ -264,7 +264,7 @@ def pack_set_speed_command(
|
||||
ramp_time_ms > 0 and (ramp_time_ms > 20000 or ramp_time_ms < 10)
|
||||
):
|
||||
raise ValueError("Invalid Ramp Speed time. Allowed range is [10-20000] ms")
|
||||
command_id = RwCommandIds.SET_SPEED
|
||||
command_id = RwCommandId.SET_SPEED
|
||||
command = bytearray()
|
||||
command += object_id + command_id
|
||||
command = command + struct.pack("!i", speed)
|
||||
@ -279,7 +279,7 @@ def handle_rw_hk_data(
|
||||
|
||||
pw = PrintWrapper(printer)
|
||||
current_idx = 0
|
||||
if set_id == RwSetIds.STATUS_SET_ID:
|
||||
if set_id == RwSetId.STATUS_SET_ID:
|
||||
pw.dlog(
|
||||
f"Received Status HK (ID {set_id}) from Reaction Wheel {object_id.name}"
|
||||
)
|
||||
@ -303,7 +303,7 @@ def handle_rw_hk_data(
|
||||
f"1: High Current Mode (0.6 A)"
|
||||
)
|
||||
printer.print_validity_buffer(hk_data[current_idx:], 5)
|
||||
if set_id == RwSetIds.LAST_RESET:
|
||||
if set_id == RwSetId.LAST_RESET:
|
||||
pw.dlog(
|
||||
f"Received Last Reset HK (ID {set_id}) from Reaction Wheel {object_id.name}"
|
||||
)
|
||||
@ -317,7 +317,7 @@ def handle_rw_hk_data(
|
||||
f"Last Non-Cleared (Cached) Reset Status {last_not_cleared_reset_status} | "
|
||||
f"Current Reset Status {current_reset_status}"
|
||||
)
|
||||
if set_id == RwSetIds.TM_SET:
|
||||
if set_id == RwSetId.TM_SET:
|
||||
pw.dlog(f"Received TM HK (ID {set_id}) from Reaction Wheel {object_id.name}")
|
||||
fmt_str = "!BiffBBiiIIIIIIIIIIIIIIII"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
|
@ -1,6 +1,6 @@
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.config.object_ids import SUS_BOARD_ASS_ID
|
||||
from eive_tmtc.tmtc.acs.acs_board import DualSideSubmodes
|
||||
from eive_tmtc.tmtc.acs.acs_board import DualSideSubmode
|
||||
from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
@ -12,7 +12,7 @@ from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||
|
||||
|
||||
class SusOpCodes:
|
||||
class SusOpCode:
|
||||
SUS_ASS_NOM_SIDE = ["0", "nom"]
|
||||
SUS_ASS_RED_SIDE = ["1", "red"]
|
||||
SUS_ASS_DUAL_MODE = ["2", "dual"]
|
||||
@ -20,23 +20,23 @@ class SusOpCodes:
|
||||
|
||||
|
||||
def pack_sus_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in SusOpCodes.SUS_ASS_NOM_SIDE:
|
||||
if op_code in SusOpCode.SUS_ASS_NOM_SIDE:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
submode=DualSideSubmode.A_SIDE,
|
||||
q=q,
|
||||
info="Switching to SUS board to nominal side",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_RED_SIDE:
|
||||
if op_code in SusOpCode.SUS_ASS_RED_SIDE:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
submode=DualSideSubmode.B_SIDE,
|
||||
q=q,
|
||||
info="Switching to SUS board to redundant side",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_OFF:
|
||||
if op_code in SusOpCode.SUS_ASS_OFF:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.OFF,
|
||||
@ -44,11 +44,11 @@ def pack_sus_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
q=q,
|
||||
info="Switching SUS board off",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_DUAL_MODE:
|
||||
if op_code in SusOpCode.SUS_ASS_DUAL_MODE:
|
||||
pack_mode_cmd_with_info(
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.DUAL_SIDE,
|
||||
submode=DualSideSubmode.DUAL_SIDE,
|
||||
q=q,
|
||||
info="Switching to SUS board to dual side",
|
||||
)
|
||||
@ -65,19 +65,19 @@ def pack_sus_cmds_prvoider(p: ServiceProviderParams):
|
||||
def add_sus_board_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(
|
||||
keys=SusOpCodes.SUS_ASS_NOM_SIDE,
|
||||
keys=SusOpCode.SUS_ASS_NOM_SIDE,
|
||||
info="Switch SUS board to nominal side",
|
||||
)
|
||||
oce.add(
|
||||
keys=SusOpCodes.SUS_ASS_RED_SIDE,
|
||||
keys=SusOpCode.SUS_ASS_RED_SIDE,
|
||||
info="Switch SUS board to redundant side",
|
||||
)
|
||||
oce.add(
|
||||
keys=SusOpCodes.SUS_ASS_OFF,
|
||||
keys=SusOpCode.SUS_ASS_OFF,
|
||||
info="Switch off SUS board",
|
||||
)
|
||||
oce.add(
|
||||
keys=SusOpCodes.SUS_ASS_DUAL_MODE,
|
||||
keys=SusOpCode.SUS_ASS_DUAL_MODE,
|
||||
info="Switch SUS board to dual mode",
|
||||
)
|
||||
defs.add_service(
|
||||
|
@ -1,4 +1,7 @@
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
@ -10,12 +13,12 @@ from tmtccmd.logging import get_console_logger
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
|
||||
from eive_tmtc.config.object_ids import CORE_CONTROLLER_ID
|
||||
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class ActionIds(enum.IntEnum):
|
||||
class ActionId(enum.IntEnum):
|
||||
LIST_DIR_INTO_FILE = 0
|
||||
SWITCH_REBOOT_FILE_HANDLING = 5
|
||||
RESET_REBOOT_COUNTER = 6
|
||||
@ -31,11 +34,11 @@ class ActionIds(enum.IntEnum):
|
||||
FULL_REBOOT = 34
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
class SetId(enum.IntEnum):
|
||||
HK = 5
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
REBOOT_XSC = ["0", "reboot_xsc"]
|
||||
XSC_REBOOT_SELF = ["1", "reboot_self"]
|
||||
XSC_REBOOT_0_0 = ["2", "reboot_00"]
|
||||
@ -86,155 +89,154 @@ class Copy(enum.IntEnum):
|
||||
@tmtc_definitions_provider
|
||||
def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||
oce.add(keys=OpCodes.REBOOT_FULL, info=Info.REBOOT_FULL)
|
||||
oce.add(keys=OpCodes.XSC_REBOOT_SELF, info="Reboot Self")
|
||||
oce.add(keys=OpCodes.XSC_REBOOT_0_0, info="Reboot 0 0")
|
||||
oce.add(keys=OpCodes.XSC_REBOOT_0_1, info="Reboot 0 1")
|
||||
oce.add(keys=OpCodes.XSC_REBOOT_1_0, info="Reboot 1 0")
|
||||
oce.add(keys=OpCodes.XSC_REBOOT_1_1, info="Reboot 1 1")
|
||||
oce.add(keys=OpCode.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||
oce.add(keys=OpCode.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||
oce.add(keys=OpCode.REBOOT_FULL, info=Info.REBOOT_FULL)
|
||||
oce.add(keys=OpCode.XSC_REBOOT_SELF, info="Reboot Self")
|
||||
oce.add(keys=OpCode.XSC_REBOOT_0_0, info="Reboot 0 0")
|
||||
oce.add(keys=OpCode.XSC_REBOOT_0_1, info="Reboot 0 1")
|
||||
oce.add(keys=OpCode.XSC_REBOOT_1_0, info="Reboot 1 0")
|
||||
oce.add(keys=OpCode.XSC_REBOOT_1_1, info="Reboot 1 1")
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
|
||||
oce.add(
|
||||
keys=OpCodes.GET_HK,
|
||||
keys=OpCode.GET_HK,
|
||||
info="Request housekeeping set",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.ENABLE_REBOOT_FILE_HANDLING,
|
||||
keys=OpCode.ENABLE_REBOOT_FILE_HANDLING,
|
||||
info="Enable reboot file handling",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.DISABLE_REBOOT_FILE_HANDLING,
|
||||
keys=OpCode.DISABLE_REBOOT_FILE_HANDLING,
|
||||
info="Disable reboot file handling",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.RESET_ALL_REBOOT_COUNTERS,
|
||||
keys=OpCode.RESET_ALL_REBOOT_COUNTERS,
|
||||
info="Reset all reboot counters",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.RESET_REBOOT_COUNTER_00,
|
||||
keys=OpCode.RESET_REBOOT_COUNTER_00,
|
||||
info="Reset reboot counter 0 0",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.RESET_REBOOT_COUNTER_01,
|
||||
keys=OpCode.RESET_REBOOT_COUNTER_01,
|
||||
info="Reset reboot counter 0 1",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.RESET_REBOOT_COUNTER_10,
|
||||
keys=OpCode.RESET_REBOOT_COUNTER_10,
|
||||
info="Reset reboot counter 1 0",
|
||||
)
|
||||
oce.add(
|
||||
keys=OpCodes.RESET_REBOOT_COUNTER_11,
|
||||
keys=OpCode.RESET_REBOOT_COUNTER_11,
|
||||
info="Reset reboot counter 1 1",
|
||||
)
|
||||
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
|
||||
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
|
||||
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
|
||||
oce.add(keys=OpCodes.SWITCH_TO_SD_0, info=Info.SWITCH_TO_SD_0)
|
||||
oce.add(keys=OpCodes.SWITCH_TO_SD_1, info=Info.SWITCH_TO_SD_1)
|
||||
oce.add(keys=OpCodes.SWITCH_TO_BOTH_SD_CARDS, info=Info.SWITCH_TO_BOTH_SD_CARDS)
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
|
||||
oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
|
||||
oce.add(keys=OpCode.SWITCH_TO_SD_0, info=Info.SWITCH_TO_SD_0)
|
||||
oce.add(keys=OpCode.SWITCH_TO_SD_1, info=Info.SWITCH_TO_SD_1)
|
||||
oce.add(keys=OpCode.SWITCH_TO_BOTH_SD_CARDS, info=Info.SWITCH_TO_BOTH_SD_CARDS)
|
||||
defs.add_service(CustomServiceList.CORE.value, "Core Controller", oce)
|
||||
|
||||
|
||||
def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
if op_code in OpCodes.REBOOT_XSC:
|
||||
if op_code in OpCode.REBOOT_XSC:
|
||||
reboot_self, chip_select, copy_select = determine_reboot_params()
|
||||
perform_reboot_cmd(
|
||||
add_xsc_reboot_cmd(
|
||||
q=q,
|
||||
reboot_self=reboot_self,
|
||||
chip=chip_select,
|
||||
copy=copy_select,
|
||||
)
|
||||
if op_code in OpCodes.REBOOT_FULL:
|
||||
if op_code in OpCode.REBOOT_FULL:
|
||||
q.add_log_cmd(f"Core Command: {Info.REBOOT_FULL}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.FULL_REBOOT
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.XSC_REBOOT_SELF:
|
||||
perform_reboot_cmd(q=q, reboot_self=True)
|
||||
if op_code in OpCodes.XSC_REBOOT_0_0:
|
||||
perform_reboot_cmd(
|
||||
q.add_pus_tc(create_full_reboot_cmds())
|
||||
if op_code in OpCode.XSC_REBOOT_SELF:
|
||||
add_xsc_reboot_cmd(q=q, reboot_self=True)
|
||||
if op_code in OpCode.XSC_REBOOT_0_0:
|
||||
add_xsc_reboot_cmd(
|
||||
q=q, reboot_self=False, chip=Chip.CHIP_0, copy=Copy.COPY_0_NOM
|
||||
)
|
||||
if op_code in OpCodes.XSC_REBOOT_0_1:
|
||||
perform_reboot_cmd(
|
||||
if op_code in OpCode.XSC_REBOOT_0_1:
|
||||
add_xsc_reboot_cmd(
|
||||
q=q,
|
||||
reboot_self=False,
|
||||
chip=Chip.CHIP_0,
|
||||
copy=Copy.COPY_1_GOLD,
|
||||
)
|
||||
if op_code in OpCodes.XSC_REBOOT_1_0:
|
||||
perform_reboot_cmd(
|
||||
if op_code in OpCode.XSC_REBOOT_1_0:
|
||||
add_xsc_reboot_cmd(
|
||||
q=q, reboot_self=False, chip=Chip.CHIP_1, copy=Copy.COPY_0_NOM
|
||||
)
|
||||
if op_code in OpCodes.XSC_REBOOT_1_1:
|
||||
perform_reboot_cmd(
|
||||
if op_code in OpCode.XSC_REBOOT_1_1:
|
||||
add_xsc_reboot_cmd(
|
||||
q=q,
|
||||
reboot_self=False,
|
||||
chip=Chip.CHIP_1,
|
||||
copy=Copy.COPY_1_GOLD,
|
||||
)
|
||||
if op_code in OpCodes.DISABLE_REBOOT_FILE_HANDLING:
|
||||
if op_code in OpCode.DISABLE_REBOOT_FILE_HANDLING:
|
||||
q.add_log_cmd("Disabling reboot file handling")
|
||||
user_data = bytearray([0])
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
||||
action_id=ActionId.SWITCH_REBOOT_FILE_HANDLING,
|
||||
user_data=user_data,
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.ENABLE_REBOOT_FILE_HANDLING:
|
||||
if op_code in OpCode.ENABLE_REBOOT_FILE_HANDLING:
|
||||
q.add_log_cmd("Enabling reboot file handling")
|
||||
user_data = bytearray([1])
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
||||
action_id=ActionId.SWITCH_REBOOT_FILE_HANDLING,
|
||||
user_data=user_data,
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.RESET_ALL_REBOOT_COUNTERS:
|
||||
if op_code in OpCode.RESET_ALL_REBOOT_COUNTERS:
|
||||
q.add_log_cmd("Resetting all reboot counters")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.RESET_REBOOT_COUNTER,
|
||||
action_id=ActionId.RESET_REBOOT_COUNTER,
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_00:
|
||||
if op_code in OpCode.RESET_REBOOT_COUNTER_00:
|
||||
reset_specific_boot_counter(q, 0, 0)
|
||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_01:
|
||||
if op_code in OpCode.RESET_REBOOT_COUNTER_01:
|
||||
reset_specific_boot_counter(q, 0, 1)
|
||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_10:
|
||||
if op_code in OpCode.RESET_REBOOT_COUNTER_10:
|
||||
reset_specific_boot_counter(q, 1, 0)
|
||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_11:
|
||||
if op_code in OpCode.RESET_REBOOT_COUNTER_11:
|
||||
reset_specific_boot_counter(q, 1, 1)
|
||||
if op_code in OpCodes.OBSW_UPDATE_FROM_SD_0:
|
||||
if op_code in OpCode.OBSW_UPDATE_FROM_SD_0:
|
||||
q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_0)
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_SD_0))
|
||||
if op_code in OpCodes.OBSW_UPDATE_FROM_SD_1:
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionId.UPDATE_OBSW_FROM_SD_0))
|
||||
if op_code in OpCode.OBSW_UPDATE_FROM_SD_1:
|
||||
q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_1)
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_SD_1))
|
||||
if op_code in OpCodes.OBSW_UPDATE_FROM_TMP:
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionId.UPDATE_OBSW_FROM_SD_1))
|
||||
if op_code in OpCode.OBSW_UPDATE_FROM_TMP:
|
||||
q.add_log_cmd(Info.OBSW_UPDATE_FROM_TMP)
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_TMP))
|
||||
if op_code in OpCodes.SWITCH_TO_SD_0:
|
||||
q.add_pus_tc(pack_obsw_update_cmd(ActionId.UPDATE_OBSW_FROM_TMP))
|
||||
if op_code in OpCode.SWITCH_TO_SD_0:
|
||||
q.add_log_cmd(Info.SWITCH_TO_SD_0)
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_0
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionId.SWITCH_TO_SD_0
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.SWITCH_TO_SD_1:
|
||||
if op_code in OpCode.SWITCH_TO_SD_1:
|
||||
q.add_log_cmd(Info.SWITCH_TO_SD_1)
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_1
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionId.SWITCH_TO_SD_1
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.SWITCH_TO_BOTH_SD_CARDS:
|
||||
if op_code in OpCode.SWITCH_TO_BOTH_SD_CARDS:
|
||||
while True:
|
||||
active_sd_card = int(input("Please specify active SD cqrd [0/1]: "))
|
||||
if active_sd_card not in [0, 1]:
|
||||
@ -244,13 +246,13 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.SWITCH_TO_BOTH_SD_CARDS,
|
||||
action_id=ActionId.SWITCH_TO_BOTH_SD_CARDS,
|
||||
user_data=bytes([active_sd_card]),
|
||||
)
|
||||
)
|
||||
if op_code in OpCodes.GET_HK:
|
||||
if op_code in OpCode.GET_HK:
|
||||
q.add_log_cmd("Requesting housekeeping set")
|
||||
sid = make_sid(object_id=CORE_CONTROLLER_ID, set_id=SetIds.HK)
|
||||
sid = make_sid(object_id=CORE_CONTROLLER_ID, set_id=SetId.HK)
|
||||
q.add_pus_tc(generate_one_hk_command(sid))
|
||||
|
||||
|
||||
@ -259,12 +261,18 @@ def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int):
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.RESET_REBOOT_COUNTER,
|
||||
action_id=ActionId.RESET_REBOOT_COUNTER,
|
||||
user_data=bytes([chip, copy]),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def create_full_reboot_cmds() -> PusTelecommand:
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionId.FULL_REBOOT
|
||||
)
|
||||
|
||||
|
||||
def determine_reboot_params() -> (bool, Chip, Copy):
|
||||
chip_select = -1
|
||||
copy_select = -1
|
||||
@ -308,25 +316,47 @@ def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
||||
)
|
||||
|
||||
|
||||
def perform_reboot_cmd(
|
||||
def add_xsc_reboot_cmd(
|
||||
q: DefaultPusQueueHelper,
|
||||
reboot_self: bool,
|
||||
chip: Chip = Chip.NONE,
|
||||
copy: Copy = Copy.NONE,
|
||||
):
|
||||
tc_data = bytearray()
|
||||
if reboot_self:
|
||||
q.add_log_cmd("Packing reboot command for current image")
|
||||
else:
|
||||
q.add_log_cmd(f"Packing reboot command for chip {chip} and copy {copy}")
|
||||
q.add_pus_tc(create_xsc_reboot_cmds(reboot_self, chip, copy))
|
||||
|
||||
|
||||
def create_xsc_reboot_cmds(
|
||||
reboot_self: bool,
|
||||
chip: Chip = Chip.NONE,
|
||||
copy: Copy = Copy.NONE,
|
||||
) -> PusTelecommand:
|
||||
tc_data = bytearray()
|
||||
if reboot_self:
|
||||
tc_data.append(True)
|
||||
else:
|
||||
tc_data.append(False)
|
||||
tc_data.append(chip)
|
||||
tc_data.append(copy)
|
||||
q.add_log_cmd(f"Packing reboot command for chip {chip} and copy {copy}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID,
|
||||
action_id=ActionIds.XSC_REBOOT,
|
||||
user_data=tc_data,
|
||||
)
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionId.XSC_REBOOT, user_data=tc_data
|
||||
)
|
||||
|
||||
|
||||
def handle_core_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetId.HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(temperature, ps_voltage, pl_voltage) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
printout = (
|
||||
f"Chip Temperature [°C] {temperature} | PS Voltage [mV] {ps_voltage} | "
|
||||
f"PL Voltage [mV] {pl_voltage}"
|
||||
)
|
||||
pw.dlog(printout)
|
||||
printer.print_validity_buffer(validity_buffer=hk_data[inc_len:], num_vars=3)
|
@ -12,12 +12,12 @@ from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Subservices as ModeSubservices
|
||||
|
||||
|
||||
class OpCodes(str, enum.Enum):
|
||||
class OpCode(str, enum.Enum):
|
||||
OFF = "off"
|
||||
REPORT_ALL_MODES = "report_modes"
|
||||
|
||||
|
||||
class PayloadModes(enum.IntEnum):
|
||||
class PayloadMode(enum.IntEnum):
|
||||
OFF = 0
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ class Info(str, enum.Enum):
|
||||
|
||||
|
||||
HANDLER_LIST: Dict[str, Tuple[int, str]] = {
|
||||
OpCodes.OFF: (PayloadModes.OFF, Info.OFF),
|
||||
OpCode.OFF: (PayloadMode.OFF, Info.OFF),
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ def build_acs_subsystem_cmd(p: ServiceProviderParams):
|
||||
op_code = p.op_code
|
||||
q = p.queue_helper
|
||||
info_prefix = "ACS Subsystem"
|
||||
if op_code in OpCodes.REPORT_ALL_MODES:
|
||||
if op_code in OpCode.REPORT_ALL_MODES:
|
||||
q.add_log_cmd(f"{info_prefix}: {Info.REPORT_ALL_MODES}")
|
||||
q.add_pus_tc(
|
||||
PusTelecommand(
|
||||
@ -60,6 +60,6 @@ def build_acs_subsystem_cmd(p: ServiceProviderParams):
|
||||
@tmtc_definitions_provider
|
||||
def add_payload_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCodes.OFF, Info.OFF)
|
||||
oce.add(OpCodes.REPORT_ALL_MODES, Info.REPORT_ALL_MODES)
|
||||
oce.add(OpCode.OFF, Info.OFF)
|
||||
oce.add(OpCode.REPORT_ALL_MODES, Info.REPORT_ALL_MODES)
|
||||
defs.add_service(CustomServiceList.PL_SS, "Payload Subsystem", oce)
|
||||
|
@ -16,7 +16,7 @@ from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class ActionIds:
|
||||
class ActionId:
|
||||
DUMP_MRAM = 1
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ def pack_ploc_memory_dumper_cmd(
|
||||
def pack_mram_dump_cmd(object_id: bytes) -> bytearray:
|
||||
start = int(input("Start address: 0x"), 16)
|
||||
end = int(input("End address: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", ActionIds.DUMP_MRAM)
|
||||
command = object_id + struct.pack("!I", ActionId.DUMP_MRAM)
|
||||
command = command + struct.pack("!I", start)
|
||||
command = command + struct.pack("!I", end)
|
||||
return bytearray(command)
|
||||
|
@ -23,6 +23,7 @@ from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from eive_tmtc.utility.input_helper import InputHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
MANUAL_INPUT = "1"
|
||||
@ -37,16 +38,19 @@ mpsoc_file_dict = {
|
||||
"2": ["0:/flash", "0:/flash"],
|
||||
}
|
||||
|
||||
sequence_file_dict = {
|
||||
SEQ_FILE_NAMES = ["0:/EM16/231", "0:/EQ04/E-75", "0:/EQ01/E130"]
|
||||
SEQ_FILE_DICT = {
|
||||
MANUAL_INPUT: ["manual input", ""],
|
||||
"2": ["0:/EM16/231", "0:/EM16/231"],
|
||||
"3": ["0:/EQ04/E-75", "0:/EQ04/E-75"],
|
||||
"2": [f"16QRM On Carrier 200 MBd ({SEQ_FILE_NAMES[0]})", f"{SEQ_FILE_NAMES[0]}"],
|
||||
"3": [f"QPSK On Carrier 780 MBd ({SEQ_FILE_NAMES[1]})", f"{SEQ_FILE_NAMES[1]}"],
|
||||
"4": [f"Maximum Bandwidth QPSK ({SEQ_FILE_NAMES[2]})", f"{SEQ_FILE_NAMES[2]}"],
|
||||
}
|
||||
|
||||
|
||||
CARRIAGE_RETURN = 0xD
|
||||
|
||||
|
||||
class CommandIds(enum.IntEnum):
|
||||
class CommandId(enum.IntEnum):
|
||||
TC_MEM_WRITE = 1
|
||||
TC_MEM_READ = 2
|
||||
FLASH_WRITE = 9
|
||||
@ -64,6 +68,30 @@ class CommandIds(enum.IntEnum):
|
||||
RELEASE_UART_TX = 21
|
||||
|
||||
|
||||
class OpCode:
|
||||
ON = ["on"]
|
||||
OFF = ["off"]
|
||||
NORMAL = ["normal"]
|
||||
VERIFY_BOOT = ["verify_boot"]
|
||||
MODE_REPLAY = ["mode_replay"]
|
||||
MODE_IDLE = ["mode_idle"]
|
||||
REPLAY_WRITE_SEQ = ["replay_write"]
|
||||
DOWNLINK_PWR_ON = ["downlink_pwr_on"]
|
||||
REPLAY_START = ["replay_start"]
|
||||
|
||||
|
||||
class Info:
|
||||
ON = "On"
|
||||
OFF = "Off"
|
||||
NORMAL = "Normal"
|
||||
VERIFY_BOOT = "Verify boot by reading 0xdeadbeef from DEADBEEF address"
|
||||
MODE_REPLAY = "Switch to REPLAY mode"
|
||||
MODE_IDLE = "Switch to IDLE mode"
|
||||
REPLAY_WRITE_SEQ = "Replay write sequence"
|
||||
DOWNLINK_PWR_ON = "Downlink Power On"
|
||||
REPLAY_START = "Replay Start"
|
||||
|
||||
|
||||
class MemAddresses(enum.IntEnum):
|
||||
DEADBEEF = 0x40000004
|
||||
|
||||
@ -76,22 +104,22 @@ class PlocReplyIds(enum.IntEnum):
|
||||
@tmtc_definitions_provider
|
||||
def add_ploc_mpsoc_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add("0", "Ploc MPSoC: Set mode off")
|
||||
oce.add("1", "Ploc MPSoC: Set mode on")
|
||||
oce.add("2", "Ploc MPSoC: Set mode normal")
|
||||
oce.add(OpCode.OFF, Info.OFF)
|
||||
oce.add(OpCode.ON, Info.ON)
|
||||
oce.add(OpCode.NORMAL, Info.NORMAL)
|
||||
oce.add("3", "Ploc MPSoC: Memory write")
|
||||
oce.add("4", "Ploc MPSoC: Memory read")
|
||||
oce.add("5", "Ploc MPSoC: Flash write")
|
||||
oce.add("6", "Ploc MPSoC: Flash delete")
|
||||
oce.add("7", "Ploc MPSoC: Replay start")
|
||||
oce.add(OpCode.REPLAY_START, Info.REPLAY_START)
|
||||
oce.add("8", "Ploc MPSoC: Replay stop")
|
||||
oce.add("9", "Ploc MPSoC: Downlink pwr on")
|
||||
oce.add(OpCode.DOWNLINK_PWR_ON, Info.DOWNLINK_PWR_ON)
|
||||
oce.add("10", "Ploc MPSoC: Downlink pwr off")
|
||||
oce.add("11", "Ploc MPSoC: Replay write sequence")
|
||||
oce.add(OpCode.REPLAY_WRITE_SEQ, Info.REPLAY_WRITE_SEQ)
|
||||
oce.add("12", "Ploc MPSoC: OBSW reset sequence count")
|
||||
oce.add("13", "Ploc MPSoC: Read DEADBEEF address")
|
||||
oce.add("14", "Ploc MPSoC: Mode replay")
|
||||
oce.add("15", "Ploc MPSoC: Mode idle")
|
||||
oce.add(OpCode.VERIFY_BOOT, "Ploc MPSoC: Read DEADBEEF address")
|
||||
oce.add(OpCode.MODE_REPLAY, Info.MODE_REPLAY)
|
||||
oce.add(OpCode.MODE_IDLE, Info.MODE_IDLE)
|
||||
oce.add("16", "Ploc MPSoC: Tc cam command send")
|
||||
oce.add("17", "Ploc MPSoC: Set UART TX tristate")
|
||||
oce.add("18", "Ploc MPSoC: Relesase UART TX")
|
||||
@ -102,21 +130,22 @@ def add_ploc_mpsoc_cmds(defs: TmtcDefinitionWrapper):
|
||||
def pack_ploc_mpsoc_commands(p: ServiceProviderParams):
|
||||
object_id = get_object_ids().get(PLOC_MPSOC_ID)
|
||||
q = p.queue_helper
|
||||
prefix = "PLOC MPSoC"
|
||||
op_code = p.op_code
|
||||
q.add_log_cmd(
|
||||
f"Generate command for PLOC MPSoC with object id: {object_id.as_hex_string}"
|
||||
)
|
||||
obyt = object_id.as_bytes
|
||||
if op_code == "0":
|
||||
q.add_log_cmd("PLOC MPSoC: Set mode off")
|
||||
if op_code in OpCode.OFF:
|
||||
q.add_log_cmd(f"{prefix}: {Info.OFF}")
|
||||
command = pack_mode_data(obyt, Modes.OFF, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code == "1":
|
||||
q.add_log_cmd("PLOC MPSoC: Set mode on")
|
||||
if op_code in OpCode.ON:
|
||||
q.add_log_cmd(f"{prefix}: {Info.ON}")
|
||||
data = pack_mode_data(obyt, Modes.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == "2":
|
||||
q.add_log_cmd("PLOC MPSoC: Mode Normal")
|
||||
if op_code in OpCode.NORMAL:
|
||||
q.add_log_cmd(f"{prefix}: {Info.NORMAL}")
|
||||
data = pack_mode_data(object_id.as_bytes, Modes.NORMAL, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
|
||||
if op_code == "3":
|
||||
@ -143,64 +172,64 @@ def pack_ploc_mpsoc_commands(p: ServiceProviderParams):
|
||||
q.add_log_cmd("PLOC MPSoC: Flash delete")
|
||||
data = prepare_flash_delete_cmd(object_id.as_bytes)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "7":
|
||||
q.add_log_cmd("PLOC MPSoC: Replay start")
|
||||
if op_code in OpCode.REPLAY_START:
|
||||
q.add_log_cmd(f"{prefix}: {Info.REPLAY_START}")
|
||||
data = prepare_replay_start_cmd(object_id.as_bytes)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("PLOC MPSoC: Replay stop")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.TC_REPLAY_STOP)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.TC_REPLAY_STOP)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "9":
|
||||
q.add_log_cmd("PLOC MPSoC: Downlink pwr on")
|
||||
if op_code in OpCode.DOWNLINK_PWR_ON:
|
||||
q.add_log_cmd(f"{prefix}: {OpCode.DOWNLINK_PWR_ON}")
|
||||
data = prepare_downlink_pwr_on_cmd(object_id.as_bytes)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "10":
|
||||
q.add_log_cmd("PLOC MPSoC: Downlink pwr off")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.TC_DOWNLINK_PWR_OFF)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.TC_DOWNLINK_PWR_OFF)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "11":
|
||||
q.add_log_cmd("PLOC MPSoC: Replay write sequence")
|
||||
if op_code in OpCode.REPLAY_WRITE_SEQ:
|
||||
q.add_log_cmd(f"{prefix}: {Info.REPLAY_WRITE_SEQ}")
|
||||
data = prepare_replay_write_sequence_cmd(object_id.as_bytes)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "12":
|
||||
q.add_log_cmd("PLOC MPSoC: Reset OBSW sequence count")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.OBSW_RESET_SEQ_COUNT)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.OBSW_RESET_SEQ_COUNT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "13":
|
||||
if op_code in OpCode.VERIFY_BOOT:
|
||||
num_words = 1
|
||||
q.add_log_cmd("PLOC MPSoC: Read DEADBEEF address")
|
||||
q.add_log_cmd(f"{prefix} {Info.VERIFY_BOOT}")
|
||||
data = (
|
||||
object_id.as_bytes
|
||||
+ struct.pack("!I", CommandIds.TC_MEM_READ)
|
||||
+ struct.pack("!I", CommandId.TC_MEM_READ)
|
||||
+ struct.pack("!I", MemAddresses.DEADBEEF)
|
||||
+ struct.pack("!H", num_words)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "14":
|
||||
if op_code in OpCode.MODE_REPLAY:
|
||||
q.add_log_cmd("PLOC MPSoC: Tc mode replay")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.TC_MODE_REPLAY)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.TC_MODE_REPLAY)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "15":
|
||||
if op_code in OpCode.MODE_IDLE:
|
||||
q.add_log_cmd("PLOC MPSoC: Tc mode idle")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.TC_MODE_IDLE)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.TC_MODE_IDLE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "16":
|
||||
q.add_log_cmd("PLOC MPSoC: Tc cam command send")
|
||||
cam_cmd = input("Specify cam command string: ")
|
||||
data = (
|
||||
object_id.as_bytes
|
||||
+ struct.pack("!I", CommandIds.TC_CAM_CMD_SEND)
|
||||
+ struct.pack("!I", CommandId.TC_CAM_CMD_SEND)
|
||||
+ bytearray(cam_cmd, "utf-8")
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "17":
|
||||
q.add_log_cmd("PLOC MPSoC: Set UART TX tristate")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.SET_UART_TX_TRISTATE)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.SET_UART_TX_TRISTATE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if op_code == "18":
|
||||
q.add_log_cmd("PLOC MPSoC: Release UART TX")
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandIds.RELEASE_UART_TX)
|
||||
data = object_id.as_bytes + struct.pack("!I", CommandId.RELEASE_UART_TX)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
|
||||
|
||||
@ -217,7 +246,7 @@ def generate_write_mem_command(
|
||||
"""
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_MEM_WRITE)
|
||||
+ struct.pack("!I", CommandId.TC_MEM_WRITE)
|
||||
+ struct.pack("!I", memory_address)
|
||||
+ struct.pack("!H", mem_len)
|
||||
+ struct.pack("!I", memory_data)
|
||||
@ -230,7 +259,7 @@ def prepare_mem_read_command(object_id: bytes) -> bytearray:
|
||||
num_words = int(input("PLOC MPSoC specify number of words (32-bit) to read: "))
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_MEM_READ)
|
||||
+ struct.pack("!I", CommandId.TC_MEM_READ)
|
||||
+ struct.pack("!I", memory_address)
|
||||
+ struct.pack("!H", num_words)
|
||||
)
|
||||
@ -242,7 +271,7 @@ def prepare_flash_write_cmd(object_id: bytes) -> bytearray:
|
||||
mpsocFile = get_mpsoc_file()
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.FLASH_WRITE)
|
||||
+ struct.pack("!I", CommandId.FLASH_WRITE)
|
||||
+ bytearray(obcFile, "utf-8")
|
||||
+ bytearray(mpsocFile, "utf-8")
|
||||
)
|
||||
@ -253,7 +282,7 @@ def prepare_flash_delete_cmd(object_id: bytes) -> bytearray:
|
||||
file = get_mpsoc_file()
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_FLASH_DELETE)
|
||||
+ struct.pack("!I", CommandId.TC_FLASH_DELETE)
|
||||
+ bytearray(file, "utf-8")
|
||||
)
|
||||
return bytearray(command)
|
||||
@ -263,7 +292,7 @@ def prepare_replay_start_cmd(object_id: bytes) -> bytearray:
|
||||
replay = int(input("Specify replay mode (0 - once, 1 - repeated): "))
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_REPLAY_START)
|
||||
+ struct.pack("!I", CommandId.TC_REPLAY_START)
|
||||
+ struct.pack("!B", replay)
|
||||
)
|
||||
return bytearray(command)
|
||||
@ -274,7 +303,7 @@ def prepare_downlink_pwr_on_cmd(object_id: bytes) -> bytearray:
|
||||
lane_rate = int(input("Specify lane rate (0 - 9): "))
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_DOWNLINK_PWR_ON)
|
||||
+ struct.pack("!I", CommandId.TC_DOWNLINK_PWR_ON)
|
||||
+ struct.pack("!B", mode)
|
||||
+ struct.pack("!B", lane_rate)
|
||||
)
|
||||
@ -282,14 +311,14 @@ def prepare_downlink_pwr_on_cmd(object_id: bytes) -> bytearray:
|
||||
|
||||
|
||||
def prepare_replay_write_sequence_cmd(object_id: bytes) -> bytearray:
|
||||
null_terminator = 0
|
||||
use_decoding = int(input("Use decoding (set to 1): "))
|
||||
file = get_sequence_file()
|
||||
command = (
|
||||
object_id
|
||||
+ struct.pack("!I", CommandIds.TC_REPLAY_WRITE_SEQUENCE)
|
||||
+ struct.pack("!I", CommandId.TC_REPLAY_WRITE_SEQUENCE)
|
||||
+ struct.pack("!B", use_decoding)
|
||||
+ bytearray(file, "utf-8")
|
||||
# + bytes([0])
|
||||
)
|
||||
return bytearray(command)
|
||||
|
||||
@ -318,10 +347,10 @@ def get_mpsoc_file() -> str:
|
||||
|
||||
def get_sequence_file() -> str:
|
||||
LOGGER.info("Specify sequence file")
|
||||
input_helper = InputHelper(sequence_file_dict)
|
||||
input_helper = InputHelper(SEQ_FILE_DICT)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
file = input("Ploc MPSoC: Specify absolute name file: ")
|
||||
else:
|
||||
file = sequence_file_dict[key][1]
|
||||
file = SEQ_FILE_DICT[key][1]
|
||||
return file
|
||||
|
@ -64,7 +64,26 @@ event_buffer_path_dict = {
|
||||
}
|
||||
|
||||
|
||||
class SupvActionIds:
|
||||
FACTORY_RESET_OPS = {
|
||||
0x00: "CLEAR_MRAM_EVENT_BUF",
|
||||
0x01: "CLEAR_MRAM_ADC_BUF",
|
||||
0x02: "FACTORY_DEFAULT_MRAM_SYS_CFG",
|
||||
0x03: "FACTORY_DEFAULT_MRAM_DBG_CFG",
|
||||
0x04: "FACTORY_DEFAULT_BOOTMAN_CFG",
|
||||
0x05: "FACTORY_DEFAULT_DATA_LOGGER",
|
||||
0x06: "DATA_LOGGER_OP_DATA_TO_ZERO",
|
||||
0x07: "FACTORY_DEFAULT_MRAM_LATCHUP_MON",
|
||||
0x08: "FACTORY_DEFAULT_ADC_MON_CFG",
|
||||
0x09: "FACTORY_DEFAULT_WATCHDOG_MON_CFG",
|
||||
0x0A: "FACTORY_DEFAULT_HK_CFG",
|
||||
0x0B: "FACTORY_DEFAULT_MEM_MAN_CFG",
|
||||
0x10: "REDWIRE_TASK_1",
|
||||
0x11: "REDWIRE_TASK_2",
|
||||
0x12: "REDWIRE_TASK_3",
|
||||
}
|
||||
|
||||
|
||||
class SupvActionId:
|
||||
HK_REPORT = 1
|
||||
START_MPSOC = 3
|
||||
SHUTWOWN_MPSOC = 4
|
||||
@ -92,11 +111,8 @@ class SupvActionIds:
|
||||
SET_GPIO = 34
|
||||
READ_GPIO = 35
|
||||
RESTART_SUPERVISOR = 36
|
||||
FACTORY_RESET_CLEAR_ALL = 37
|
||||
LOGGING_REQUEST_COUNTERS = 38
|
||||
UPDATE_IMAGE_DATA = 39
|
||||
FACTORY_RESET_CLEAR_MIRROR = 40
|
||||
FACTORY_RESET_CLEAR_CIRCULAR = 41
|
||||
FACTORY_RESET = 39
|
||||
START_MPSOC_QUIET = 45
|
||||
SET_SHUTDOWN_TIMEOUT = 46
|
||||
FACTORY_FLASH = 47
|
||||
@ -133,6 +149,7 @@ class OpCodes:
|
||||
REQ_BOOT_STATUS_REPORT = ["13", "boot_report"]
|
||||
START_UPDATE = ["42", "start_update"]
|
||||
PERFORM_UPDATE = ["update"]
|
||||
FACTORY_RESET = ["factory_reset"]
|
||||
MEM_CHECK = ["mem_check"]
|
||||
|
||||
|
||||
@ -147,6 +164,7 @@ class Info(str, enum.Enum):
|
||||
FACTORY_FLASH = "Factory Flash Mode"
|
||||
PERFORM_UPDATE = "Start or continue MPSoC SW update at starting bytes"
|
||||
START_UPDATE = "Start new MPSoC SW update"
|
||||
FACTORY_RESET = "Factory Reset of loggers"
|
||||
REQ_BOOT_STATUS_REPORT = "Request boot status report and HK"
|
||||
MEM_CHECK = "Memory Check"
|
||||
SEL_NVM = "Select NVM"
|
||||
@ -165,6 +183,7 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(OpCodes.SHUTDOWN_MPSOC, "PLOC Supervisor: Shutdown MPSoC")
|
||||
oce.add(OpCodes.SEL_NVM, Info.SEL_NVM)
|
||||
oce.add(OpCodes.SET_TIME_REF, Info.SET_TIME_REF)
|
||||
oce.add(OpCodes.FACTORY_RESET, Info.FACTORY_RESET)
|
||||
oce.add("8", "PLOC Supervisor: Set max restart tries")
|
||||
oce.add("9", "PLOC Supervisor: Reset MPSoC")
|
||||
oce.add("11", "PLOC Supervisor: Set boot timeout")
|
||||
@ -183,9 +202,6 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add("35", "PLOC Supervisor: Set GPIO")
|
||||
oce.add("36", "PLOC Supervisor: Read GPIO")
|
||||
oce.add("37", "PLOC Supervisor: Restart supervisor")
|
||||
oce.add("38", "PLOC Supervisor: Factory reset clear all")
|
||||
oce.add("39", "PLOC Supervisor: Factory reset clear mirror entries")
|
||||
oce.add("40", "PLOC Supervisor: Factory reset clear circular entries")
|
||||
oce.add(OpCodes.PERFORM_UPDATE, Info.PERFORM_UPDATE)
|
||||
oce.add(OpCodes.START_UPDATE, Info.START_UPDATE)
|
||||
oce.add("43", "PLOC Supervisor: Terminate supervisor process")
|
||||
@ -228,7 +244,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||
if op_code in OpCodes.HK_TO_OBC:
|
||||
q.add_log_cmd(f"{prefix}: {Info.HK_TO_OBC}")
|
||||
command = obyt + struct.pack("!I", SupvActionIds.HK_REPORT)
|
||||
command = obyt + struct.pack("!I", SupvActionId.HK_REPORT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.REQUEST_HK:
|
||||
q.add_log_cmd(f"{prefix}: {Info.REQUEST_HK}")
|
||||
@ -237,11 +253,11 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
q.add_pus_tc(cmd)
|
||||
elif op_code in OpCodes.START_MPSOC:
|
||||
q.add_log_cmd("PLOC Supervisor: Start MPSoC")
|
||||
command = obyt + struct.pack("!I", SupvActionIds.START_MPSOC)
|
||||
command = obyt + struct.pack("!I", SupvActionId.START_MPSOC)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.SHUTDOWN_MPSOC:
|
||||
q.add_log_cmd("PLOC Supervisor: Shutdown MPSoC")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.SHUTWOWN_MPSOC)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.SHUTWOWN_MPSOC)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.SEL_NVM:
|
||||
q.add_log_cmd("PLOC Supervisor: Select MPSoC boot image")
|
||||
@ -251,40 +267,58 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
bp2 = int(input("BP2 (0 or 1): "))
|
||||
command = pack_sel_boot_image_cmd(object_id.as_bytes, mem, bp0, bp1, bp2)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.FACTORY_RESET:
|
||||
q.add_log_cmd(f"{prefix}: {Info.FACTORY_RESET}")
|
||||
key = -1
|
||||
while True:
|
||||
print("Please select the key for a factory reset operation")
|
||||
for key, val in FACTORY_RESET_OPS.items():
|
||||
print(f"{key}: {val}")
|
||||
key = int(input("Key Select: "))
|
||||
if key not in FACTORY_RESET_OPS:
|
||||
print("Key invalid!")
|
||||
break
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=PLOC_SUPV_ID,
|
||||
action_id=SupvActionId.FACTORY_RESET,
|
||||
user_data=bytes([key]),
|
||||
)
|
||||
)
|
||||
if op_code == "8":
|
||||
q.add_log_cmd("PLOC Supervisor: Set max restart tries")
|
||||
restart_tries = int(input("Specify maximum restart tries: "))
|
||||
command = (
|
||||
object_id.as_bytes
|
||||
+ struct.pack("!I", SupvActionIds.SET_MAX_RESTART_TRIES)
|
||||
+ struct.pack("!I", SupvActionId.SET_MAX_RESTART_TRIES)
|
||||
+ struct.pack("!B", restart_tries)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "9":
|
||||
q.add_log_cmd("PLOC Supervisor: Reset MPSoC")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.RESET_MPSOC)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.RESET_MPSOC)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.SET_TIME_REF:
|
||||
q.add_log_cmd("PLOC Supervisor: Set time reference")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.SET_TIME_REF)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.SET_TIME_REF)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "11":
|
||||
q.add_log_cmd("PLOC Supervisor: Set boot timeout")
|
||||
boot_timeout = int(input("Specify boot timeout [ms]: "))
|
||||
command = (
|
||||
object_id.as_bytes
|
||||
+ struct.pack("!I", SupvActionIds.SET_BOOT_TIMEOUT)
|
||||
+ struct.pack("!I", SupvActionId.SET_BOOT_TIMEOUT)
|
||||
+ struct.pack("!I", boot_timeout)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "12":
|
||||
q.add_log_cmd("PLOC Supervisor: Disable HK")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.DISABLE_HK)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.DISABLE_HK)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.REQ_BOOT_STATUS_REPORT:
|
||||
q.add_log_cmd(f"{prefix}: {Info.REQ_BOOT_STATUS_REPORT}")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.GET_BOOT_STATUS_REPORT
|
||||
"!I", SupvActionId.GET_BOOT_STATUS_REPORT
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
q.add_wait_seconds(2.0)
|
||||
@ -318,13 +352,13 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
if op_code == "26":
|
||||
q.add_log_cmd("PLOC Supervisor: Request latchup status report")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.GET_LATCHUP_STATUS_REPORT
|
||||
"!I", SupvActionId.GET_LATCHUP_STATUS_REPORT
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "27":
|
||||
q.add_log_cmd("PLOC Supervisor: Copy ADC data to MRAM")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.COPY_ADC_DATA_TO_MRAM
|
||||
"!I", SupvActionId.COPY_ADC_DATA_TO_MRAM
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "30":
|
||||
@ -346,25 +380,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
if op_code == "37":
|
||||
q.add_log_cmd("PLOC Supervisor: Restart supervisor")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.RESTART_SUPERVISOR
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "38":
|
||||
q.add_log_cmd("PLOC Supervisor: Factory reset clear all")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.FACTORY_RESET_CLEAR_ALL
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "39":
|
||||
q.add_log_cmd("PLOC Supervisor: Factory reset clear mirror entries")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.FACTORY_RESET_CLEAR_MIRROR
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "40":
|
||||
q.add_log_cmd("PLOC Supervisor: Factory reset clear circular entries")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.FACTORY_RESET_CLEAR_CIRCULAR
|
||||
"!I", SupvActionId.RESTART_SUPERVISOR
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.START_UPDATE:
|
||||
@ -378,14 +394,12 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
if op_code == "43":
|
||||
q.add_log_cmd("PLOC Supervisor: Terminate supervisor process")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.TERMINATE_SUPV_HELPER
|
||||
"!I", SupvActionId.TERMINATE_SUPV_HELPER
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "44":
|
||||
q.add_log_cmd("PLOC Supervisor: Start MPSoC quiet")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.START_MPSOC_QUIET
|
||||
)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.START_MPSOC_QUIET)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "45":
|
||||
q.add_log_cmd("PLOC Supervisor: Set shutdown timeout")
|
||||
@ -393,15 +407,15 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.FACTORY_FLASH:
|
||||
q.add_log_cmd(f"{prefix}: {Info.FACTORY_FLASH}")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.FACTORY_FLASH)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.FACTORY_FLASH)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "47":
|
||||
q.add_log_cmd("PLOC Supervisor: Enable auto TM")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.ENABLE_AUTO_TM)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.ENABLE_AUTO_TM)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "48":
|
||||
q.add_log_cmd("PLOC Supervisor: Disable auto TM")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.DISABLE_AUTO_TM)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.DISABLE_AUTO_TM)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "51":
|
||||
q.add_log_cmd("PLOC Supervisor: Logging request event buffers")
|
||||
@ -410,7 +424,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
if op_code == "52":
|
||||
q.add_log_cmd("PLOC Supervisor: Logging clear counters")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.LOGGING_CLEAR_COUNTERS
|
||||
"!I", SupvActionId.LOGGING_CLEAR_COUNTERS
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "53":
|
||||
@ -420,18 +434,18 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
if op_code == "54":
|
||||
q.add_log_cmd("PLOC Supervisor: Logging request counters")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.LOGGING_REQUEST_COUNTERS
|
||||
"!I", SupvActionId.LOGGING_REQUEST_COUNTERS
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "55":
|
||||
q.add_log_cmd("PLOC Supervisor: Request ADC report")
|
||||
command = object_id.as_bytes + struct.pack(
|
||||
"!I", SupvActionIds.REQUEST_ADC_REPORT
|
||||
"!I", SupvActionId.REQUEST_ADC_REPORT
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "56":
|
||||
q.add_log_cmd("PLOC Supervisor: Reset PL")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.RESET_PL)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.RESET_PL)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "57":
|
||||
q.add_log_cmd("PLOC Supervisor: Enable NVMs")
|
||||
@ -439,14 +453,14 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
nvm3 = int(input("Enable (1) or disable(0) NVM 3: "))
|
||||
command = (
|
||||
object_id.as_bytes
|
||||
+ struct.pack("!I", SupvActionIds.ENABLE_NVMS)
|
||||
+ struct.pack("!I", SupvActionId.ENABLE_NVMS)
|
||||
+ struct.pack("B", nvm01)
|
||||
+ struct.pack("B", nvm3)
|
||||
)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code == "58":
|
||||
q.add_log_cmd("PLOC Supervisor: Continue update")
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.CONTINUE_UPDATE)
|
||||
command = object_id.as_bytes + struct.pack("!I", SupvActionId.CONTINUE_UPDATE)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||
if op_code in OpCodes.MEM_CHECK:
|
||||
custom_data = bytearray()
|
||||
@ -462,7 +476,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
||||
f"address {start_address}"
|
||||
)
|
||||
command = make_fsfw_action_cmd(
|
||||
object_id.as_bytes, SupvActionIds.MEM_CHECK, custom_data
|
||||
object_id.as_bytes, SupvActionId.MEM_CHECK, custom_data
|
||||
)
|
||||
q.add_pus_tc(command)
|
||||
|
||||
@ -477,7 +491,7 @@ def pack_sel_boot_image_cmd(
|
||||
@param bp1 Partition pin 1
|
||||
@param bp2 Partition pin 2
|
||||
"""
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SEL_MPSOC_BOOT_IMAGE)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SEL_MPSOC_BOOT_IMAGE)
|
||||
command = command + struct.pack("!B", mem)
|
||||
command = command + struct.pack("!B", bp0)
|
||||
command = command + struct.pack("!B", bp1)
|
||||
@ -495,7 +509,7 @@ def pack_update_available_cmd(object_id: bytes) -> bytearray:
|
||||
image_size = 222
|
||||
image_crc = 0x0
|
||||
number_of_packets = 150
|
||||
command = object_id + struct.pack("!I", SupvActionIds.UPDATE_AVAILABLE)
|
||||
command = object_id + struct.pack("!I", SupvActionId.UPDATE_AVAILABLE)
|
||||
command = command + struct.pack("!B", image_select)
|
||||
command = command + struct.pack("!B", image_partition)
|
||||
command = command + struct.pack("!I", image_size)
|
||||
@ -513,9 +527,9 @@ def pack_lachtup_alert_cmd(object_id: bytes, state: bool) -> bytearray:
|
||||
latchup_id = get_latchup_id()
|
||||
command = bytearray()
|
||||
if state:
|
||||
command = object_id + struct.pack("!I", SupvActionIds.ENABLE_LATCHUP_ALERT)
|
||||
command = object_id + struct.pack("!I", SupvActionId.ENABLE_LATCHUP_ALERT)
|
||||
else:
|
||||
command = object_id + struct.pack("!I", SupvActionIds.DISABLE_LATCHUP_ALERT)
|
||||
command = object_id + struct.pack("!I", SupvActionId.DISABLE_LATCHUP_ALERT)
|
||||
command = command + struct.pack("!B", latchup_id)
|
||||
return bytearray(command)
|
||||
|
||||
@ -544,7 +558,7 @@ def pack_set_alert_limit_cmd(object_id: bytes) -> bytearray:
|
||||
latchup_id = get_latchup_id()
|
||||
dutycycle = int(input("Specify dutycycle: "))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_ALERT_LIMIT)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SET_ALERT_LIMIT)
|
||||
command = command + struct.pack("!B", latchup_id)
|
||||
command = command + struct.pack("!I", dutycycle)
|
||||
return bytearray(command)
|
||||
@ -556,7 +570,7 @@ def pack_set_adc_enabled_channels_cmd(object_id: bytes) -> bytearray:
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
ch = int(input("Specify ch: 0x"), 16)
|
||||
cmd = object_id + struct.pack("!I", SupvActionIds.SET_ADC_ENABLED_CHANNELS)
|
||||
cmd = object_id + struct.pack("!I", SupvActionId.SET_ADC_ENABLED_CHANNELS)
|
||||
cmd = cmd + struct.pack("!H", ch)
|
||||
return bytearray(cmd)
|
||||
|
||||
@ -564,7 +578,7 @@ def pack_set_adc_enabled_channels_cmd(object_id: bytes) -> bytearray:
|
||||
def pack_set_adc_window_and_stride_cmd(object_id: bytes) -> bytearray:
|
||||
window_size = int(input("Specify window size: "))
|
||||
striding_step_size = int(input("Specify striding step size: "))
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_WINDOW_AND_STRIDE)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SET_ADC_WINDOW_AND_STRIDE)
|
||||
command = command + struct.pack("!H", window_size)
|
||||
command = command + struct.pack("!H", striding_step_size)
|
||||
return bytearray(command)
|
||||
@ -572,21 +586,21 @@ def pack_set_adc_window_and_stride_cmd(object_id: bytes) -> bytearray:
|
||||
|
||||
def pack_set_adc_threshold_cmd(object_id: bytes) -> bytearray:
|
||||
threshold = int(input("Specify threshold: "))
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_THRESHOLD)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SET_ADC_THRESHOLD)
|
||||
command = command + struct.pack("!I", threshold)
|
||||
return bytearray(command)
|
||||
|
||||
|
||||
def pack_select_nvm_cmd(object_id: bytes) -> bytearray:
|
||||
mem = int(input("Specify NVM (0 - NVM0, 1 - MVM1): "))
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SELECT_NVM)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SELECT_NVM)
|
||||
command = command + struct.pack("!B", mem)
|
||||
return bytearray(command)
|
||||
|
||||
|
||||
def pack_auto_em_tests_cmd(object_id: bytes) -> bytearray:
|
||||
test = int(input("Specify test (1 - complete, 2 - short): "))
|
||||
command = object_id + struct.pack("!I", SupvActionIds.RUN_AUTO_EM_TESTS)
|
||||
command = object_id + struct.pack("!I", SupvActionId.RUN_AUTO_EM_TESTS)
|
||||
command = command + struct.pack("!B", test)
|
||||
return bytearray(command)
|
||||
|
||||
@ -594,7 +608,7 @@ def pack_auto_em_tests_cmd(object_id: bytes) -> bytearray:
|
||||
def pack_mram_wipe_cmd(object_id: bytes) -> bytearray:
|
||||
start = int(input("Start address: 0x"), 16)
|
||||
stop = int(input("Stop address: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", SupvActionIds.WIPE_MRAM)
|
||||
command = object_id + struct.pack("!I", SupvActionId.WIPE_MRAM)
|
||||
command = command + struct.pack("!I", start)
|
||||
command = command + struct.pack("!I", stop)
|
||||
return bytearray(command)
|
||||
@ -626,7 +640,7 @@ def pack_update_command(object_id: bytes, new_update: bool) -> bytearray:
|
||||
else:
|
||||
raise ValueError("Invalid input, use y or n")
|
||||
command += object_id
|
||||
command += struct.pack("!I", SupvActionIds.PERFORM_UPDATE)
|
||||
command += struct.pack("!I", SupvActionId.PERFORM_UPDATE)
|
||||
command += bytearray(update_file, "utf-8")
|
||||
# Adding null terminator
|
||||
command += struct.pack("!B", 0)
|
||||
@ -641,7 +655,7 @@ def pack_update_command(object_id: bytes, new_update: bool) -> bytearray:
|
||||
def pack_set_shutdown_timeout_command(object_id: bytes) -> bytearray:
|
||||
command = bytearray()
|
||||
command += object_id
|
||||
command += struct.pack("!I", SupvActionIds.SET_SHUTDOWN_TIMEOUT)
|
||||
command += struct.pack("!I", SupvActionId.SET_SHUTDOWN_TIMEOUT)
|
||||
timeout = int(input("Specify shutdown timeout (ms): "))
|
||||
command += struct.pack("!I", timeout)
|
||||
return command
|
||||
@ -650,7 +664,7 @@ def pack_set_shutdown_timeout_command(object_id: bytes) -> bytearray:
|
||||
def pack_logging_buffer_request(object_id: bytes) -> bytearray:
|
||||
command = bytearray()
|
||||
command += object_id
|
||||
command += struct.pack("!I", SupvActionIds.LOGGING_REQUEST_EVENT_BUFFERS)
|
||||
command += struct.pack("!I", SupvActionId.LOGGING_REQUEST_EVENT_BUFFERS)
|
||||
path = get_event_buffer_path()
|
||||
command += bytearray(path, "utf-8")
|
||||
return command
|
||||
@ -660,7 +674,7 @@ def pack_set_gpio_cmd(object_id: bytes) -> bytearray:
|
||||
port = int(input("Specify port: 0x"), 16)
|
||||
pin = int(input("Specify pin: 0x"), 16)
|
||||
val = int(input("Specify val: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", SupvActionIds.SET_GPIO)
|
||||
command = object_id + struct.pack("!I", SupvActionId.SET_GPIO)
|
||||
command = command + struct.pack("!B", port)
|
||||
command = command + struct.pack("!B", pin)
|
||||
command = command + struct.pack("!B", val)
|
||||
@ -670,14 +684,14 @@ def pack_set_gpio_cmd(object_id: bytes) -> bytearray:
|
||||
def pack_read_gpio_cmd(object_id: bytes) -> bytearray:
|
||||
port = int(input("Specify port: 0x"), 16)
|
||||
pin = int(input("Specify pin: 0x"), 16)
|
||||
command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO)
|
||||
command = object_id + struct.pack("!I", SupvActionId.READ_GPIO)
|
||||
command = command + struct.pack("!B", port)
|
||||
command = command + struct.pack("!B", pin)
|
||||
return bytearray(command)
|
||||
|
||||
|
||||
def pack_logging_set_topic(object_id: bytes) -> bytearray:
|
||||
command = object_id + struct.pack("!I", SupvActionIds.LOGGING_SET_TOPIC)
|
||||
command = object_id + struct.pack("!I", SupvActionId.LOGGING_SET_TOPIC)
|
||||
tpc = int(input("Specify logging topic: "))
|
||||
command += struct.pack("!B", tpc)
|
||||
return bytearray(command)
|
||||
|
@ -12,7 +12,7 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
add_gomspace_cmd_defs,
|
||||
req_hk_cmds,
|
||||
pack_common_power_cmds,
|
||||
SetIds,
|
||||
SetId,
|
||||
OBC_ENDIANNESS,
|
||||
unpack_array_in_data,
|
||||
)
|
||||
@ -42,7 +42,7 @@ class ACUHkTable:
|
||||
wdt_gnd_left = gs.TableEntry(bytearray([0x00, 0x74]), gs.TableEntry.uint32_size)
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
TEST = ["0", "test"]
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ def add_acu_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_gomspace_cmd_defs(oce)
|
||||
|
||||
oce.add(keys=OpCodes.TEST, info=Info.TEST)
|
||||
oce.add(keys=OpCode.TEST, info=Info.TEST)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.ACU.value,
|
||||
info="ACU Device",
|
||||
@ -72,7 +72,7 @@ def pack_acu_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
|
||||
|
||||
def acu_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
req_hk_cmds("ACU", q, op_code, ACU_HANDLER_ID, [SetIds.CORE, SetIds.AUX])
|
||||
req_hk_cmds("ACU", q, op_code, ACU_HANDLER_ID, [SetId.CORE, SetId.AUX])
|
||||
|
||||
|
||||
class ACUTestProcedure:
|
||||
|
@ -4,12 +4,13 @@ from typing import List
|
||||
from eive_tmtc.gomspace.gomspace_common import (
|
||||
pack_set_u8_param_command,
|
||||
Channel,
|
||||
GomspaceDeviceActionIds,
|
||||
GomspaceDeviceActionId,
|
||||
prompt_and_pack_set_integer_param_command,
|
||||
prompt_and_pack_get_param_command,
|
||||
pack_request_config_command,
|
||||
pack_gnd_wdt_reset_command,
|
||||
ParamTypes,
|
||||
pack_reboot_command,
|
||||
)
|
||||
from eive_tmtc.gomspace.gomspace_pdu_definitions import OUT_ENABLE_LIST
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
@ -26,13 +27,14 @@ from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32, ObjectIdBase
|
||||
|
||||
|
||||
class GomspaceOpCodes:
|
||||
class GomspaceOpCode:
|
||||
GET_PARAM = ["get_param"]
|
||||
SET_INTEGER_PARAM = ["set_int_param"]
|
||||
SAVE_TABLE = ["save_table"]
|
||||
RESET_GND_WATCHDOG = ["reset_gnd_wdt"]
|
||||
SAVE_TABLE_DEFAULT = ["save_table_default"]
|
||||
LOAD_TABLE = ["load_table"]
|
||||
REBOOT = ["reboot"]
|
||||
REQUEST_CONFIG_TABLE = ["cfg_table"]
|
||||
|
||||
|
||||
@ -44,6 +46,7 @@ class GsInfo:
|
||||
SAVE_TABLE = "Save table non-volatile (file)"
|
||||
SAVE_TABLE_DEFAULT = "Save table non-volatile (default)"
|
||||
LOAD_TABLE = "Load Table"
|
||||
REBOOT = "Reboot PCDU module"
|
||||
|
||||
|
||||
class PowerInfo:
|
||||
@ -96,6 +99,7 @@ class PowerOpCodes:
|
||||
PL_CAM_ON = ["cam_on"]
|
||||
PL_CAM_OFF = ["cam_off"]
|
||||
|
||||
REBOOT = ["reboot"]
|
||||
INFO_CORE = ["info"]
|
||||
ENABLE_INFO_HK = ["info_hk_on"]
|
||||
DISABLE_INFO_HK = ["info_hk_off"]
|
||||
@ -109,7 +113,7 @@ class PowerOpCodes:
|
||||
PRINT_LATCHUPS = ["print_latchups"]
|
||||
|
||||
|
||||
class SetIds:
|
||||
class SetId:
|
||||
CORE = 1
|
||||
AUX = 2
|
||||
CONFIG = 3
|
||||
@ -123,13 +127,13 @@ def pack_common_power_cmds(
|
||||
interval = float(input("Specify HK interval in floating point seconds: "))
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.ENABLE_INFO_HK} with interval {interval}")
|
||||
cmds = enable_periodic_hk_command_with_interval(
|
||||
True, make_sid(objb, SetIds.CORE), interval
|
||||
True, make_sid(objb, SetId.CORE), interval
|
||||
)
|
||||
for cmd in cmds:
|
||||
q.add_pus_tc(cmd)
|
||||
if op_code in PowerOpCodes.DISABLE_INFO_HK:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.DISABLE_INFO_HK}")
|
||||
q.add_pus_tc(disable_periodic_hk_command(True, make_sid(objb, SetIds.CORE)))
|
||||
q.add_pus_tc(disable_periodic_hk_command(True, make_sid(objb, SetId.CORE)))
|
||||
|
||||
|
||||
def pack_common_gomspace_cmds(
|
||||
@ -140,30 +144,33 @@ def pack_common_gomspace_cmds(
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_SWITCH_V_I}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
object_id=objb, action_id=GomspaceDeviceActionId.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in PowerOpCodes.REBOOT:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.REBOOT}")
|
||||
q.add_pus_tc(pack_reboot_command(object_id))
|
||||
if op_code in PowerOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_LATCHUPS}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
object_id=objb, action_id=GomspaceDeviceActionId.PRINT_LATCHUPS
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.SET_INTEGER_PARAM:
|
||||
if op_code in GomspaceOpCode.SET_INTEGER_PARAM:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.SET_PARAMETER}")
|
||||
print("Please specify the parameter type from index")
|
||||
for idx, v in enumerate(ParamTypes):
|
||||
print(f"{idx}: {v.name}")
|
||||
ptype = int(input("Index: "))
|
||||
prompt_and_pack_set_integer_param_command(q, object_id, ParamTypes(ptype))
|
||||
if op_code in GomspaceOpCodes.GET_PARAM:
|
||||
if op_code in GomspaceOpCode.GET_PARAM:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.GET_PARAMETER}")
|
||||
prompt_and_pack_get_param_command(q, object_id)
|
||||
if op_code in GomspaceOpCodes.REQUEST_CONFIG_TABLE:
|
||||
if op_code in GomspaceOpCode.REQUEST_CONFIG_TABLE:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.REQUEST_CONFIG_TABLE}")
|
||||
q.add_pus_tc(pack_request_config_command(object_id.as_bytes))
|
||||
if op_code in GomspaceOpCodes.SAVE_TABLE:
|
||||
if op_code in GomspaceOpCode.SAVE_TABLE:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.SAVE_TABLE}")
|
||||
source_table = int(
|
||||
input(
|
||||
@ -182,11 +189,11 @@ def pack_common_gomspace_cmds(
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes,
|
||||
action_id=GomspaceDeviceActionIds.SAVE_TABLE,
|
||||
action_id=GomspaceDeviceActionId.SAVE_TABLE,
|
||||
user_data=bytes([source_table]),
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.SAVE_TABLE_DEFAULT:
|
||||
if op_code in GomspaceOpCode.SAVE_TABLE_DEFAULT:
|
||||
source_table = int(
|
||||
input(
|
||||
"Source table [0: Board Config, 1: Module Config, 2: Calibration Parameter]: "
|
||||
@ -197,11 +204,11 @@ def pack_common_gomspace_cmds(
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes,
|
||||
action_id=GomspaceDeviceActionIds.SAVE_TABLE_DEFAULT,
|
||||
action_id=GomspaceDeviceActionId.SAVE_TABLE_DEFAULT,
|
||||
user_data=bytes([source_table]),
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.LOAD_TABLE:
|
||||
if op_code in GomspaceOpCode.LOAD_TABLE:
|
||||
target_table = int(
|
||||
input(
|
||||
"Target table ID [0: Board Config, 1: Module Config, 2: Calibration Parameter, "
|
||||
@ -225,11 +232,11 @@ def pack_common_gomspace_cmds(
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes,
|
||||
action_id=GomspaceDeviceActionIds.LOAD_TABLE,
|
||||
action_id=GomspaceDeviceActionId.LOAD_TABLE,
|
||||
user_data=bytes([source_table, target_table]),
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.RESET_GND_WATCHDOG:
|
||||
if op_code in GomspaceOpCode.RESET_GND_WATCHDOG:
|
||||
q.add_log_cmd(f"{prefix}: {GsInfo.RESET_GND_WATCHDOG}")
|
||||
q.add_pus_tc(pack_gnd_wdt_reset_command(object_id))
|
||||
|
||||
@ -266,12 +273,14 @@ def generic_on_cmd(
|
||||
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||
):
|
||||
q.add_log_cmd(info_str + " on")
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.on,
|
||||
)
|
||||
q.add_pus_tc(create_generic_on_cmd(object_id, out_idx))
|
||||
|
||||
|
||||
def create_generic_on_cmd(object_id: bytes, out_idx: int):
|
||||
return pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.on,
|
||||
)
|
||||
|
||||
|
||||
@ -279,12 +288,14 @@ def generic_off_cmd(
|
||||
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||
):
|
||||
q.add_log_cmd(info_str + " off")
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.off,
|
||||
)
|
||||
q.add_pus_tc(create_generic_off_cmd(object_id, out_idx))
|
||||
|
||||
|
||||
def create_generic_off_cmd(object_id: bytes, out_idx: int):
|
||||
return pack_set_u8_param_command(
|
||||
object_id,
|
||||
OUT_ENABLE_LIST[out_idx].parameter_address,
|
||||
Channel.off,
|
||||
)
|
||||
|
||||
|
||||
@ -305,13 +316,14 @@ def add_gomspace_cmd_defs(oce: OpCodeEntry):
|
||||
info=PowerInfo.REQUEST_AUX_HK_ONCE,
|
||||
)
|
||||
oce.add(keys=PowerOpCodes.PRINT_LATCHUPS, info=PowerInfo.PRINT_LATCHUPS)
|
||||
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCodes.SET_INTEGER_PARAM, info=GsInfo.SET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCodes.REQUEST_CONFIG_TABLE, info=GsInfo.REQUEST_CONFIG_TABLE)
|
||||
oce.add(keys=GomspaceOpCodes.SAVE_TABLE, info=GsInfo.SAVE_TABLE)
|
||||
oce.add(keys=GomspaceOpCodes.SAVE_TABLE_DEFAULT, info=GsInfo.SAVE_TABLE_DEFAULT)
|
||||
oce.add(keys=GomspaceOpCodes.LOAD_TABLE, info=GsInfo.LOAD_TABLE)
|
||||
oce.add(keys=GomspaceOpCodes.RESET_GND_WATCHDOG, info=GsInfo.RESET_GND_WATCHDOG)
|
||||
oce.add(keys=GomspaceOpCode.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCode.REBOOT, info=GsInfo.REBOOT)
|
||||
oce.add(keys=GomspaceOpCode.SET_INTEGER_PARAM, info=GsInfo.SET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCode.REQUEST_CONFIG_TABLE, info=GsInfo.REQUEST_CONFIG_TABLE)
|
||||
oce.add(keys=GomspaceOpCode.SAVE_TABLE, info=GsInfo.SAVE_TABLE)
|
||||
oce.add(keys=GomspaceOpCode.SAVE_TABLE_DEFAULT, info=GsInfo.SAVE_TABLE_DEFAULT)
|
||||
oce.add(keys=GomspaceOpCode.LOAD_TABLE, info=GsInfo.LOAD_TABLE)
|
||||
oce.add(keys=GomspaceOpCode.RESET_GND_WATCHDOG, info=GsInfo.RESET_GND_WATCHDOG)
|
||||
|
||||
|
||||
OBC_ENDIANNESS = "<"
|
||||
|
@ -9,7 +9,7 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
pack_common_gomspace_cmds,
|
||||
req_hk_cmds,
|
||||
pack_common_power_cmds,
|
||||
SetIds,
|
||||
SetId,
|
||||
)
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from eive_tmtc.gomspace.gomspace_common import (
|
||||
@ -27,11 +27,11 @@ from eive_tmtc.config.object_ids import P60_DOCK_HANDLER
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
class P60OpCodes:
|
||||
STACK_3V3_ON = ["stack-3v3-on", "1"]
|
||||
STACK_3V3_OFF = ["stack-3v3-off", "2"]
|
||||
STACK_5V_ON = ["stack-5v-on", "3"]
|
||||
STACK_5V_OFF = ["stack-5v-off", "4"]
|
||||
class P60OpCode:
|
||||
STACK_3V3_ON = ["stack_3v3_on", "1"]
|
||||
STACK_3V3_OFF = ["stack_3v3_off", "2"]
|
||||
STACK_5V_ON = ["stack_5v_on", "3"]
|
||||
STACK_5V_OFF = ["stack_5v_off", "4"]
|
||||
TEST = ["test", "0"]
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
pack_common_power_cmds("P60 Dock", object_id, q, op_code)
|
||||
pack_common_gomspace_cmds("P60 Dock", object_id, q, op_code)
|
||||
p60_dock_req_hk_cmds(q, op_code)
|
||||
if op_code in P60OpCodes.STACK_3V3_ON:
|
||||
if op_code in P60OpCode.STACK_3V3_ON:
|
||||
q.add_log_cmd(P60Info.STACK_3V3_ON)
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
@ -112,7 +112,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
Channel.on,
|
||||
)
|
||||
)
|
||||
if op_code in P60OpCodes.STACK_3V3_OFF:
|
||||
if op_code in P60OpCode.STACK_3V3_OFF:
|
||||
q.add_log_cmd(P60Info.STACK_3V3_OFF)
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
@ -121,7 +121,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
Channel.off,
|
||||
)
|
||||
)
|
||||
if op_code in P60OpCodes.STACK_5V_ON:
|
||||
if op_code in P60OpCode.STACK_5V_ON:
|
||||
q.add_log_cmd(P60Info.STACK_5V_ON)
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
@ -130,7 +130,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
Channel.on,
|
||||
)
|
||||
)
|
||||
if op_code in P60OpCodes.STACK_5V_OFF:
|
||||
if op_code in P60OpCode.STACK_5V_OFF:
|
||||
q.add_log_cmd(P60Info.STACK_5V_OFF)
|
||||
q.add_pus_tc(
|
||||
pack_set_u8_param_command(
|
||||
@ -238,4 +238,4 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
|
||||
|
||||
def p60_dock_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
req_hk_cmds("P60 Dock", q, op_code, P60_DOCK_HANDLER, [SetIds.CORE, SetIds.AUX])
|
||||
req_hk_cmds("P60 Dock", q, op_code, P60_DOCK_HANDLER, [SetId.CORE, SetId.AUX])
|
||||
|
@ -12,12 +12,14 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
generic_on_cmd,
|
||||
generic_off_cmd,
|
||||
add_gomspace_cmd_defs,
|
||||
create_generic_on_cmd,
|
||||
create_generic_off_cmd,
|
||||
pack_common_power_cmds,
|
||||
GomspaceOpCodes,
|
||||
GomspaceOpCode,
|
||||
GsInfo,
|
||||
PowerInfo,
|
||||
add_common_power_defs,
|
||||
SetIds,
|
||||
SetId,
|
||||
)
|
||||
|
||||
from eive_tmtc.gomspace.gomspace_common import *
|
||||
@ -89,7 +91,7 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
|
||||
|
||||
def pdu1_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
req_hk_cmds("PDU1", q, op_code, PDU_1_HANDLER_ID, [SetIds.CORE, SetIds.AUX])
|
||||
req_hk_cmds("PDU1", q, op_code, PDU_1_HANDLER_ID, [SetId.CORE, SetId.AUX])
|
||||
|
||||
|
||||
def info_on_pdu1(base: str) -> str:
|
||||
@ -164,7 +166,7 @@ def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
keys=PowerOpCodes.PRINT_SWITCH_V_I,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
oce.add(keys=GomspaceOpCode.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||
|
||||
defs.add_service(
|
||||
name=CustomServiceList.PDU1.value,
|
||||
@ -173,65 +175,148 @@ def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
)
|
||||
|
||||
|
||||
PDU1_DICT = {
|
||||
Pdu1ChIndex.TCS: Pdu1InfoBase.TCS,
|
||||
Pdu1ChIndex.STR: Pdu1InfoBase.STR,
|
||||
Pdu1ChIndex.SYRLINKS: Pdu1InfoBase.SYRLINKS,
|
||||
Pdu1ChIndex.MGT: Pdu1InfoBase.MGT,
|
||||
Pdu1ChIndex.SCEX: Pdu1InfoBase.SCEX,
|
||||
Pdu1ChIndex.ACS_A: Pdu1InfoBase.ACS_A,
|
||||
Pdu1ChIndex.SUS_N: Pdu1InfoBase.SUS_N,
|
||||
}
|
||||
|
||||
|
||||
def pdu1_on_cmd(idx: Pdu1ChIndex, q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, PDU1_DICT[idx], idx)
|
||||
|
||||
|
||||
def pdu1_off_cmd(idx: Pdu1ChIndex, q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, PDU1_DICT[idx], idx)
|
||||
|
||||
|
||||
def tcs_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||
pdu1_on_cmd(Pdu1ChIndex.TCS, q)
|
||||
|
||||
|
||||
def create_tcs_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.TCS)
|
||||
|
||||
|
||||
def tcs_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||
pdu1_off_cmd(Pdu1ChIndex.TCS, q)
|
||||
|
||||
|
||||
def create_tcs_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.TCS)
|
||||
|
||||
|
||||
def syrlinks_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||
pdu1_on_cmd(Pdu1ChIndex.SYRLINKS, q)
|
||||
|
||||
|
||||
def create_syrlinks_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SYRLINKS)
|
||||
|
||||
|
||||
def syrlinks_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||
pdu1_off_cmd(Pdu1ChIndex.SYRLINKS, q)
|
||||
|
||||
|
||||
def create_syrlinks_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SYRLINKS)
|
||||
|
||||
|
||||
def startracker_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||
pdu1_on_cmd(Pdu1ChIndex.STR, q)
|
||||
|
||||
|
||||
def create_startracker_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.STR)
|
||||
|
||||
|
||||
def startracker_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||
pdu1_on_cmd(Pdu1ChIndex.STR, q)
|
||||
|
||||
|
||||
def create_startracker_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.STR)
|
||||
|
||||
|
||||
def mgt_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||
pdu1_on_cmd(Pdu1ChIndex.MGT, q)
|
||||
|
||||
|
||||
def create_mgt_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.MGT)
|
||||
|
||||
|
||||
def mgt_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||
pdu1_off_cmd(Pdu1ChIndex.MGT, q)
|
||||
|
||||
|
||||
def create_mgt_off_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.MGT)
|
||||
|
||||
|
||||
def sun_sensor_nominal_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||
pdu1_on_cmd(Pdu1ChIndex.SUS_N, q)
|
||||
|
||||
|
||||
def create_sun_sensor_nominal_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SUS_N)
|
||||
|
||||
|
||||
def sun_sensor_nominal_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||
pdu1_off_cmd(Pdu1ChIndex.SUS_N, q)
|
||||
|
||||
|
||||
def create_sun_sensor_nominal_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SUS_N)
|
||||
|
||||
|
||||
def solar_cell_experiment_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||
pdu1_on_cmd(Pdu1ChIndex.SCEX, q)
|
||||
|
||||
|
||||
def create_solar_cell_experiment_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SCEX)
|
||||
|
||||
|
||||
def solar_cell_experiment_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||
pdu1_off_cmd(Pdu1ChIndex.SCEX, q)
|
||||
|
||||
|
||||
def create_solar_cell_experiment_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.SCEX)
|
||||
|
||||
|
||||
def ploc_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||
pdu1_on_cmd(Pdu1ChIndex.PLOC, q)
|
||||
|
||||
|
||||
def create_ploc_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.PLOC)
|
||||
|
||||
|
||||
def ploc_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||
pdu1_off_cmd(Pdu1ChIndex.PLOC, q)
|
||||
|
||||
|
||||
def create_ploc_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.PLOC)
|
||||
|
||||
|
||||
def acs_board_a_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||
pdu1_on_cmd(Pdu1ChIndex.ACS_A, q)
|
||||
|
||||
|
||||
def create_acs_board_a_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.ACS_A)
|
||||
|
||||
|
||||
def acs_board_a_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||
pdu1_off_cmd(Pdu1ChIndex.ACS_A, q)
|
||||
|
||||
|
||||
def create_acs_board_a_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.ACS_A)
|
||||
|
@ -15,7 +15,9 @@ from eive_tmtc.tmtc.power.common_power import (
|
||||
generic_off_cmd,
|
||||
add_gomspace_cmd_defs,
|
||||
pack_common_power_cmds,
|
||||
SetIds,
|
||||
create_generic_on_cmd,
|
||||
create_generic_off_cmd,
|
||||
SetId,
|
||||
add_common_power_defs,
|
||||
)
|
||||
from eive_tmtc.gomspace.gomspace_common import *
|
||||
@ -238,7 +240,7 @@ def add_pdu2_common_defs(oce: OpCodeEntry):
|
||||
|
||||
|
||||
def pdu2_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||
req_hk_cmds("PDU2", q, op_code, PDU_2_HANDLER_ID, [SetIds.CORE, SetIds.AUX])
|
||||
req_hk_cmds("PDU2", q, op_code, PDU_2_HANDLER_ID, [SetId.CORE, SetId.AUX])
|
||||
|
||||
|
||||
def pl_pcdu_bat_nom_on_cmd(q: DefaultPusQueueHelper):
|
||||
@ -257,61 +259,117 @@ def reaction_wheel_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||
|
||||
|
||||
def create_reaction_wheel_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.RW)
|
||||
|
||||
|
||||
def reaction_wheel_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||
|
||||
|
||||
def create_reaction_wheel_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.RW)
|
||||
|
||||
|
||||
def heater_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||
|
||||
|
||||
def create_heater_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.HEATER)
|
||||
|
||||
|
||||
def heater_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||
|
||||
|
||||
def create_heater_off_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.HEATER)
|
||||
|
||||
|
||||
def sus_red_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||
|
||||
|
||||
def create_sus_red_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.SUS_R)
|
||||
|
||||
|
||||
def sus_red_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||
|
||||
|
||||
def create_sus_red_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.SUS_R)
|
||||
|
||||
|
||||
def solar_array_deployment_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(
|
||||
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||
)
|
||||
|
||||
|
||||
def create_solar_array_deployment_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.SOLAR_ARRAY_DEPL)
|
||||
|
||||
|
||||
def solar_array_deployment_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(
|
||||
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||
)
|
||||
|
||||
|
||||
def create_solar_array_deployment_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.SOLAR_ARRAY_DEPL)
|
||||
|
||||
|
||||
def pl_pcdu_bat_red_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(
|
||||
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||
)
|
||||
|
||||
|
||||
def create_pl_pcdu_bat_red_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_PCDU_BAT_RED)
|
||||
|
||||
|
||||
def pl_pcdu_bat_red_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(
|
||||
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||
)
|
||||
|
||||
|
||||
def create_pl_pcdu_bat_red_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_PCDU_BAT_RED)
|
||||
|
||||
|
||||
def acs_board_b_side_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||
|
||||
|
||||
def create_acs_board_b_side_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.ACS_B)
|
||||
|
||||
|
||||
def acs_board_b_side_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||
|
||||
|
||||
def create_acs_board_b_side_off_cmd() -> PusTelecommand:
|
||||
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.ACS_B)
|
||||
|
||||
|
||||
def payload_camera_on_cmd(q: DefaultPusQueueHelper):
|
||||
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||
|
||||
|
||||
def create_payload_camera_on_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_CAM)
|
||||
|
||||
|
||||
def payload_camera_off_cmd(q: DefaultPusQueueHelper):
|
||||
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||
|
||||
|
||||
def create_payload_camera_off_cmd() -> PusTelecommand:
|
||||
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_CAM)
|
||||
|
@ -27,7 +27,7 @@ from eive_tmtc.tmtc.power.pdu2 import (
|
||||
from tmtccmd import get_console_logger
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
|
||||
from eive_tmtc.tmtc.power.p60dock import P60OpCodes, P60Info, p60_dock_req_hk_cmds
|
||||
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.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
@ -75,12 +75,12 @@ def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
@tmtc_definitions_provider
|
||||
def add_p60_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=P60OpCodes.STACK_3V3_ON, info=P60Info.STACK_3V3_ON)
|
||||
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
|
||||
oce.add(keys=P60OpCodes.STACK_5V_ON, info=P60Info.STACK_5V_ON)
|
||||
oce.add(keys=P60OpCodes.STACK_5V_OFF, info=P60Info.STACK_5V_OFF)
|
||||
oce.add(keys=P60OpCode.STACK_3V3_ON, info=P60Info.STACK_3V3_ON)
|
||||
oce.add(keys=P60OpCode.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
|
||||
oce.add(keys=P60OpCode.STACK_5V_ON, info=P60Info.STACK_5V_ON)
|
||||
oce.add(keys=P60OpCode.STACK_5V_OFF, info=P60Info.STACK_5V_OFF)
|
||||
add_gomspace_cmd_defs(oce)
|
||||
oce.add(keys=P60OpCodes.TEST, info="P60 Tests")
|
||||
oce.add(keys=P60OpCode.TEST, info="P60 Tests")
|
||||
defs.add_service(
|
||||
name=CustomServiceList.P60DOCK.value, info="P60 Device", op_code_entry=oce
|
||||
)
|
||||
|
@ -3,14 +3,14 @@ from typing import List, Tuple
|
||||
|
||||
from eive_tmtc.tmtc.power.acu import acu_config_table_handler
|
||||
from eive_tmtc.tmtc.power.common_power import (
|
||||
SetIds,
|
||||
SetId,
|
||||
unpack_array_in_data,
|
||||
OBC_ENDIANNESS,
|
||||
)
|
||||
from tmtccmd.util import ObjectIdBase
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.gomspace.gomspace_common import GomspaceDeviceActionIds
|
||||
from eive_tmtc.gomspace.gomspace_common import GomspaceDeviceActionId
|
||||
from eive_tmtc.config.object_ids import (
|
||||
PDU_1_HANDLER_ID,
|
||||
PDU_2_HANDLER_ID,
|
||||
@ -151,7 +151,7 @@ def handle_pdu_data(
|
||||
pw = PrintWrapper(printer=printer)
|
||||
current_idx = 0
|
||||
priv_idx = pdu_idx - 1
|
||||
if set_id == SetIds.AUX or set_id == SetIds.AUX:
|
||||
if set_id == SetId.AUX or set_id == SetId.AUX:
|
||||
fmt_str = "!hhBBBIIH"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(
|
||||
@ -188,7 +188,7 @@ def handle_pdu_data(
|
||||
wdt.print()
|
||||
pw.dlog(f"PDU Device Types: 0:FRAM|1:ADC|2:ADC|3:TempSens|4,5,6,7:Reserved")
|
||||
dev_parser.print(pw=pw)
|
||||
if set_id == SetIds.CORE or set_id == SetIds.CORE:
|
||||
if set_id == SetId.CORE or set_id == SetId.CORE:
|
||||
pw.dlog(f"Received PDU HK from PDU {pdu_idx}")
|
||||
current_list = []
|
||||
for idx in range(len(PDU1_CHANNELS_NAMES)):
|
||||
@ -229,7 +229,7 @@ def handle_pdu_data(
|
||||
|
||||
def handle_p60_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw = PrintWrapper(printer=printer)
|
||||
if set_id == SetIds.CORE:
|
||||
if set_id == SetId.CORE:
|
||||
pw.dlog("Received P60 Core HK. Voltages in mV, currents in mA")
|
||||
current_idx = 0
|
||||
current_list = []
|
||||
@ -276,7 +276,7 @@ def handle_p60_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw.dlog(temps)
|
||||
pw.dlog(batt_info)
|
||||
printer.print_validity_buffer(validity_buffer=hk_data[current_idx:], num_vars=9)
|
||||
if set_id == SetIds.AUX:
|
||||
if set_id == SetId.AUX:
|
||||
pw.dlog("Received P60 AUX HK. Voltages in mV, currents in mA")
|
||||
current_idx = 0
|
||||
latchup_list = []
|
||||
@ -355,7 +355,7 @@ def gen_six_entry_u16_list(hk_data: bytes, current_idx: int) -> Tuple[int, List[
|
||||
|
||||
def handle_acu_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
pw = PrintWrapper(printer=printer)
|
||||
if set_id == SetIds.CORE:
|
||||
if set_id == SetId.CORE:
|
||||
mppt_mode = hk_data[0]
|
||||
current_idx = 1
|
||||
current_idx, currents = gen_six_entry_u16_list(
|
||||
@ -399,7 +399,7 @@ def handle_acu_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
printer.print_validity_buffer(
|
||||
validity_buffer=hk_data[current_idx:], num_vars=12
|
||||
)
|
||||
if set_id == SetIds.AUX:
|
||||
if set_id == SetId.AUX:
|
||||
current_idx = 0
|
||||
fmt_str = "!BBB"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
@ -439,7 +439,7 @@ def handle_acu_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
def handle_get_param_data_reply(
|
||||
obj_id: ObjectIdBase, action_id: int, pw: PrintWrapper, custom_data: bytearray
|
||||
):
|
||||
if action_id == GomspaceDeviceActionIds.PARAM_GET:
|
||||
if action_id == GomspaceDeviceActionId.PARAM_GET:
|
||||
pw.dlog(f"Parameter Get Request received for object {obj_id}")
|
||||
header_list = [
|
||||
"Gomspace Request Code",
|
||||
@ -461,7 +461,7 @@ def handle_get_param_data_reply(
|
||||
]
|
||||
pw.dlog(f"{header_list}")
|
||||
pw.dlog(f"{content_list}")
|
||||
elif action_id == GomspaceDeviceActionIds.REQUEST_CONFIG_TABLE:
|
||||
elif action_id == GomspaceDeviceActionId.REQUEST_CONFIG_TABLE:
|
||||
print(f"Received config table with size {len(custom_data)} for object {obj_id}")
|
||||
if obj_id.as_bytes == PDU_1_HANDLER_ID or obj_id.as_bytes == PDU_2_HANDLER_ID:
|
||||
pdu_config_table_handler(pw, custom_data, obj_id)
|
||||
|
@ -22,7 +22,7 @@ from tmtccmd import get_console_logger
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class OpCodes:
|
||||
class OpCode:
|
||||
MANUAL_DEPLOYMENT = "man_depl"
|
||||
|
||||
|
||||
@ -30,14 +30,14 @@ class Info:
|
||||
MANUAL_DEPLOYMENT = "Manual Solar Array Deployment"
|
||||
|
||||
|
||||
class ActionIds:
|
||||
class ActionId:
|
||||
MANUAL_DEPLOYMENT = 5
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
def pack_sa_depl_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=OpCodes.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT)
|
||||
oce.add(keys=OpCode.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.SA_DEPLYOMENT,
|
||||
info="Solar Array Deployment",
|
||||
@ -73,6 +73,6 @@ def pack_solar_array_deployment_test_into(p: ServiceProviderParams):
|
||||
dry_run_str = ""
|
||||
q.add_log_cmd(f"Testing S/A Deployment with burn time {burn_time}{dry_run_str}")
|
||||
command = make_fsfw_action_cmd(
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID, ActionIds.MANUAL_DEPLOYMENT, user_data
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID, ActionId.MANUAL_DEPLOYMENT, user_data
|
||||
)
|
||||
q.add_pus_tc(command)
|
||||
|
@ -1 +1 @@
|
||||
tmtccmd >= 3.0.0rc2
|
||||
.
|
||||
|
@ -27,9 +27,10 @@ classifiers =
|
||||
|
||||
[options]
|
||||
install_requires =
|
||||
tmtccmd >= 3.0.0rc3
|
||||
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
|
||||
packages = find:
|
||||
python_requires = >=3.8
|
||||
python_requires = >=3.10
|
||||
include_package_data = True
|
||||
|
||||
[options.extras_require]
|
||||
mib =
|
||||
|
2
tmtcc.py
2
tmtcc.py
@ -373,7 +373,7 @@ def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
|
||||
max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt")
|
||||
)
|
||||
cfdp_ccsds_seq_count_provider = PusFileSeqCountProvider(
|
||||
file_name=Path("seqcnt_cfdp_ccsds_.txt")
|
||||
file_name=Path("seqcnt_cfdp_in_ccsds.txt")
|
||||
)
|
||||
cfdp_user = EiveCfdpUser()
|
||||
cfdp_in_ccsds_handler = CfdpInCcsdsHandler(
|
||||
|
Reference in New Issue
Block a user