Device
- class iio.Device
iio.Device class: Contains the representation of an IIO device.
Subclassed by iio.Trigger
Public Functions
- Channel get_channel (string name, bool output = false)
Get the iio.Channel object of the specified name.
- Param name:
Name, ID, or label of the channel to look for
- Param output:
true if you are looking for an output channel, otherwise false.
- Throws IioLib.IIOException:
The IIO channel with the specified name, ID, or label could not be found in the current device.
- void set_trigger (Trigger trig)
Affect a trigger to this device.
- Param trig:
A valid instance of the iio.Trigger class.
- Throws IioLib.IIOException:
The trigger could not be set.
- Trigger get_trigger ()
Get the current trigger affected to this device.
- Throws IioLib.IIOException:
The instance could not be retrieved.
- Return:
An instance of the iio.Trigger class.
- uint get_sample_size (ChannelsMask mask)
Get the current sample size of the device.
The sample size varies each time channels get enabled or disabled.
- Throws IioLib.IIOException:
Internal error. Please report any bug.
Public Members
- readonly Context ctx
Gets the context of the current device.
- readonly IReadOnlyDictionary<string, Attr> attrs
A
Dictionaryof all the attributes that this device has. Key is the attribute name.
- readonly IReadOnlyDictionary<string, Attr> debug_attrs
A
Dictionaryof all the debug attributes that this device has. Key is the attribute name.
- readonly IReadOnlyDictionary<string, Attr> event_attrs
A
Dictionaryof all the event attributes that this device has. Key is the attribute name.
- readonly IReadOnlyList<Channel> channels
A
listof all the iio.Channel objects that this device possesses.
- readonly IReadOnlyList<IOBuffer> buffers
A
listof all the iio.IOBuffer objects that this device possesses.