Compare commits

...

16 Commits

Author SHA1 Message Date
d33013ed58 Merge pull request 'Prep v5.13.0' (#271) from prep-v5.13.0 into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #271
2024-01-30 09:25:47 +01:00
7e39a481bd Merge branch 'main' into prep-v5.13.0
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-01-30 09:24:06 +01:00
4744de8a54 changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2024-01-30 09:17:40 +01:00
916ce92bdc bump version 2024-01-30 09:17:31 +01:00
bb765ac8a0 Merge pull request 'Gens' (#270) from reran-gens into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #270
2024-01-30 09:14:38 +01:00
84f0f42783 gens
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-01-30 09:10:47 +01:00
ee2dade270 gens
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-01-30 09:07:56 +01:00
4f26c34c60 gens
All checks were successful
EIVE/-/pipeline/head This commit looks good
2024-01-29 17:14:18 +01:00
b5ae7c5f38 Merge pull request 'Add new param command' (#268) from ploc-mpsoc-skip-supv-commanding-param into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #268
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-01-29 10:15:11 +01:00
caaf937003 changelog
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-01-25 11:20:38 +01:00
1831ea8b7a add new param command
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2024-01-24 14:30:57 +01:00
747ad34eec prev v5.12.1
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-12-13 11:30:03 +01:00
2789453d57 Merge pull request 'the endianness is actually really important here' (#266) from add-cmds-to-test-scheduling into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #266
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-12-13 11:28:09 +01:00
5456d79965 the endianness is actually really important here
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-12-13 11:23:55 +01:00
4c54aa7586 Merge pull request 'small fix' (#265) from small-fix into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #265
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-12-07 13:57:49 +01:00
1a132684a6 small fix
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-12-07 13:54:09 +01:00
8 changed files with 121 additions and 26 deletions

View File

@ -10,6 +10,18 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v5.13.0] 2024-01-30
## Added
- Added new parameter commands for PLOC MPSoC to skip SUPV commanding.
# [v5.12.1] 2023-12-13
## Added
- A few new commands to test the TC scheduler.
# [v5.12.0] 2023-12-06
## Added

View File

@ -88,7 +88,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h
10805;0x2a35;HANDLING_CFDP_REQUEST_FAILED;LOW;CFDP request handling failed. P2: Returncode.;fsfw/src/fsfw/cfdp/handler/defs.h
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h
11201;0x2bc1;RATE_RECOVERY;MEDIUM;The system has recovered from a rate rotation violation.;mission/acs/defs.h
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h
11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acs/defs.h
11204;0x2bc4;MEKF_RECOVERY;INFO;MEKF is able to compute a solution again.;mission/acs/defs.h
@ -97,6 +97,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h
11208;0x2bc8;TLE_TOO_OLD;INFO;The TLE for the SGP4 Propagator has become too old.;mission/acs/defs.h
11209;0x2bc9;TLE_FILE_READ_FAILED;LOW;The TLE could not be read from the filesystem.;mission/acs/defs.h
11210;0x2bca;PTG_RATE_VIOLATION;MEDIUM;The limits for the rotation in pointing mode were violated.;mission/acs/defs.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
88 10804 0x2a34 FILENAME_TOO_LARGE_ERROR LOW P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name fsfw/src/fsfw/cfdp/handler/defs.h
89 10805 0x2a35 HANDLING_CFDP_REQUEST_FAILED LOW CFDP request handling failed. P2: Returncode. fsfw/src/fsfw/cfdp/handler/defs.h
90 11200 0x2bc0 SAFE_RATE_VIOLATION MEDIUM The limits for the rotation in safe mode were violated. mission/acs/defs.h
91 11201 0x2bc1 SAFE_RATE_RECOVERY RATE_RECOVERY MEDIUM The system has recovered from a safe rate rotation violation. The system has recovered from a rate rotation violation. mission/acs/defs.h
92 11202 0x2bc2 MULTIPLE_RW_INVALID HIGH Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained. mission/acs/defs.h
93 11203 0x2bc3 MEKF_INVALID_INFO INFO MEKF was not able to compute a solution. P1: MEKF state on exit mission/acs/defs.h
94 11204 0x2bc4 MEKF_RECOVERY INFO MEKF is able to compute a solution again. mission/acs/defs.h
97 11207 0x2bc7 SAFE_MODE_CONTROLLER_FAILURE HIGH The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate mission/acs/defs.h
98 11208 0x2bc8 TLE_TOO_OLD INFO The TLE for the SGP4 Propagator has become too old. mission/acs/defs.h
99 11209 0x2bc9 TLE_FILE_READ_FAILED LOW The TLE could not be read from the filesystem. mission/acs/defs.h
100 11210 0x2bca PTG_RATE_VIOLATION MEDIUM The limits for the rotation in pointing mode were violated. mission/acs/defs.h
101 11300 0x2c24 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/power/defs.h
102 11301 0x2c25 SWITCH_HAS_CHANGED INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/power/defs.h
103 11302 0x2c26 SWITCHING_Q7S_DENIED MEDIUM No description mission/power/defs.h

View File

@ -387,6 +387,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x4304;PUS11_InvalidRelativeTime;No description;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4305;PUS11_ContainedTcTooSmall;No description;5;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4306;PUS11_ContainedTcCrcMissmatch;No description;6;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4307;PUS11_MapIsFull;No description;7;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4400;FILS_GenericFileError;No description;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
0x4401;FILS_GenericDirError;No description;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
0x4402;FILS_FilesystemInactive;No description;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
@ -453,6 +454,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x5208;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5209;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x520a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x53a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/acs/RwHandler.h
0x53a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/acs/RwHandler.h
0x53a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/acs/RwHandler.h
0x53a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/acs/RwHandler.h
0x53a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/acs/RwHandler.h
0x53a5;RWHA_ValueNotRead;No description;165;RW_HANDLER;mission/acs/RwHandler.h
0x53b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h
0x53b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h
0x53b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h
@ -498,12 +505,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x58a1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;161;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x58a2;PLSPVhLP_PathNotExists;Received command with invalid pathname;162;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x58a3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;163;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x59a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h
0x59a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h
0x59a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h
0x59a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h
0x59a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h
0x59a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h
0x59a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h
0x59a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h
0x5aa0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h
0x5ba0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h
0x5d01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h
@ -592,9 +595,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x69b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
0x69c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
0x69c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
0x6a00;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h
0x6a01;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;1;ACS_CTRL;mission/controller/AcsController.h
0x6a02;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;2;ACS_CTRL;mission/controller/AcsController.h
0x6aa0;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;160;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
0x6aa1;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;161;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
0x6aa2;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
0x6aa3;ACSCTRL_SingleRwUnavailable;A single RW has failed.;163;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
0x6aa4;ACSCTRL_MultipleRwUnavailable;Multiple RWs have failed.;164;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
387 0x4304 PUS11_InvalidRelativeTime No description 4 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
388 0x4305 PUS11_ContainedTcTooSmall No description 5 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
389 0x4306 PUS11_ContainedTcCrcMissmatch No description 6 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
390 0x4307 PUS11_MapIsFull No description 7 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
391 0x4400 FILS_GenericFileError No description 0 FILE_SYSTEM fsfw/src/fsfw/filesystem/HasFileSystemIF.h
392 0x4401 FILS_GenericDirError No description 1 FILE_SYSTEM fsfw/src/fsfw/filesystem/HasFileSystemIF.h
393 0x4402 FILS_FilesystemInactive No description 2 FILE_SYSTEM fsfw/src/fsfw/filesystem/HasFileSystemIF.h
454 0x5208 IMTQ_CmdErrUnknown No description 8 IMTQ_HANDLER mission/acs/imtqHelpers.h
455 0x5209 IMTQ_StartupCfgError No description 9 IMTQ_HANDLER mission/acs/imtqHelpers.h
456 0x520a IMTQ_UnexpectedSelfTestReply The status reply to a self test command was received but no self test command has been sent. This should normally never happen. 10 IMTQ_HANDLER mission/acs/imtqHelpers.h
457 0x53a0 RWHA_InvalidSpeed Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000] 160 RW_HANDLER mission/acs/RwHandler.h
458 0x53a1 RWHA_InvalidRampTime Action Message with invalid ramp time was received. 161 RW_HANDLER mission/acs/RwHandler.h
459 0x53a2 RWHA_SetSpeedCommandInvalidLength Received set speed command has invalid length. Should be 6. 162 RW_HANDLER mission/acs/RwHandler.h
460 0x53a3 RWHA_ExecutionFailed Command execution failed 163 RW_HANDLER mission/acs/RwHandler.h
461 0x53a4 RWHA_CrcError Reaction wheel reply has invalid crc 164 RW_HANDLER mission/acs/RwHandler.h
462 0x53a5 RWHA_ValueNotRead No description 165 RW_HANDLER mission/acs/RwHandler.h
463 0x53b0 RWHA_SpiWriteFailure No description 176 RW_HANDLER mission/acs/rwHelpers.h
464 0x53b1 RWHA_SpiReadFailure Used by the spi send function to tell a failing read call 177 RW_HANDLER mission/acs/rwHelpers.h
465 0x53b2 RWHA_MissingStartSign Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E 178 RW_HANDLER mission/acs/rwHelpers.h
505 0x58a1 PLSPVhLP_ProcessTerminated Process has been terminated by command 161 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
506 0x58a2 PLSPVhLP_PathNotExists Received command with invalid pathname 162 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
507 0x58a3 PLSPVhLP_EventBufferReplyInvalidApid Expected event buffer TM but received space packet with other APID 163 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
508 0x59a0 SUSS_InvalidSpeed SUSS_ErrorUnlockMutex Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000] No description 160 SUS_HANDLER mission/acs/RwHandler.h mission/acs/archive/LegacySusHandler.h
509 0x59a1 SUSS_InvalidRampTime SUSS_ErrorLockMutex Action Message with invalid ramp time was received. No description 161 SUS_HANDLER mission/acs/RwHandler.h mission/acs/archive/LegacySusHandler.h
0x59a2 SUSS_SetSpeedCommandInvalidLength Received set speed command has invalid length. Should be 6. 162 SUS_HANDLER mission/acs/RwHandler.h
0x59a3 SUSS_ExecutionFailed Command execution failed 163 SUS_HANDLER mission/acs/RwHandler.h
0x59a4 SUSS_CrcError Reaction wheel reply has invalid crc 164 SUS_HANDLER mission/acs/RwHandler.h
0x59a5 SUSS_ValueNotRead No description 165 SUS_HANDLER mission/acs/RwHandler.h
510 0x5aa0 IPCI_PapbBusy No description 160 CCSDS_IP_CORE_BRIDGE linux/ipcore/PapbVcInterface.h
511 0x5ba0 PTME_UnknownVcId No description 160 PTME linux/ipcore/Ptme.h
512 0x5d01 STRHLP_SdNotMounted SD card specified in path string not mounted 1 STR_HELPER linux/acs/StrComHandler.h
595 0x69b5 SPVRTVIF_SupvHelperExecuting Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command) 181 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h
596 0x69c0 SPVRTVIF_BufTooSmall No description 192 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h
597 0x69c1 SPVRTVIF_NoReplyTimeout No description 193 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h
598 0x6a00 0x6aa0 ACSCTRL_FileDeletionFailed File deletion failed and at least one file is still existent. 0 160 ACS_CTRL mission/controller/AcsController.h mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
599 0x6a01 0x6aa1 ACSCTRL_WriteFileFailed Writing the TLE to the file has failed. 1 161 ACS_CTRL mission/controller/AcsController.h mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
600 0x6a02 0x6aa2 ACSCTRL_ReadFileFailed Reading the TLE to the file has failed. 2 162 ACS_CTRL mission/controller/AcsController.h mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
601 0x6aa3 ACSCTRL_SingleRwUnavailable A single RW has failed. 163 ACS_CTRL mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
602 0x6aa4 ACSCTRL_MultipleRwUnavailable Multiple RWs have failed. 164 ACS_CTRL mission/controller/controllerdefinitions/AcsCtrlDefinitions.h
603 0x6b02 ACSMEKF_MekfUninitialized No description 2 ACS_MEKF mission/controller/acs/MultiplicativeKalmanFilter.h
604 0x6b03 ACSMEKF_MekfNoGyrData No description 3 ACS_MEKF mission/controller/acs/MultiplicativeKalmanFilter.h
605 0x6b04 ACSMEKF_MekfNoModelVectors No description 4 ACS_MEKF mission/controller/acs/MultiplicativeKalmanFilter.h

View File

@ -893,6 +893,7 @@ def handle_attitude_estimation_data(pw: PrintWrapper, hk_data: bytes):
quest_quat = struct.unpack(
fmt_quat, hk_data[current_idx : current_idx + inc_len_quat]
)
current_idx += inc_len_quat
pw.dlog(f"{'QUEST Quaternion'.ljust(25)}: {fmt_str_4.format(*quest_quat)}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=4))
return

View File

@ -5,22 +5,25 @@ import struct
from pathlib import Path
from typing import Tuple
from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.config.definitions import CustomServiceList
from spacepackets.ecss import PusTelecommand
from tmtccmd.config import TmtcDefinitionWrapper
from tmtccmd.tmtc import DefaultPusQueueHelper
from tmtccmd.pus.s8_fsfw_action import create_action_cmd
from tmtccmd.pus.tc.s3_fsfw_hk import make_sid, generate_one_hk_command
from tmtccmd.pus.s20_fsfw_param import (
create_scalar_u8_parameter,
create_load_param_cmd,
)
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
from eive_tmtc.config.object_ids import CORE_CONTROLLER_ID
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.pus.s8_fsfw_action import create_action_cmd
from tmtccmd.pus.s11_tc_sched import (
create_enable_tc_sched_cmd,
create_disable_tc_sched_cmd,
)
from tmtccmd.pus.s20_fsfw_param import (
create_load_param_cmd,
create_scalar_u8_parameter,
)
from tmtccmd.pus.tc.s3_fsfw_hk import generate_one_hk_command, make_sid
from tmtccmd.tmtc import DefaultPusQueueHelper
from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import CORE_CONTROLLER_ID
from eive_tmtc.pus_tm.defs import PrintWrapper
_LOGGER = logging.getLogger(__name__)
@ -66,6 +69,7 @@ class ActionId(enum.IntEnum):
MV_HELPER = 53
RM_HELPER = 54
MKDIR_HELPER = 55
ENABLE_SCHEDULER = 56
class ParamId(enum.IntEnum):
@ -115,6 +119,8 @@ class OpCode:
RWD_SET_MAX_REBOOT_CNT = "rwd_max_cnt"
AUTO_SWITCH_ENABLE = "auto_switch_enable"
AUTO_SWITCH_DISABLE = "auto_switch_disable"
ENABLE_SCHEDULER = "enable_scheduler"
DISABLE_SCHEDULER = "disable_scheduler"
class Info:
@ -142,6 +148,8 @@ class Info:
MKDIR_HELPER = "Filesystem Directory Creation Helper"
AUTO_SWITCH_ENABLE = "Enable Auto-Switch Feature with a specific target image"
AUTO_SWITCH_DISABLE = "Disable Auto-Switch Feature"
ENABLE_SCHEDULER = "Enable scheduler"
DISABLE_SCHEDULER = "Disable scheduler"
class Chip(enum.IntEnum):
@ -241,6 +249,8 @@ def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCode.CP_HELPER, info=Info.CP_HELPER)
oce.add(keys=OpCode.RM_HELPER, info=Info.RM_HELPER)
oce.add(keys=OpCode.MKDIR_HELPER, info=Info.MKDIR_HELPER)
oce.add(keys=OpCode.ENABLE_SCHEDULER, info=Info.ENABLE_SCHEDULER)
oce.add(keys=OpCode.DISABLE_SCHEDULER, info=Info.DISABLE_SCHEDULER)
defs.add_service(CustomServiceList.CORE.value, "Core Controller", oce)
@ -514,6 +524,12 @@ def pack_core_commands( # noqa C901
q.add_pus_tc(
create_action_cmd(CORE_CONTROLLER_ID, ActionId.MKDIR_HELPER, user_data)
)
elif op_code == OpCode.ENABLE_SCHEDULER:
q.add_log_cmd(Info.ENABLE_SCHEDULER)
q.add_pus_tc(create_enable_tc_sched_cmd())
elif op_code == OpCode.DISABLE_SCHEDULER:
q.add_log_cmd(Info.DISABLE_SCHEDULER)
q.add_pus_tc(create_disable_tc_sched_cmd())
else:
_LOGGER.warning(
f"Unknown operation code {op_code} for core controller commands"

View File

@ -24,6 +24,7 @@ from tmtccmd.tmtc import service_provider
from tmtccmd.tmtc.decorator import ServiceProviderParams
from eive_tmtc.utility.input_helper import InputHelper
from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode
from tmtccmd.pus.s20_fsfw_param import create_load_param_cmd, create_scalar_u8_parameter
from tmtccmd.pus.s8_fsfw_action import create_action_cmd
_LOGGER = logging.getLogger(__name__)
@ -93,6 +94,10 @@ class ActionId(enum.IntEnum):
TC_FLASH_READ_FULL_FILE = 30
class ParamId(enum.IntEnum):
PLOC_SUPV_CMD_TO_ON = 1
class OpCode:
ON = "on"
OFF = "off"
@ -115,6 +120,8 @@ class OpCode:
SIMPLEX_SEND_FILE = "simplex_send_file"
DOWNLINK_DATA_MODULATE = "downlink_data_modulate"
MODE_SNAPSHOT = "mode_snapshot"
ENABLE_PLOC_SUPV_COMMANDING_TO_ON = "enable_ploc_supv_cmd_to_on"
DISABLE_PLOC_SUPV_COMMANDING_TO_ON = "disable_ploc_supv_cmd_to_on"
class Info:
@ -137,6 +144,10 @@ class Info:
FLASH_GET_DIR_CONTENT = "Get flash directory content on MPSoC"
DOWNLINK_DATA_MODULATE = "Downlink data modulate"
MODE_SNAPSHOT = "Mode Snapshot"
ENABLE_PLOC_SUPV_COMMANDING_TO_ON = "Enable PLOC SUPV commanding when switching ON"
DISABLE_PLOC_SUPV_COMMANDING_TO_ON = (
"Disable PLOC SUPV commanding when switching ON"
)
class MemAddresses(enum.IntEnum):
@ -171,6 +182,13 @@ def add_ploc_mpsoc_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.SIMPLEX_SEND_FILE, Info.SIMPLEX_SEND_FILE)
oce.add(OpCode.DOWNLINK_DATA_MODULATE, Info.DOWNLINK_DATA_MODULATE)
oce.add(OpCode.MODE_SNAPSHOT, Info.MODE_SNAPSHOT)
oce.add(
OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON, Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON
)
oce.add(
OpCode.DISABLE_PLOC_SUPV_COMMANDING_TO_ON,
Info.DISABLE_PLOC_SUPV_COMMANDING_TO_ON,
)
defs.add_service(CustomServiceList.PLOC_MPSOC.value, "Ploc MPSoC", oce)
@ -179,6 +197,7 @@ def pack_ploc_mpsoc_commands( # noqa C901
p: ServiceProviderParams,
): # noqa C901: Complexity okay here.
object_id = get_object_ids().get(PLOC_MPSOC_ID)
assert object_id is not None
q = p.queue_helper
prefix = "PLOC MPSoC"
op_code = p.op_code
@ -313,6 +332,24 @@ def pack_ploc_mpsoc_commands( # noqa C901
q.add_log_cmd("PLOC MPSoC: Mode snapshot")
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_MODE_SNAPSHOT)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON:
q.add_log_cmd(Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON)
q.add_pus_tc(
create_load_param_cmd(
create_scalar_u8_parameter(
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 0
)
)
)
if op_code == OpCode.DISABLE_PLOC_SUPV_COMMANDING_TO_ON:
q.add_log_cmd(Info.DISABLE_PLOC_SUPV_COMMANDING_TO_ON)
q.add_pus_tc(
create_load_param_cmd(
create_scalar_u8_parameter(
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 1
)
)
)
def generate_write_mem_command(

View File

@ -1,10 +1,15 @@
from spacepackets.ecss import PusTelecommand, PusService
import struct
import datetime
import math
from spacepackets.ecss import PusService, PusTelecommand
from tmtccmd.config import CoreServiceList
from tmtccmd.config.tmtc import (
tmtc_definitions_provider,
TmtcDefinitionWrapper,
OpCodeEntry,
TmtcDefinitionWrapper,
tmtc_definitions_provider,
)
from tmtccmd.pus.s11_tc_sched import create_time_tagged_cmd
from tmtccmd.pus.s17_test import create_service_17_ping_command
from tmtccmd.tmtc import service_provider
from tmtccmd.tmtc.decorator import ServiceProviderParams
@ -14,12 +19,14 @@ class OpCodes:
PING = "ping"
TRIGGER_EVENT = "trig_event"
PING_WITH_DATA = "ping_with_data"
SCHEDULE_PING = "sched_ping"
class Info:
PING = "Simple Ping and Connection Test"
TRIGGER_EVENT = "Trigger an event"
PING_WITH_DATA = "Ping with data. Size of sent data is sent back"
SCHEDULE_PING = "Schedule a ping"
@tmtc_definitions_provider
@ -28,6 +35,7 @@ def add_test_defs(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCodes.PING, info=Info.PING)
oce.add(keys=OpCodes.TRIGGER_EVENT, info=Info.TRIGGER_EVENT)
oce.add(keys=OpCodes.PING_WITH_DATA, info=Info.PING_WITH_DATA)
oce.add(keys=OpCodes.SCHEDULE_PING, info=Info.SCHEDULE_PING)
defs.add_service(
name=CoreServiceList.SERVICE_17_ALT,
@ -46,6 +54,21 @@ def pack_test_command(p: ServiceProviderParams):
if info.op_code == OpCodes.TRIGGER_EVENT:
q.add_log_cmd("Sending PUS TC Event Trigger [17, 128]")
q.add_pus_tc(PusTelecommand(service=PusService.S17_TEST, subservice=128))
if info.op_code == OpCodes.SCHEDULE_PING:
q.add_log_cmd("Sending scheduled PUS ping")
# Generate a UNIX timestamp 30 seconds in the future using the datetime API with a UTC timezone
now = datetime.datetime.now(tz=datetime.timezone.utc)
second_offset_to_now = input("Please specify offset to now in seconds: ")
now += datetime.timedelta(seconds=int(second_offset_to_now))
unix_stamp = struct.pack("!I", math.floor(now.timestamp()))
print(f"Sending ping scheuled at {now}")
ping = PusTelecommand(service=PusService.S17_TEST, subservice=128)
q.add_pus_tc(
create_time_tagged_cmd(
release_time=unix_stamp,
tc_to_insert=ping,
)
)
if info.op_code == OpCodes.PING_WITH_DATA:
q.add_log_cmd("Sending Ping With Data, Size Reported Back [17, 129]")
while True:

View File

@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "eive-tmtc"
description = "TMTC Commander EIVE"
readme = "README.md"
version = "5.12.0"
version = "5.13.0"
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
authors = [