Improve Switch Lat test methods
    - Add dependence functions
    - improve test algorithm
Change-Id: I3b9f03b2e53b3759e32cbc464c2c53a84f5a562c
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
index da371c3..519debc 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,2,1,2,1,2,1,2</testcases>
+    <testcases>0,1,2,1,2,1,2,1,2</testcases>
 
     <SCALE>1,3,5,7</SCALE>
     <max>7</max>
@@ -9,9 +9,15 @@
         <cellApps>drivers,metrics,openflow</cellApps>
     </ENV>
 
+    <DEPENDENCY>
+        <path>/tests/SCPF/SCPFswitchLat/dependencies/</path>
+        <topology>topo-perf-1sw.py</topology>
+        <function>switchFunc</function>
+    </DEPENDENCY>
+
     <GIT>
-        <autopull>off</autopull>
-        <checkout>master</checkout>
+        <gitPull>off</gitPull>
+        <gitBranch>master</gitBranch>
     </GIT>
 
     <CTRL>
@@ -29,17 +35,26 @@
         <ip1>OCN</ip1>
     </MN>
 
+    <TIMEOUT>
+        <timeout>60</timeout>
+    </TIMEOUT>
+
     <BENCH>
         <ip>localhost</ip>
     </BENCH>
 
     <TSHARK>
-        <ofpPortStatus>OF 1.3 146</ofpPortStatus>
-        <ofpRoleReply>OF 1.3 90 of_role_reply</ofpRoleReply>
-        <featureReply>OF 1.3 98 of_features_reply</featureReply>
-        <roleRequest>OF 1.3 90 of_role_request</roleRequest>
-        <tcpSynAck>TCP 74 openflow</tcpSynAck>
-        <finAckSequence>FIN</finAckSequence>
+        <up>
+            <TCP>TCP 74 openflow</TCP>  #1
+            <RQ>OF 1.3 90 of_role_request</RQ> #2
+            <RR>OF 1.3 90 of_role_reply</RR> #3
+            <Feature>OF 1.3 98 of_features_reply</Feature>#4
+        </up>
+
+        <down>
+            <FA>\[FIN,\ ACK\]</FA>
+            <ACK>openflow\ \[ACK\]</ACK>
+        </down>
     </TSHARK>
 
     <TEST>
@@ -58,20 +73,41 @@
         org.onlab.onos.net.topology.impl.DefaultTopologyProvider.cfg
         </topoConfigName>
 
-        #Number of times to iterate each case
-        <numIter>25</numIter>
-        <numSwitch>2</numSwitch>
         #Number of iterations to ignore initially
-        <iterIgnore>5</iterIgnore>
+        <warmUp>5</warmUp>
+
+        #Number of times to iterate each case
+        <sampleSize>20</sampleSize>
+        <device>s3</device>
+        <tsharkResultPath>
+            <up>
+                <TCP>/tmp/Tshark_TCP</TCP>
+                <RQ>/tmp/Tshark_RQ</RQ> #role request
+                <RR>/tmp/Tshark_RR</RR> #role reply OF output
+                <Feature>/tmp/Tshark_Feature</Feature>
+            </up>
+
+            <down>
+                <FA>/tmp/Tshark_FA</FA>#Fin_ack
+                <ACK>/tmp/Tshark_ACK</ACK>
+            </down>
+
+        </tsharkResultPath>
 
         <singleSwThreshold>0,1000</singleSwThreshold>
 
         <tabletFile>tablets_3node.json</tabletFile>
    </TEST>
 
-    <DB>
-        <switchEventResultPath>/tmp/switchEventResultDb</switchEventResultPath>
-    </DB>
+    <SLEEP>
+        <startup>5</startup>
+        <measure>5</measure>
+        <mininet>5</mininet>
+    </SLEEP>
+
+    <DATABASE>
+        <dbName>/tmp/switchEventResultDb</dbName>
+    </DATABASE>
 
     <JSON>
         <deviceTimestamp>topologyDeviceEventTimestamp</deviceTimestamp>