changes for updated tmtccmd
This commit is contained in:
@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user