Merge branch 'develop' into meier/tvac-tests

This commit is contained in:
Jakob Meier 2022-06-01 06:25:46 +02:00
commit 210ec8805c

View File

@ -144,19 +144,19 @@ def pack_generic_hk_listening_cmds(
tc_queue: TcQueueT,
proc_key: str,
sid_list: list[bytearray],
diag: bool,
diag_list: list[bool],
cfg: GenericHkListeningCfg,
):
info = PROC_INFO_DICT[proc_key]
collection_time = info[2]
generic_print(tc_queue=tc_queue, info=info)
for sid in sid_list:
for i in range(len(sid_list)):
enable_listen_to_hk_for_x_seconds(
diag=diag,
diag=diag_list[i],
tc_queue=tc_queue,
device=proc_key,
sid=sid,
sid=sid_list[i],
interval_seconds=info[3],
)
if not cfg.use_tc_sched:
@ -179,13 +179,13 @@ def pack_generic_hk_listening_cmds(
if not cfg.use_tc_sched:
tc_queue.appendleft((QueueCommands.WAIT, collection_time))
disable_cmd_list = []
for sid in sid_list:
for i in range(len(sid_list)):
disable_cmd_list.append(
gen_disable_listen_to_hk_for_x_seconds(
diag=diag,
diag=diag_list[i],
tc_queue=tc_queue,
device=proc_key,
sid=sid,
sid=sid_list[i],
)
)
current_time = time.time()
@ -203,6 +203,7 @@ def pack_generic_hk_listening_cmds(
)
)
sid_list.clear()
diag_list.clear()
def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
@ -214,22 +215,24 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
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))
diag_list = [False]
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
if op_code in OpCodes.CORE_FT:
key = KAI.CORE_FT[0]
sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK))
diag_list = [False]
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -246,6 +249,17 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX),
]
diag_list = [
False,
True,
True,
True,
False,
False,
False,
False,
]
for pcdu_dev in pcdu_pairs:
oid = pcdu_dev[0]
set_id = pcdu_dev[1]
@ -254,18 +268,19 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
if op_code in OpCodes.RAD_SEN_FT:
key = KAI.RAD_SEN_FT[0]
sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.HK))
diag_list = [False]
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -303,6 +318,13 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.GPS_CONTROLLER, GpsSetIds.HK),
]
d_side_pairs = a_side_pairs + b_side_pairs
diag_list = [
False,
False,
False,
False,
False,
]
pack_acs_command(tc_queue=tc_queue, op_code="acs-a")
for a_side_dev in a_side_pairs:
@ -313,7 +335,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -329,7 +351,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -341,11 +363,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
oid = d_side_dev[0]
set_id = d_side_dev[1]
sid_list.append(make_sid(oid, set_id))
diag_list = diag_list + diag_list
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -358,6 +381,11 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET),
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
]
diag_list = [
False,
False,
False,
]
# mgt 1: imtq und hk
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2")
@ -367,7 +395,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
set_id = imtq_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, cfg=GenericHkListeningCfg.default()
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag_list=diag_list, cfg=GenericHkListeningCfg.default()
)
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0")
@ -394,7 +422,21 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
]
d_side_and_imtq_pairs = a_side_pairs + b_side_pairs + imtq_pairs
diag_list = [
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
]
pack_acs_command(tc_queue=tc_queue, op_code="acs-d")
# mgt 2.: imtq + dual side + dipole
pack_imtq_test_into(
@ -412,7 +454,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=cfg,
)
@ -440,6 +482,15 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
oids.SUS_10_R_LOC_XMYBZF_PT_ZF,
oids.SUS_11_R_LOC_XBYMZB_PT_ZB,
]
diag_list = [
False,
False,
False,
False,
False,
False,
]
# SUSs
for nom_sus in sus_n_ids:
sid_list.append(make_sid(nom_sus, SetIds.HK))
@ -447,7 +498,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -462,7 +513,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -475,11 +526,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(nom_sus, SetIds.HK))
for red_sus in sus_r_ids:
sid_list.append(make_sid(red_sus, SetIds.HK))
diag_list = diag_list + diag_list
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -494,11 +546,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
# STR
sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE))
diag_list = [False]
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg.default(),
)
@ -526,7 +579,24 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.RW4_ID, RwSetIds.LAST_RESET),
(oids.RW4_ID, RwSetIds.TM_SET),
]
diag_list = [
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
@ -539,7 +609,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg(mgt=False, one_rw=True, two_rws=False),
)
# RW OFF
@ -566,6 +636,24 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.RW4_ID, RwSetIds.LAST_RESET),
(oids.RW4_ID, RwSetIds.TM_SET),
]
diag_list = [
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
False,
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
@ -578,7 +666,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
diag_list=diag_list,
cfg=GenericHkListeningCfg(mgt=False, one_rw=False, two_rws=True),
)
# RW OFF