Newer
Older
/**
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc Module containing functions for basic Transport Protocol
*
*/
// LibCommon
import from LibCommon_Sync all;
// LibIts
import from LibIts_Interface all;
import from LibItsBtp_TypesAndValues all;
import from LibItsBtp_Templates all;
import from LibItsBtp_Pixits all;
import from LibItsCommon_Functions all;
group configurationFunctions {
/**
* @desc Setups default configuration
*/
function f_cfUp() runs on ItsNt {
map(self:utPort, system:utPort);
map(self:btpPort, system:btpPort);
f_connect4SelfOrClientSync();
} // end f_cfUp
/**
* @desc Deletes default configuration
*/
function f_cfDown() runs on ItsNt {
unmap(self:utPort, system:utPort);
unmap(self:btpPort, system:btpPort);
f_disconnect4SelfOrClientSync();
} // end f_cfDown
} // end configurationFunctions
group btpAltsteps {
/**
* @desc The base default.
*/
altstep a_default() runs on ItsNt {
[] btpPort.receive {
f_selfOrClientSyncAndVerdict("error", e_error, "*** a_default: Received an unexpected message ***");
}
[] tc_wait.timeout {
f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
}
[] tc_ac.timeout {
f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting the reception of a message ***");
}
[] a_shutdown() {
f_poDefault();
f_cfDown();
log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
} //end btpAltsteps
/**
* @desc The default preamble.
*/
function f_prDefault() runs on ItsNt {
activate(a_default());
}
group postambles {
/**
* @desc The default postamble.
*/
function f_poDefault() runs on ItsNt {
//empty
}
} // end postambles
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
group getFunctions {
/**
* @desc Gets the BTP source port of the IUT.
* @return
*/
function f_getBtpSrcPort() return BtpPortId {
return PX_SOURCE_PORT;
}
/**
* @desc Gets the BTP destination port of the IUT.
* @return
*/
function f_getBtpDstPort() return BtpPortId {
return PX_DESTINATION_PORT;
}
/**
* @desc Gets a unknown BTP destination port of the IUT.
* @return
*/
function f_getBtpDstPort_Unknown() return BtpPortId {
return PX_UNKNOWN_DESTINATION_PORT;
}
/**
* @desc Gets the BTP destination port info of the IUT.
* @return
*/
function f_getBtpDstPortInfo() return BtpPortId {
return PX_DESTINATION_PORT_INFO;
}
/**
* @desc Gets the BTP payload to use.
* @return
*/
function f_getBtpPayload() return BtpPayload {
return PX_PAYLOAD;
}
} // end getFunctions