diff --git a/Ccs/ccs_function_lib.py b/Ccs/ccs_function_lib.py index 6a48bcbb83cb617955f04abeb508946a7e914cd6..8754bb285b1a83fa962890b8e8ca4d009f405815 100644 --- a/Ccs/ccs_function_lib.py +++ b/Ccs/ccs_function_lib.py @@ -2748,6 +2748,7 @@ def get_tm_parameter_info(pname): return res +# def get_tm_id(pcf_descr=None): if pcf_descr is None: diff --git a/Tst/testing_library/testlib/tm.py b/Tst/testing_library/testlib/tm.py index fda5d20e6fbd171b68ed092a134b5d78075791ca..4ad37b9a875f3cd781535051c3221399c70dce4e 100644 --- a/Tst/testing_library/testlib/tm.py +++ b/Tst/testing_library/testlib/tm.py @@ -1338,6 +1338,16 @@ def get_5_1_tc_acknow(pool_name="LIVE", tm_name="name", parameter_1=5, parameter def check_if_packet_is_received(ST=1,SST=7,pool_name="LIVE"): + """ + Checks if a certain type of packet has been received + :param ST: int + The subtype of the packet that should be checked for + :param SST: int + The subsubtype of the packet that should be checked for + :param pool_name: str + Name of the TM pool in the database + """ + assert isinstance(pool_name, str) assert isinstance(ST, int) assert isinstance(SST, int) @@ -1352,17 +1362,20 @@ def check_if_packet_is_received(ST=1,SST=7,pool_name="LIVE"): for i in range(len(raw_packet_list)): packet = cfl.get_header_parameters_detailed(raw_packet_list[i]) - print(packet) + # print(packet) current_packet_ST = packet[10][1] current_packet_SST = packet[11][1] + try: current_timestamp = cfl.get_cuctime(raw_packet_list[i]) except: current_timestamp = "" + # print(current_packet_ST, current_packet_SST, current_timestamp) + if current_packet_ST == ST and current_packet_SST == SST: print("Match") print(ST, SST, current_timestamp) @@ -1370,10 +1383,6 @@ def check_if_packet_is_received(ST=1,SST=7,pool_name="LIVE"): else: continue - - - - # print(time) if current_packet_ST == ST and current_packet_SST == SST: diff --git a/Tst/tst/verification_tab.py b/Tst/tst/verification_tab.py index 202182aaf2f3d94d9389f2491247fa0e4627f5e7..8e6b1101500e721b6bae00d05d77f8a43578cbe9 100644 --- a/Tst/tst/verification_tab.py +++ b/Tst/tst/verification_tab.py @@ -171,6 +171,7 @@ class VerificationTable(Gtk.Grid): # print(name_string) selected_data_for_drag_drop = name_string + # ToDo: selected_data_for_drag_drop = "result = " + name_string # selected_data_for_drag_drop = cfl.verification_template(name_string) # str(verification_name) + "\n ST = " + str(ST) + "\n SST = " + str(SST) + "\n Time = 2" # selected_data_for_drag_drop = "{} ({}, {})".format((name, ST, SST))