Loading ttcn/CAM/LibItsCam_Functions.ttcn +4 −23 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ module LibItsCam_Functions { import from LibItsCam_Templates all; import from LibItsCam_Pixits all; import from LibItsCam_TypesAndValues all; import from LibItsCommon_Functions all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -79,28 +80,8 @@ group postambles { group otherFunctions { /** @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range<br> * @param p_upperbound highest number in range<br> * @return integer<br> * */ function f_random( in integer p_lowerbound, in integer p_upperbound ) return integer { //Variables var integer v_random := 0; v_random := float2int(int2float(p_upperbound - p_lowerbound +1)*rnd()) + p_lowerbound; // Here, upperbound and lowerbound denote highest and lowest number in range. log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** @desc function to generate a random bitstring value * corrzesponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * corresponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * * @see f_random * @param p_length bitstring length - max 15<br> Loading @@ -113,10 +94,10 @@ group otherFunctions { var bitstring v_random := '00000000'B; v_random := '000000000000001'B << f_random (0, p_length); log("*** f_random: INFO: OK - random value = " & bit2str(v_random) & " ***"); log("*** f_bitPositionRandom: INFO: OK - random value = " & bit2str(v_random) & " ***"); return v_random; } // end function f_random } // end function f_bitPositionRandom } // end group otherFunctions Loading ttcn/Common/LibItsCommon_Functions.ttcn +0 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,6 @@ module LibItsCommon_Functions { /** @desc function to generate integer random values * * @see ttcn-3 - rnd() Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -1098,6 +1098,16 @@ module LibItsGeoNetworking_Functions { return v_itsGnLifetimeLocTE; } // end f_getLifetimeLocTE /** * @desc Set the number of neighbour in the Location Table. * @return */ function f_setNrNeighbourLT(in integer p_nrNeighbour) runs on ItsNt { //TODO set the number of Nieghbour in the IUT Location Table } // end f_setNrNeighbourLT } // end iutFunctions group posVectorFunctions { Loading Loading
ttcn/CAM/LibItsCam_Functions.ttcn +4 −23 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ module LibItsCam_Functions { import from LibItsCam_Templates all; import from LibItsCam_Pixits all; import from LibItsCam_TypesAndValues all; import from LibItsCommon_Functions all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -79,28 +80,8 @@ group postambles { group otherFunctions { /** @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range<br> * @param p_upperbound highest number in range<br> * @return integer<br> * */ function f_random( in integer p_lowerbound, in integer p_upperbound ) return integer { //Variables var integer v_random := 0; v_random := float2int(int2float(p_upperbound - p_lowerbound +1)*rnd()) + p_lowerbound; // Here, upperbound and lowerbound denote highest and lowest number in range. log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** @desc function to generate a random bitstring value * corrzesponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * corresponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * * @see f_random * @param p_length bitstring length - max 15<br> Loading @@ -113,10 +94,10 @@ group otherFunctions { var bitstring v_random := '00000000'B; v_random := '000000000000001'B << f_random (0, p_length); log("*** f_random: INFO: OK - random value = " & bit2str(v_random) & " ***"); log("*** f_bitPositionRandom: INFO: OK - random value = " & bit2str(v_random) & " ***"); return v_random; } // end function f_random } // end function f_bitPositionRandom } // end group otherFunctions Loading
ttcn/Common/LibItsCommon_Functions.ttcn +0 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,6 @@ module LibItsCommon_Functions { /** @desc function to generate integer random values * * @see ttcn-3 - rnd() Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -1098,6 +1098,16 @@ module LibItsGeoNetworking_Functions { return v_itsGnLifetimeLocTE; } // end f_getLifetimeLocTE /** * @desc Set the number of neighbour in the Location Table. * @return */ function f_setNrNeighbourLT(in integer p_nrNeighbour) runs on ItsNt { //TODO set the number of Nieghbour in the IUT Location Table } // end f_setNrNeighbourLT } // end iutFunctions group posVectorFunctions { Loading