From 4a02e284b337bce57576d35f49133fd772df5b95 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Jan 2023 11:12:07 +0100 Subject: [PATCH] changes for updated tmtccmd --- eive_tmtc/config/events.py | 2 +- eive_tmtc/gomspace/gomspace_common.py | 28 +++++++++++------------ eive_tmtc/pus_tc/devs/bpx_batt.py | 8 +++---- eive_tmtc/pus_tc/devs/heater.py | 4 ++-- eive_tmtc/pus_tc/devs/plpcdu.py | 20 ++++++++-------- eive_tmtc/pus_tc/devs/scex.py | 16 ++++++------- eive_tmtc/pus_tc/procedure_packer.py | 2 +- eive_tmtc/pus_tc/system/core.py | 22 +++++++++--------- eive_tmtc/pus_tc/system/proc.py | 14 ++++++------ eive_tmtc/tmtc/payload/ploc_supervisor.py | 6 ++--- eive_tmtc/tmtc/power/common_power.py | 12 +++++----- eive_tmtc/tmtc/solar_array_deployment.py | 4 ++-- eive_tmtc/tmtc/test.py | 2 +- 13 files changed, 70 insertions(+), 70 deletions(-) diff --git a/eive_tmtc/config/events.py b/eive_tmtc/config/events.py index b706986..044ad28 100644 --- a/eive_tmtc/config/events.py +++ b/eive_tmtc/config/events.py @@ -3,7 +3,7 @@ import os from eive_tmtc import EIVE_TMTC_ROOT from tmtccmd import get_console_logger from tmtccmd.fsfw import parse_fsfw_events_csv -from tmtccmd.pus.pus_5_event import EventDictT +from tmtccmd.pus.s5_event import EventDictT LOGGER = get_console_logger() DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "config/events.csv" diff --git a/eive_tmtc/gomspace/gomspace_common.py b/eive_tmtc/gomspace/gomspace_common.py index 1ce71a5..76045ad 100644 --- a/eive_tmtc/gomspace/gomspace_common.py +++ b/eive_tmtc/gomspace/gomspace_common.py @@ -12,7 +12,7 @@ from typing import Union from spacepackets.ecss import PusTelecommand from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd from tmtccmd.util import ObjectIdU32, ObjectIdBase @@ -63,7 +63,7 @@ class Channel: def pack_request_config_command(object_id: bytes) -> PusTelecommand: - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=GomspaceDeviceActionIds.REQUEST_CONFIG_TABLE ) @@ -88,7 +88,7 @@ def pack_get_param_command( else: app_data += memory_address app_data += struct.pack("!B", parameter_size) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=GomspaceDeviceActionIds.PARAM_GET, user_data=app_data, @@ -103,7 +103,7 @@ def pack_set_float_param_command( app_data += memory_address app_data.append(4) app_data += struct.pack("!f", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -116,7 +116,7 @@ def pack_set_u8_param_command( app_data += memory_address app_data.append(1) app_data.append(parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -129,7 +129,7 @@ def pack_set_i8_param_command( app_data += memory_address app_data.append(1) app_data += struct.pack("!b", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -142,7 +142,7 @@ def pack_set_u16_param_command( app_data += memory_address app_data.append(2) app_data += struct.pack("!H", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -155,7 +155,7 @@ def pack_set_i16_param_command( app_data += memory_address app_data.append(2) app_data += struct.pack("!h", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -166,7 +166,7 @@ def pack_set_u32_param_command(object_id: bytes, memory_address: bytes, paramete app_data += memory_address app_data.append(4) app_data += struct.pack("!I", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -177,7 +177,7 @@ def pack_set_i32_param_command(object_id: bytes, memory_address: bytes, paramete app_data += memory_address app_data.append(4) app_data += struct.pack("!i", parameter) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=action_id, user_data=app_data ) @@ -224,7 +224,7 @@ def pack_ping_command(object_id: ObjectIdU32, data: bytearray) -> PusTelecommand @note The ping request sends the specified data to a gompsace device. These data are simply copied by the device and then sent back. """ - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.PING, user_data=data, @@ -235,7 +235,7 @@ def pack_gnd_wdt_reset_command(object_id: ObjectIdBase) -> PusTelecommand: """ " Function to generate the command to reset the watchdog of a gomspace device. @param object_id Object Id of the gomspace device handler. """ - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.WDT_RESET ) @@ -244,7 +244,7 @@ def pack_reboot_command(object_id: ObjectIdU32) -> PusTelecommand: """Function to generate the command which triggers a reboot of a gomspace device @param object_id The object id of the gomspace device handler. """ - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REBOOT ) @@ -254,6 +254,6 @@ def pack_request_full_hk_table_command(object_id: ObjectIdU32) -> PusTelecommand device. @param object_id The object id of the gomspace device handler. """ - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REQUEST_HK_TABLE ) diff --git a/eive_tmtc/pus_tc/devs/bpx_batt.py b/eive_tmtc/pus_tc/devs/bpx_batt.py index 8599571..9fb40bd 100644 --- a/eive_tmtc/pus_tc/devs/bpx_batt.py +++ b/eive_tmtc/pus_tc/devs/bpx_batt.py @@ -9,7 +9,7 @@ from tmtccmd.config.tmtc import ( ) 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_8_fsfw_funccmd import create_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 @@ -87,14 +87,14 @@ def pack_bpx_commands(p: ServiceProviderParams): if op_code in BpxOpCodes.RST_BOOT_CNT: q.add_log_cmd("Resetting reboot counters") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS ) ) if op_code in BpxOpCodes.REQUEST_CFG: q.add_log_cmd("Requesting configuration struct") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG ) ) @@ -105,7 +105,7 @@ def pack_bpx_commands(p: ServiceProviderParams): if op_code in BpxOpCodes.REBOOT: q.add_log_cmd("Rebooting BPX battery") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT ) ) diff --git a/eive_tmtc/pus_tc/devs/heater.py b/eive_tmtc/pus_tc/devs/heater.py index ae7dd37..71c3a80 100644 --- a/eive_tmtc/pus_tc/devs/heater.py +++ b/eive_tmtc/pus_tc/devs/heater.py @@ -16,7 +16,7 @@ from tmtccmd.tc.pus_201_fsfw_health import ( FsfwHealth, Subservices, ) -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd from spacepackets.ecss.tc import PusTelecommand @@ -200,6 +200,6 @@ def pack_switch_heater_command( command.append(switch_nr) command.append(switch_action) command.append(COMMAND_SOURCE_PARAM_EXTERNAL) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=object_id, action_id=ActionIds.SWITCH_HEATER, user_data=command ) diff --git a/eive_tmtc/pus_tc/devs/plpcdu.py b/eive_tmtc/pus_tc/devs/plpcdu.py index b2c8008..cef496a 100644 --- a/eive_tmtc/pus_tc/devs/plpcdu.py +++ b/eive_tmtc/pus_tc/devs/plpcdu.py @@ -15,8 +15,8 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( disable_periodic_hk_command, ) from tmtccmd.tc.pus_11_tc_sched import ( - generate_enable_tc_sched_cmd, - generate_time_tagged_cmd, + create_enable_tc_sched_cmd, + create_time_tagged_cmd, ) from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices from tmtccmd.tc.pus_20_params import ( @@ -312,50 +312,50 @@ def hpa_on_procedure(q: DefaultPusQueueHelper): ) current_time = time.time() - enb_sched = generate_enable_tc_sched_cmd() + enb_sched = create_enable_tc_sched_cmd() sched_time = int(round(current_time + 10)) q.add_pus_tc(enb_sched) - tagged_on_cmd = generate_time_tagged_cmd( + tagged_on_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=pl_pcdu_on, ) q.add_pus_tc(tagged_on_cmd) sched_time += 5 - tagged_ssr_cmd = generate_time_tagged_cmd( + tagged_ssr_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=ssr_on, ) q.add_pus_tc(tagged_ssr_cmd) sched_time += 5 - tagged_dro_cmd = generate_time_tagged_cmd( + tagged_dro_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=dro_on ) q.add_pus_tc(tagged_dro_cmd) sched_time += delay_dro_to_x8 sched_time = int(round(sched_time)) - tagged_x8_cmd = generate_time_tagged_cmd( + tagged_x8_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=x8_on ) q.add_pus_tc(tagged_x8_cmd) sched_time += 5 - tagged_tx_cmd = generate_time_tagged_cmd( + tagged_tx_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=tx_on ) q.add_pus_tc(tagged_tx_cmd) sched_time += 5 - tagged_mpa_cmd = generate_time_tagged_cmd( + tagged_mpa_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=mpa_on ) q.add_pus_tc(tagged_mpa_cmd) sched_time += 5 - tagged_hpa_cmd = generate_time_tagged_cmd( + tagged_hpa_cmd = create_time_tagged_cmd( release_time=struct.pack("!I", sched_time), tc_to_insert=hpa_on ) q.add_pus_tc(tagged_hpa_cmd) diff --git a/eive_tmtc/pus_tc/devs/scex.py b/eive_tmtc/pus_tc/devs/scex.py index 2612c5e..41d8e70 100644 --- a/eive_tmtc/pus_tc/devs/scex.py +++ b/eive_tmtc/pus_tc/devs/scex.py @@ -8,7 +8,7 @@ from tmtccmd.config.tmtc import tmtc_definitions_provider from tmtccmd.tc.pus_200_fsfw_modes import Modes, pack_mode_data, Subservices 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_8_fsfw_funccmd import create_fsfw_action_cmd from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper from eive_tmtc.config.object_ids import SCEX_HANDLER_ID @@ -99,23 +99,23 @@ def pack_scex_cmds(p: ServiceProviderParams): if op_code in OpCodes.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)) + q.add_pus_tc(create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.PING, app_data)) if op_code in OpCodes.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)) + q.add_pus_tc(create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ION_CMD, app_data)) if op_code in OpCodes.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) + create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.TEMP_CMD, app_data) ) if op_code in OpCodes.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) + create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data) ) # one cell @@ -164,7 +164,7 @@ 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) + create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data) ) if op_code in OpCodes.ALL_CELLS_CMD: @@ -196,13 +196,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) + create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data) ) if op_code in OpCodes.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(create_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.FRAM, app_data)) def append_16_bit_val(packet: bytearray, val: int): diff --git a/eive_tmtc/pus_tc/procedure_packer.py b/eive_tmtc/pus_tc/procedure_packer.py index bbceaa9..ac9a8e0 100644 --- a/eive_tmtc/pus_tc/procedure_packer.py +++ b/eive_tmtc/pus_tc/procedure_packer.py @@ -20,7 +20,7 @@ from tmtccmd.tc.decorator import ( from tmtccmd.tc.pus_5_event import ( pack_generic_service_5_test_into, ) -from tmtccmd.pus.pus_17_test import pack_service_17_ping_command +from tmtccmd.pus.s17_test import pack_service_17_ping_command from eive_tmtc.pus_tc.service_200_mode import pack_service_200_test_into from eive_tmtc.tmtc.power.p60dock import pack_p60dock_cmds diff --git a/eive_tmtc/pus_tc/system/core.py b/eive_tmtc/pus_tc/system/core.py index 1d1813a..d2fdb2e 100644 --- a/eive_tmtc/pus_tc/system/core.py +++ b/eive_tmtc/pus_tc/system/core.py @@ -5,7 +5,7 @@ from spacepackets.ecss import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper from tmtccmd.tc import DefaultPusQueueHelper -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd 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 @@ -150,7 +150,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): if op_code in OpCodes.REBOOT_FULL: q.add_log_cmd(f"Core Command: {Info.REBOOT_FULL}") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.FULL_REBOOT ) ) @@ -182,7 +182,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): q.add_log_cmd("Disabling reboot file handling") user_data = bytearray([0]) q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING, user_data=user_data, @@ -192,7 +192,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): q.add_log_cmd("Enabling reboot file handling") user_data = bytearray([1]) q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING, user_data=user_data, @@ -201,7 +201,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): if op_code in OpCodes.RESET_ALL_REBOOT_COUNTERS: q.add_log_cmd("Resetting all reboot counters") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER, ) @@ -226,14 +226,14 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): if op_code in OpCodes.SWITCH_TO_SD_0: q.add_log_cmd(Info.SWITCH_TO_SD_0) q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_0 ) ) if op_code in OpCodes.SWITCH_TO_SD_1: q.add_log_cmd(Info.SWITCH_TO_SD_1) q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_1 ) ) @@ -245,7 +245,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): break q.add_log_cmd(Info.SWITCH_TO_BOTH_SD_CARDS) q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_BOTH_SD_CARDS, user_data=bytes([active_sd_card]), @@ -260,7 +260,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str): def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int): q.add_log_cmd(f"Resetting boot counter {chip} {copy}") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER, user_data=bytes([chip, copy]), @@ -306,7 +306,7 @@ def determine_chip_and_copy() -> (int, int): def pack_obsw_update_cmd(action_id: int) -> PusTelecommand: chip, copy = determine_chip_and_copy() user_data = bytes([chip, copy]) - return make_fsfw_action_cmd( + return create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data ) @@ -327,7 +327,7 @@ def perform_reboot_cmd( 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( + create_fsfw_action_cmd( object_id=CORE_CONTROLLER_ID, action_id=ActionIds.XSC_REBOOT, user_data=tc_data, diff --git a/eive_tmtc/pus_tc/system/proc.py b/eive_tmtc/pus_tc/system/proc.py index 86e4d2b..37fdfd1 100644 --- a/eive_tmtc/pus_tc/system/proc.py +++ b/eive_tmtc/pus_tc/system/proc.py @@ -12,9 +12,9 @@ from tmtccmd.config.tmtc import tmtc_definitions_provider from tmtccmd.tc import DefaultPusQueueHelper from tmtccmd.tc.decorator import ServiceProviderParams from tmtccmd.tc.pus_11_tc_sched import ( - generate_time_tagged_cmd, - generate_enable_tc_sched_cmd, - generate_reset_tc_sched_cmd, + create_time_tagged_cmd, + create_enable_tc_sched_cmd, + create_reset_tc_sched_cmd, ) from tmtccmd.tc.pus_3_fsfw_hk import * @@ -209,7 +209,7 @@ def pack_generic_hk_listening_cmds( else: for cmd in disable_cmd_list: q.add_pus_tc( - generate_time_tagged_cmd( + create_time_tagged_cmd( release_time=struct.pack("!I", int(current_time)), tc_to_insert=cmd ) ) @@ -225,7 +225,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str): obj_id_dict = get_object_ids() if op_code in OpCodes.RESET_SCHED: q.add_log_cmd("Resetting/Clearing TC schedule") - q.add_pus_tc(generate_reset_tc_sched_cmd()) + q.add_pus_tc(create_reset_tc_sched_cmd()) if op_code in OpCodes.BAT_FT: key = KAI.BAT_FT[0] sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET)) @@ -300,7 +300,7 @@ def pack_proc_commands(q: DefaultPusQueueHelper, op_code: str): if op_code in OpCodes.TV_SETUP_TCS_FT_ON: # Enable scheduling - q.add_pus_tc(generate_enable_tc_sched_cmd()) + q.add_pus_tc(create_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)) @@ -736,7 +736,7 @@ def enable_listen_to_hk_for_x_seconds( ) for cmd in cmd_tuple: q.add_pus_tc(cmd) - generate_time_tagged_cmd( + create_time_tagged_cmd( struct.pack("!I", int(round(time.time() + interval_seconds))), gen_disable_listen_to_hk_for_x_seconds(q, diag, device, sid), ) diff --git a/eive_tmtc/tmtc/payload/ploc_supervisor.py b/eive_tmtc/tmtc/payload/ploc_supervisor.py index c15d28e..bcce86b 100644 --- a/eive_tmtc/tmtc/payload/ploc_supervisor.py +++ b/eive_tmtc/tmtc/payload/ploc_supervisor.py @@ -20,7 +20,7 @@ from tmtccmd.logging import get_console_logger from tmtccmd.tc import service_provider from tmtccmd.tc.decorator import ServiceProviderParams from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter from eive_tmtc.utility.input_helper import InputHelper @@ -279,7 +279,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): print("Key invalid!") break q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=PLOC_SUPV_ID, action_id=SupvActionIds.FACTORY_RESET, user_data=bytes([key]), @@ -477,7 +477,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): f"{prefix}: {Info.MEM_CHECK} for file {update_file} at memory ID {memory_id} at start " f"address {start_address}" ) - command = make_fsfw_action_cmd( + command = create_fsfw_action_cmd( object_id.as_bytes, SupvActionIds.MEM_CHECK, custom_data ) q.add_pus_tc(command) diff --git a/eive_tmtc/tmtc/power/common_power.py b/eive_tmtc/tmtc/power/common_power.py index 224b7f9..54394c4 100644 --- a/eive_tmtc/tmtc/power/common_power.py +++ b/eive_tmtc/tmtc/power/common_power.py @@ -23,7 +23,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import ( enable_periodic_hk_command_with_interval, disable_periodic_hk_command, ) -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd from tmtccmd.util import ObjectIdU32, ObjectIdBase @@ -143,7 +143,7 @@ def pack_common_gomspace_cmds( if op_code in PowerOpCodes.PRINT_SWITCH_V_I: q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_SWITCH_V_I}") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I ) ) @@ -153,7 +153,7 @@ def pack_common_gomspace_cmds( if op_code in PowerOpCodes.PRINT_LATCHUPS: q.add_log_cmd(f"{prefix}: {PowerInfo.PRINT_LATCHUPS}") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS ) ) @@ -187,7 +187,7 @@ def pack_common_gomspace_cmds( )) """ q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.SAVE_TABLE, user_data=bytes([source_table]), @@ -202,7 +202,7 @@ def pack_common_gomspace_cmds( if source_table not in [0, 1, 2]: raise ValueError("Invalid source table index") q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.SAVE_TABLE_DEFAULT, user_data=bytes([source_table]), @@ -230,7 +230,7 @@ def pack_common_gomspace_cmds( # Will be ignored source_table = 4 q.add_pus_tc( - make_fsfw_action_cmd( + create_fsfw_action_cmd( object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.LOAD_TABLE, user_data=bytes([source_table, target_table]), diff --git a/eive_tmtc/tmtc/solar_array_deployment.py b/eive_tmtc/tmtc/solar_array_deployment.py index 96eea65..d9c5fe1 100644 --- a/eive_tmtc/tmtc/solar_array_deployment.py +++ b/eive_tmtc/tmtc/solar_array_deployment.py @@ -15,7 +15,7 @@ from tmtccmd.config.tmtc import ( OpCodeEntry, ) from tmtccmd.tc import service_provider -from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd +from tmtccmd.tc.pus_8_fsfw_funccmd import create_fsfw_action_cmd from tmtccmd.tc.decorator import ServiceProviderParams from tmtccmd import get_console_logger @@ -72,7 +72,7 @@ def pack_solar_array_deployment_test_into(p: ServiceProviderParams): else: 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( + command = create_fsfw_action_cmd( SOLAR_ARRAY_DEPLOYMENT_ID, ActionIds.MANUAL_DEPLOYMENT, user_data ) q.add_pus_tc(command) diff --git a/eive_tmtc/tmtc/test.py b/eive_tmtc/tmtc/test.py index 87f6b6b..789ac2e 100644 --- a/eive_tmtc/tmtc/test.py +++ b/eive_tmtc/tmtc/test.py @@ -5,7 +5,7 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.pus.pus_17_test import pack_service_17_ping_command +from tmtccmd.pus.s17_test import pack_service_17_ping_command from tmtccmd.tc import service_provider from tmtccmd.tc.decorator import ServiceProviderParams