proc service added
This commit is contained in:
parent
168b662288
commit
973bdeadd6
@ -46,3 +46,4 @@ class CustomServiceList(enum.Enum):
|
||||
SUS_ASS = "sus-ass"
|
||||
TCS_ASS = "tcs-ass"
|
||||
TIME = "time"
|
||||
PROCEDURE = "proc"
|
||||
|
@ -71,6 +71,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_ploc_supv_cmds,
|
||||
add_system_cmds,
|
||||
add_time_cmds,
|
||||
add_proc_cmds,
|
||||
)
|
||||
from pus_tc.devs.gps import GpsOpCodes
|
||||
|
||||
@ -85,6 +86,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_ploc_supv_cmds(cmd_dict=service_op_code_dict)
|
||||
add_system_cmds(cmd_dict=service_op_code_dict)
|
||||
add_time_cmds(cmd_dict=service_op_code_dict)
|
||||
add_proc_cmds(cmd_dict=service_op_code_dict)
|
||||
|
||||
op_code_dict = {
|
||||
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
|
@ -685,6 +685,22 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
] = service_ploc_memory_dumper_tuple
|
||||
|
||||
|
||||
def add_proc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
from pus_tc.system.proc import OpCodes, Info
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=OpCodes.HEATER,
|
||||
info=Info.HEATER
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.PROCEDURE.value,
|
||||
info="Procedures",
|
||||
op_code_entry=op_code_dict,
|
||||
)
|
||||
|
||||
|
||||
def add_system_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
from pus_tc.system.acs import AcsOpCodes, SusOpCodes
|
||||
import pus_tc.system.tcs as tcs
|
||||
|
24
pus_tc/system/proc.py
Normal file
24
pus_tc/system/proc.py
Normal file
@ -0,0 +1,24 @@
|
||||
from tmtccmd.config import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
|
||||
|
||||
class OpCodes:
|
||||
HEATER = ["0", "heater"]
|
||||
|
||||
|
||||
class Info:
|
||||
HEATER = "heater procedure"
|
||||
|
||||
|
||||
def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
||||
testint = 10
|
||||
print(f"hello world{op_code} {testint}")
|
||||
if op_code in OpCodes.HEATER:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TUrning heater 0 on"))
|
||||
tc_queue.appendleft(heater1cmd_on.pack_command_tuple())
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TUrning heater 0 off"))
|
||||
tc_queue.appendleft(heater1cmd_off.pack_command_tuple())
|
||||
tc_queue.appendleft(heater1cmd.pack_command_tuple())
|
||||
tc_queue.appendleft(heater1cmd.pack_command_tuple())
|
||||
|
||||
pass
|
@ -41,6 +41,7 @@ from pus_tc.system.acs import pack_acs_command, pack_sus_cmds
|
||||
from pus_tc.devs.plpcdu import pack_pl_pcdu_commands
|
||||
from pus_tc.devs.str_img_helper import pack_str_img_helper_command
|
||||
from pus_tc.system.tcs import pack_tcs_sys_commands
|
||||
from pus_tc.system.proc import pack_proc_commands
|
||||
from config.definitions import CustomServiceList
|
||||
from config.object_ids import (
|
||||
P60_DOCK_HANDLER,
|
||||
@ -223,6 +224,8 @@ def pack_service_queue_user(
|
||||
return pack_solar_array_deployment_test_into(
|
||||
object_id=SOLAR_ARRAY_DEPLOYMENT_ID, tc_queue=service_queue
|
||||
)
|
||||
if service == CustomServiceList.PROCEDURE.value:
|
||||
return pack_proc_commands(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.SUS_ASS.value:
|
||||
return pack_sus_cmds(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.PL_PCDU.value:
|
||||
|
6
tmtc_conf.json
Normal file
6
tmtc_conf.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"com_if": "dummy",
|
||||
"tcpip_tcp_ip_addr": "127.0.0.1",
|
||||
"tcpip_tcp_port": 1536,
|
||||
"tcpip_tcp_recv_max_size": 1500
|
||||
}
|
Loading…
Reference in New Issue
Block a user