Skip to content
LibItsSecurity_Functions.ttcn3 51.8 KiB
Newer Older
        
        /**
         * @desc Check that the location is inside a polygonal region
         * @param p_region      The polygonal region to consider
         * @param p_location    The device location
         * @return true on success, false otherwise
         * @verdict Unchanged
         */
        function f_isLocationInsidePolygonalRegion(in template (value) PolygonalRegion p_region,
                                                   in template (value) ThreeDLocation   p_location
        ) return boolean {
            // Sanity check
            if (not isbound(p_region) or not isbound(p_location) or (lengthof(p_region) == 0)) {
                return false;
            }
            
garciay's avatar
garciay committed
            return fx_isLocationInsidePolygonalRegion(valueof(p_region), valueof(p_location));
        } // End of function f_isLocationInsidePolygonalRegion
        
        /**
         * @desc Check if the location is inside an identified region
         * @param p_region      The identified region to consider
         * @param p_location    The device location
         * @return true on success, false otherwise
         * @verdict Unchanged
         */
        function f_isLocationInsideIdentifiedRegion(in template (value) IdentifiedRegion p_region,
                                                    in template (value) ThreeDLocation   p_location
        ) return boolean {
            // Sanity check
            if (not isbound(p_region) or not isbound(p_location)) {
                return false;
            }
            
garciay's avatar
garciay committed
            return fx_isLocationInsideIdentifiedRegion(valueof(p_region), valueof(p_location));
        } // End of function f_isLocationInsideIdentifiedRegion
        
        /**
         * @desc Check if the location is inside an undefined region
         * @param p_region      The identified region to consider
         * @param p_location    The device location
         * @return true on success, false otherwise
         * @verdict Unchanged
         */
        function f_isLocationInsideOtherRegion(in template (value) octetstring p_region,
                                               in template (value) ThreeDLocation   p_location
        ) return boolean {
            // FIXME To be removed
        } // End of function f_isLocationInsideOtherRegion
        
garciay's avatar
garciay committed
    } // End of group geometryFunctions 
filatov's avatar
filatov committed
    
} // End of module LibItsSecurity_Functions