public override bool Equals(object obj)
        {
            DriTunerModulation mod = obj as DriTunerModulation;

            if (mod != null && this == mod)
            {
                return(true);
            }
            return(false);
        }
        /// <summary>
        /// The GetTunerParameters action SHALL return tuning status in less than 1s.
        /// </summary>
        /// <param name="currentCarrierLock">This argument provides the value of the CarrierLock state variable when the action response is created.</param>
        /// <param name="currentFrequency">This argument provides the value of the Frequency state variable when the action response is created. The unit is kHz.</param>
        /// <param name="currentModulation">This argument provides the value of the Modulation state variable when the action response is created.</param>
        /// <param name="currentPcrLock">This argument provides the value of the PCRLock state variable when the action response is created.</param>
        /// <param name="currentSignalLevel">This argument provides the value of the SignalLevel state variable when the action response is created. The unit is dBmV.</param>
        /// <param name="currentSnr">This argument provides the value of the SNR state variable when the action response is created. The unit is dB.</param>
        public void GetTunerParameters(out bool currentCarrierLock, out UInt32 currentFrequency,
                                       out DriTunerModulation currentModulation, out bool currentPcrLock,
                                       out Int32 currentSignalLevel, out UInt32 currentSnr)
        {
            IList <object> outParams = _getTunerParametersAction.InvokeAction(null);

            currentCarrierLock = (bool)outParams[0];
            currentFrequency   = (uint)outParams[1];
            currentModulation  = (DriTunerModulation)(string)outParams[2];
            currentPcrLock     = (bool)outParams[3];
            currentSignalLevel = (int)outParams[4];
            currentSnr         = (uint)outParams[5];
        }
        /// <summary>
        /// The SetTunerParameters action SHALL return tuning status in less than 2s per modulations attempt.
        /// </summary>
        /// <param name="newFrequency">This argument set the Frequency state variable to the selected frequency. The unit is kHz.</param>
        /// <param name="newModulationList">This argument sets the Modulation state variable to the last in a list of selected
        ///   modulation types if no demodulation was achieved or to the modulation as reported by demodulator in case of
        ///   successful demodulation.</param>
        /// <param name="currentFrequency">This argument provides the value in Frequency state variable when the action response is created. The unit is kHz.</param>
        /// <param name="currentModulation">This argument provides the value of the Modulation state variable when the action response is created.</param>
        /// <param name="pcrLockStatus">This argument provides the value of the PCRLock state variable when the action response is created.</param>
        public void SetTunerParameters(UInt32 newFrequency, IList <DriTunerModulation> newModulationList,
                                       out UInt32 currentFrequency, out DriTunerModulation currentModulation, out bool pcrLockStatus)
        {
            string newModulationListCsv = DriTunerModulation.All;

            if (newModulationList != null)
            {
                newModulationListCsv = string.Join(",", newModulationList.Select(x => x.ToString()).ToArray());
            }
            IList <object> outParams = _setTunerParametersAction.InvokeAction(new List <object> {
                newFrequency, newModulationListCsv
            });

            currentFrequency  = (uint)outParams[0];
            currentModulation = (DriTunerModulation)(string)outParams[1];
            pcrLockStatus     = (bool)outParams[2];
        }
Example #4
0
 /// <summary>
 /// The GetTunerParameters action SHALL return tuning status in less than 1s.
 /// </summary>
 /// <param name="currentCarrierLock">This argument provides the value of the CarrierLock state variable when the action response is created.</param>
 /// <param name="currentFrequency">This argument provides the value of the Frequency state variable when the action response is created. The unit is kHz.</param>
 /// <param name="currentModulation">This argument provides the value of the Modulation state variable when the action response is created.</param>
 /// <param name="currentPcrLock">This argument provides the value of the PCRLock state variable when the action response is created.</param>
 /// <param name="currentSignalLevel">This argument provides the value of the SignalLevel state variable when the action response is created. The unit is dBmV.</param>
 /// <param name="currentSnr">This argument provides the value of the SNR state variable when the action response is created. The unit is dB.</param>
 public void GetTunerParameters(out bool currentCarrierLock, out UInt32 currentFrequency,
                               out DriTunerModulation currentModulation, out bool currentPcrLock,
                               out Int32 currentSignalLevel, out UInt32 currentSnr)
 {
   IList<object> outParams = _getTunerParametersAction.InvokeAction(null);
   currentCarrierLock = (bool)outParams[0];
   currentFrequency = (uint)outParams[1];
   currentModulation = (DriTunerModulation)(string)outParams[2];
   currentPcrLock = (bool)outParams[3];
   currentSignalLevel = (int)outParams[4];
   currentSnr = (uint)outParams[5];
 }
Example #5
0
 /// <summary>
 /// The SetTunerParameters action SHALL return tuning status in less than 2s per modulations attempt.
 /// </summary>
 /// <param name="newFrequency">This argument set the Frequency state variable to the selected frequency. The unit is kHz.</param>
 /// <param name="newModulationList">This argument sets the Modulation state variable to the last in a list of selected
 ///   modulation types if no demodulation was achieved or to the modulation as reported by demodulator in case of
 ///   successful demodulation.</param>
 /// <param name="currentFrequency">This argument provides the value in Frequency state variable when the action response is created. The unit is kHz.</param>
 /// <param name="currentModulation">This argument provides the value of the Modulation state variable when the action response is created.</param>
 /// <param name="pcrLockStatus">This argument provides the value of the PCRLock state variable when the action response is created.</param>
 public void SetTunerParameters(UInt32 newFrequency, IList<DriTunerModulation> newModulationList,
                         out UInt32 currentFrequency, out DriTunerModulation currentModulation, out bool pcrLockStatus)
 {
   string newModulationListCsv = DriTunerModulation.All;
   if (newModulationList != null)
   {
     newModulationListCsv = string.Join(",", newModulationList.Select(x => x.ToString()).ToArray());
   }
   IList<object> outParams = _setTunerParametersAction.InvokeAction(new List<object> { newFrequency, newModulationListCsv });
   currentFrequency = (uint)outParams[0];
   currentModulation = (DriTunerModulation)(string)outParams[1];
   pcrLockStatus = (bool)outParams[2];
 }