iio.Context class: Contains the representation of an IIO context.
More...
Inherits IDisposable.
|
| Context (string uri) |
| Initializes a new instance of the iio.Context class, using the provided URI. For compatibility with existing code, providing an IP address or a hostname here will automatically create a network context.
|
|
| Context () |
| Initializes a new instance of the iio.Context class, using the local or the network backend of the IIO library.
|
|
Context | clone () |
| Clone this instance.
|
|
Device | get_device (string name) |
| Get the iio.Device object of the specified name.
|
|
void | set_timeout (uint timeout) |
| Set a timeout for I/O operations.
|
|
void | Dispose () |
| Releases all resource used by the iio.Context object.
|
|
Device | find_device (string device) |
| Finds the device with the given name from the current context.
|
|
|
readonly string | xml |
| A XML representation of the current context.
|
|
readonly string | name |
| The name of the current context.
|
|
readonly string | description |
| Retrieve a human-readable information string about the current context.
|
|
readonly Version | library_version |
| Retrieve a information about the version context.
|
|
readonly Version | backend_version |
|
readonly List< Device > | devices |
| A List of all the IIO devices present on the current context.
|
|
|
Dictionary< string, string > | attrs [get] |
| A Dictionary of all the attributes of the current channel. (key, value) = (name, value)
|
|
iio.Context class: Contains the representation of an IIO context.
- Examples
- ExampleProgram.cs.
◆ Context() [1/2]
iio.Context.Context |
( |
string |
uri | ) |
|
|
inline |
Initializes a new instance of the iio.Context class, using the provided URI. For compatibility with existing code, providing an IP address or a hostname here will automatically create a network context.
- Parameters
-
uri | URI to use for the IIO context creation |
- Returns
- an instance of the iio.Context class
- Exceptions
-
System.Exception | The IIO context could not be created. |
◆ Context() [2/2]
Initializes a new instance of the iio.Context class, using the local or the network backend of the IIO library.
This function will create a network context if the IIOD_REMOTE environment variable is set to the hostname where the IIOD server runs. If set to an empty string, the server will be discovered using ZeroConf. If the environment variable is not set, a local context will be created instead.
- Exceptions
-
System.Exception | The IIO context could not be created. |
◆ Dispose()
void iio.Context.Dispose |
( |
| ) |
|
|
inline |
Releases all resource used by the iio.Context object.
Call Dispose when you are finished using the iio.Context. The Dispose method leaves the iio.Context in an unusable state. After calling Dispose, you must release all references to the iio.Context so the garbage collector can reclaim the memory that the iio.Context was occupying.
◆ find_device()
Device iio.Context.find_device |
( |
string |
device | ) |
|
|
inline |
Finds the device with the given name from the current context.
- Parameters
-
device | The name of the device. |
- Exceptions
-
System.Exception | There is no device with the given name. |
◆ get_device()
Device iio.Context.get_device |
( |
string |
name | ) |
|
|
inline |
Get the iio.Device object of the specified name.
- Parameters
-
name | Name or ID of the device to look for |
- Exceptions
-
System.Exception | The IIO device with the specified name or ID could not be found in the current context. |
◆ set_timeout()
void iio.Context.set_timeout |
( |
uint |
timeout | ) |
|
|
inline |
Set a timeout for I/O operations.
- Parameters
-
timeout | The timeout value, in milliseconds |
- Exceptions
-
System.Exception | The timeout could not be applied. |
The documentation for this class was generated from the following file:
- /builddir/libiio-0.25/bindings/csharp/Context.cs