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
3db7a1b3
Commit
3db7a1b3
authored
Dec 06, 2012
by
schmitting
Browse files
Ut templates corrected
parent
26fa816b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ttcn/DCC/LibItsDcc_Functions.ttcn3
View file @
3db7a1b3
...
...
@@ -103,7 +103,6 @@ module LibItsDcc_Functions {
repeat
;
}
}
}
/**
...
...
@@ -160,6 +159,37 @@ module LibItsDcc_Functions {
}
// End of function f_utCommandIndication
/**
* @desc Receive frames via the radio link and check that all frames are sent with
* the requested Tx power and inter-packet spacing on the chosen channel
* @param p_testDuration Overall test duration
* @param p_tOff Requested Toff value
* @param p_requestedTxPower Requested Tx send power value
* @param p_dCCProfileIdentifier Requested DCC profile
* @param p_channel Channel on which the frame has been sent
*/
function
f_ut_AllRequestedFramesSent
(
float
p_testDuration
,
float
p_tOff
,
ChannelState
p_cch
,
ChannelState
p_sch1
,
ChannelState
p_sch2
,
ChannelState
p_sch3
,
ChannelState
p_sch4
,
integer
p_requestedTxPower
,
Channel
p_channel
)
runs
on
UtComp
{
var
integer
v_frameReceivedCount
:=
0
;
timer
tc_testDuration
:=
p_testDuration
;
timer
tc_tOff
:=
p_tOff
;
// Initialize radio equipment
f_utInitializeIut
(
m_utInitialize
(
m_utRadioInitialize
));
// Put channel(s) into defined state
f_utTriggerEvent
(
m_utRadioEvent
(
p_cch
,
p_sch1
,
p_sch2
,
p_sch3
,
p_sch4
));
f_selfOrClientSyncAndVerdict
(
c_prDone
,
e_success
);
}
// End of function f_ut_AllRequestedFramesSent
}
// End of group utFunctions
/**
...
...
@@ -184,7 +214,8 @@ module LibItsDcc_Functions {
var
integer
v_commandReference
:=
float2int
(
int2float
(
c_maxCommandReference
)
*
rnd
());
var
InSta
v_inSta
;
var
integer
v_frameUnacknowledgedCount
:=
1
;
var
integer
v_frameRequestedCount
:=
1
;
var
integer
v_frameAcknowledgedCount
:=
0
;
timer
tc_testDuration
:=
p_testDuration
;
timer
tc_tOff
:=
p_tOff
;
...
...
@@ -202,7 +233,7 @@ module LibItsDcc_Functions {
p_channel
,
true
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
(
v_inSta
.
achievedSendPower
!=
p_requestedTxPower
)
{
setverdict
(
fail
)}
tc_tOff
.
start
;
...
...
@@ -214,12 +245,12 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST
,
p_requestedTxPower
,
p_dCCProfileIdentifier
));
v_frame
Unacknowledg
edCount
:=
v_frame
Unacknowledg
edCount
+
1
;
v_frame
Request
edCount
:=
v_frame
Request
edCount
+
1
;
repeat
;
}
[]
tc_testDuration
.
timeout
{
if
(
v_frame
Una
cknowledgedCount
==
0
)
if
(
v_frame
A
cknowledgedCount
==
v_frameRequestedCount
)
{
setverdict
(
pass
)}
else
{
tc_tOff
.
start
;
...
...
@@ -228,10 +259,12 @@ module LibItsDcc_Functions {
p_channel
,
true
))
->
value
v_inSta
{
tc_tOff
.
stop
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
((
v_inSta
.
achievedSendPower
!=
p_requestedTxPower
)
or
(
v_frame
Una
cknowledgedCount
!=
0
))
or
(
v_frame
A
cknowledgedCount
!=
v_frameRequestedCount
))
{
setverdict
(
fail
)}
else
{
setverdict
(
pass
)}
}
[]
tc_tOff
.
timeout
{
...
...
@@ -262,7 +295,8 @@ module LibItsDcc_Functions {
var
integer
v_commandReference
:=
float2int
(
int2float
(
c_maxCommandReference
)
*
rnd
());
var
InSta
v_inSta
;
var
integer
v_frameUnacknowledgedCount
:=
1
;
var
integer
v_frameRequestedCount
:=
1
;
var
integer
v_frameAcknowledgedCount
:=
0
;
timer
tc_testDuration
:=
p_testDuration
;
timer
tc_tOff
:=
p_tOff
;
...
...
@@ -280,7 +314,7 @@ module LibItsDcc_Functions {
p_channel
,
true
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
(
v_inSta
.
achievedSendPower
>=
p_maxTxPower
)
{
setverdict
(
fail
)}
tc_tOff
.
start
;
...
...
@@ -292,12 +326,12 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST
,
p_requestedTxPower
,
p_dCCProfileIdentifier
));
v_frame
Unacknowledg
edCount
:=
v_frame
Unacknowledg
edCount
+
1
;
v_frame
Request
edCount
:=
v_frame
Request
edCount
+
1
;
repeat
;
}
[]
tc_testDuration
.
timeout
{
if
(
v_frame
Una
cknowledgedCount
==
0
)
if
(
v_frame
A
cknowledgedCount
==
v_frameRequestedCount
)
{
setverdict
(
pass
)}
else
{
tc_tOff
.
start
;
...
...
@@ -306,10 +340,12 @@ module LibItsDcc_Functions {
p_channel
,
true
))
->
value
v_inSta
{
tc_tOff
.
stop
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
((
v_inSta
.
achievedSendPower
>=
p_maxTxPower
)
or
(
v_frame
Una
cknowledgedCount
!=
0
))
or
(
v_frame
A
cknowledgedCount
!=
v_frameRequestedCount
))
{
setverdict
(
fail
)}
else
{
setverdict
(
pass
)}
}
[]
tc_tOff
.
timeout
{
...
...
@@ -390,7 +426,8 @@ module LibItsDcc_Functions {
var
integer
v_commandReference
:=
float2int
(
int2float
(
c_maxCommandReference
)
*
rnd
());
var
InSta
v_inSta
;
var
integer
v_frameUnacknowledgedCount
:=
1
;
var
integer
v_frameRequestedCount
:=
1
;
var
integer
v_frameAcknowledgedCount
:=
0
;
var
boolean
v_frameSent
,
v_frameDropped
:=
false
;
timer
tc_testDuration
:=
p_testDuration
;
...
...
@@ -409,7 +446,7 @@ module LibItsDcc_Functions {
p_channel
,
true
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
v_frameSent
:=
true
;
tc_tOff
.
start
;
repeat
;
...
...
@@ -419,7 +456,7 @@ module LibItsDcc_Functions {
p_channel
,
false
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
v_frameDropped
:=
true
;
tc_tOff
.
start
;
repeat
;
...
...
@@ -430,14 +467,14 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST
,
p_requestedTxPower
,
p_dCCProfileIdentifier
));
v_frame
Unacknowledg
edCount
:=
v_frame
Unacknowledg
edCount
+
1
;
v_frame
Request
edCount
:=
v_frame
Request
edCount
+
1
;
repeat
;
}
[]
tc_testDuration
.
timeout
{
if
(
not
v_frameSent
and
v_frameDropped
)
{
setverdict
(
fail
)}
if
(
v_frame
Una
cknowledgedCount
==
0
)
if
(
v_frame
A
cknowledgedCount
==
v_frameRequestedCount
)
{
setverdict
(
pass
)}
else
{
tc_tOff
.
start
;
...
...
@@ -446,9 +483,11 @@ module LibItsDcc_Functions {
p_channel
,
?
))
->
value
v_inSta
{
tc_tOff
.
stop
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
if
(
v_frame
Una
cknowledgedCount
!=
0
)
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
(
v_frame
A
cknowledgedCount
!=
v_frameRequestedCount
)
{
setverdict
(
fail
)}
else
{
setverdict
(
pass
)}
}
[]
tc_tOff
.
timeout
{
...
...
@@ -479,7 +518,8 @@ module LibItsDcc_Functions {
var
integer
v_commandReference
:=
float2int
(
int2float
(
c_maxCommandReference
)
*
rnd
());
var
InSta
v_inSta
;
var
integer
v_frameUnacknowledgedCount
:=
1
;
var
integer
v_frameRequestedCount
:=
1
;
var
integer
v_frameAcknowledgedCount
:=
0
;
var
boolean
v_channel_1
,
v_channel_2
:=
false
;
timer
tc_testDuration
:=
p_testDuration
;
...
...
@@ -498,7 +538,7 @@ module LibItsDcc_Functions {
p_channel_1
,
true
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
v_channel_1
:=
true
;
tc_tOff
.
start
;
repeat
;
...
...
@@ -508,7 +548,7 @@ module LibItsDcc_Functions {
p_channel_2
,
true
))
->
value
v_inSta
{
v_commandReference
:=
(
v_commandReference
+
1
)
mod
c_maxCommandReference
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
v_channel_2
:=
true
;
tc_tOff
.
start
;
repeat
;
...
...
@@ -519,14 +559,14 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST
,
p_requestedTxPower
,
p_dCCProfileIdentifier
));
v_frame
Unacknowledg
edCount
:=
v_frame
Unacknowledg
edCount
+
1
;
v_frame
Request
edCount
:=
v_frame
Request
edCount
+
1
;
repeat
;
}
[]
tc_testDuration
.
timeout
{
if
(
not
v_channel_1
and
v_channel_2
)
{
setverdict
(
fail
)}
if
(
v_frame
Una
cknowledgedCount
==
0
)
if
(
v_frame
A
cknowledgedCount
==
v_frameRequestedCount
)
{
setverdict
(
pass
)}
else
{
tc_tOff
.
start
;
...
...
@@ -535,9 +575,11 @@ module LibItsDcc_Functions {
?
,
true
))
->
value
v_inSta
{
tc_tOff
.
stop
;
v_frame
Una
cknowledgedCount
:=
v_frame
Una
cknowledgedCount
-
1
;
if
(
v_frame
Una
cknowledgedCount
!=
0
)
v_frame
A
cknowledgedCount
:=
v_frame
A
cknowledgedCount
+
1
;
if
(
v_frame
A
cknowledgedCount
!=
v_frameRequestedCount
)
{
setverdict
(
fail
)}
else
{
setverdict
(
pass
)}
}
[]
tc_tOff
.
timeout
{
...
...
@@ -546,8 +588,8 @@ module LibItsDcc_Functions {
}
}
}
f_selfOrClientSyncAndVerdict
(
c_prDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
// End of function f_iN_AllRequestedFramesSentOn2Channels
}
// End of group inFunctions
}
// End of module LibItsDcc_Functions
\ No newline at end of file
ttcn/DCC/LibItsDcc_Templates.ttcn3
View file @
3db7a1b3
...
...
@@ -11,33 +11,41 @@ module LibItsDcc_Templates {
// LibIts
import
from
LibItsDcc_TypesAndValues
all
;
import
from
LibItsDcc_TestSystem
all
;
/**
* @desc Templates used to trigger actions at the Upper Tester
* and to capture indication message sent by the IUT on the radio interface
*/
group
utPrimitives
{
/**
* @desc Ut Initialize Primitive template
*/
template
UtInitialize
m_utInitialize
(
template
UtRadioInitialize
p_utRadioInitialize
)
:=
{
utRadioInitialize
:=
p_utRadioInitialize
}
// End m_utRadioInitialize
/**
* @desc UtRadioInitialize Primitive template
*/
template
UtRadioInitialize
m_utRadioInitialize
:=
template
UtRadioInitialize
m_utRadioInitialize
:=
{
}
// End m_utRadioInitialize
/**
* @desc UtRadioEvent Primitive template
*/
template
UtRadioEvent
m_utRadioEvent
(
template
ChannelState
p_cch
,
template
ChannelState
p_sch1
,
template
ChannelState
p_sch2
,
template
ChannelState
p_sch3
,
template
ChannelState
p_sch4
)
:=
{
cchChannelState
:=
p_cch
,
sch1ChannelState
:=
p_sch1
,
sch2ChannelState
:=
p_sch2
,
sch3ChannelState
:=
p_sch3
,
sch4ChannelState
:=
p_sch4
}
// End m_utRadioEvent
template
(
value
)
UtTrigger
m_utRadioEvent
(
template
(
omit
)
ChannelState
p_cch
,
template
(
omit
)
ChannelState
p_sch1
:=
omit
,
template
(
omit
)
ChannelState
p_sch2
:=
omit
,
template
(
omit
)
ChannelState
p_sch3
:=
omit
,
template
(
omit
)
ChannelState
p_sch4
:=
omit
)
:=
{
utRadioEvent
:=
{
cchChannelState
:=
p_cch
,
sch1ChannelState
:=
p_sch1
,
sch2ChannelState
:=
p_sch2
,
sch3ChannelState
:=
p_sch3
,
sch4ChannelState
:=
p_sch4
}
}
// End m_utRadioEvent
/**
* @desc UtRadioCommandIndication Primitive template
...
...
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