changed diagnostic handover
This commit is contained in:
parent
e4e0b882e5
commit
351bb7c475
@ -144,19 +144,19 @@ def pack_generic_hk_listening_cmds(
|
|||||||
tc_queue: TcQueueT,
|
tc_queue: TcQueueT,
|
||||||
proc_key: str,
|
proc_key: str,
|
||||||
sid_list: list[bytearray],
|
sid_list: list[bytearray],
|
||||||
diag: bool,
|
diag_list: list[bool],
|
||||||
cfg: GenericHkListeningCfg,
|
cfg: GenericHkListeningCfg,
|
||||||
):
|
):
|
||||||
info = PROC_INFO_DICT[proc_key]
|
info = PROC_INFO_DICT[proc_key]
|
||||||
collection_time = info[2]
|
collection_time = info[2]
|
||||||
generic_print(tc_queue=tc_queue, info=info)
|
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(
|
enable_listen_to_hk_for_x_seconds(
|
||||||
diag=diag,
|
diag=diag_list[i],
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
device=proc_key,
|
device=proc_key,
|
||||||
sid=sid,
|
sid=sid_list[i],
|
||||||
interval_seconds=info[3],
|
interval_seconds=info[3],
|
||||||
)
|
)
|
||||||
if not cfg.use_tc_sched:
|
if not cfg.use_tc_sched:
|
||||||
@ -179,13 +179,13 @@ def pack_generic_hk_listening_cmds(
|
|||||||
if not cfg.use_tc_sched:
|
if not cfg.use_tc_sched:
|
||||||
tc_queue.appendleft((QueueCommands.WAIT, collection_time))
|
tc_queue.appendleft((QueueCommands.WAIT, collection_time))
|
||||||
disable_cmd_list = []
|
disable_cmd_list = []
|
||||||
for sid in sid_list:
|
for i in range(len(sid_list)):
|
||||||
disable_cmd_list.append(
|
disable_cmd_list.append(
|
||||||
gen_disable_listen_to_hk_for_x_seconds(
|
gen_disable_listen_to_hk_for_x_seconds(
|
||||||
diag=diag,
|
diag=diag_list[i],
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
device=proc_key,
|
device=proc_key,
|
||||||
sid=sid,
|
sid=sid_list[i],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
@ -203,6 +203,7 @@ def pack_generic_hk_listening_cmds(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
sid_list.clear()
|
sid_list.clear()
|
||||||
|
diag_list.clear()
|
||||||
|
|
||||||
|
|
||||||
def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
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:
|
if op_code in OpCodes.BAT_FT:
|
||||||
key = KAI.BAT_FT[0]
|
key = KAI.BAT_FT[0]
|
||||||
sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET))
|
sid_list.append(make_sid(oids.BPX_HANDLER_ID, BpxSetIds.GET_HK_SET))
|
||||||
|
diag_list = [False]
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
if op_code in OpCodes.CORE_FT:
|
if op_code in OpCodes.CORE_FT:
|
||||||
key = KAI.CORE_FT[0]
|
key = KAI.CORE_FT[0]
|
||||||
sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK))
|
sid_list.append(make_sid(oids.CORE_CONTROLLER_ID, CoreSetIds.HK))
|
||||||
|
diag_list = [False]
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -246,6 +249,17 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX),
|
(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
diag_list = [
|
||||||
|
False,
|
||||||
|
True,
|
||||||
|
True,
|
||||||
|
True,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
]
|
||||||
|
|
||||||
for pcdu_dev in pcdu_pairs:
|
for pcdu_dev in pcdu_pairs:
|
||||||
oid = pcdu_dev[0]
|
oid = pcdu_dev[0]
|
||||||
set_id = pcdu_dev[1]
|
set_id = pcdu_dev[1]
|
||||||
@ -254,18 +268,19 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
if op_code in OpCodes.RAD_SEN_FT:
|
if op_code in OpCodes.RAD_SEN_FT:
|
||||||
key = KAI.RAD_SEN_FT[0]
|
key = KAI.RAD_SEN_FT[0]
|
||||||
sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.HK))
|
sid_list.append(make_sid(oids.RAD_SENSOR_ID, RadSetIds.HK))
|
||||||
|
diag_list = [False]
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -303,6 +318,13 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
(oids.GPS_CONTROLLER, GpsSetIds.HK),
|
(oids.GPS_CONTROLLER, GpsSetIds.HK),
|
||||||
]
|
]
|
||||||
d_side_pairs = a_side_pairs + b_side_pairs
|
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")
|
pack_acs_command(tc_queue=tc_queue, op_code="acs-a")
|
||||||
|
|
||||||
for a_side_dev in a_side_pairs:
|
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,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -329,7 +351,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -341,11 +363,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
oid = d_side_dev[0]
|
oid = d_side_dev[0]
|
||||||
set_id = d_side_dev[1]
|
set_id = d_side_dev[1]
|
||||||
sid_list.append(make_sid(oid, set_id))
|
sid_list.append(make_sid(oid, set_id))
|
||||||
|
diag_list = diag_list + diag_list
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
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.CAL_MTM_SET),
|
||||||
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
|
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
|
||||||
]
|
]
|
||||||
|
diag_list = [
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
]
|
||||||
|
|
||||||
# mgt 1: imtq und hk
|
# mgt 1: imtq und hk
|
||||||
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2")
|
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]
|
set_id = imtq_dev[1]
|
||||||
sid_list.append(make_sid(oid, set_id))
|
sid_list.append(make_sid(oid, set_id))
|
||||||
pack_generic_hk_listening_cmds(
|
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")
|
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),
|
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
|
||||||
]
|
]
|
||||||
d_side_and_imtq_pairs = a_side_pairs + b_side_pairs + imtq_pairs
|
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")
|
pack_acs_command(tc_queue=tc_queue, op_code="acs-d")
|
||||||
# mgt 2.: imtq + dual side + dipole
|
# mgt 2.: imtq + dual side + dipole
|
||||||
pack_imtq_test_into(
|
pack_imtq_test_into(
|
||||||
@ -412,7 +454,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=cfg,
|
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_10_R_LOC_XMYBZF_PT_ZF,
|
||||||
oids.SUS_11_R_LOC_XBYMZB_PT_ZB,
|
oids.SUS_11_R_LOC_XBYMZB_PT_ZB,
|
||||||
]
|
]
|
||||||
|
diag_list = [
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
False,
|
||||||
|
]
|
||||||
|
|
||||||
# SUSs
|
# SUSs
|
||||||
for nom_sus in sus_n_ids:
|
for nom_sus in sus_n_ids:
|
||||||
sid_list.append(make_sid(nom_sus, SetIds.HK))
|
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,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -462,7 +513,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
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))
|
sid_list.append(make_sid(nom_sus, SetIds.HK))
|
||||||
for red_sus in sus_r_ids:
|
for red_sus in sus_r_ids:
|
||||||
sid_list.append(make_sid(red_sus, SetIds.HK))
|
sid_list.append(make_sid(red_sus, SetIds.HK))
|
||||||
|
diag_list = diag_list + diag_list
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
cfg=GenericHkListeningCfg.default(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -494,11 +546,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
|
|
||||||
# STR
|
# STR
|
||||||
sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE))
|
sid_list.append(make_sid(oids.STAR_TRACKER_ID, StrSetIds.TEMPERATURE))
|
||||||
|
diag_list = [False]
|
||||||
pack_generic_hk_listening_cmds(
|
pack_generic_hk_listening_cmds(
|
||||||
tc_queue=tc_queue,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg.default(),
|
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.LAST_RESET),
|
||||||
(oids.RW4_ID, RwSetIds.TM_SET),
|
(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
|
# RW NORMAL
|
||||||
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
|
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,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg(mgt=False, one_rw=True, two_rws=False),
|
cfg=GenericHkListeningCfg(mgt=False, one_rw=True, two_rws=False),
|
||||||
)
|
)
|
||||||
# RW OFF
|
# 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.LAST_RESET),
|
||||||
(oids.RW4_ID, RwSetIds.TM_SET),
|
(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
|
# RW NORMAL
|
||||||
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
|
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,
|
tc_queue=tc_queue,
|
||||||
proc_key=key,
|
proc_key=key,
|
||||||
sid_list=sid_list,
|
sid_list=sid_list,
|
||||||
diag=False,
|
diag_list=diag_list,
|
||||||
cfg=GenericHkListeningCfg(mgt=False, one_rw=False, two_rws=True),
|
cfg=GenericHkListeningCfg(mgt=False, one_rw=False, two_rws=True),
|
||||||
)
|
)
|
||||||
# RW OFF
|
# RW OFF
|
||||||
|
Loading…
Reference in New Issue
Block a user