private async Task <ZoneState> GetMainZoneState(DenonDevice denonDevice) { var state = await _commander.GetMainZoneState(denonDevice); return(state switch { "ZMOFF" => ZoneState.Off, "ZMON" => ZoneState.On, _ => ZoneState.Unknown });
public async Task <DeviceInformation> GetDeviceInformation(DenonDevice denonDevice) { var deviceInformation = new DeviceInformation( await GetMuteState(denonDevice), await GetMasterVolume(denonDevice), await GetMainZoneState(denonDevice), await GetZone2State(denonDevice), await GetSubwooferLevel(denonDevice) ); return(deviceInformation); }
public async Task <string> GetSubwooferLevel(DenonDevice denonPlayer) { return(await IssueCommand(denonPlayer.Ip, "PSSWL ?")); }
public async Task SetSubwooferLevel(DenonDevice denonPlayer, int value) { await IssueCommand(denonPlayer.Ip, $"PSSWL {value}"); }
public async Task <string> GetMasterVolume(DenonDevice denonPlayer) { return(await IssueCommand(denonPlayer.Ip, "MV?")); }
public async Task SetMasterVolume(DenonDevice denonPlayer, int value) { value = Math.Min(Math.Max(value, 0), 98); await IssueCommand(denonPlayer.Ip, $"MV{value}"); }
public async Task <string> GetZone2State(DenonDevice denonPlayer) { return(await IssueCommand(denonPlayer.Ip, "Z2?")); }
public async void Zone2Off(DenonDevice denonPlayer) { await IssueCommand(denonPlayer.Ip, "Z2OFF"); }
public async void MainZoneOff(DenonDevice denonPlayer) { await IssueCommand(denonPlayer.Ip, "ZMOFF"); }
public async void Unmute(DenonDevice denonPlayer) { await IssueCommand(denonPlayer.Ip, "MUOFF"); }