static void Main(string[] args) { Radio radio = new Radio(); radio.Power = true; do { Console.Write("1. Print data\n2. Swith power\n3. Change volume\n4. Change frequency"); int caseSwitch = 1; Console.WriteLine("Choose option: "); caseSwitch = int.Parse(Console.ReadLine()); switch (caseSwitch) { case 1: if (radio.Power == true) Console.WriteLine("Power is on"); else if (radio.Power == false) Console.WriteLine("Power is off"); break; case 2: Console.WriteLine("Case 2"); break; default: Console.WriteLine("Default case"); break; } } while (true); }
static void Main(string[] args) { Radio radio = new Radio("Yamaha", -1, 0); Console.WriteLine(radio.ToString()); radio.Volume = 1000000000; radio.Frq = 1000; Console.WriteLine(radio.ToString()); radio.Volume = -5; radio.Frq = 999999999; Console.WriteLine(radio.ToString()); radio.Volume = 5; radio.OnOff = true; radio.Frq = 10000; Console.WriteLine(radio.ToString()); radio.Volume = 9; radio.OnOff = true; radio.Frq = 25684; Console.WriteLine(radio.ToString()); radio.Volume = -5000; radio.OnOff = false; radio.Frq = 88888888; Console.WriteLine(radio.ToString()); Console.ReadLine(); }
static void Main(string[] args) { IRadio radio = null; Radio pandora = new Radio(); Console.WriteLine("Select the channel you would want to listen (1:Grunge, 2:Rock 3:Heavy Metal, 4:Death Metal"); string input = Console.ReadLine(); switch (input) { case "1": radio = new Grunge(); break; case "2": radio = new Rock(); break; case "3": radio = new HeavyMetal(); break; case "4": radio = new DeathMetal(); break; } pandora.SetChannel(radio); pandora.Play(); Console.Read(); }
private async void Radio_StateChanged(Radio sender, object args) { // The Radio StateChanged event doesn't run from the UI thread, so we must use the dispatcher // to run NotifyPropertyChanged await this.parent.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { NotifyPropertyChanged("IsRadioOn"); }); }
protected RegisterBase(Radio radio, int length, byte address, string name = "") { Value = new byte[length]; Name = string.IsNullOrEmpty(name) ? GetType().Name : name; Radio = radio; Length = length; Address = address; IsDirty = false; }
static void Main(string[] args) { Radio radio = new Radio(false, 5, 5000.0); radio.Power = true; radio.Freq = 25999; radio.Freq = 1000; radio.Volume = 20; radio.PrintData(); }
public void OnLevelWasLoaded(){ if(radioRef == null){ radioRef = GameObject.Find ("Radio").GetComponent<Radio>(); if(radioRef == null){ this.enabled = false; } } //saveOffset(); }
public static void Main() { ICommand command; IElectronicDevice device; DeviceButton button; device = new Television(); command = new TurnOn(device); button = new DeviceButton(command); button.Press(); command = new TurnOff(device); button = new DeviceButton(command); button.Press(); command = new TurnUp(device); button = new DeviceButton(command); button.Press(); button.Press(); button.Press(); command = new TurnDown(device); button = new DeviceButton(command); button.Press(); // ----------------------------------- device = new Radio(); command = new TurnOn(device); button = new DeviceButton(command); button.Press(); command = new TurnOff(device); button = new DeviceButton(command); button.Press(); command = new TurnUp(device); button = new DeviceButton(command); button.Press(); button.Press(); button.Press(); command = new TurnDown(device); button = new DeviceButton(command); button.Press(); }
public void SelectRiskLevel(bool isGreaterThanMinimalRisk) { string name = ""; if (isGreaterThanMinimalRisk) { name = "Greater than minimal risk"; } else { name = "No greater than minimal risk"; } var rdo = new Radio(By.XPath(".//td[text()='" + name + "']/../td/input[1]")); rdo.Click(); }
void SetRadioList(IEnumerable <string> genderList, RadioGroup radioGroup) { radioGroup.ItemsSource = genderList; radioGroup.SelectedItem = genderList.ElementAt(0); StackLayout content = (StackLayout)radioGroup.Content; Radio rg = null; for (int i = 0; i < content.Children.Count; i++) { rg = (Radio)(content.Children[i]); rg.Margin = new Thickness(0, 0, 10, 0); rg.VerticalOptions = LayoutOptions.Center; } }
private void API_RadioAdded(Radio radio) { bool notfound = _LocalRadios.FirstOrDefault((RadioViewData r) => r.Radio.Serial == radio.Serial) == null; if (notfound) { RadioViewData newRvm = new RadioViewData(radio); _LocalRadios.Add(newRvm); _RadiosFound.Add(newRvm); RadioViewData rr = _RadiosFound.FirstOrDefault((RadioViewData r) => r.Radio.IsWan && r.Radio.Serial == newRvm.Radio.Serial); if (rr != null) { _RadiosFound.Remove(rr); } } }
public async Task setRadios() { IReadOnlyList <Radio> radios = await Radio.GetRadiosAsync(); foreach (var radio in radios) { if (radio.Name.Equals("Wi-Fi")) { WiFi_RadioSwitchList.Items.Add(new RadioModel(radio, this)); } else if (radio.Name.Equals("Bluetooth")) { Bluetooth_RadioSwitchList.Items.Add(new RadioModel(radio, this)); } } }
/*public float drag = 3; public float maxVel = 30; public float accel = 5; public float deadzone = 0.6f;*/ //private Animator animator; public override void Start() { base.Start(); AIManager.staticManager.AddPeloton(myPeloton); //Avisar al AIManager cursor = GameObject.Find("Cursor").GetComponent<PlayerCursor>(); cursor.SetLeader(gameObject); callArea = gameObject.GetComponentInChildren<Projector>(); callText = GameObject.Find("CallText"); healthSlider = GameObject.Find("Slider").GetComponent<Slider>(); pelotonSource = GetComponent<AudioSource>(); radio = GameObject.Find(Names.RADIO).GetComponent<Radio>(); }
private void Knob1Button_Click(object sender, RoutedEventArgs e) { #if DebugOnRealDeviceOverFTDI Manager.Instance.EnqueueMessage(new Message(DeviceAddress.Radio, DeviceAddress.CDChanger, RadioEmulator.IsEnabled ? CDChanger.DataStop : CDChanger.DataPlay)); if (RadioEmulator.IsEnabled) { DisableRadio(); } else { EnableRadio(); } #else Radio.PressOnOffToggle(); #endif }
private void ExecuteSkipCurrentTrack() { EnsureTrackStreamExists(); if (_loveHateTrackStream != null && Radio.CurrentTrackStream != _loveHateTrackStream) { Radio.Play(_loveHateTrackStream); } else { if (Radio.CanGoToNextTrack) { Radio.NextTrack(); } } }
public void CC_OpenSend8_Key() { using (var c = Radio.OpenKey <int, int>(3, x => { })) { Radio.SendKey <int, int>(3, 1); Radio.SendKey <int, int>(3, 2); Radio.SendKey <int, int>(3, 3); Radio.SendKey <int, int>(3, 4); Radio.SendKey <int, int>(3, 5); Radio.SendKey <int, int>(3, 6); Radio.SendKey <int, int>(3, 7); Radio.SendKey <int, int>(3, 8); } return; }
private async Task ListRadios() { try { // This is only local radios? var radios = await Radio.GetRadiosAsync(); foreach (var radio in radios) { this.log.Info("DoDiscovery", () => string.Format("Radio {0} State {1} Kind {2}", radio.Name, radio.State, radio.Kind)); } // Looks like it is only for the local device } catch (Exception ex) { this.log.Exception(8888, "", ex); } }
private async void Page_Loaded(object sender, RoutedEventArgs e) { try { var result = await Radio.RequestAccessAsync(); var newstate = await Bluetooth.SendBluetooth(TetheringState.GetState); connected = newstate == TetheringState.Enabled; } catch (Exception) { } UpdateButton(); }
public void CC_OpenSend8() { using (var c = Radio.Open <int>(x => { })) { Radio.Send <int>(1); Radio.Send <int>(2); Radio.Send <int>(3); Radio.Send <int>(4); Radio.Send <int>(5); Radio.Send <int>(6); Radio.Send <int>(7); Radio.Send <int>(8); } return; }
private void Window_Loaded(object sender, RoutedEventArgs e) { tvLivingRoom = new Television("leefkamer"); radioKitchen = new Radio("keuken"); lampHallway = new SmartLamp("gang"); electricalAppliances = new List <ElectricalAppliance> { tvLivingRoom, radioKitchen, lampHallway }; lblTVLivingRoomVolume.Content = tvLivingRoom.CurrentVolume; lblRadioKitchenVolume.Content = radioKitchen.CurrentVolume; }
public void UpdateFrequency(float updateValue) { ActualFrequency = updateValue > 0 ? ActualFrequency + FrequencyChangeValue : ActualFrequency - FrequencyChangeValue; if (ActualFrequency > Frequencies[Frequencies.Length - 1]) { ActualFrequency = Frequencies[0]; } if (ActualFrequency < Frequencies[0]) { ActualFrequency = Frequencies[Frequencies.Length - 1]; } Radio.UpdateFrequency(); }
IObservable <Radio> WhenRadioReady() => Observable.FromAsync(async ct => { if (this.radio != null) { return(this.radio); } this.native = await BluetoothAdapter.GetDefaultAsync().AsTask(ct); if (this.native == null) { throw new ArgumentException("No bluetooth adapter found"); } this.radio = await this.native.GetRadioAsync().AsTask(ct); return(this.radio); });
protected override async void OnNavigatedTo(NavigationEventArgs e) { rootPage = MainPage.Current; // RequestAccessAsync must be called at least once from the UI thread var accessLevel = await Radio.RequestAccessAsync(); if (accessLevel != RadioAccessStatus.Allowed) { rootPage.NotifyUser("App is not allowed to control radios.", NotifyType.ErrorMessage); } else { InitializeRadios(); } }
private static void StartRadio() { radio = new Radio("http://naxi64.streaming.rs:9160/;stream.nsv"); radio = new Radio("http://live2.okradio.net:8052/;?.mp3"); radio = new Radio("http://cdn.maksnet.tv/em/asmedia/?streamname=index&radio"); radio = new Radio("http://stream.b92.net:7999/radio-b92.mp3"); radio.OnCurrentSongChanged += (s, eventArgs) => { string message = eventArgs.NewSong.Artist + " - " + eventArgs.NewSong.Title; Console.WriteLine(message); }; radio.OnStreamUpdate += Radio_OnStreamUpdate; radio.Start(); }
public static SocketResponse GetStatus(Radio currentRadio) { try { InternetRadioStatus status = new InternetRadioStatus(); status.CurrentRadio = currentRadio; status.State = BackgroundAudioHelper.GetState(); status.Volume = BackgroundAudioHelper.GetVolumeValue(); return(new SocketResponse(SocketResponse.StatusCode.OK, JsonHelper.ToJson(status))); } catch (Exception ex) { return(new SocketResponse(SocketResponse.StatusCode.EXCEPTION, ex.ToString())); } }
public void SelectTeamMember(string user = "") { BtnSelectTeamMember.Click(); selectPersonPopup.SwitchTo(); if (user == "") { Radio firstChoice = new Radio(By.CssSelector("input[type='radio']")); firstChoice.Click(); } else { selectPersonPopup.SelectValue(user); } selectPersonPopup.BtnOk.Click(); selectPersonPopup.SwitchBackToParent(); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); var sc = new ServiceCollection(); sc.AddMessagePipe(); var provider = sc.BuildServiceProvider(); var channel = Radio.Open <int>(x => Console.WriteLine($"CrossChannel: {x}")); var sub = provider.GetService <ISubscriber <int> >() !; var pub = provider.GetService <IPublisher <int> >() !; var subscribe = sub.Subscribe(x => Console.WriteLine($"MessagePipe: {x}")); var taskCrossChannel = Task.Run(async() => { for (var i = 0; i < 10; i++) { Radio.Send <int>(i); pub.Publish(i); await Task.Delay(1000); } }); Task.Delay(1000).Wait(); var taskAdd = Task.Run(async() => { for (var i = 0; i < 10; i++) { Radio.Open <int>(x => Console.WriteLine($"CC{i}: {x}")); sub.Subscribe(x => Console.WriteLine($"MP{i}: {x}")); await Task.Delay(1000); } /*using (var c = Radio.Open<int>(x => Console.WriteLine($"CC: {x}"))) * using (var s = sub.Subscribe(x => Console.WriteLine($"MP: {x}"))) * { * await Task.Delay(3000); * }*/ }); taskCrossChannel.Wait(); subscribe.Dispose(); channel.Dispose(); }
public bool Equals(SaveFileIV other) { if (other == null) { return(false); } return(Name.Equals(other.Name) && TimeStamp.Equals(other.TimeStamp) && SaveVersion.Equals(other.SaveVersion) && SaveSizeInBytes.Equals(other.SaveSizeInBytes) && ScriptSpaceSize.Equals(other.ScriptSpaceSize) && SimpleVars.Equals(other.SimpleVars) && PlayerInfo.Equals(other.PlayerInfo) && ExtraContent.Equals(other.ExtraContent) && Scripts.Equals(other.Scripts) && Garages.Equals(other.Garages) && GameLogic.Equals(other.GameLogic) && Paths.Equals(other.Paths) && Pickups.Equals(other.Pickups) && RestartPoints.Equals(other.RestartPoints) && RadarBlips.Equals(other.RadarBlips) && Zones.Equals(other.Zones) && GangData.Equals(other.GangData) && CarGenerators.Equals(other.CarGenerators) && Stats.Equals(other.Stats) && IplStore.Equals(other.IplStore) && StuntJumps.Equals(other.StuntJumps) && Radio.Equals(other.Radio) && Objects.Equals(other.Objects) && Relationships.Equals(other.Relationships) && Inventory.Equals(other.Inventory) && UnusedPools.Equals(other.UnusedPools) && UnusedPhoneInfo.Equals(other.UnusedPhoneInfo) && UnusedAudioScript.Equals(other.UnusedAudioScript) && UnusedSetPieces.Equals(other.UnusedSetPieces) && UnusedStreaming.Equals(other.UnusedStreaming) && UnusedPedTypeInfo.Equals(other.UnusedPedTypeInfo) && UnusedTags.Equals(other.UnusedTags) && UnusedShopping.Equals(other.UnusedShopping) && UnusedGangWars.Equals(other.UnusedGangWars) && UnusedEntryExits.Equals(other.UnusedEntryExits) && Unused3dMarkers.Equals(other.Unused3dMarkers) && UnusedVehicles.Equals(other.UnusedVehicles) && UnusedExtraBlock.Equals(other.UnusedExtraBlock) && GfwlData.Equals(other.GfwlData)); }
private async Task ListRadio(string deviceId) { try { //// This is only local radios //var radios = await Radio.GetRadiosAsync(); //foreach (var radio in radios) { // radio. //} // File Not Found exception // Looks like it is only for the local device Radio r = await Radio.FromIdAsync(deviceId); this.log.Info("DoDiscovery", () => string.Format("Radio {0} State {1} Kind {2}", r.Name, r.State, r.Kind)); } catch (Exception ex) { this.log.Exception(8888, "", ex); } }
/// <summary> /// Flyout handler for deleting radio. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <returns></returns> public async void DeleteRadioMenuFlyoutItem_Click(object sender, RoutedEventArgs e) { try { ProgressObject.Show("Deleting radio"); FrameworkElement element = (FrameworkElement)sender; Radio radio = (Radio)element.DataContext; await DeleteRadioAsync(radio); await UpdateRadiosAsync(); } catch { MessageDialog dlg = new MessageDialog("Radio could not be deleted. Check network connection and try again please."); await dlg.ShowAsync(); } finally { ProgressObject.Hide(); } }
public ConfigData() { // Default configuration SerialPort = ""; SerialBaudRate = 9600; SerialDataBits = 8; SerialStopBits = StopBits.One; SerialParity = Parity.None; PollTimeTransmitMS = 50; MinLineQuietTimeMS = 100; RadioID = Radio.NULL_RADIO; RadioAddress = 0x00; ControllerAddress = (byte)Radio.PC_CONTROL; ControllerPromiscuousLevel = PromiscuityLevel.PROMISCUOUS_NONE; }
public void Start(Radio.SamplesAvailableDelegate callback) { if (_hackRFDevice == null) { throw new ApplicationException("No device selected"); } _callback = callback; try { _hackRFDevice.Start(); } catch { Open(); _hackRFDevice.Start(); } }
public static void CloseSession() { Discovery.Stop(); while (radio_list.Count > 0) { Radio r = radio_list[0]; RemoveRadio(r); LogDisconnect("API::CloseSession(" + r.ToString() + ")--Application is closing"); } initialized = false; if (_semNewPacket != null) { _semNewPacket.Set(); } }
private void ExecuteQueueTracks(IEnumerable tracks) { if (tracks == null) { return; } ITrackStream stream = tracks.OfType <Track>().ToTrackStream(CurrentArtist.Name); Radio.Queue(stream); ToastService.Show(new ToastData { Message = "Tracks queued", Icon = AppIcons.Add }); }
static void Main(string[] args) { var access = await WiFiAdapter.RequestAccessAsync(); if (access == WiFiAccessStatus.Allowed) { var radios = await Radio.GetRadiosAsync(); foreach (var radio in radios) { if (radio.Kind == RadioKind.WiFi) { await radio.SetStateAsync(RadioState.Off); } } } }
private void PowerButton_Click(object sender, RoutedEventArgs e) { if (Radio.On) { Radio.TurnOff(); PlayButton.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("C:\\Users\\User\\github\\eng71\\OOP\\RadioAppStarterCode\\RadioAppWPF\\Play.png")) }; TurnOnOffUI(); } else { Radio.TurnOn(); } TurnOnOffUI(); }
public static bool Prefix(Radio __instance) { var RColor = __instance.GetAllComponentsInChildren <MeshRenderer>(); foreach (var radioColor in RColor) { if (radioColor.name.Contains("Mesh")) { radioColor.material.color = new Color32(Convert.ToByte(Config.fabricatorValue), Convert.ToByte(Config.fabricatorgValue), Convert.ToByte(Config.fabricatorbValue), 1); } } return(true); }
public void RaiseMessageWhenParseRadioErrorOccured() { var stream = new MemoryEventStream(); stream.Add(new RadioCreated("djam", new Uri("http://djamradio.fr"))); var publisher = new EventBus(stream); var radioEngine = RadioEngineBuilder .Create() .SetException(new Exception("error")) .Build(); var radio = new Radio(stream, publisher, radioEngine); radio.SearchSong(); Assert.IsTrue(stream.GetEvents().Contains(new RadioSongError("djam", "error"))); }
public GameObject CreateNewEscapePod(EscapePodModel model) { SURPRESS_ESCAPE_POD_AWAKE_METHOD = true; GameObject escapePod; if (model.Id == MyEscapePodId) { escapePod = EscapePod.main.gameObject; } else { escapePod = Object.Instantiate(EscapePod.main.gameObject); NitroxEntity.SetNewId(escapePod, model.Id); } escapePod.transform.position = model.Location.ToUnity(); StorageContainer storageContainer = escapePod.RequireComponentInChildren <StorageContainer>(); using (packetSender.Suppress <ItemContainerRemove>()) { storageContainer.container.Clear(); } NitroxEntity.SetNewId(storageContainer.gameObject, model.StorageContainerId); MedicalCabinet medicalCabinet = escapePod.RequireComponentInChildren <MedicalCabinet>(); NitroxEntity.SetNewId(medicalCabinet.gameObject, model.MedicalFabricatorId); Fabricator fabricator = escapePod.RequireComponentInChildren <Fabricator>(); NitroxEntity.SetNewId(fabricator.gameObject, model.FabricatorId); Radio radio = escapePod.RequireComponentInChildren <Radio>(); NitroxEntity.SetNewId(radio.gameObject, model.RadioId); DamageEscapePod(model.Damaged, model.RadioDamaged); FixStartMethods(escapePod); SURPRESS_ESCAPE_POD_AWAKE_METHOD = false; return(escapePod); }
public Device CreateDevice(string TypeOfDevice) { switch (TypeOfDevice) { case ("refrigerator"): NewDevice = new Refrigerator(); NewDevice.deviceNotificator += ServiceMessages.Message; return NewDevice; case ("conditioner"): NewDevice = new Conditioner(); return NewDevice; case ("radio"): default: NewDevice = new Radio(); return NewDevice; } }
public static void Main(string [] args) { // kleiner Test Radio radio1 = new Radio(); radio1.an(); Console.WriteLine(radio1.ausgabe() + "\n"); radio1.lauter(); radio1.lauter(); radio1.lauter(); Console.WriteLine(radio1.ausgabe() + "\n"); radio1.leiser(); Console.WriteLine(radio1.ausgabe() + "\n"); radio1.waehleSender(117.5); Console.WriteLine(radio1.ausgabe() + "\n"); Radio radio2 = new Radio(114.5); radio2.an(); Console.WriteLine(radio2.ausgabe() + "\n"); }
static void Main(string[] args) { Radio myRadio = new Radio(); Console.WriteLine("Controls:\n" + " Power : P\n" + " Mode : M\n" + " Volume: V\n"); ConsoleKeyInfo consoleKeyInfo; do { consoleKeyInfo = Console.ReadKey(true); if (consoleKeyInfo.Key == ConsoleKey.P) myRadio.ClickPWR(); else if (consoleKeyInfo.Key == ConsoleKey.M) myRadio.ClickMODE(); else if (consoleKeyInfo.Key == ConsoleKey.V) myRadio.ClickVOLUME(); } while (consoleKeyInfo.Key != ConsoleKey.Escape); }
public SetupRetransmissionRegister(Radio radio) : base(radio, 1, Addresses.SETUP_RETR) { }
// Use this for initialization void Start () { spawnPoints = playerSpawnPoints.GetComponentsInChildren<Transform>(); gameController = GameObject.FindObjectOfType<GameController>(); radio = GetComponentInChildren<Radio>(); fpc = GetComponent<FirstPersonController>(); }
protected PipeRegisterBase(Radio radio, byte address, byte length, byte pipeNumber) : base(radio, length, address) { PipeNumber = pipeNumber; }
public RfChannelRegister(Radio radio) : base(radio, 1, Addresses.RF_CH) { }
// Use this for initialization void Awake() { Radio._instance = this; GameObject.DontDestroyOnLoad(this.gameObject); RefreshVolume(); StartRadio(); }
public SetupAddressWidthRegister(Radio radio) : base(radio, 1, Addresses.SETUP_AW) { }
public RfSetupRegister(Radio radio) : base(radio, 1, Addresses.RF_SETUP) { }
public ReceivePayloadWidthPipeRegister(Radio radio, byte address, byte pipeNumber) : base(radio, address, 1, pipeNumber) { }
public EnableAutoAcknowledgementRegister(Radio radio) : base(radio, 1, Addresses.EN_AA) { }
public RegisterManager(Radio radio) { ConfigurationRegister = new ConfigurationRegister(radio); EnableAutoAcknowledgementRegister = new EnableAutoAcknowledgementRegister(radio); EnableReceiveAddressRegister = new EnableReceiveAddressRegister(radio); AddressWidthRegister = new SetupAddressWidthRegister(radio); SetupRetransmissionRegister = new SetupRetransmissionRegister(radio); RfChannelRegister = new RfChannelRegister(radio); RfSetupRegister = new RfSetupRegister(radio); StatusRegister = new StatusRegister(radio); ObserveTransmitRegister = new ObserveTransmitRegister(radio); ReceivedPowerDetectorRegister = new ReceivedPowerDetectorRegister(radio); TransmitAddressRegister = new AddressPipeRegister(radio, Addresses.TX_ADDR, 0); FifoStatusRegister = new FifoStatusRegister(radio); DynamicPayloadLengthRegister = new DynamicPayloadLengthRegister(radio); FeatureRegister = new FeatureRegister(radio); ReceiveAddressPipeRegisters = new RegisterCollection<AddressPipeRegister> { {0, new AddressPipeRegister(radio, Addresses.RX_ADDR_P0, 0)}, {1, new AddressPipeRegister(radio, Addresses.RX_ADDR_P1, 1)}, {2, new AddressPipeRegister(radio, Addresses.RX_ADDR_P1, 2)}, {3, new AddressPipeRegister(radio, Addresses.RX_ADDR_P1, 3)}, {4, new AddressPipeRegister(radio, Addresses.RX_ADDR_P1, 4)}, {5, new AddressPipeRegister(radio, Addresses.RX_ADDR_P1, 5)}, }; ReceivePayloadWidthPipeRegisters = new RegisterCollection<ReceivePayloadWidthPipeRegister> { {0, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P0, 0)}, {1, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P1, 1)}, {2, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P2, 2)}, {3, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P3, 3)}, {4, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P4, 4)}, {5, new ReceivePayloadWidthPipeRegister(radio, Addresses.RX_PW_P5, 5)} }; AllRegisters = new RegisterCollection<RegisterBase> { {Addresses.CONFIG, ConfigurationRegister}, {Addresses.EN_AA, EnableAutoAcknowledgementRegister}, {Addresses.EN_RXADDR, EnableReceiveAddressRegister}, {Addresses.SETUP_AW, AddressWidthRegister}, {Addresses.SETUP_RETR, SetupRetransmissionRegister}, {Addresses.RF_CH, RfChannelRegister}, {Addresses.RF_SETUP, RfSetupRegister}, {Addresses.STATUS, StatusRegister}, {Addresses.OBSERVE_TX, ObserveTransmitRegister}, {Addresses.RPD, ReceivedPowerDetectorRegister}, {Addresses.RX_ADDR_P0, ReceiveAddressPipeRegisters[0]}, {Addresses.RX_ADDR_P1, ReceiveAddressPipeRegisters[1]}, {Addresses.RX_ADDR_P2, ReceiveAddressPipeRegisters[2]}, {Addresses.RX_ADDR_P3, ReceiveAddressPipeRegisters[3]}, {Addresses.RX_ADDR_P4, ReceiveAddressPipeRegisters[4]}, {Addresses.RX_ADDR_P5, ReceiveAddressPipeRegisters[5]}, {Addresses.TX_ADDR, TransmitAddressRegister}, {Addresses.RX_PW_P0, ReceivePayloadWidthPipeRegisters[0]}, {Addresses.RX_PW_P1, ReceivePayloadWidthPipeRegisters[1]}, {Addresses.RX_PW_P2, ReceivePayloadWidthPipeRegisters[2]}, {Addresses.RX_PW_P3, ReceivePayloadWidthPipeRegisters[3]}, {Addresses.RX_PW_P4, ReceivePayloadWidthPipeRegisters[4]}, {Addresses.RX_PW_P5, ReceivePayloadWidthPipeRegisters[5]}, {Addresses.FIFO_STATUS, FifoStatusRegister}, {Addresses.DYNPD, DynamicPayloadLengthRegister}, {Addresses.FEATURE, FeatureRegister} }; }
public AddressPipeRegister(Radio radio, byte address, byte pipeNumber) : base(radio, address, (byte)(pipeNumber <= 1 ? 5 : 1), pipeNumber) { }
public static void Main() { Radio radio = new Radio(); radio.Run(); }
public RadioModel(Radio radio, UIElement parent) { this.radio = radio; this.parent = parent; this.radio.StateChanged += Radio_StateChanged; }
public FifoStatusRegister(Radio radio) : base(radio, 1, Addresses.FIFO_STATUS) { }
public FeatureRegister(Radio radio) : base(radio, 1, Addresses.FEATURE) { }
public ReceivedPowerDetectorRegister(Radio radio) : base(radio, 1, Addresses.RPD) { }
public EnableReceiveAddressRegister(Radio radio) : base(radio, 1, Addresses.EN_RXADDR) { }
public ConfigurationRegister(Radio radio) : base(radio, 1, Addresses.CONFIG) { }