コード例 #1
0
ファイル: XBeeNode.cs プロジェクト: macntouch/XBee
        /// <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);
        }
コード例 #2
0
 public InputOutputConfigurationCommand(InputOutputChannel channel,
                                        InputOutputConfiguration configuration) : this(channel)
 {
     Configuration = configuration;
 }
コード例 #3
0
 public InputOutputConfigurationCommand(InputOutputChannel channel) :
     base((int)channel > 9 ? $"P{(int) channel - 10}" : $"D{(int) channel}")
 {
 }
コード例 #4
0
 public InputOutputConfigurationCommand(InputOutputChannel channel) :
     base(string.Format("D{0}", (int)channel))
 {
 }
コード例 #5
0
 /// <summary>
 ///     Not supported on XBee Cellular.
 /// </summary>
 public override Task SetInputOutputConfigurationAsync(InputOutputChannel channel,
                                                       InputOutputConfiguration configuration)
 {
     throw new NotSupportedException(NotSupportedMessage);
 }
コード例 #6
0
ファイル: XBeeNode.cs プロジェクト: alamus/XBee
 /// <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)));
 }
コード例 #7
0
ファイル: XBeeNode.cs プロジェクト: alamus/XBee
        /// <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);
        }
コード例 #8
0
 public async Task SetInputOutputConfiguration(InputOutputChannel channel, InputOutputConfiguration configuration)
 {
     await SetInputOutputConfigurationAsync(channel, configuration);
 }
コード例 #9
0
 public async Task <InputOutputConfiguration> GetInputOutputConfiguration(InputOutputChannel channel)
 {
     return(await GetInputOutputConfigurationAsync(channel));
 }
コード例 #10
0
 /// <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));
 }