Commit f866f91e authored by garciay's avatar garciay
Browse files

Add new templates for Regions

parent 4caae706
Loading
Loading
Loading
Loading
+128 −12
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ module LibItsSecurity_Templates {
    // LibCommon
    // LibCommon
    import from LibCommon_BasicTypesAndValues {
    import from LibCommon_BasicTypesAndValues {
        type 
        type 
            UInt8, 
            UInt8, UInt16,  
            Int32        
            Int32        
    }
    }
    import from LibCommon_DataStrings {
    import from LibCommon_DataStrings {
@@ -148,7 +148,6 @@ module LibItsSecurity_Templates {
                    } // End of field signature_
                    } // End of field signature_
                } // End of template m_signature_ecdsa
                } // End of template m_signature_ecdsa
                
                
                
                template (value) EcdsaSignature m_ecdsaSignature := {
                template (value) EcdsaSignature m_ecdsaSignature := {
                    algorithm   := e_ecdsa_nistp256_with_sha256,
                    algorithm   := e_ecdsa_nistp256_with_sha256,
                    field_size  := f_int2UInt8(1 + lengthof(PX_ECDSA_S)),
                    field_size  := f_int2UInt8(1 + lengthof(PX_ECDSA_S)),
@@ -270,6 +269,69 @@ module LibItsSecurity_Templates {
                elevation := p_elevation
                elevation := p_elevation
            } // End of template m_threeDLocation
            } // End of template m_threeDLocation
            
            
            /**
             * @desc Send template circular geographic region
             * @param p_center  Circle center 
             * @param p_radius  Circle radius
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (value) GeographicRegion m_geographicRegion_circle(
                                                                        in template (value) TwoDLocation p_center,
                                                                        in template (value) UInt16 p_radius
            ):= {
                region_type := e_circle,
                region := {
                    circular_region := {
                        center := p_center,
                        radius := p_radius 
                    } // End of field circular_region
                } // End of field region
            } // End of template m_geographicRegion_circle
            
            /**
             * @desc Basic send template rectangular geographic region
             * @param p_northwest  Upper left corner 
             * @param p_southeast  Lower rigth corner
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (value) GeographicRegion m_geographicRegion_rectangle_dummy(
                                                                                 in template (value) TwoDLocation p_northwest,
                                                                                 in template (value) TwoDLocation p_southeast
            ):= {
                region_type := e_rectangle,
                region := {
                    rectangular_region := {
                        {
                            northwest := p_northwest,
                            southeast := p_southeast 
                        }
                    } // End of field rectangular_region
                } // End of field region
            } // End of template m_geographicRegion_rectangle_dummy
            
            /**
             * @desc Send template polygonial geographic region
             * @param p_polygonal_region  Polygonial region description
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (value) GeographicRegion m_geographicRegion_polygonial(
                                                                            in template (value) PolygonalRegion p_polygonal_region
            ):= {
                region_type := e_polygon,
                region := {
                    polygonal_region := p_polygonal_region
                } // End of field region
            } // End of template m_geographicRegion_polygonial
            
            template (value) GeographicRegion m_geographicRegion_identifiedRegion(
                                                                                  in template (value) PolygonalRegion p_polygonal_region
            ):= {
                region_type := e_polygon,
                region := {
                    polygonal_region := p_polygonal_region
                } // End of field region
            } // End of template m_geographicRegion_polygonial
            
        } // End of group dummyBasicFormatElementsSend 
        } // End of group dummyBasicFormatElementsSend 
        
        
        /**
        /**
@@ -376,6 +438,60 @@ module LibItsSecurity_Templates {
                elevation   := p_elevation
                elevation   := p_elevation
            } // End of template mw_threeDLocation
            } // End of template mw_threeDLocation
            
            
            /**
             * @desc Receive template circular geographic region
             * @param p_center  Circle center 
             * @param p_radius  Circle radius
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (present) GeographicRegion mw_geographicRegion_circle(
                                                                           in template (present) TwoDLocation p_center,
                                                                           in template (present) UInt16 p_radius
            ):= {
                region_type := e_circle,
                region := {
                    circular_region := {
                        center := p_center,
                        radius := p_radius 
                    } // End of field circular_region
                } // End of field region
            } // End of template mw_geographicRegion_circle
            
            /**
             * @desc Basic receive template rectangular geographic region
             * @param p_northwest  Upper left corner 
             * @param p_southeast  Lower rigth corner
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (present) GeographicRegion mw_geographicRegion_rectangle_dummy(
                                                                                    in template (present) TwoDLocation p_northwest,
                                                                                    in template (present) TwoDLocation p_southeast
            ):= {
                region_type := e_rectangle,
                region := {
                    rectangular_region := {
                        {
                            northwest := p_northwest,
                            southeast := p_southeast 
                        }
                    } // End of field rectangular_region
                } // End of field region
            } // End of template mw_geographicRegion_rectangle_dummy
            
            /**
             * @desc Receive template polygonial geographic region
             * @param p_polygonal_region  Polygonial region description
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.21  GeographicRegion
             */
            template (present) GeographicRegion mw_geographicRegion_polygonial(
                                                                               in template (present) PolygonalRegion p_polygonal_region
            ):= {
                region_type := e_polygon,
                region := {
                    polygonal_region := p_polygonal_region
                } // End of field region
            } // End of template mw_geographicRegion_polygonial
            
        } // End of group dummyBasicFormatElementsRecv
        } // End of group dummyBasicFormatElementsRecv
        
        
    } // End of group dummyBasicFormatElements 
    } // End of group dummyBasicFormatElements 
+7 −7
Original line number Original line Diff line number Diff line
@@ -369,8 +369,8 @@ module LibItsSecurity_TypesAndValues {
        
        
        /**
        /**
         * @desc Defines a rectangular region by connecting the four points in the order (northwest.latitude, northwest.longitude), (northwest.longitude, southeast.longitude), (southeast.longitude, southeast.longitude), and (southeast.longitude, northwest.longitude)
         * @desc Defines a rectangular region by connecting the four points in the order (northwest.latitude, northwest.longitude), (northwest.longitude, southeast.longitude), (southeast.longitude, southeast.longitude), and (southeast.longitude, northwest.longitude)
         * @member center   Circular center
         * @member northwest   Upper left corner
         * @member radius   Radius given in metres
         * @member southeast   Lower rigth corner
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.24  RectangularRegion
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.24  RectangularRegion
         */
         */
        type record RectangularRegion {
        type record RectangularRegion {