iio.Device class: Contains the representation of an IIO device.
More...
|
string | label [get] |
| The label of this device. More...
|
|
bool | hwmon [get] |
| True if the device is a hardware monitoring device, False if it is a IIO device. More...
|
|
List< Attr > | buffer_attrs [get] |
| A list of all the buffer attributes that this device has. More...
|
|
iio.Device class: Contains the representation of an IIO device.
◆ find_attribute()
Attr iio.Device.find_attribute |
( |
string |
attribute | ) |
|
|
inline |
Finds the attribute with the given name from the current device.
- Parameters
-
attribute | The name of the attribute. |
- Returns
- An instance of the iio.Device.DeviceAttr class.
- Exceptions
-
System.Exception | There is no attribute with the given name. |
◆ find_buffer_attribute()
Attr iio.Device.find_buffer_attribute |
( |
string |
attribute | ) |
|
|
inline |
Finds the buffer attribute with the given name from the current device.
- Parameters
-
attribute | The name of the buffer attribute. |
- Returns
- An instance of the iio.Device.DeviceBufferAttr class.
- Exceptions
-
System.Exception | There is no attribute with the given name. |
◆ find_channel()
Channel iio.Device.find_channel |
( |
string |
channel, |
|
|
bool |
output |
|
) |
| |
|
inline |
Finds the channel with the given name from the current device.
- Parameters
-
channel | The name of the channel. |
output | true if you are looking for an output channel, otherwise false. |
- Returns
- An instance of the iio.Channel class.
- Exceptions
-
System.Exception | There is no channel with the given name. |
◆ find_debug_attribute()
Attr iio.Device.find_debug_attribute |
( |
string |
attribute | ) |
|
|
inline |
Finds the debug attribute with the given name from the current device.
- Parameters
-
attribute | The name of the debug attribute. |
- Returns
- An instance of the iio.Device.DeviceDebugAttr class.
- Exceptions
-
System.Exception | There is no debug attribute with the given name. |
◆ get_channel()
Channel iio.Device.get_channel |
( |
string |
name | ) |
|
|
inline |
Get the iio.Channel object of the specified name.
- Parameters
-
name | Name or ID of the channel to look for |
- Exceptions
-
System.Exception | The IIO device with the specified name or ID could not be found in the current context. |
◆ get_context()
Gets the context of the current device.
- Returns
- An instance of the iio.Context class.
◆ get_sample_size()
uint iio.Device.get_sample_size |
( |
| ) |
|
|
inline |
Get the current sample size of the device.
The sample size varies each time channels get enabled or disabled.
- Exceptions
-
System.Exception | Internal error. Please report any bug. |
◆ get_trigger()
Get the current trigger affected to this device.
- Returns
- An instance of the iio.Trigger class.
- Exceptions
-
System.Exception | The instance could not be retrieved. |
◆ identify_filename()
int iio.Device.identify_filename |
( |
string |
filename, |
|
|
IntPtr |
chn_ptr, |
|
|
IntPtr |
attr |
|
) |
| |
|
inline |
Finds the channel attribute corresponding to the given filename from the current device.
- Parameters
-
filename | The name of the attribute. |
chn_ptr | Output variable. It will contain a pointer to the resulting iio.Channel. |
attr | Output variable. It will contain a pointer to the resulting iio.ChannelAttr. |
- Returns
- C errorcode if error encountered, otherwise 0.
◆ reg_read()
uint iio.Device.reg_read |
( |
uint |
addr | ) |
|
|
inline |
Read the content of a register of this device.
- Parameters
-
addr | The address of the register concerned. |
- Exceptions
-
System.Exception | The register could not be read. |
◆ reg_write()
void iio.Device.reg_write |
( |
uint |
addr, |
|
|
uint |
value |
|
) |
| |
|
inline |
Set a value to one register of this device.
- Parameters
-
addr | The address of the register concerned. |
value | The value that will be used for this register. |
- Exceptions
-
System.Exception | The register could not be written. |
◆ set_kernel_buffers_count()
int iio.Device.set_kernel_buffers_count |
( |
uint |
nb | ) |
|
|
inline |
Sets the number of active kernel buffers for this device.
- Parameters
-
nb | The number of kernel buffers. |
◆ set_trigger()
void iio.Device.set_trigger |
( |
Trigger |
trig | ) |
|
|
inline |
Affect a trigger to this device.
- Parameters
-
- Exceptions
-
System.Exception | The trigger could not be set. |
◆ attrs
readonly List<Attr> iio.Device.attrs |
A list
of all the attributes that this device has.
◆ channels
readonly List<Channel> iio.Device.channels |
A list
of all the iio.Channel objects that this device possesses.
◆ debug_attrs
readonly List<Attr> iio.Device.debug_attrs |
A list
of all the debug attributes that this device has.
◆ id
readonly string iio.Device.id |
An identifier of this device.
The identifier is only valid in this IIO context
◆ name
readonly string iio.Device.name |
◆ buffer_attrs
List<Attr> iio.Device.buffer_attrs |
|
get |
A list
of all the buffer attributes that this device has.
◆ hwmon
True if the device is a hardware monitoring device, False if it is a IIO device.
◆ label
The label of this device.
The documentation for this class was generated from the following file:
- /__w/1/s/bindings/csharp/Device.cs