Skip to content
Snippets Groups Projects
Commit 5dbc891e authored by fischer's avatar fischer
Browse files

Add LibItsCommon_Functions module

parent 7f725a5e
No related branches found
No related tags found
No related merge requests found
/**
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc Module containing common functions for ITS
*
*/
module LibItsCommon_Functions {
/** @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
} // end of module
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment