From 7e4082f08ff032b93cf5394cc17ac83b4546ceb7 Mon Sep 17 00:00:00 2001 From: fischer Date: Thu, 8 Jul 2010 16:09:09 +0000 Subject: [PATCH] TCs added --- ttcn/CAM/LibItsCam_Functions.ttcn | 43 ++++++++++++- ttcn/CAM/LibItsCam_Templates.ttcn | 100 +++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 6 deletions(-) diff --git a/ttcn/CAM/LibItsCam_Functions.ttcn b/ttcn/CAM/LibItsCam_Functions.ttcn index b67820ae..374b9536 100644 --- a/ttcn/CAM/LibItsCam_Functions.ttcn +++ b/ttcn/CAM/LibItsCam_Functions.ttcn @@ -10,16 +10,52 @@ module LibItsCam_Functions { // LibIts import from LibIts_TestSystem all; import from LibIts_Interface all; - + import from LibItsCam_Templates all; + + group defaults { + + /** + * @desc basic default behaviour handling + * @remark none + * @param none + */ + altstep a_basicDefault() runs on ItsFa { + + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + setverdict(fail, "**** a_basicDefault: CAM message received in default ****"); + stop; + } + []camPort.receive { + setverdict(fail, "**** a_basicDefault: event received on CAM port in default ****"); + stop; + } + [] any timer.timeout { + setverdict(fail, "**** a_basicDefault: atimer expired in default ****"); + stop; + } + }//end altstep a_basicDefault + + + + } // end of defaults + + group preambles { + /** * @desc Initialize the IUT * @remark No specific actions specified in the base standard * @param none */ - function f_initialState() { + function f_initialState() runs on ItsFa { - // + // basic default altstep + activate(a_basicDefault()); + } // end f_ptcCamUp + + } // end of preambles + +group configuration { /** * @desc Create Facility component and map CAM port @@ -58,4 +94,5 @@ module LibItsCam_Functions { } // end f_ptcCamDown +} // end of configuration } // end LibItsCam_Functions \ No newline at end of file diff --git a/ttcn/CAM/LibItsCam_Templates.ttcn b/ttcn/CAM/LibItsCam_Templates.ttcn index 614f90e8..1fb4057b 100644 --- a/ttcn/CAM/LibItsCam_Templates.ttcn +++ b/ttcn/CAM/LibItsCam_Templates.ttcn @@ -9,6 +9,7 @@ module LibItsCam_Templates { import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from LibIts_Interface all; + import from ASNAUX all; template CamInd mw_camInd (in template CoopAwareness camMsg) := { msgIn := camMsg }; @@ -25,16 +26,105 @@ module LibItsCam_Templates { profile := ? }; - template CoopAwareness mw_camMsg_basicVehicle := { + template CoopAwareness mw_camMsg_basicVehicle := { + protocolVersion := 0, + messageID := 0, + generationTime := ?, + stationId := ?, + referencePosition := ?, + stationCharacteristics := {true, true, true}, + profile := { + basicVehicle := { + vehicleType := ?, + stationLength := ?, + stationLengthConfidence := *, + stationWidth := ?, + stationWidthConfidence := *, + vehicleSpeed := ?, + vehicleSpeedConfidence := ?, + longAcceleration := ?, + accelerationControl := ?, + exteriorLights := ?, + turnAdvice := *, + distanceToStopLine := *, + occupancy := *, + doorOpen := *, + posConfidenceEllipse := ?, + curvature := ?, + curvatureGradient := *, + crashStatus := *, + headingConfidence := ?, + dangerousGoods := * + } + } + }; + + template CoopAwareness mw_camMsg_basicIRS := { + protocolVersion := 0, + messageID := 0, + generationTime := ?, + stationId := ?, + referencePosition := { + longitude := ?, + latitude := ?, + elevation := ?, + heading := omit, + streetName := *, + positionConfidence := omit, + elevationConfidence := omit, + roadSegmentID := * + }, + stationCharacteristics := {false, false, false}, + profile := {basicIRS := NULL} + }; + + template CoopAwareness mw_camMsg_emergencyVehicle := { + protocolVersion := 0, + messageID := 0, + generationTime := ?, + stationId := ?, + referencePosition := ?, + stationCharacteristics := {true, false, true}, + profile := { + emergencyVehicle := { + vehicleType := ?, + lightBarInUse := *, + sireneInUse := *, + emergencyResponseType := ?, + stationLength := ?, + stationLengthConfidence := *, + stationWidth := ?, + stationWidthConfidence := *, + vehicleSpeed := ?, + vehicleSpeedConfidence := ?, + longAcceleration := ?, + accelerationControl := ?, + exteriorLights := ?, + turnAdvice := *, + distanceToStopLine := *, + occupancy := *, + doorOpen := *, + posConfidenceEllipse := ?, + curvature := ?, + curvatureGradient := *, + crashStatus := *, + headingConfidence := ?, + dangerousGoods := * + } + } + } + + template CoopAwareness mw_camMsg_publicTransportVehicle := { protocolVersion := 0, messageID := 0, generationTime := ?, stationId := ?, referencePosition := ?, - stationCharacteristics := {true, true, true}, + stationCharacteristics := {true, false, true}, profile := { - basicVehicle := { + publicTransportVehicle := { vehicleType := ?, + publicVehicleType := ?, stationLength := ?, stationLengthConfidence := *, stationWidth := ?, @@ -44,9 +134,12 @@ module LibItsCam_Templates { longAcceleration := ?, accelerationControl := ?, exteriorLights := ?, + pTLineDescription := *, turnAdvice := *, distanceToStopLine := *, occupancy := *, + scheduleDeviation := *, + trafficLightPriority := *, doorOpen := *, posConfidenceEllipse := ?, curvature := ?, @@ -57,5 +150,6 @@ module LibItsCam_Templates { } } } + } // end LibItsCam_Templates \ No newline at end of file -- GitLab