From 26489f6cee39843b0b7ab9556377e49b44dcefcb Mon Sep 17 00:00:00 2001
From: "Robin.Mueller" <robin.mueller.m@gmail.com>
Date: Fri, 10 Jan 2020 01:04:00 +0100
Subject: [PATCH] service 3 testing:

---
 .../OBSW_UdpClient_Service_3_Serial_.xml      |  2 +-
 tc/OBSW_TcService3.py                         | 26 ++++++++++++-------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/.idea/runConfigurations/OBSW_UdpClient_Service_3_Serial_.xml b/.idea/runConfigurations/OBSW_UdpClient_Service_3_Serial_.xml
index d1ba4ad..b4b686d 100644
--- a/.idea/runConfigurations/OBSW_UdpClient_Service_3_Serial_.xml
+++ b/.idea/runConfigurations/OBSW_UdpClient_Service_3_Serial_.xml
@@ -13,7 +13,7 @@
     <option name="ADD_SOURCE_ROOTS" value="true" />
     <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
     <option name="SCRIPT_NAME" value="$PROJECT_DIR$/OBSW_UdpClient.py" />
-    <option name="PARAMETERS" value="-m 3 -s 3 -p -c 1 --COM COM9" />
+    <option name="PARAMETERS" value="-m 3 -s 3 -p -c 1 --COM COM9 -t 4" />
     <option name="SHOW_COMMAND_LINE" value="false" />
     <option name="EMULATE_TERMINAL" value="false" />
     <option name="MODULE_MODE" value="false" />
diff --git a/tc/OBSW_TcService3.py b/tc/OBSW_TcService3.py
index 49ec25d..f8ed0d0 100644
--- a/tc/OBSW_TcService3.py
+++ b/tc/OBSW_TcService3.py
@@ -13,7 +13,6 @@ from tc.OBSW_TcPacket import PUSTelecommand
 def packService3TestInto(tcQueue):
     tcQueue.put(("print", "Testing Service 3"))
     # adding custom defintion to hk using test pool variables
-    tcQueue.put(("print", "\r\nTesting Service 3: Adding custom HK definition"))
     sid1 = bytearray([0x00, 0x00, 0x43, 0x00])
     sid2 = bytearray([0x00, 0x00, 0x44, 0x00])
     sidGps = bytearray([0x00, 0x00, 0x1f, 0x00])
@@ -26,10 +25,12 @@ def packService3TestInto(tcQueue):
     p5 = bytearray([0x05, 0x05, 0x05, 0x05])
     hkDefinition1 = sid1 + collectionInterval + numberOfParameters + p1 + p2 + p3 + p4 + p5
     hkDefinition2 = sid2 + collectionInterval + numberOfParameters + p1 + p2 + p3 + p4 + p5
+    # adding custom definition to hk pool using test pool variables
+    tcQueue.put(("print", "\r\nTesting Service 3: Adding custom HK definition"))
     command = PUSTelecommand(service=3, subservice=1, SSC=3010, data=hkDefinition1)
     tcQueue.put(command.packCommandTuple())
-    tcQueue.put(("print", "\r\nTesting Service 3: Adding custom diganostics definition"))
     # adding custom definition to diagnostics using test pool variables
+    tcQueue.put(("print", "\r\nTesting Service 3: Adding custom diganostics definition"))
     command = PUSTelecommand(service=3, subservice=2, SSC=3020, data=hkDefinition2)
     tcQueue.put(command.packCommandTuple())
     # enable custom hk definition
@@ -37,9 +38,9 @@ def packService3TestInto(tcQueue):
     command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sid1)
     tcQueue.put(command.packCommandTuple())
     # enable gps0
-    tcQueue.put(("print", "\r\nTesting Service 3: Enable GPS definition"))
-    command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sidGps)
-    tcQueue.put(command.packCommandTuple())
+    # tcQueue.put(("print", "\r\nTesting Service 3: Enable GPS definition"))
+    # command = PUSTelecommand(service=3, subservice=5, SSC=3030, data=sidGps)
+    # tcQueue.put(command.packCommandTuple())
     # enable custom diag definition
     # disable custom hk definition
     # disable custom diag definition
@@ -57,13 +58,18 @@ def packService3TestInto(tcQueue):
     # report custom diag definition
     # delete custom hk definition
     # delete custom diag definition
-    tcQueue.put(("print", "\r\nTesting Service 3: Deleting custom HK definition"))
-    command = PUSTelecommand(service=3, subservice=3, SSC=3080, data=sid1)
+    # disable gps0
+    tcQueue.put(("print", "\r\nTesting Service 3: Disable GPS definition"))
+    command = PUSTelecommand(service=3, subservice=6, SSC=3030, data=sidGps)
     tcQueue.put(command.packCommandTuple())
+    # tcQueue.put(("print", "\r\nTesting Service 3: Deleting custom HK definition"))
+    # command = PUSTelecommand(service=3, subservice=3, SSC=3080, data=sid1)
+    # tcQueue.put(command.packCommandTuple())
     # delete custom diag definition
-    tcQueue.put(("print", "\r\nTesting Service 3: Deleting custom diagnostics definition"))
-    command = PUSTelecommand(service=3, subservice=4, SSC=3090, data=sid2)
-    tcQueue.put(command.packCommandTuple())
+    # tcQueue.put(("print", "\r\nTesting Service 3: Deleting custom diagnostics definition"))
+    # command = PUSTelecommand(service=3, subservice=4, SSC=3090, data=sid2)
+    # tcQueue.put(command.packCommandTuple())
+
     # do some basic testing on predefined structs too
     # e.g. add one variable, change interval, report them....
     tcQueue.put(("export", "log/tmtc_log_service3.txt"))
-- 
GitLab