tsp added for data samples, hardcoded values removed

Signed-off-by: eantwuh <antal.wu-hen-chang@ericsson.com>
diff --git a/src/IOT_LGen_Definitions.ttcn b/src/IOT_LGen_Definitions.ttcn
index a8d8140..6470d13 100644
--- a/src/IOT_LGen_Definitions.ttcn
+++ b/src/IOT_LGen_Definitions.ttcn
@@ -84,6 +84,18 @@
   //     <EPTF_LGenBase_FsmTableDeclaratorList>
   ///////////////////////////////////////////////////////////
   modulepar EPTF_LGenBase_FsmTableDeclaratorList tsp_IOT_LGen_FSMs := {}
+  
+  ///////////////////////////////////////////////////////////
+  //  Module parameter: tsp_IOT_LGen_dataSamples
+  // 
+  //  Purpose:
+  //   Data sample declarations that can be used to simulate the changing
+  //  values of smart object and resources.
+  //
+  //  Type:
+  //     <LwM2M_DataSamples_List>
+  ///////////////////////////////////////////////////////////
+  modulepar LwM2M_DataSamples_List tsp_IOT_LGen_dataSamples := {}
 
   ///////////////////////////////////////////////////////////
   //  const: c_IOT_entityType
@@ -174,6 +186,7 @@
     var LwM2M_DataSamples_DB v_IOT_LGen_DataSamples_DB := c_LwM2M_DataSamples_DB_init;
   }
   
+  /*  
   const LwM2M_DataSamples c_DataSamples_Latitude :=
   {
     name := "Latitude",
@@ -245,4 +258,5 @@
       { floatValue := 19.096813 }
     }
   }
+  */
 }
diff --git a/src/IOT_LGen_Functions.ttcn b/src/IOT_LGen_Functions.ttcn
index c1f5d98..c49a0d3 100644
--- a/src/IOT_LGen_Functions.ttcn
+++ b/src/IOT_LGen_Functions.ttcn
@@ -448,15 +448,20 @@
   runs on IOT_LGen_CT
   {
     f_LwM2M_DataSamples_DB_init(v_IOT_LGen_DataSamples_DB, p_selfName&"_SamplesDB");
-    
-    var LwM2M_DataSamples v_longitudes := c_DataSamples_Longitude;
-    var LwM2M_DataSamples v_latitudes := c_DataSamples_Latitude;
-    
-    if (sizeof(v_longitudes.values) != sizeof(v_latitudes.values)) {
-      f_IOT_LGen_Logging_ERROR("Data sample latitude longitude mismatch!");
+
+    for (var integer i:=0; i<sizeof(tsp_IOT_LGen_dataSamples); i:=i+1)
+    {
+      f_LwM2M_DataSamples_DB_add(v_IOT_LGen_DataSamples_DB, tsp_IOT_LGen_dataSamples[i]);    
     }
+
+    //var LwM2M_DataSamples v_longitudes := c_DataSamples_Longitude;
+    //var LwM2M_DataSamples v_latitudes := c_DataSamples_Latitude;
     
-    f_LwM2M_DataSamples_DB_add(v_IOT_LGen_DataSamples_DB, v_longitudes);    
-    f_LwM2M_DataSamples_DB_add(v_IOT_LGen_DataSamples_DB, v_latitudes);
+    //if (sizeof(v_longitudes.values) != sizeof(v_latitudes.values)) {
+    //  f_IOT_LGen_Logging_ERROR("Data sample latitude longitude mismatch!");
+    //}
+    
+    //f_LwM2M_DataSamples_DB_add(v_IOT_LGen_DataSamples_DB, v_longitudes);    
+    //f_LwM2M_DataSamples_DB_add(v_IOT_LGen_DataSamples_DB, v_latitudes);
   }
 }