Loading ttcn/DENM/LibItsDenm_Functions.ttcn +3 −4 Original line number Diff line number Diff line Loading @@ -61,10 +61,9 @@ module LibItsDenm_Functions { [] utPort.receive(UtDenmTriggerResult:?) -> value v_result { tc_wait.stop; v_actionId := v_result.actionId; if ( not v_result.result ) { f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_error); } [] utPort.receive { tc_wait.stop; f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_timeout); } [] tc_wait.timeout { log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); Loading ttcn/MapSpat/LibItsMapSpat_Functions.ttcn +42 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,37 @@ module LibItsMapSpat_Functions { } } } /** * @desc Triggers an event from the application layer * @param p_event The event to trigger. */ function f_utTriggerEvent (template (value) UtMapSpatTrigger p_event) runs on ItsMapSpat return MsgCount { var MsgCount v_msgCount; var UtMapSpatTriggerResult v_result; utPort.send ( p_event ); tc_wait.start; alt { [] utPort.receive ( UtMapSpatTriggerResult:? ) -> value v_result { tc_wait.stop; v_msgCount := v_result.msgCount; if ( not v_result.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 repeat; } } return v_msgCount; } } // end group utFuntions group altsteps { Loading Loading @@ -163,4 +194,15 @@ module LibItsMapSpat_Functions { } // end group postambles group postambles { /** * @desc External function to compute distance between two points * @param p_rawData Octetstring to analyse * @return true or false according to the check */ external function fx_checkUperEncoding ( in RawData p_rawData ) return boolean; } // end group postambles } // end LibItsMapSpat_Functions No newline at end of file ttcn/MapSpat/LibItsMapSpat_Pics.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc CAM PICS * @desc MAP SPAT PICS * */ module LibItsMapSpat_Pics { Loading ttcn/MapSpat/LibItsMapSpat_Templates.ttcn +159 −28 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc Module containing base template definitions for CAM * @desc Module containing base template definitions for MAP SPAT * */ module LibItsMapSpat_Templates { Loading Loading @@ -52,36 +52,43 @@ module LibItsMapSpat_Templates { */ template (value) UtInitialize m_mapSpatInitialize := { } /** * @desc Send template for Upper Tester Trigger event */ template (value) UtMapSpatTrigger m_utTriggerEvent ( Event p_event ) := { event := p_event } } group mapSpatPduTemplates { /** * @desc Send template for MAP PDU * @param p_denm The MAP Message * @param p_map The MAP Message */ template (value) MAP m_mapPdu ( template (value) MapData p_map ) := { header := m_itsPduHeader, mapM := p_map header := m_itsPduHeader ( - , - ,c_mapMessageId ), mapData := p_map } /** * @desc Send template for SPAT PDU * @param p_denm The SPAT Message * @param p_map The SPAT Message */ template (value) SPAT m_spatPdu ( template (value) SpatData p_spat ) := { header := m_itsPduHeader, header := m_itsPduHeader ( - , - , c_spatMessageId ), spat := p_spat } /** * @desc Default receive template for MAP PDU * @param p_itsPduHeader The expected ITS PDU header (Default: any) * @param p_denm The expected MAP Message (Default: any) * @param p_map The expected MAP Message (Default: any) */ template MapMsg mw_mapPdu ( template (present) ItsPduHeader p_itsPduHeader := ?, Loading @@ -89,14 +96,14 @@ module LibItsMapSpat_Templates { ) := { msg := { header := p_itsPduHeader, mapM := p_map }, mapData := p_map }, rawData := ? } /** * @desc Default receive template for SPAT PDU * @param p_itsPduHeader The expected ITS PDU header (Default: any) * @param p_denm The expected SPAT Message (Default: any) * @param p_spat The expected SPAT Message (Default: any) */ template SpatMsg mw_spatPdu ( template (present) ItsPduHeader p_itsPduHeader := ?, Loading @@ -115,13 +122,13 @@ module LibItsMapSpat_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 DEN protocol version) * @param p_messageID The message Id (Default: DEN message id) * @param p_protocolVersion The protocol version (Default: current MAP SPAT protocol version) * @param p_messageID The message Id (Default: MAp SPAT message id) */ template (value) ItsPduHeader m_itsPduHeader( template (value) StationID p_stationID := f_getTsStationId(), template (value) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (value) ItsPduHeader.messageID p_messageID := c_messageId template (value) ItsPduHeader.messageID p_messageID ) := { protocolVersion := p_protocolVersion, messageID := p_messageID, Loading @@ -131,13 +138,45 @@ module LibItsMapSpat_Templates { /** * @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 DEN protocol version) * @param p_messageID The expected message id (Default: DEN message id) * @param p_protocolVersion The expected protocol version (Default: current MAP SPAT protocol version) * @param p_messageID The expected message id (Default: MAP SPATmessage id) */ template ItsPduHeader mw_itsPduHeader ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_messageId template (present) ItsPduHeader.messageID p_messageID := ? ) := { protocolVersion := p_protocolVersion, 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 MAP SPAT protocol version) * @param p_messageID The expected message id (Default: MAP message id) */ template ItsPduHeader mw_itsPduHeaderMap ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_mapMessageId ) := { protocolVersion := p_protocolVersion, 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 MAP SPAT protocol version) * @param p_messageID The expected message id (Default: SPAT message id) */ template ItsPduHeader mw_itsPduHeaderSpat ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_spatMessageId ) := { protocolVersion := p_protocolVersion, messageID := p_messageID, Loading @@ -153,6 +192,23 @@ module LibItsMapSpat_Templates { group mapSpatTemplates { /** * @desc Send template for MAP Message */ template (value) MapData m_map := { msgID := mapData_P, msgSubID := 0, msgIssueRevision := 10, layerType := omit, layerID := omit, intersections := omit, roadSegments := omit, dataParameters := omit, restrictionList := omit, regional := omit, crc := omit } /** * @desc Receive template for MAP Message */ Loading @@ -169,18 +225,86 @@ module LibItsMapSpat_Templates { regional := *, crc := * } template (present) MapData mw_mapSubId0 := { msgID := mapData_P, /** * @desc Receive template for MAP Message with SubId = 0 */ template (present) MapData mw_mapSubId0 modifies mw_anyMap := { msgSubID := 0 } /** * @desc Receive template for MAP Message with no MsgCrc */ template (present) MapData mw_mapNoMsgCrc modifies mw_anyMap := { crc := omit } /** * @desc Receive template for MAP Message with MsgCrc as the last data elemnt of the message */ template (present) MapData mw_mapMsgCrcLast modifies mw_anyMap := { crc := ? } /** * @desc Receive template for MAP Message with no LayerType */ template (present) MapData mw_mapNoLayerType modifies mw_anyMap := { layerType := omit } /** * @desc Receive template for MAP Message with no LayerType */ template (present) MapData mw_mapWellFormatted modifies mw_anyMap := { msgSubID := 0, msgIssueRevision := ?, layerType := *, layerID := *, intersections := *, roadSegments := *, dataParameters := *, restrictionList := *, regional := *, crc := * layerType := omit } /** * @desc Send template for SPAT Message */ template (value) SpatData m_spat := { msgID := signalPhaseAndTimingMessage_P, msgSubID := 0, name := omit, intersections := m_intersections, regional := omit } template (value) IntersectionStateList m_intersections := { m_intersection }; template (value) IntersectionState m_intersection := { name := omit, id := m_intersectionReferenceID, revision := 20, status := '1000'O, moy := omit, timeStamp := omit, enabledLanes := omit, states := m_movements, maneuverAssistList := omit, priority := omit, preempt := omit, regional := omit } template (value) IntersectionReferenceID m_intersectionReferenceID := { region := omit, id := 'ABAB'O } template (value) MovementList m_movements := { m_movement }; template (value) MovementState m_movement := { movementName := omit, signalGroup := 128, state_time_speed := m_movementEventList, maneuverAssistList := omit, regional := omit } template (value) MovementEventList m_movementEventList := { m_movementEvent }; template (value) MovementEvent m_movementEvent := { eventState := stop_Then_Proceed, timing := omit, speeds := omit, regional := omit } /** Loading @@ -194,6 +318,13 @@ module LibItsMapSpat_Templates { regional := * } /** * @desc Receive template for SPAT Message with SubId = 0 */ template (present) SpatData mw_spatSubId0 modifies mw_anySpat := { msgSubID := 0 } } // end mapSpatTemplates } // end LibItsMapSpat_Templates ttcn/MapSpat/LibItsMapSpat_TestSystem.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc Test System module for ITS CAM * @desc Test System module for ITS MAP SPAT * */ module LibItsMapSpat_TestSystem { Loading Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +3 −4 Original line number Diff line number Diff line Loading @@ -61,10 +61,9 @@ module LibItsDenm_Functions { [] utPort.receive(UtDenmTriggerResult:?) -> value v_result { tc_wait.stop; v_actionId := v_result.actionId; if ( not v_result.result ) { f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_error); } [] utPort.receive { tc_wait.stop; f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_timeout); } [] tc_wait.timeout { log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); Loading
ttcn/MapSpat/LibItsMapSpat_Functions.ttcn +42 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,37 @@ module LibItsMapSpat_Functions { } } } /** * @desc Triggers an event from the application layer * @param p_event The event to trigger. */ function f_utTriggerEvent (template (value) UtMapSpatTrigger p_event) runs on ItsMapSpat return MsgCount { var MsgCount v_msgCount; var UtMapSpatTriggerResult v_result; utPort.send ( p_event ); tc_wait.start; alt { [] utPort.receive ( UtMapSpatTriggerResult:? ) -> value v_result { tc_wait.stop; v_msgCount := v_result.msgCount; if ( not v_result.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 repeat; } } return v_msgCount; } } // end group utFuntions group altsteps { Loading Loading @@ -163,4 +194,15 @@ module LibItsMapSpat_Functions { } // end group postambles group postambles { /** * @desc External function to compute distance between two points * @param p_rawData Octetstring to analyse * @return true or false according to the check */ external function fx_checkUperEncoding ( in RawData p_rawData ) return boolean; } // end group postambles } // end LibItsMapSpat_Functions No newline at end of file
ttcn/MapSpat/LibItsMapSpat_Pics.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc CAM PICS * @desc MAP SPAT PICS * */ module LibItsMapSpat_Pics { Loading
ttcn/MapSpat/LibItsMapSpat_Templates.ttcn +159 −28 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc Module containing base template definitions for CAM * @desc Module containing base template definitions for MAP SPAT * */ module LibItsMapSpat_Templates { Loading Loading @@ -52,36 +52,43 @@ module LibItsMapSpat_Templates { */ template (value) UtInitialize m_mapSpatInitialize := { } /** * @desc Send template for Upper Tester Trigger event */ template (value) UtMapSpatTrigger m_utTriggerEvent ( Event p_event ) := { event := p_event } } group mapSpatPduTemplates { /** * @desc Send template for MAP PDU * @param p_denm The MAP Message * @param p_map The MAP Message */ template (value) MAP m_mapPdu ( template (value) MapData p_map ) := { header := m_itsPduHeader, mapM := p_map header := m_itsPduHeader ( - , - ,c_mapMessageId ), mapData := p_map } /** * @desc Send template for SPAT PDU * @param p_denm The SPAT Message * @param p_map The SPAT Message */ template (value) SPAT m_spatPdu ( template (value) SpatData p_spat ) := { header := m_itsPduHeader, header := m_itsPduHeader ( - , - , c_spatMessageId ), spat := p_spat } /** * @desc Default receive template for MAP PDU * @param p_itsPduHeader The expected ITS PDU header (Default: any) * @param p_denm The expected MAP Message (Default: any) * @param p_map The expected MAP Message (Default: any) */ template MapMsg mw_mapPdu ( template (present) ItsPduHeader p_itsPduHeader := ?, Loading @@ -89,14 +96,14 @@ module LibItsMapSpat_Templates { ) := { msg := { header := p_itsPduHeader, mapM := p_map }, mapData := p_map }, rawData := ? } /** * @desc Default receive template for SPAT PDU * @param p_itsPduHeader The expected ITS PDU header (Default: any) * @param p_denm The expected SPAT Message (Default: any) * @param p_spat The expected SPAT Message (Default: any) */ template SpatMsg mw_spatPdu ( template (present) ItsPduHeader p_itsPduHeader := ?, Loading @@ -115,13 +122,13 @@ module LibItsMapSpat_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 DEN protocol version) * @param p_messageID The message Id (Default: DEN message id) * @param p_protocolVersion The protocol version (Default: current MAP SPAT protocol version) * @param p_messageID The message Id (Default: MAp SPAT message id) */ template (value) ItsPduHeader m_itsPduHeader( template (value) StationID p_stationID := f_getTsStationId(), template (value) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (value) ItsPduHeader.messageID p_messageID := c_messageId template (value) ItsPduHeader.messageID p_messageID ) := { protocolVersion := p_protocolVersion, messageID := p_messageID, Loading @@ -131,13 +138,45 @@ module LibItsMapSpat_Templates { /** * @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 DEN protocol version) * @param p_messageID The expected message id (Default: DEN message id) * @param p_protocolVersion The expected protocol version (Default: current MAP SPAT protocol version) * @param p_messageID The expected message id (Default: MAP SPATmessage id) */ template ItsPduHeader mw_itsPduHeader ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_messageId template (present) ItsPduHeader.messageID p_messageID := ? ) := { protocolVersion := p_protocolVersion, 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 MAP SPAT protocol version) * @param p_messageID The expected message id (Default: MAP message id) */ template ItsPduHeader mw_itsPduHeaderMap ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_mapMessageId ) := { protocolVersion := p_protocolVersion, 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 MAP SPAT protocol version) * @param p_messageID The expected message id (Default: SPAT message id) */ template ItsPduHeader mw_itsPduHeaderSpat ( template (present) StationID p_stationID := ?, template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionMapSpat, template (present) ItsPduHeader.messageID p_messageID := c_spatMessageId ) := { protocolVersion := p_protocolVersion, messageID := p_messageID, Loading @@ -153,6 +192,23 @@ module LibItsMapSpat_Templates { group mapSpatTemplates { /** * @desc Send template for MAP Message */ template (value) MapData m_map := { msgID := mapData_P, msgSubID := 0, msgIssueRevision := 10, layerType := omit, layerID := omit, intersections := omit, roadSegments := omit, dataParameters := omit, restrictionList := omit, regional := omit, crc := omit } /** * @desc Receive template for MAP Message */ Loading @@ -169,18 +225,86 @@ module LibItsMapSpat_Templates { regional := *, crc := * } template (present) MapData mw_mapSubId0 := { msgID := mapData_P, /** * @desc Receive template for MAP Message with SubId = 0 */ template (present) MapData mw_mapSubId0 modifies mw_anyMap := { msgSubID := 0 } /** * @desc Receive template for MAP Message with no MsgCrc */ template (present) MapData mw_mapNoMsgCrc modifies mw_anyMap := { crc := omit } /** * @desc Receive template for MAP Message with MsgCrc as the last data elemnt of the message */ template (present) MapData mw_mapMsgCrcLast modifies mw_anyMap := { crc := ? } /** * @desc Receive template for MAP Message with no LayerType */ template (present) MapData mw_mapNoLayerType modifies mw_anyMap := { layerType := omit } /** * @desc Receive template for MAP Message with no LayerType */ template (present) MapData mw_mapWellFormatted modifies mw_anyMap := { msgSubID := 0, msgIssueRevision := ?, layerType := *, layerID := *, intersections := *, roadSegments := *, dataParameters := *, restrictionList := *, regional := *, crc := * layerType := omit } /** * @desc Send template for SPAT Message */ template (value) SpatData m_spat := { msgID := signalPhaseAndTimingMessage_P, msgSubID := 0, name := omit, intersections := m_intersections, regional := omit } template (value) IntersectionStateList m_intersections := { m_intersection }; template (value) IntersectionState m_intersection := { name := omit, id := m_intersectionReferenceID, revision := 20, status := '1000'O, moy := omit, timeStamp := omit, enabledLanes := omit, states := m_movements, maneuverAssistList := omit, priority := omit, preempt := omit, regional := omit } template (value) IntersectionReferenceID m_intersectionReferenceID := { region := omit, id := 'ABAB'O } template (value) MovementList m_movements := { m_movement }; template (value) MovementState m_movement := { movementName := omit, signalGroup := 128, state_time_speed := m_movementEventList, maneuverAssistList := omit, regional := omit } template (value) MovementEventList m_movementEventList := { m_movementEvent }; template (value) MovementEvent m_movementEvent := { eventState := stop_Then_Proceed, timing := omit, speeds := omit, regional := omit } /** Loading @@ -194,6 +318,13 @@ module LibItsMapSpat_Templates { regional := * } /** * @desc Receive template for SPAT Message with SubId = 0 */ template (present) SpatData mw_spatSubId0 modifies mw_anySpat := { msgSubID := 0 } } // end mapSpatTemplates } // end LibItsMapSpat_Templates
ttcn/MapSpat/LibItsMapSpat_TestSystem.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ * @author ETSI / STF484 * @version $URL$ * $Id$ * @desc Test System module for ITS CAM * @desc Test System module for ITS MAP SPAT * */ module LibItsMapSpat_TestSystem { Loading