diff --git a/tc/obsw_tc_service20.py b/tc/obsw_tc_service20.py index e86b0cb859a9f48cc3e63ea3b283b5184d184f19..40ffc25ab051eb487038a9941b2e1ed2452452c8 100644 --- a/tc/obsw_tc_service20.py +++ b/tc/obsw_tc_service20.py @@ -18,26 +18,66 @@ def pack_service20_test_into(tc_queue: Deque, called_externally: bool = False) - object_id = g.DUMMY_DEVICE_ID #test invalid subservice + #use subservice 130 for invalid subservice check, as this is in use for dump reply + #(and therefore will never be a valid subservice) + tc_queue.appendleft(("print", "Testing Service 20: Invalid subservice")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=130, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test invalid objectid //TODO: do we have an objectid known to be empty (even in future)? + tc_queue.appendleft(("print", "Testing Service 20: Invalid object ID")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test invalid parameterID for load + tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for load")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test invalid parameterID for dump + tc_queue.appendleft(("print", "Testing Service 20: Invalid parameter ID for dump")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Load for uint32_t + tc_queue.appendleft(("print", "Testing Service 20: Load uint32_t")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Dump for uint32_t + tc_queue.appendleft(("print", "Testing Service 20: Dump uint32_t")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Load for int32_t + tc_queue.appendleft(("print", "Testing Service 20: Load int32_t")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Dump for int32_t + tc_queue.appendleft(("print", "Testing Service 20: Dump int32_t")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Load for float + tc_queue.appendleft(("print", "Testing Service 20: Load float")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=128, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) #test checking Dump for float - - + tc_queue.appendleft(("print", "Testing Service 20: Dump float")) + mode_data = pack_mode_data(object_id, 2, 0) + command = PusTelecommand(service=20, subservice=129, ssc=810, app_data=mode_data) + tc_queue.appendleft(command.pack_command_tuple()) if called_externally is False: tc_queue.appendleft(("export", "log/tmtc_log_service8.txt")) diff --git a/test/obsw_pus_service_test.py b/test/obsw_pus_service_test.py index e546a92aafc466e9a2dafdf673537f92ce030826..487efe0e45315d5445fb07bfba098fccf146e381 100644 --- a/test/obsw_pus_service_test.py +++ b/test/obsw_pus_service_test.py @@ -196,7 +196,7 @@ class TestService20(TestService): #TODO: implement correctly cls.data_reply_count = 0 pack_service20_test_into(cls.test_queue) - def test_Service8(self): + def test_Service20(self): assertion_dict = self.perform_testing_and_generate_assertion_dict() # 3 x Mode changes