|
| 1 | +// |
| 2 | +// Copyright (c) .NET Foundation and Contributors |
| 3 | +// See LICENSE file in the project root for full license information. |
| 4 | +// |
| 5 | + |
| 6 | +using System; |
| 7 | + |
| 8 | +namespace System.Device.Adc.Provider |
| 9 | +{ |
| 10 | + public interface IAdcControllerProvider |
| 11 | + { |
| 12 | + /// <summary> |
| 13 | + /// Gets the number of channels available on for the controller. |
| 14 | + /// </summary> |
| 15 | + /// <value> |
| 16 | + /// Number of channels. |
| 17 | + /// </value> |
| 18 | + int ChannelCount { get; } |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// Gets or sets the controller channel mode. |
| 22 | + /// </summary> |
| 23 | + /// <value> |
| 24 | + /// The channel mode. |
| 25 | + /// </value> |
| 26 | + ProviderAdcChannelMode ChannelMode { get; set; } |
| 27 | + |
| 28 | + /// <summary> |
| 29 | + /// Gets the maximum value that the controller can return. |
| 30 | + /// </summary> |
| 31 | + /// <value> |
| 32 | + /// The maximum value. |
| 33 | + /// </value> |
| 34 | + int MaxValue { get; } |
| 35 | + |
| 36 | + /// <summary> |
| 37 | + /// Gets the minimum value that the controller can return. |
| 38 | + /// </summary> |
| 39 | + /// <value> |
| 40 | + /// The minimum value. |
| 41 | + /// </value> |
| 42 | + int MinValue { get; } |
| 43 | + |
| 44 | + /// <summary> |
| 45 | + /// Acquires a connection to the specified channel. |
| 46 | + /// </summary> |
| 47 | + /// <param name="channel"> |
| 48 | + /// Which channel to connect to. |
| 49 | + /// </param> |
| 50 | + void AcquireChannel(Int32 channel); |
| 51 | + |
| 52 | + /// <summary> |
| 53 | + /// Determines if the specified channel mode is supported by the controller. |
| 54 | + /// </summary> |
| 55 | + /// <param name="channelMode"> |
| 56 | + /// The channel mode in question. |
| 57 | + /// </param> |
| 58 | + /// <returns> |
| 59 | + /// True if the specified channel mode is supported, otherwise false. |
| 60 | + /// </returns> |
| 61 | + bool IsChannelModeSupported(ProviderAdcChannelMode channelMode); |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// Gets the digital representation of the analog value on the specified channel. |
| 65 | + /// </summary> |
| 66 | + /// <param name="channelNumber"> |
| 67 | + /// Which channel to read from. |
| 68 | + /// </param> |
| 69 | + /// <returns> |
| 70 | + /// The digital representation of the analog value. |
| 71 | + /// </returns> |
| 72 | + int ReadValue(Int32 channelNumber); |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// Releases the channel connection, opening that channel for others to use. |
| 76 | + /// </summary> |
| 77 | + /// <param name="channel"> |
| 78 | + /// Which channel to close the connection to. |
| 79 | + /// </param> |
| 80 | + void ReleaseChannel(Int32 channel) |
| 81 | + } |
| 82 | +} |
0 commit comments