LibItsCam_Templates.ttcn 3.77 KB
Newer Older
/**
 *	@author 	ETSI / STF405
berge's avatar
berge committed
 *  @version 	$URL$
 *				$Id$
 *	@desc		Module containing base template definitions for CAM
 *
 */
module LibItsCam_Templates {

    import from LibIts_Interface all;    
fischer's avatar
fischer committed
	import from ItsCam_Pixits all;
fischer's avatar
fischer committed
	import from CAM_PDU_Descriptions language "ASN.1:1997" all;
	import from CAM_TEST_PDU_Descriptions language "ASN.1:1997" all;
fischer's avatar
fischer committed
    

	template CamInd mw_camInd (in template CamPdu p_camMsg) := { msgIn := p_camMsg };

	template CamReq m_camReq (in template CamPdu p_camMsg) := { msgOut := p_camMsg };
fischer's avatar
fischer committed
	
fischer's avatar
fischer committed
	template InvalidCamReq m_invalidCamReq (in template InvalidCamPdu p_camMsg) := { msgOut := p_camMsg };
	
	template CamPdu mw_camMsg_any := {
        header := {
			protocolVersion := 0,
			messageID := 0,
			generationTime := ? },
        cam := {
			stationID := ?,
			stationCharacteristics := ?,
			camParameters := ? }
fischer's avatar
fischer committed
	};

    template CamPdu mw_camMsg_anyVehicle modifies mw_camMsg_any := {
		cam := {
			stationCharacteristics := {?, ?, ?},
			camParameters := {
				vehicle := {
					referencePositionVehicle := ?,
					vehicleCommonParameters := {
						vehicleType := ?,
						stationLength := ?,
						stationLengthConfidence := *,
						stationWidth := ?,
						stationWidthConfidence := *,
						vehicleSpeed := ?,
						vehicleSpeedConfidence := ?,
						longAcceleration := ?,
						longAccelerationConfidence := ?,
						accelerationControl := ?,
						yawRate := ?,
						yawRateConfidence := ?,
						exteriorLights := ?,
						turnAdvice := *,
						distanceToStopLine := *,
						occupancy := *,
						doorOpen := *,
						posConfidenceEllipse := ?,
						curvature := ?,
fischer's avatar
fischer committed
						curvatureChange := *,
						curvatureConfidence := ?,
						crashStatus := *,
						headingConfidence := ?,
						dangerousGoods := *
					},
					profileDependent := *
				}
			}
		}
	}
fischer's avatar
fischer committed
    
	template CamPdu mw_camMsg_basicIRS modifies mw_camMsg_any := {
		cam := {
			stationCharacteristics := {false, false, false},
			camParameters := {irs := {referencePositionIrs := ?}}
fischer's avatar
fischer committed
	};

fischer's avatar
fischer committed
	template CamPdu m_camMsg_IRS_valid ( TimeStamp p_generationTime) := {
        header := {
			protocolVersion := 0,
			messageID := 0,
			generationTime := p_generationTime },
        cam := {
			stationID := PX_TESTER_STATION_ID,
			stationCharacteristics := {false, false, false},
			camParameters := {irs := {referencePositionIrs := PX_TESTER_REF_POSITION_IRS}}
		}
	};

	template InvalidCamPdu m_camMsg_IRS_invalid ( TimeStamp p_generationTime) := {
        header := {
			protocolVersion := 0,
			messageID := 0,
			generationTime := p_generationTime },
        cam := {
			stationID := PX_TESTER_STATION_ID,
			stationCharacteristics := {false, false, false}
		}
	};

	template CamPdu mw_camMsg_basicVehicle modifies mw_camMsg_anyVehicle := {
		cam := {
			stationCharacteristics := {true, false, true},
			camParameters := {
fischer's avatar
fischer committed
				vehicle := {profileDependent := {basicVehicle := {} }}
fischer's avatar
fischer committed
			}
		}
fischer's avatar
fischer committed
	}

	template CamPdu mw_camMsg_emergencyVehicle modifies mw_camMsg_anyVehicle := {
		cam := {
			stationCharacteristics := {true, false, true},
			camParameters := {
				vehicle := {
					profileDependent := {
						emergencyVehicle := {
							lightBarInUse := *,
							sireneInUse := *,
							emergencyResponseType := ?
						}
					}
				}
			}
		}
	};

	template CamPdu mw_camMsg_publicTransportVehicle modifies mw_camMsg_basicVehicle := {
		cam := {
			stationCharacteristics := {true, false, true},
			camParameters := {
				vehicle := {
					profileDependent := {
						publicTransportVehicle := {
							publicVehicleType := ?,
							pTLineDescription := *,
							scheduleDeviation := *,
							trafficLightPriority := *
						}
					}
				}
fischer's avatar
fischer committed
			}
		}
	}
} // end LibItsCam_Templates