Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LibIts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TTCN-3 Libraries
LibIts
Commits
5dbc891e
Commit
5dbc891e
authored
14 years ago
by
fischer
Browse files
Options
Downloads
Patches
Plain Diff
Add LibItsCommon_Functions module
parent
7f725a5e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ttcn/Common/LibItsCommon_Functions.ttcn
+33
-0
33 additions, 0 deletions
ttcn/Common/LibItsCommon_Functions.ttcn
with
33 additions
and
0 deletions
ttcn/Common/LibItsCommon_Functions.ttcn
0 → 100644
+
33
−
0
View file @
5dbc891e
/**
* @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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment