Merge branch 'main' into acs-ctrl-update

This commit is contained in:
Marius Eggert 2023-02-24 15:27:55 +01:00
commit 7120f14601
6 changed files with 92 additions and 18 deletions

View File

@ -13,6 +13,16 @@ list yields a list of all related PRs for each release.
- added ACS action cmds
- fixed diag related ACS hk cmds
# [v2.16.0] 2023-02-23
## Added
- PDEC parameter commands to change size of positive and negative window of AD frames-
## Fixed
- Added missing skip directive for private resultcode.
# [v2.15.2] 2023-02-23
- Update of generated returnvalue and event files.
@ -297,4 +307,4 @@ tmtccmd v4.0.0rc0
- Extended heater commands for more informative output which component is heated
See [milestones](https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/milestones)
and [releases](https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/releases)
and [releases](https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/releases)

View File

@ -1,12 +1,12 @@
__version__ = "2.15.2"
__version__ = "2.16.0"
import logging
from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 2
VERSION_MINOR = 15
VERSION_REVISION = 2
VERSION_MINOR = 16
VERSION_REVISION = 0
EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent

View File

@ -2,7 +2,6 @@ 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
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
0x6300;NVMB_Busy;No description;0;NVM_PARAM_BASE;mission/system/objects/Stack5VHandler.h
0x5100;IMTQ_InvalidCommandCode;No description;0;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h
0x5101;IMTQ_MgmMeasurementLowLevelError;No description;1;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h
0x5102;IMTQ_ActuateCmdLowLevelError;No description;2;IMTQ_HANDLER;mission/devices/devicedefinitions/imtqHelpers.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
2 0x0000 OK System-wide code for ok. 0 HasReturnvaluesIF fsfw/returnvalues/returnvalue.h
3 0x0001 Failed Unspecified system-wide code for failed. 1 HasReturnvaluesIF fsfw/returnvalues/returnvalue.h
4 0x63a0 NVMB_KeyNotExists Specified key does not exist in json file 160 NVM_PARAM_BASE mission/memory/NVMParameterBase.h
0x6300 NVMB_Busy No description 0 NVM_PARAM_BASE mission/system/objects/Stack5VHandler.h
5 0x5100 IMTQ_InvalidCommandCode No description 0 IMTQ_HANDLER mission/devices/devicedefinitions/imtqHelpers.h
6 0x5101 IMTQ_MgmMeasurementLowLevelError No description 1 IMTQ_HANDLER mission/devices/devicedefinitions/imtqHelpers.h
7 0x5102 IMTQ_ActuateCmdLowLevelError No description 2 IMTQ_HANDLER mission/devices/devicedefinitions/imtqHelpers.h

View File

@ -23,14 +23,6 @@ def get_eive_service_op_code_dict() -> TmtcDefinitionWrapper:
return def_wrapper
@tmtc_definitions_provider
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()
oce.add("0", "PDEC Handler: Print CLCW")
oce.add("1", "PDEC Handler: Print PDEC monitor")
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
@tmtc_definitions_provider
def add_str_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()

View File

@ -32,6 +32,7 @@ from eive_tmtc.tmtc.com.ccsds_handler import pack_ccsds_handler_test
from eive_tmtc.tmtc.core import pack_core_commands
from eive_tmtc.tmtc.acs.star_tracker import pack_star_tracker_commands
from eive_tmtc.tmtc.com.syrlinks_handler import pack_syrlinks_command
from eive_tmtc.tmtc.com.pdec_handler import pack_pdec_handler_test
from eive_tmtc.tmtc.acs.acs_board import pack_acs_command
from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import (
@ -170,7 +171,7 @@ def handle_default_procedure(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.PDEC_HANDLER.value:
return pack_ccsds_handler_test(
return pack_pdec_handler_test(
object_id=PDEC_HANDLER_ID, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.SYRLINKS.value:

View File

@ -8,6 +8,22 @@
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_20_fsfw_param import (
create_load_param_cmd
)
from tmtccmd.pus.s20_fsfw_param_defs import (
create_scalar_u8_parameter
)
from tmtccmd.config.tmtc import (
tmtc_definitions_provider,
TmtcDefinitionWrapper,
OpCodeEntry,
)
from eive_tmtc.config.definitions import CustomServiceList
class CommandId:
# prints the clcw to the console. Useful for debugging
@ -16,15 +32,71 @@ class CommandId:
PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
class ParameterId:
POSITIVE_WINDOW = 0
NEGATIVE_WINDOW = 1
class OpCode:
PRINT_CLCW = "print_clcw"
PRINT_MON_REG = "print_mon_reg"
POSITIVE_WINDOW = "positive_window"
NEGATIVE_WINDOW = "negative_window"
class Info:
PRINT_CLCW = "Will cause the OBSW to print the current CLCW to the debug console"
PRINT_MON_REG = "Will cause the OBSW to print the PDEC monitor register to the console"
POSITIVE_WINDOW = "Change positive window parameter for AD frames"
NEGATIVE_WINDOW = "Change negative window parameter for AD frames"
def pack_pdec_handler_test(
object_id: bytearray, q: DefaultPusQueueHelper, op_code: str
):
q.add_log_cmd(f"Testing PDEC handler with object id: {object_id.hex()}")
if op_code == "0":
q.add_log_cmd("PDEC Handler: Print CLCW")
prefix = "PDEC Handler "
if op_code == OpCode.PRINT_CLCW:
q.add_log_cmd(f"{prefix}: {Info.PRINT_CLCW}")
command = object_id + CommandId.PRINT_CLCW
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if op_code == "1":
q.add_log_cmd("PDEC Handler: Print PDEC monitor register")
if op_code == OpCode.PRINT_MON_REG:
q.add_log_cmd(f"{prefix}: {Info.PRINT_MON_REG}")
command = object_id + CommandId.PRINT_PDEC_MON
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if op_code == OpCode.POSITIVE_WINDOW:
q.add_log_cmd(f"{prefix}: {Info.POSITIVE_WINDOW}")
pw = int(input("Specify positive window to set: "))
q.add_pus_tc(
create_load_param_cmd(
create_scalar_u8_parameter(
object_id,
0,
ParameterId.POSITIVE_WINDOW,
pw,
).pack()
)
)
if op_code == OpCode.NEGATIVE_WINDOW:
q.add_log_cmd(f"{prefix}: {Info.NEGATIVE_WINDOW}")
nw = int(input("Specify negative window to set: "))
q.add_pus_tc(
create_load_param_cmd(
create_scalar_u8_parameter(
object_id,
0,
ParameterId.NEGATIVE_WINDOW,
nw,
).pack()
)
)
@tmtc_definitions_provider
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()
oce.add(OpCode.PRINT_CLCW, Info.PRINT_CLCW)
oce.add(OpCode.PRINT_MON_REG, Info.PRINT_MON_REG)
oce.add(OpCode.POSITIVE_WINDOW, Info.POSITIVE_WINDOW)
oce.add(OpCode.NEGATIVE_WINDOW, Info.NEGATIVE_WINDOW)
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)