Newer
Older
/**
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc Module containing functions for GeoNetworking
*
*/
module LibItsGeoNetworking_Functions {
// LibIts
import from LibIts_TestSystem all;
import from LibIts_Interface all;
import from LibItsGeoNetworking_TypesAndValues all;
/**
* @desc Create Facility component and connects GeoNetworking port
* @param p_ptcDenm returned Facility component variable
*/
function f_ptcGeoNetworkingUp(out ItsNt p_ptcGeoNetworking) {
p_ptcGeoNetworking := ItsNt.create("GeoNetworking Tester");
// map ports
map(p_ptcGeoNetworking:geoNetworkingPort, system:geoNetworkingPort);
/**
* @desc Wait for component to finish and unmap GeoNetworking ports
function f_ptcGeoNetworkingDown(in ItsNt p_ptcGeoNetworking) runs on ItsMtc {
tc_guard.start;
alt {
[] p_ptcGeoNetworking.done {
tc_guard.stop;
}
[] tc_guard.timeout {
log("*** f_ptcGeoNetworkingDown: ERROR: Timeout while waiting for component ***");
setverdict(inconc);
}
}
unmap(p_ptcGeoNetworking:geoNetworkingPort);
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
group altsteps {
/**
* @desc The base default.
*/
altstep a_default() runs on ItsNt {
[] geoNetworkingPort.receive {
setverdict (inconc, "Received an unexpected message");
//TODO shall stop be called here?
stop;
}
[] tc_wait.timeout {
setverdict (inconc, "Timeout while awaiting reaction of the IUT prior to Upper Tester action");
//TODO shall stop be called here?
stop;
}
[] tc_ac.timeout {
setverdict (inconc, "Timeout while awaiting the reception of a message");
//TODO shall stop be called here?
stop;
}
}
}
group preambles {
/**
* @desc The default preamble.
*/
function f_prDefault() runs on ItsNt {
activate(a_default());
}
/**
* @desc Brings the IUT into an initial state.
* @return
*/
function f_prInitialState() runs on ItsNt {
f_prDefault();
// TODO: any specific action ?
setverdict(pass);
}
} // end preambles
group postambles {
/**
* @desc The default postamble.
*/
function f_poDefault() runs on ItsNt {
setverdict(pass);
}
} // end postambles
group upperTester {
function f_utGenerateIpv6Message() runs on ItsNt {
}
} // end upperTester
group testAdapter {
function f_taStartBeaconing(in template (value) Header p_beaconHeader) {
}
function f_taStopBeaconing() {
}
} // end testAdapter
group posVectorFunctions {
function f_getTesterLongPosVector() return LongPosVector {
var LongPosVector v_longPosVector;
return v_longPosVector;
}
function f_longPosVector2ShortPosVector(in LongPosVector p_longPosVector) return ShortPosVector {
var ShortPosVector v_shortPosVector;
return v_shortPosVector;
}
function f_getIutShortPosVector() return ShortPosVector {
var ShortPosVector v_shortPosVector;
return v_shortPosVector;
}