Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TTCN-3 Libraries
LibIts
Commits
b68bc1a8
Commit
b68bc1a8
authored
Dec 07, 2012
by
tepelmann
Browse files
Added first table handling.
Added first check handling.
parent
2238e20d
Changes
4
Hide whitespace changes
Inline
Side-by-side
ttcn/DCC/LibItsDcc_Functions.ttcn
View file @
b68bc1a8
...
...
@@ -30,6 +30,8 @@ module LibItsDcc_Functions {
connect
(
p_utComp
:
syncPort
,
self
:
syncPort
);
connect
(
p_itsInDcc
:
syncPort
,
self
:
syncPort
);
connect
(
p_itsRrxDcc
:
syncPort
,
self
:
syncPort
);
connect
(
p_itsInDcc
:
checkPort
,
mtc
:
checkPort
);
connect
(
p_itsRrxDcc
:
checkPort
,
mtc
:
checkPort
);
//Map
map
(
p_utComp
:
utPort
,
system
:
utPort
);
...
...
@@ -56,6 +58,8 @@ module LibItsDcc_Functions {
disconnect
(
p_utComp
:
syncPort
,
self
:
syncPort
);
disconnect
(
p_itsInDcc
:
syncPort
,
self
:
syncPort
);
disconnect
(
p_itsRrxDcc
:
syncPort
,
self
:
syncPort
);
disconnect
(
p_itsInDcc
:
checkPort
,
mtc
:
checkPort
);
disconnect
(
p_itsRrxDcc
:
checkPort
,
mtc
:
checkPort
);
// Unmap
unmap
(
p_utComp
:
utPort
,
system
:
utPort
);
...
...
@@ -580,4 +584,54 @@ module LibItsDcc_Functions {
}
// End of function f_iN_AllRequestedFramesSentOn2Channels
}
// End of group inFunctions
group
checkFunctions
{
function
f_checkExpectedFrames
()
runs
on
ItsDccMts
return
FncRetCode
{
var
FncRetCode
v_ret
:=
e_success
;
var
integer
v_framesIn
:=
-
1
;
var
integer
v_framesRxx
:=
-
1
;
timer
t_check
:=
PX_TSYNC_TIME_LIMIT
;
t_check
.
start
;
alt
{
[
v_framesIn
==-
1
]
checkPort
.
receive
(
integer
:?
)
from
vc_itsInDcc
->
value
v_framesIn
{
t_check
.
stop
;
if
(
v_framesRxx
!=
-
1
)
{
t_check
.
start
;
repeat
;
}
}
[
v_framesRxx
==-
1
]
checkPort
.
receive
(
integer
:?
)
from
vc_itsRrxDcc
->
value
v_framesRxx
{
t_check
.
stop
;
if
(
v_framesIn
!=
-
1
)
{
t_check
.
start
;
repeat
;
}
}
[]
t_check
.
timeout
{
log
(
"**** "
&
__SCOPE__
&
": Timeout while waiting for number of frames indication ****"
)
;
return
e_error
;
}
}
if
(
v_framesIn
!=
v_framesRxx
)
{
v_ret
:=
e_error
;
}
return
v_ret
;
}
// End of function f_checkExpectedFrames
}
// End of group checkFunctions
group
externalFunction
{
/**
* @desc Returns the string representation of the float value
* @param p_float The float value
* @return The string representation of the float value
*/
external
function
fx_float2str
(
float
p_float
)
return
charstring
;
}
}
// End of module LibItsDcc_Functions
\ No newline at end of file
ttcn/DCC/LibItsDcc_Pixits.ttcn
View file @
b68bc1a8
...
...
@@ -7,6 +7,8 @@
*/
module
LibItsDcc_Pixits
{
import
from
LibItsDcc_TypesAndValues
{
type
ProfileTimeAspects
;}
group
acceptableTransmissionPower
{
/**
* @desc Give an acceptable Transmission power for the CCH in the Relaxed state. Value in dBm.
...
...
@@ -223,10 +225,29 @@ module LibItsDcc_Pixits {
}
// end group inachievableTransmissionPower
/**
* @desc Give the content of the reference burst to be sent on the radio interface.
* @see ETSI TS 102 917-3 v1.1.1 A.3/1
*/
modulepar
octetstring
PIXIT_REFERENCE_BURST
;
group
testcaseDataTables
{
/**
* @desc Give the content of the reference burst to be sent on the radio interface.
* @see ETSI TS 102 917-3 v1.1.1 A.3/1
*/
modulepar
octetstring
PIXIT_REFERENCE_BURST
;
* @desc Give the content of Table 7.
* @see ETSI TS 102 917-2 Table 7
*/
modulepar
ProfileTimeAspects
PIXIT_TABLE_7_TC_STS_REL_01_03
:=
{
{
0
,
20.0
,
50.0
},
{
1
,
10.0
,
95.0
},
{
2
,
10.0
,
95.0
},
{
3
,
4.0
,
250.0
},
{
4
,
2.0
,
500.0
},
{
5
,
1.0
,
1000.0
},
{
6
,
0.2
,
5000.0
},
{
7
,
0.1
,
10000.0
},
{
8
,
0.1
,
10000.0
}
}
}
}
// End of module LibItsDcc_Pixits
\ No newline at end of file
ttcn/DCC/LibItsDcc_TestSystem.ttcn
View file @
b68bc1a8
...
...
@@ -45,7 +45,14 @@ module LibItsDcc_TestSystem {
in
RrxInd
;
}
// End of port InPort
}
// end portDefinitions
/**
* @desc Check Port used for intercomponent exchange of data to check
*/
type
port
CheckPort
message
{
inout
all
;
}
}
// end portDefinitions
group
componentDefinitions
{
...
...
@@ -86,6 +93,7 @@ module LibItsDcc_TestSystem {
// IN ports
port
InPort
inPort
;
port
CheckPort
checkPort
;
//timers
...
...
@@ -103,8 +111,9 @@ module LibItsDcc_TestSystem {
*/
type
component
ItsRrxDcc
extends
ItsBaseComponent
{
//
IN
ports
//
RRX
ports
port
RrxPort
rrxPort
;
port
CheckPort
checkPort
;
//timers
...
...
@@ -117,6 +126,28 @@ module LibItsDcc_TestSystem {
}
// End of component ItsInDcc
/**
* @desc Test component for ITS DCC MTC
*/
type
component
ItsDccMts
extends
ItsBaseMtc
{
// MTC ports
port
CheckPort
checkPort
;
//timers
//component variables
var
UtComp
vc_utComp
;
var
ItsInDcc
vc_itsInDcc
;
var
ItsRrxDcc
vc_itsRrxDcc
;
//default
var
default
vc_default
:=
null
;
//global variables
}
// End of component ItsDccMts
}
// End of group componentDefinitions
group
upperTester
{
...
...
@@ -145,4 +176,4 @@ module LibItsDcc_TestSystem {
with
{
encode
"LibIts_Interface"
}
// End of group interfacePrimitives
}
// End of module LibItsDcc_TestSystem
\ No newline at end of file
}
// End of module LibItsDcc_TestSystem
\ No newline at end of file
ttcn/DCC/LibItsDcc_TypesAndValues.ttcn
View file @
b68bc1a8
...
...
@@ -86,6 +86,54 @@ module LibItsDcc_TypesAndValues {
}
// End of group subFields
group
moduleParTables
{
type
integer
ProfileType
(
0
..
infinity
);
type
record
ProfileTimeAspect
{
ProfileType
profile
,
float
messageInterval
,
//in Hz
float
tOff
//in ms
}
type
record
of
ProfileTimeAspect
ProfileTimeAspects
;
type
record
ChannelTimeAspect
{
ChannelState
cchState
,
float
messageInterval
,
//in Hz
float
tOff
,
//in ms
record
of
ChannelState
sch1State
}
type
record
ProfileChannelTimeAspect
{
ProfileType
profile
,
ChannelTimeAspect
aspects
}
type
record
of
ProfileChannelTimeAspect
ProfileChannelTimeAspects
;
type
record
ProfileTimeChannelAspect
{
ProfileType
profile
,
ChannelTimeAspect
aspects
}
type
record
of
ProfileTimeChannelAspect
ProfileTimeChannelAspects
;
type
record
ProfileChannelAspect
{
ProfileType
profile
,
record
of
record
{
ChannelState
cchState
,
record
of
record
{
ChannelState
sch1State
,
ChannelState
sch2State
}
states
}
aspects
}
type
record
of
ProfileChannelAspect
ProfileChannelAspects
;
}
group
Constants
{
const
integer
c_maxCommandReference
:=
256
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment