Fix switchLat test
    - TCP package now using openflow SYN package
    - If we greped more than one TCP packages, we use the latest one

Change-Id: I3dcfd442bcf796e6b963e523748e553ff9a1c44f
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 853668d..d174cdd 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -83,7 +83,11 @@
             with open(main.tsharkResultPath[switchStatus][d], "r") as resultFile:
                 # grep tshark result timestamp
                 resultText = resultFile.readlines()
-                resultText = resultText[0]
+                if d == "TCP":
+                    # if TCP package, we should use the latest one package
+                    resultText = resultText[len(resultText) - 1:]
+                else:
+                    resultText = resultText[0]
                 main.log.info("Capture result:" + resultText)
                 resultText = resultText.strip()
                 resultText = resultText.split( " " )
@@ -242,5 +246,5 @@
                 resultDict[switchStatus]['node' + str(i)][ 'A_D' ].append( A_Dtemp )
                 resultDict[switchStatus]['node' + str(i)][ 'D_G' ].append( D_Gtemp )
                 resultDict[switchStatus]['node' + str(i)][ 'E_E' ].append( E_Etemp )
-
+        main.CLIs[0].removeDevice(["of:0000000000000001"])