Commit 6ea9334c authored by garciay's avatar garciay
Browse files

Start SREM/SSEM implementation

parent aa3111a7
......@@ -117,8 +117,8 @@ module LibItsDenm_Templates {
*/
template DenmInd mw_denmIndWithBtpParameters (
template (present) DENM p_denMsg,
in template UInt8 p_btpDestinationPort := *,
in template UInt8 p_btpInfo := *
in template UInt16 p_btpDestinationPort := *,
in template UInt16 p_btpInfo := *
) modifies mw_denmInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
......
......@@ -304,7 +304,7 @@ module LibItsIvim_Functions {
mw_ivimPdu(
mw_ivimStructure
))) {
log("*** " & testcasename() & ": INFO: IVIM message received in default ***");
log("*** " & testcasename() & ": INFO: IVIM received in default ***");
vc_ivimReceived := true;
repeat;
}
......
......@@ -7,49 +7,59 @@
*/
module LibItsIvim_Pics {
group ivimPics {
/**
* @desc Does the IUT act as Road Side Unit?
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_RSU_ROLE := true;
/**
* @desc Support for IVIM generation
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_GENERATION := true;
/**
* @desc Does the IUT act as Road Side Unit?
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_RSU_ROLE := true;
/**
* @desc Support for IVIM generation
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_GENERATION := true;
/**
* @desc Support for IVIM update
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_UPDATE := true;
/**
* @desc Support for IVIM update
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_UPDATE := true;
/**
* @desc Support for IVIM cancellation
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_CANCELLATION := true;
/**
* @desc Support for IVIM cancellation
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_CANCELLATION := true;
/**
* @desc Support for IVIM NEGATION
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_NEGATION := true;
/**
* @desc Support for IVIM NEGATION
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_NEGATION := true;
/**
* @desc Support for IVIM RECEPTION
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_RECEPTION := true;
/**
* @desc Support for IVIM RECEPTION
* @see ETSI TS 103 191-1 Table 3
*/
modulepar boolean PICS_IVIM_RECEPTION := true;
/**
* @desc Is the IUT running in secured mode?
*/
modulepar boolean PICS_IS_IUT_SECURED := false;
} // end ivimPics
/**
* @desc Is the IUT running in secured mode?
*/
modulepar boolean PICS_IS_IUT_SECURED := false;
/**
* @desc Minimum time interval between IVIM generations (in seconds).
* Default value, as per base standard: 4s
* @see ???
*/
modulepar float PICS_T_GENIVIMMIN := 4.0;
/**
* @desc Maximum time interval between IVIM generations (in seconds).
* Default value, as per base standard: 10.0s
* @see ???
*/
modulepar float PICS_T_GENIVIMMAX := 10.000;
}
\ No newline at end of file
} // End of module LibItsIvim_Pics
\ No newline at end of file
......@@ -94,8 +94,8 @@ module LibItsIvim_Templates {
*/
template IvimInd mw_ivimIndWithBtpParameters (
template (present) IVIM p_iviMsg,
template UInt8 p_btpDestinationPort := *,
template UInt8 p_btpInfo := *
template UInt16 p_btpDestinationPort := *,
template UInt16 p_btpInfo := *
) modifies mw_ivimInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
......@@ -127,20 +127,20 @@ module LibItsIvim_Templates {
/**
* @desc Send template for Upper Tester Trigger event
* @param p_timeStamp TODO (Default: 2 seconds)
* @param p_repetitionInterval TODO (Default: 4 seconds)
* @param p_validFrom TODO (Default: omit)
* @param p_validTo TODO (Default: omit)
* @param p_connectedIviStructures TODO (Default: omit)
* @param p_optional_ TODO (Default: omit)
*/
template (value) UtIvimTrigger m_utTriggerEvent(
template (omit) TimestampIts p_timeStamp := c_duration_2sec,
template (omit) TimestampIts p_repetitionInterval := c_duration_4sec,
template (omit) TimestampIts p_validFrom := omit,
template (omit) TimestampIts p_validTo := omit,
template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit,
template (omit) IviStructure.optional_ p_optional_ := omit
) := {
timeStamp := p_timeStamp,
repetitionInterval := p_repetitionInterval,
validFrom := p_validFrom,
validTo := p_validTo,
connectedIviStructures := p_connectedIviStructures,
......@@ -325,7 +325,7 @@ module LibItsIvim_Templates {
) := {
serviceProviderId := p_serviceProviderId,
iviIdentificationNumber := p_iviIdentificationNumber,
timeStamp := *,
timeStamp := f_getCurrentTime(),
validFrom := omit,
validTo := omit,
connectedIviStructures := omit,
......@@ -359,14 +359,14 @@ module LibItsIvim_Templates {
* @param p_iviStatus The IVIM status
* @param p_timeStamp TODO
*/
template (present) IVIManagementContainer mw_iviManagementContainer_timeStamp(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_timeStamp := ?
template (present) IVIManagementContainer mw_iviManagementContainer_timestamp(
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_timeStamp := ?
) modifies mw_iviManagementContainer := {
timeStamp := p_timeStamp
} // End of template mw_iviManagementContainer_timeStamp
} // End of template mw_iviManagementContainer_timestamp
/**
* @desc Receive template for IVIManagement container
......@@ -379,7 +379,7 @@ module LibItsIvim_Templates {
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_validTo := *
template (present) TimestampIts p_validTo := ?
) modifies mw_iviManagementContainer := {
validTo := p_validTo
} // End of template mw_iviManagementContainer_validTo
......@@ -395,7 +395,7 @@ module LibItsIvim_Templates {
template (present) Provider p_serviceProviderId := ?,
template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
template (present) IviStatus p_iviStatus := ?,
template (present) TimestampIts p_validFrom := *
template (present) TimestampIts p_validFrom := ?
) modifies mw_iviManagementContainer := {
validFrom := p_validFrom
} // End of template mw_iviManagementContainer_validFrom
......
......@@ -52,7 +52,7 @@ module LibItsIvim_TypesAndValues {
* @desc Upper Tester message to request triggering of an event at IUT
*/
type record UtIvimTrigger {
TimestampIts timeStamp optional,
TimestampIts repetitionInterval optional,
TimestampIts validFrom optional,
TimestampIts validTo optional,
IVIManagementContainer.connectedIviStructures connectedIviStructures optional,
......
......@@ -103,12 +103,12 @@ module LibItsMapemSpatem_Functions {
*/
altstep a_default() runs on ItsMapemSpatem {
[] mapemSpatemPort.receive(mw_mapemInd(mw_mapemPdu(mw_defaultMapem))) {
log("*** " & testcasename() & ": INFO: MAPEM message received in default ***");
log("*** " & testcasename() & ": INFO: MAPEM received in default ***");
vc_mapemReceived := true;
repeat;
}
[] mapemSpatemPort.receive(mw_spatemInd(mw_spatemPdu(mw_defaultSpatem))) {
log("*** " & testcasename() & ": INFO: MAPEM message received in default ***");
log("*** " & testcasename() & ": INFO: MAPEM received in default ***");
vc_spatemReceived := true;
repeat;
}
......
......@@ -17,37 +17,30 @@ module LibItsMapemSpatem_Pixits {
// LibItsMapemSpatem
import from LibItsMapemSpatem_TypesAndValues all;
group mapSpatPixits {
group parametrisation {
/**
* @desc MsgCount for MAPEM message sending
*/
modulepar MsgCount PX_MSG_ISSUE_REVISION := 10;
/**
* @desc MsgCount for IntersectionState DF sending
*/
modulepar MsgCount PX_INTERSECTIONSTATE_REVISION := 20;
/**
* @desc MsgCount for MAPEM sending
*/
modulepar MsgCount PX_MSG_ISSUE_REVISION := 10;
/**
* @desc MsgCount for IntersectionState DF sending
*/
modulepar MsgCount PX_INTERSECTIONSTATE_REVISION := 20;
/**
* @desc Status for IntersectionState DF sending
*/
modulepar IntersectionStatusObject PX_STATUS := '1000000000000000'B;
/**
* @desc Status for IntersectionState DF sending
*/
modulepar IntersectionStatusObject PX_STATUS := '1000000000000000'B;
/**
* @desc Id for IntersectionReferenceID DF sending
*/
modulepar IntersectionID PX_INTERSECTION_ID := 1500;
/**
* @desc Id for IntersectionReferenceID DF sending
*/
modulepar IntersectionID PX_INTERSECTION_ID := 1500;
/**
* @desc SignalGroup for MovementState DF sending
*/
modulepar SignalGroupID PX_SIGNAL_GROUP_ID := 128;
} // end parametrisation
} // end mapSpatPixits
/**
* @desc SignalGroup for MovementState DF sending
*/
modulepar SignalGroupID PX_SIGNAL_GROUP_ID := 128;
} // end LibItsMapemSpatem_Pixits
......@@ -45,16 +45,16 @@ module LibItsMapemSpatem_Templates {
template (present) MapemInd mw_mapemInd(
template (present) MAPEM p_mapemMsg
) := {
msgIn := p_mapemMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
msgIn := p_mapemMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
}
/**
......@@ -74,11 +74,11 @@ module LibItsMapemSpatem_Templates {
in template UInt32 p_gnLifetime := *,
in template UInt8 p_gnTrafficClass := *
) modifies mw_mapemInd := {
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnHeaderSubtype := p_gnHeaderSubtype,
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
}
/**
......@@ -92,8 +92,8 @@ module LibItsMapemSpatem_Templates {
in template UInt16 p_btpDestinationPort := *,
in template UInt16 p_btpInfo := *
) modifies mw_mapemInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
};
/**
......@@ -128,15 +128,16 @@ module LibItsMapemSpatem_Templates {
template (present) SpatemInd mw_spatemInd(
template (present) SPATEM p_spatemMsg
) := {
msgIn := p_spatemMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
its_aid := *
msgIn := p_spatemMsg,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
};
/**
......@@ -156,11 +157,11 @@ module LibItsMapemSpatem_Templates {
in template UInt32 p_gnLifetime := *,
in template UInt8 p_gnTrafficClass := *
) modifies mw_spatemInd := {
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnHeaderSubtype := p_gnHeaderSubtype,
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
}
/**
......@@ -174,8 +175,8 @@ module LibItsMapemSpatem_Templates {
template UInt16 p_btpDestinationPort := *,
template UInt16 p_btpInfo := *
) modifies mw_spatemInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
};
/**
......@@ -185,7 +186,7 @@ module LibItsMapemSpatem_Templates {
* @param p_its_aid ITS-AID value
*/
template (present) SpatemInd mw_spatemIndWithSecurityParameters(
template (present) SPATEM p_mapemMsg,
template (present) SPATEM p_spatemMsg,
template Oct16 p_ssp := *,
template Oct16 p_its_aid := *
) modifies mw_spatemInd := {
......@@ -222,8 +223,8 @@ module LibItsMapemSpatem_Templates {
template (value) MAPEM m_mapemPdu(
in template (value) MapData p_map
) := {
header := m_itsPduHeader( - , - ,ItsPduHeader_messageID_mapem_ ),
map_ := p_map
header := m_itsPduHeader( - , - ,ItsPduHeader_messageID_mapem_ ),
map_ := p_map
}
/**
......@@ -233,8 +234,8 @@ module LibItsMapemSpatem_Templates {
template (present) MAPEM mw_mapemPdu(
template (present) MapData p_map := ?
) := {
header := mw_itsPduHeaderMapem,
map_ := p_map
header := mw_itsPduHeaderMapem,
map_ := p_map
}
/**
......@@ -244,8 +245,8 @@ module LibItsMapemSpatem_Templates {
template (value) SPATEM m_spatemPdu(
in template (value) SPAT p_spat
) := {
header := m_itsPduHeader( - , - , ItsPduHeader_messageID_spatem_ ),
spat := p_spat
header := m_itsPduHeader( - , - , ItsPduHeader_messageID_spatem_ ),
spat := p_spat
}
/**
......@@ -255,8 +256,8 @@ module LibItsMapemSpatem_Templates {
template (present) SPATEM mw_spatemPdu(
template (present) SPAT p_spat := ?
) := {
header := mw_itsPduHeaderSpatem,
spat := p_spat
header := mw_itsPduHeaderSpatem,
spat := p_spat
}
} // End of group mapSpatPduTemplates
......@@ -267,7 +268,7 @@ module LibItsMapemSpatem_Templates {
* @desc Default send template for ITS PDU header
* @param p_stationID The source station ID (Default: test system station id)
* @param p_protocolVersion The protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The message Id (Default: MAp SPATEM message id)
* @param p_messageID The message Id (Default: MAPEM SPATEM id)
*/
template (value) ItsPduHeader m_itsPduHeader(
in template (value) StationID p_stationID := f_getTsStationId(),
......@@ -275,15 +276,15 @@ module LibItsMapemSpatem_Templates {
in template (value) ItsPduHeader.messageID p_messageID
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for ITS PDU header
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The expected message id (Default: MAPEM SPATmessage id)
* @param p_messageID The expected message id (Default: MAPEM SPATEM message id)
*/
template ItsPduHeader mw_itsPduHeader(
template (present) StationID p_stationID := ?,
......@@ -291,15 +292,15 @@ module LibItsMapemSpatem_Templates {
template (present) ItsPduHeader.messageID p_messageID := ?
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for ITS PDU header
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The expected message id (Default: MAPEM message id)
* @param p_messageID The expected message id (Default: MAPEM id)
*/
template ItsPduHeader mw_itsPduHeaderMapem(
template (present) StationID p_stationID := ?,
......@@ -307,15 +308,15 @@ module LibItsMapemSpatem_Templates {
template (present) ItsPduHeader.messageID p_messageID := ItsPduHeader_messageID_mapem_
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for ITS PDU header
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The expected message id (Default: SPATEM message id)
* @param p_messageID The expected message id (Default: SPATEM id)
*/
template ItsPduHeader mw_itsPduHeaderSpatem(
template (present) StationID p_stationID := ?,
......
/**
* @author ETSI / STF484
* @version $URL$
* $Id$
* @desc Module containing common functions for ITS SREMM SSEM
*
*/
module LibItsSremSsem_Functions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from DSRC language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
// LibItsSremSsem
import from LibItsSremSsem_TestSystem all;
import from LibItsSremSsem_TypesAndValues all;
import from LibItsSremSsem_Templates all;
group utFuntions {
/**
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsSremSsem {
utPort.send(p_init);
tc_wait.start;
alt {
[] utPort.receive(UtInitializeResult:true) {
tc_wait.stop;
log("*** " & testcasename() & ": INFO: IUT initialized ***");
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
}
/**
* @desc Triggers an event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(
in template (value) UtSremSsemTrigger p_event
) runs on ItsSremSsem {
var UtSremSsemTriggerResult v_result;
utPort.send ( p_event );
tc_wait.start;
alt {
[] utPort.receive ( UtSremSsemTriggerResult:? ) -> value v_result {
tc_wait.stop;
if ( not v_result ) {
f_selfOrClientSyncAndVerdict("MapSpat Trigger failed", e_error);
}
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
return;
}
} // End of group utFuntions
group altsteps {
/**
* @desc Default handling cf01 de-initialisation.
*/
altstep a_cf01Down() runs on ItsSremSsem {
[] a_shutdown() {
f_poDefault();
f_cfDown();
log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;