public static async Task NetRadioSetPresetAsync(this ISCPConnection connection, short preset) { await connection.SendCommandAsync(new NetRadioPreset() { Preset = preset }); }
public static async Task <NetListInfoExtended> GetNetListExtended(this ISCPConnection connection, short layer, short nbrOfItems = 30, short startIndex = 0, short sequence = 0) { return(await connection.SendCommandAsync <NetListInfoExtended>(new NetListInfoExtended() { Sequence = sequence, Layer = layer, NumberOfItems = nbrOfItems, StartIndex = startIndex })); }
public async Task ConnectTest() { using (var connection = new ISCPConnection()) { await connection.ConnectAsync(IPAddress); } }
public static async Task SelectNetListInfoExtended(this ISCPConnection connection, short layer, short index, short sequence = 0) { await connection.SendCommandAsync(new NetListInfoSelectExtended() { Sequence = sequence, Layer = layer, Index = index }); connection.MessageProcessingWaitHandle.WaitOne(); }
public static async Task SetNetServiceAsync(this ISCPConnection connection, NetServices service) { await connection.SendCommandAsync(new NetService() { Serivce = service }, 10000, (om, sm) => sm.Command == "NLS"); // after sending NSV, NLT + NLS (many) are expected connection.MessageProcessingWaitHandle.WaitOne(); }
public static async Task SelectNetListInfoByIndex(this ISCPConnection connection, short index) { await connection.SendCommandAsync(new NetListInfoSelect() { IndexNbr = index }, 10000); connection.MessageProcessingWaitHandle.WaitOne(); }
public async Task SetVolumeExtTest() { using (var connection = new ISCPConnection()) { await connection.ConnectAsync(IPAddress); await connection.PowerOnAsync(); var vol = await connection.SetVolumeAsync(90); Assert.Equal(90, vol.VolumeLevel); } }
public async Task SetVolumeTest() { using (var connection = new ISCPConnection()) { await connection.ConnectAsync(IPAddress); await connection.PowerOnAsync(Zone.Main); var vol = await connection.SendCommandAsync <Volume>(new Volume(Zone.Main) { VolumeLevel = 80 }); Assert.Equal(80, vol.VolumeLevel); } }
public static async Task <string> GetNetTitleNameAsync(this ISCPConnection connection) { var ntn = await connection.SendCommandAsync <NetTitleName>(new NetTitleName()); return(ntn.Title); }
public static async Task <NetArtistName> GetNetArtistNameAsync(this ISCPConnection connection) { return(await connection.SendCommandAsync <NetArtistName>(new NetArtistName())); }
public static async Task <NetJacketArt> GetNetJacketArtAsync(this ISCPConnection connection) { return(await connection.SendCommandAsync <NetJacketArt>(new NetJacketArt())); }
public static async Task <NetTrackFileInfo> GetNetTrackFileInfoAsync(this ISCPConnection connection) { return(await connection.SendCommandAsync <NetTrackFileInfo>(new NetTrackFileInfo())); }