libiio
Public Member Functions | Properties | List of all members
iio._DeviceOrTrigger Class Reference
Inheritance diagram for iio._DeviceOrTrigger:
Inheritance graph
[legend]
Collaboration diagram for iio._DeviceOrTrigger:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, _ctx, _device)
 
def reg_write (self, reg, value)
 
def reg_read (self, reg)
 
def find_channel (self, name_or_id, is_output=False)
 
- Public Member Functions inherited from iio._IIO_Object
def __init__ (self, hdl, parent)
 
def __eq__ (self, other)
 

Properties

 id
 
 name
 
 label
 
 attrs
 
 debug_attrs
 
 buffer_attrs
 
 channels
 

Member Function Documentation

◆ find_channel()

def iio._DeviceOrTrigger.find_channel (   self,
  name_or_id,
  is_output = False 
)
Find a IIO channel by its name or ID.

:param name_or_id: type=str
    The name or ID of the channel to find
:param is_output: type=bool
    Set to True to search for an output channel

returns: type=iio.Device or type=iio.Trigger
    The IIO Device

◆ reg_read()

def iio._DeviceOrTrigger.reg_read (   self,
  reg 
)
Read the content of a register of this device.

:param reg: type=int
    The register address

returns: type=int
    The value of the register

◆ reg_write()

def iio._DeviceOrTrigger.reg_write (   self,
  reg,
  value 
)
Set a value to one register of this device.

:param reg: type=int
    The register address
:param value: type=int
    The value that will be used for this register

Property Documentation

◆ attrs

iio._DeviceOrTrigger.attrs
static
Initial value:
= property(
lambda self: self._attrs,
None,
None,
"List of attributes for this IIO device.\n\ttype=dict of iio.DeviceAttr",
)

◆ buffer_attrs

iio._DeviceOrTrigger.buffer_attrs
static
Initial value:
= property(
lambda self: self._buffer_attrs,
None,
None,
"List of buffer attributes for this IIO device.\n\ttype=dict of iio.DeviceBufferAttr",
)

◆ channels

iio._DeviceOrTrigger.channels
static
Initial value:
= property(
lambda self: sorted([
Channel(self, _get_channel(self._device, x))
for x in range(0, _channels_count(self._device))
], key=lambda c: c.id),
None,
None,
"List of channels available with this IIO device.\n\ttype=list of iio.Channel objects",
)

◆ debug_attrs

iio._DeviceOrTrigger.debug_attrs
static
Initial value:
= property(
lambda self: self._debug_attrs,
None,
None,
"List of debug attributes for this IIO device.\n\ttype=dict of iio.DeviceDebugAttr",
)

◆ id

iio._DeviceOrTrigger.id
static
Initial value:
= property(
lambda self: self._id,
None,
None,
"An identifier of this device, only valid in this IIO context.\n\ttype=str",
)

◆ label

iio._DeviceOrTrigger.label
static
Initial value:
= property(
lambda self: self._label, None, None, "The label of this device.\n\ttype=str",
)

◆ name

iio._DeviceOrTrigger.name
static
Initial value:
= property(
lambda self: self._name, None, None, "The name of this device.\n\ttype=str"
)

The documentation for this class was generated from the following file: