Commit 683e2b63 authored by Yann Garcia's avatar Yann Garcia
Browse files

Add template for AtsPIM

parent e0cace2a
Loading
Loading
Loading
Loading
+287 −12
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ module LibItsPim_Templates {
    // LibIts
    // LibIts
    import from ETSI_ITS_CDD language "ASN.1:1997" all;
    import from ETSI_ITS_CDD language "ASN.1:1997" all;
    import from PIM_PDU_Descriptions language "ASN.1:1997" all;
    import from PIM_PDU_Descriptions language "ASN.1:1997" all;
    import from PIM_SA_Application_Data_Descriptions language "ASN.1:1997" all;


    // LibItsCommon
    // LibItsCommon
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Functions all;
@@ -139,4 +140,278 @@ module LibItsPim_Templates {
        pimPayload := ?
        pimPayload := ?
    }
    }


    template (omit) PimPayload m_pim_payload(
                                             in template (value) PimManagementContainer p_managementContainer,
                                             in template (omit) ParkingSpaceDetections p_detections := omit,
                                             in template (omit) ParkingSpaceIntentIndication p_arrivalIndication := omit,
                                             in template (omit) ParkingSpaceIntentIndication p_departureIndication := omit
                                             ) := {
        managementContainer := p_managementContainer,
        detections          := p_detections,
        arrivalIndication   := p_arrivalIndication,
        departureIndication := p_departureIndication
    }

    template (present) PimPayload mw_pim_payload(
                                                 template (present) PimManagementContainer p_managementContainer := ?,
                                                 template ParkingSpaceDetections p_detections := *,
                                                 template ParkingSpaceIntentIndication p_arrivalIndication := *,
                                                 template ParkingSpaceIntentIndication p_departureIndication := *
                                                 ) := {
        managementContainer := p_managementContainer,
        detections          := p_detections,
        arrivalIndication   := p_arrivalIndication,
        departureIndication := p_departureIndication
    }

    template (value) PimManagementContainer m_pim_management_container(
                                                                       in template (value) MessageSegmentationInfo p_segmentationInfo
                                                                       ) := {
        segmentationInfo := p_segmentationInfo
    }

    template (present) PimManagementContainer mw_pim_management_container(
                                                                          template (present) MessageSegmentationInfo p_segmentationInfo := ?
                                                                          ) := {
        segmentationInfo := p_segmentationInfo
    }

    template (value) ParkingSpaceDetections m_ParkingSpaceDetections(
                                                                     in template (value) IndividualParkingSpaces p_individualParkingSpaces,
                                                                     in template (value) ParkingSpaceSegments p_segmentsOfParkingSpaces
                                                                     ) := {
        individualParkingSpaces := p_individualParkingSpaces,
        segmentsOfParkingSpaces := p_segmentsOfParkingSpaces
    }

    template (present) ParkingSpaceDetections mw_ParkingSpaceDetections(
                                                                        template (present) IndividualParkingSpaces p_individualParkingSpaces := ?,
                                                                        template (present) ParkingSpaceSegments p_segmentsOfParkingSpaces := ?
                                                                        ) := {
        individualParkingSpaces := p_individualParkingSpaces,
        segmentsOfParkingSpaces := p_segmentsOfParkingSpaces
    }

    template (omit) ParkingSpaceIntentIndication m_parking_space_intent_indication(
                                                                                   in template (value) Identifier2B p_spaceId,
                                                                                   in template (omit) StationId p_reporter := omit,
                                                                                   in template (omit) TimestampIts p_estimatedCompletionTime := omit,
                                                                                   in template (omit) IndividualParkingSpace p_subjectParkingSpace := omit
                                                                                   ) := {
        spaceId                 := p_spaceId,
        reporter                := p_reporter,
        estimatedCompletionTime := p_estimatedCompletionTime,
        subjectParkingSpace     := p_subjectParkingSpace
    }

    template (present) ParkingSpaceIntentIndication me_parking_space_intent_indication(
                                                                                   in template (present) Identifier2B p_spaceId := ?,
                                                                                   in template StationId p_reporter := *,
                                                                                   in template TimestampIts p_estimatedCompletionTime := *,
                                                                                   in template IndividualParkingSpace p_subjectParkingSpace := *
                                                                                   ) := {
        spaceId                 := p_spaceId,
        reporter                := p_reporter,
        estimatedCompletionTime := p_estimatedCompletionTime,
        subjectParkingSpace     := p_subjectParkingSpace
    }

    template (omit) IndividualParkingSpace m_individual_parking_space(
                                                                      in template (value) ParkingSpaceDetectionMetaData p_detectionMetaData,
                                                                      in template (value) GeoPosition p_position,
                                                                      in template (value) ParkingSpaceAttributes p_attributes,
                                                                      in template (omit) ParkingSpaceSize p_size := omit,
                                                                      in template (omit) ExternalParkingSpaceIdentifiers p_externalParkingSpaceIds:= omit
                                                                      ) := {
        detectionMetaData       := p_detectionMetaData,
        position                := p_position,
        attributes              := p_attributes,
        size                    := p_size,
        externalParkingSpaceIds := p_externalParkingSpaceIds
    }

    template (present) IndividualParkingSpace mw_individual_parking_space(
                                                                          template (present) ParkingSpaceDetectionMetaData p_detectionMetaData := ?,
                                                                          template (present) GeoPosition p_position := ?,
                                                                          template (present) ParkingSpaceAttributes p_attributes := ?,
                                                                          template ParkingSpaceSize p_size := *,
                                                                          template ExternalParkingSpaceIdentifiers p_externalParkingSpaceIds:= *
                                                                          ) := {
        detectionMetaData       := p_detectionMetaData,
        position                := p_position,
        attributes              := p_attributes,
        size                    := p_size,
        externalParkingSpaceIds := p_externalParkingSpaceIds
    }

    template (omit) ParkingSpaceDetectionMetaData m_parking_space_detection_meta_data(
                                                                                      in template (value) Identifier2B p_id,
                                                                                      in template (value) TimestampIts p_endTime,
                                                                                      in template (omit) StationId p_source := omit
                                                                                      ) := {
        id      := p_id,
        source  := p_source,
        endTime := p_endTime
    }

    template (present) ParkingSpaceDetectionMetaData mw_parking_space_detection_meta_data(
                                                                                          template (present) Identifier2B p_id := ?,
                                                                                          template (present) TimestampIts p_endTime := ?,
                                                                                          template StationId p_source := *
                                                                                          ) := {
        id      := p_id,
        source  := p_source,
        endTime := p_endTime
    }

    template (omit) ParkingSpaceSegment m_parking_space_segment(
                                                                in template (value) ParkingSpaceDetectionMetaData p_detectionMetaData,
                                                                in template (value) GeoPosition p_detectionReferencePosition,
                                                                in template (value) Path p_path,
                                                                in template (omit) ParkingSegments p_spacesOnTheLeft := omit,
                                                                in template (omit) ParkingSegments p_spacesOnTheRight := omit,
                                                                in template (omit) ExternalParkingSpaceIdentifiers p_externalParkingSpaceIds := omit
                                                                ) := {
        detectionMetaData          := p_detectionMetaData,
        detectionReferencePosition := p_detectionReferencePosition,
        path                       := p_path,
        spacesOnTheLeft            := p_spacesOnTheLeft,
        spacesOnTheRight           := p_spacesOnTheRight,
        externalParkingSpaceIds    := p_externalParkingSpaceIds
    }
// ((WITH COMPONENTS {..., spacesOnTheLeft PRESENT}) |
// (WITH COMPONENTS {..., spacesOnTheRight PRESENT}))

    template (present) ParkingSpaceSegment mw_parking_space_segment(
                                                                    template (present) ParkingSpaceDetectionMetaData p_detectionMetaData := ?,
                                                                    template (present) GeoPosition p_detectionReferencePosition := ?,
                                                                    template (present) Path p_path := ?,
                                                                    template ParkingSegments p_spacesOnTheLeft := *,
                                                                    template ParkingSegments p_spacesOnTheRight := *,
                                                                    template ExternalParkingSpaceIdentifiers p_externalParkingSpaceIds := *
                                                                    ) := {
        detectionMetaData          := p_detectionMetaData,
        detectionReferencePosition := p_detectionReferencePosition,
        path                       := p_path,
        spacesOnTheLeft            := p_spacesOnTheLeft,
        spacesOnTheRight           := p_spacesOnTheRight,
        externalParkingSpaceIds    := p_externalParkingSpaceIds
    }

    template (omit) ExternalParkingSpaceIdentifiers m_external_parking_space_identifiers(
                                                                                         in template (omit) ExternalParkingSpaceIdentifiers.evSEId p_evSEId := omit,
                                                                                         in template (omit) Identifier2B p_parkingSpaceId := omit
                                                                                         ) := {
        evSEId         := p_evSEId,
        parkingSpaceId := p_parkingSpaceId
    }

    template ExternalParkingSpaceIdentifiers mw_external_parking_space_identifiers(
                                                                                   template ExternalParkingSpaceIdentifiers.evSEId p_evSEId := *,
                                                                                   template Identifier2B p_parkingSpaceId := *
                                                                                    ) := {
        evSEId         := p_evSEId,
        parkingSpaceId := p_parkingSpaceId
    }

    template (omit) ParkingSegment m_parking_segment(
                                                     in template (value) StandardLength12b p_distanceFromLastPoint,
                                                     in template (value) DeltaTimeTenthOfSecond p_timeDelta,
                                                     in template (value) ParkingSpaceAttributes p_attributes,
                                                     in template (omit) StandardLength1B p_offsetToPath := omit,
                                                     in template (omit) ParkingSpaceSize p_size := omit
                                                     ) := {
        distanceFromLastPoint := p_distanceFromLastPoint,
        timeDelta             := p_timeDelta,
        offsetToPath          := p_offsetToPath,
        attributes            := p_attributes,
        size                  := p_size
    }

    template (present) ParkingSegment mw_parking_segment(
                                                         template (present) StandardLength12b p_distanceFromLastPoint := ?,
                                                         template (present) DeltaTimeTenthOfSecond p_timeDelta := ?,
                                                         template (present) ParkingSpaceAttributes p_attributes := ?,
                                                         template StandardLength1B p_offsetToPath := *,
                                                         template ParkingSpaceSize p_size := *
                                                         ) := {
        distanceFromLastPoint := p_distanceFromLastPoint,
        timeDelta             := p_timeDelta,
        offsetToPath          := p_offsetToPath,
        attributes            := p_attributes,
        size                  := p_size
    }

    template (omit) ParkingSpaceAttributes m_parking_space_attributes(
                                                                      in template (value) ParkingSpaceStatus p_status,
                                                                      in template (omit) ParkingAreaArrangementType p_arrangementType := omit,
                                                                      in template (omit) ParkingOccupancyInfo p_occupancyRule := omit,
                                                                      in template (omit) ParkingSpaceAttributes.reservationType p_reservationType := omit
                                                                      ) := {
        status          := p_status,
        arrangementType := p_arrangementType,
        occupancyRule   := p_occupancyRule,
        reservationType := p_reservationType
    }

    template (present) ParkingSpaceAttributes mw_parking_space_attributes(
                                                                          template (present) ParkingSpaceStatus p_status := ?,
                                                                          template ParkingAreaArrangementType p_arrangementType := *,
                                                                          template ParkingOccupancyInfo p_occupancyRule := *,
                                                                          template ParkingSpaceAttributes.reservationType p_reservationType := *
                                                                          ) := {
        status          := p_status,
        arrangementType := p_arrangementType,
        occupancyRule   := p_occupancyRule,
        reservationType := p_reservationType
    }

    template (omit) ParkingSpaceSize m_parking_space_size(
                                                          in template (omit) ObjectDimension p_observedWidth := omit,
                                                          in template (omit) ObjectDimension p_observedLength := omit,
                                                          in template (omit) ObjectDimension p_nominalWidth := omit,
                                                          in template (omit) ObjectDimension p_nominalLength := omit
                                                          ) := {
        observedWidth  := p_observedWidth,
        observedLength := p_observedLength,
        nominalWidth   := p_nominalWidth,
        nominalLength  := p_nominalLength
    }

    template ParkingSpaceSize mw_parking_space_size(
                                                    template ObjectDimension p_observedWidth := *,
                                                    template ObjectDimension p_observedLength := *,
                                                    template ObjectDimension p_nominalWidth := *,
                                                    template ObjectDimension p_nominalLength := *
                                                    ) := {
        observedWidth  := p_observedWidth,
        observedLength := p_observedLength,
        nominalWidth   := p_nominalWidth,
        nominalLength  := p_nominalLength
    }

    template (omit) PimAdvertiseApplicationData m_PimAdvertiseApplicationData(
                                                                              in template (omit) PimRequest p_request := omit    
                                                                              ) := {
        request := p_request
    }

    template PimAdvertiseApplicationData mw_PimAdvertiseApplicationData(
                                                                        template PimRequest p_request := *    
                                                                        ) := {
        request := p_request
    }

    template (value) PimRequest m_pim_request(
                                              in template (value) TrafficParticipantType p_vehicleType
                                              ) := {
        vehicleType := p_vehicleType
    }

    template (present) PimRequest mw_pim_request(
                                                 template (present) TrafficParticipantType p_vehicleType := ?
                                                 ) := {
        vehicleType := p_vehicleType
    }

}// End of group LibItsPim_Templates
}// End of group LibItsPim_Templates