/** * @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
* @param p_upperbound highest number in range
* @return 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; // 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