Esempio n. 1
0
        public ICollection <LegacyRadioInfo> ListLegacy()
        {
            var info = new NativeDefinitions.OldRadioInfo();
            var ptr  = Marshal.AllocHGlobal(info.bLength);

            var count = G313Api.G3GetRadioList(ptr, info.bLength);

            Marshal.PtrToStructure(ptr, info);
            Marshal.FreeHGlobal(ptr);

            return(count > 1 ? ListLegacyBig((int)count, info.bLength) : new[] { new LegacyRadioInfo(info) });
        }
Esempio n. 2
0
 internal LegacyRadioInfo(NativeDefinitions.OldRadioInfo info)
 {
     Serial                = info.szSerNum;
     Name                  = info.szProdName;
     MinFrequency          = info.dwMinFreq;
     MaxFrequency          = info.dwMaxFreq;
     BandFilterCount       = info.bNumBands;
     BandFrequency         = info.dwBandFreq;
     LocalOscillatorOffset = info.dwLOfreq;
     VcoCount              = info.bNumVcos;
     VcoFrequncy           = info.dwVcoFreq;
     VcoDividers           = info.wVcoDiv;
     VcoSelectBits         = info.bVcoBits;
     ReferenceClock1       = info.dwRefClk1;
     ReferenceClock2       = info.dwRefClk2;
     DacOnIf1              = info.IF1DAC;
 }