Loading ttcn/Common/LibItsCommon_Functions.ttcn −140 Changes for ttcn/Common/LibItsCommon_Functions.ttcn: 0 added lines, 140 removed lines. Original line number Diff line number Diff line Loading @@ -13,97 +13,14 @@ module LibItsCommon_Functions { // LibCommon // import from LibCommon_Sync all; // import from LibCommon_VerdictControl all; import from LibCommon_BasicTypesAndValues all; // LibIts import from LibItsCommon_Pixits all; import from ITS_Container language "ASN.1:1997" all; // import from DSRC language "ASN.1:1997" all; group generalFunctions { /** * @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range * @param p_upperbound highest number in range * @return random integer * */ 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; log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** * @desc Computes the absolute value of an integer * @param p_number the number * @return Absolute value of the number */ function f_abs(in integer p_number) return integer { if(p_number < 0) { return 0 - p_number; } return p_number; } /** * @desc Computes the absolute value of an integer * @param p_number the number * @return Absolute value of the number */ function ff_abs(in float p_number) return float { if(p_number < 0.0) { return 0.0 - p_number; } return p_number; } /** * @desc Compares two values and returns the lowest onde * @param p_a First value * @param p_b Second value * @return Lowest value */ function f_min(in integer p_a, in integer p_b) return integer { if(p_a < p_b) { return p_a; } return p_b; } /** * @desc Removes unsignificant right-most 0 bits of a bitstring * * @param p_bitstring Bitstring to be reduced * @return Reduced bitstring * */ function f_removeUnsignificantBits(in bitstring p_bitstring) return bitstring { var integer i, len; len := lengthof(p_bitstring); for(i:=len-1; i >=0 and p_bitstring[i] == '0'B; i:=i-1) {} return substr(p_bitstring, 0, i + 1); } /** * @desc Gets the current time since 01/01/2004 * @return TimestampIts - current time since 01/01/2004 in milliseconds Loading @@ -117,19 +34,6 @@ module LibItsCommon_Functions { return v_timeStamp; } /** * @desc Gets the current time since 01/01/1970 in UTC format * @return The current time since 01/01/1970 in UTC format in milliseconds */ function f_getCurrentTimeUtc() return UInt64 { var UInt64 v_time := 0; // log("*** f_getCurrentTimeUtc: INFO: calling fx_getCurrentTimeUtc() ***"); v_time := fx_getCurrentTimeUtc(); return v_time; } /** * @desc Gets the current time since 01/01/2004 * @return TimeMark - tenths of a second in the current or next hour in units of 1/10th second from UTC time Loading @@ -143,32 +47,6 @@ module LibItsCommon_Functions { return v_timeMark; } /** * @desc Gets the Minute of current UTC year * @return MinuteOfTheYear - tenths of a second in the current or next hour in units of 1/10th second from UTC time */ function f_getMinuteOfTheYear() return UInt16 { var UInt16 v_minuteOfTheYear := 0; // log("*** f_getMinuteOfTheYear: INFO: calling fx_getMinuteOfTheYear() ***"); v_minuteOfTheYear := fx_getMinuteOfTheYear(); return v_minuteOfTheYear; } /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - The milliseconds point in the current UTC minute (0..60000) */ function f_getDSecond() return UInt16 { var UInt16 v_dSecond := 0; // log("*** f_getDSecond: INFO: calling fx_getDSecond() ***"); v_dSecond := fx_getDSecond(); return v_dSecond; } } // end generalFunctions group itsFunctions { Loading Loading @@ -246,30 +124,12 @@ module LibItsCommon_Functions { */ external function fx_getCurrentTime() return UInt64; /** * @desc Gets the current time since 01/01/1970 in UTC format * @return The current time since 01/01/1970 in UTC format */ external function fx_getCurrentTimeUtc() return UInt64; /** * @desc Gets the tenths of a second in the current or next hour in units of 1/10th second from UTC time * @return TimeMark - tenths of a second in the current or next hour in units of 1/10th second from UTC time */ external function fx_getCurrentTimeMark() return UInt32; /** * @desc Gets the minutes of current UTC year * @return MinuteOfTheYear - minutes of current UTC year */ external function fx_getMinuteOfTheYear() return UInt16; /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - the milliseconds point in the current UTC minute */ external function fx_getDSecond() return UInt16; /** * @desc External function to compute distance between two points * @param p_latitudeA Latitude of first point Loading ttcn/Http/LibItsHttp_BinaryMessageBodyTypes.ttcn −35 File deleted. Show changes ttcn/Http/LibItsHttp_BinaryTemplates.ttcn −62 File deleted. Show changes ttcn/Http/LibItsHttp_BinaryTypes.ttcn −9 File deleted. Show changes ttcn/Http/LibItsHttp_EncdecDeclarations.ttcn −11 File deleted. Show changes Loading
ttcn/Common/LibItsCommon_Functions.ttcn −140 Changes for ttcn/Common/LibItsCommon_Functions.ttcn: 0 added lines, 140 removed lines. Original line number Diff line number Diff line Loading @@ -13,97 +13,14 @@ module LibItsCommon_Functions { // LibCommon // import from LibCommon_Sync all; // import from LibCommon_VerdictControl all; import from LibCommon_BasicTypesAndValues all; // LibIts import from LibItsCommon_Pixits all; import from ITS_Container language "ASN.1:1997" all; // import from DSRC language "ASN.1:1997" all; group generalFunctions { /** * @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range * @param p_upperbound highest number in range * @return random integer * */ 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; log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** * @desc Computes the absolute value of an integer * @param p_number the number * @return Absolute value of the number */ function f_abs(in integer p_number) return integer { if(p_number < 0) { return 0 - p_number; } return p_number; } /** * @desc Computes the absolute value of an integer * @param p_number the number * @return Absolute value of the number */ function ff_abs(in float p_number) return float { if(p_number < 0.0) { return 0.0 - p_number; } return p_number; } /** * @desc Compares two values and returns the lowest onde * @param p_a First value * @param p_b Second value * @return Lowest value */ function f_min(in integer p_a, in integer p_b) return integer { if(p_a < p_b) { return p_a; } return p_b; } /** * @desc Removes unsignificant right-most 0 bits of a bitstring * * @param p_bitstring Bitstring to be reduced * @return Reduced bitstring * */ function f_removeUnsignificantBits(in bitstring p_bitstring) return bitstring { var integer i, len; len := lengthof(p_bitstring); for(i:=len-1; i >=0 and p_bitstring[i] == '0'B; i:=i-1) {} return substr(p_bitstring, 0, i + 1); } /** * @desc Gets the current time since 01/01/2004 * @return TimestampIts - current time since 01/01/2004 in milliseconds Loading @@ -117,19 +34,6 @@ module LibItsCommon_Functions { return v_timeStamp; } /** * @desc Gets the current time since 01/01/1970 in UTC format * @return The current time since 01/01/1970 in UTC format in milliseconds */ function f_getCurrentTimeUtc() return UInt64 { var UInt64 v_time := 0; // log("*** f_getCurrentTimeUtc: INFO: calling fx_getCurrentTimeUtc() ***"); v_time := fx_getCurrentTimeUtc(); return v_time; } /** * @desc Gets the current time since 01/01/2004 * @return TimeMark - tenths of a second in the current or next hour in units of 1/10th second from UTC time Loading @@ -143,32 +47,6 @@ module LibItsCommon_Functions { return v_timeMark; } /** * @desc Gets the Minute of current UTC year * @return MinuteOfTheYear - tenths of a second in the current or next hour in units of 1/10th second from UTC time */ function f_getMinuteOfTheYear() return UInt16 { var UInt16 v_minuteOfTheYear := 0; // log("*** f_getMinuteOfTheYear: INFO: calling fx_getMinuteOfTheYear() ***"); v_minuteOfTheYear := fx_getMinuteOfTheYear(); return v_minuteOfTheYear; } /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - The milliseconds point in the current UTC minute (0..60000) */ function f_getDSecond() return UInt16 { var UInt16 v_dSecond := 0; // log("*** f_getDSecond: INFO: calling fx_getDSecond() ***"); v_dSecond := fx_getDSecond(); return v_dSecond; } } // end generalFunctions group itsFunctions { Loading Loading @@ -246,30 +124,12 @@ module LibItsCommon_Functions { */ external function fx_getCurrentTime() return UInt64; /** * @desc Gets the current time since 01/01/1970 in UTC format * @return The current time since 01/01/1970 in UTC format */ external function fx_getCurrentTimeUtc() return UInt64; /** * @desc Gets the tenths of a second in the current or next hour in units of 1/10th second from UTC time * @return TimeMark - tenths of a second in the current or next hour in units of 1/10th second from UTC time */ external function fx_getCurrentTimeMark() return UInt32; /** * @desc Gets the minutes of current UTC year * @return MinuteOfTheYear - minutes of current UTC year */ external function fx_getMinuteOfTheYear() return UInt16; /** * @desc Gets the milliseconds point in the current UTC minute * @return DSecond - the milliseconds point in the current UTC minute */ external function fx_getDSecond() return UInt16; /** * @desc External function to compute distance between two points * @param p_latitudeA Latitude of first point Loading