コード例 #1
0
        /// <summary>
        ///     Validates the spectrum use notify request.
        /// </summary>
        /// <param name="notifyRequest">The notify request.</param>
        /// <param name="errorMessages">The error messages.</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
        public override bool ValidateNotifyRequest(INotifyRequest notifyRequest, out List <string> errorMessages)
        {
            if (!this.IsValidDeviceDescriptor(notifyRequest.DeviceDescriptor, out errorMessages))
            {
                return(false);
            }

            if (notifyRequest.MasterDeviceDescriptors != null)
            {
                if (!this.IsValidDeviceDescriptor(notifyRequest.MasterDeviceDescriptors, out errorMessages))
                {
                    return(false);
                }

                if (!this.FCCIdValidate(out errorMessages, notifyRequest.MasterDeviceDescriptors))
                {
                    return(false);
                }
            }

            if (notifyRequest.MasterDeviceLocation != null)
            {
                if (!this.IsValid(notifyRequest.MasterDeviceLocation, out errorMessages))
                {
                    return(false);
                }

                if (!this.IsValidLocation(notifyRequest.MasterDeviceLocation, out errorMessages))
                {
                    return(false);
                }
            }

            if (!this.IsValid(notifyRequest.Location, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValid(notifyRequest.Spectra, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValidSpectra(notifyRequest.Spectra, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValidLocation(notifyRequest.Location, out errorMessages))
            {
                return(false);
            }

            var result = this.FCCIdValidate(out errorMessages, notifyRequest.DeviceDescriptor);

            return(result);
        }
コード例 #2
0
        /// <summary>
        ///     Validates the spectrum use notify request.
        /// </summary>
        /// <param name="notifyRequest">The notify request.</param>
        /// <param name="errorMessages">The error messages.</param>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
        public override bool ValidateNotifyRequest(INotifyRequest notifyRequest, out List <string> errorMessages)
        {
            if (!this.IsValidDeviceDescriptor(notifyRequest.DeviceDescriptor, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValid(notifyRequest.Location, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValid(notifyRequest.Spectra, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValidSpectra(notifyRequest.Spectra, out errorMessages))
            {
                return(false);
            }

            if (!this.IsValidLocation(notifyRequest.Location, out errorMessages))
            {
                return(false);
            }

            if (notifyRequest.DeviceDescriptor.ManufacturerId == null || notifyRequest.DeviceDescriptor.ManufacturerId == string.Empty)
            {
                errorMessages.Add(Constants.ErrorMessagEtsiManufacturerId);
                return(false);
            }

            if (notifyRequest.DeviceDescriptor.ModelId == null || notifyRequest.DeviceDescriptor.ModelId == string.Empty)
            {
                errorMessages.Add(Constants.ErrorMessagEtsiModelId);
                return(false);
            }

            return(true);
        }
コード例 #3
0
 /// <summary>
 /// Validates the notify spectrum request.
 /// </summary>
 /// <param name="notifyRequest">The notify request.</param>
 /// <param name="errorMessages">The error messages.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
 public virtual bool ValidateNotifyRequest(INotifyRequest notifyRequest, out List <string> errorMessages)
 {
     errorMessages = new List <string>();
     return(true);
 }