Ejemplo n.º 1
0
        /// <summary>
        /// Creates a response message to a RegisterServiceRequest message.
        /// </summary>
        /// <param name="Request">RegisterServiceRequest message for which the response is created.</param>
        /// <returns>RegisterServiceResponse message that is ready to be sent.</returns>
        public LocProtocolMessage CreateRegisterServiceResponse(LocProtocolMessage Request, GpsLocation Location)
        {
            RegisterServiceResponse registerServiceResponse = new RegisterServiceResponse();

            registerServiceResponse.Location = new Iop.Locnet.GpsLocation()
            {
                Latitude  = Location.GetLocationTypeLatitude(),
                Longitude = Location.GetLocationTypeLongitude()
            };

            LocProtocolMessage res = CreateLocalServiceOkResponse(Request);

            res.Response.LocalService.RegisterService = registerServiceResponse;

            return(res);
        }