/// <summary> /// Gets configuration for a channel on this node. /// </summary> /// <param name="channel">The channel</param> /// <returns>The channel configuration</returns> public async Task <InputOutputConfiguration> GetInputOutputConfiguration(InputOutputChannel channel) { InputOutputResponseData response = await ExecuteAtQueryAsync <InputOutputResponseData>(new InputOutputConfigurationCommand(channel)); return(response.Value); }
public InputOutputConfigurationCommand(InputOutputChannel channel, InputOutputConfiguration configuration) : this(channel) { Configuration = configuration; }
public InputOutputConfigurationCommand(InputOutputChannel channel) : base((int)channel > 9 ? $"P{(int) channel - 10}" : $"D{(int) channel}") { }
public InputOutputConfigurationCommand(InputOutputChannel channel) : base(string.Format("D{0}", (int)channel)) { }
/// <summary> /// Not supported on XBee Cellular. /// </summary> public override Task SetInputOutputConfigurationAsync(InputOutputChannel channel, InputOutputConfiguration configuration) { throw new NotSupportedException(NotSupportedMessage); }
/// <summary> /// Sets configuration for a channel on this node. /// </summary> /// <param name="channel">The channel</param> /// <param name="configuration">The channel configuration</param> public virtual Task SetInputOutputConfigurationAsync(InputOutputChannel channel, InputOutputConfiguration configuration) { return(ExecuteAtCommandAsync(new InputOutputConfigurationCommand(channel, configuration))); }
/// <summary> /// Gets configuration for a channel on this node. /// </summary> /// <param name="channel">The channel</param> /// <returns>The channel configuration</returns> public virtual async Task <InputOutputConfiguration> GetInputOutputConfigurationAsync(InputOutputChannel channel) { var response = await ExecuteAtQueryAsync <InputOutputResponseData>(new InputOutputConfigurationCommand(channel)) .ConfigureAwait(false); return(response.Value); }
public async Task SetInputOutputConfiguration(InputOutputChannel channel, InputOutputConfiguration configuration) { await SetInputOutputConfigurationAsync(channel, configuration); }
public async Task <InputOutputConfiguration> GetInputOutputConfiguration(InputOutputChannel channel) { return(await GetInputOutputConfigurationAsync(channel)); }
/// <summary> /// Sets configuration for a channel on this node. /// </summary> /// <param name="channel">The channel</param> /// <param name="configuration">The channel configuration</param> public async Task SetInputOutputConfigurationAsync(InputOutputChannel channel, InputOutputConfiguration configuration) { await ExecuteAtCommandAsync(new InputOutputConfigurationCommand(channel, configuration)); }