pydevDAG._structure._pyudev._utils module — pydevDAG 1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._structure package »
- pydevDAG._structure._pyudev package »

# pydevDAG._structure._pyudev._utils module

## pydevDAG._structure._pyudev._utils

Utilities for building pyudev graphs.

class `pydevDAG._structure._pyudev._utils.` `SysfsTraversal`

  Bases: `object`

  Build simple graph from the holders or slaves of a given device.

  classmethod `do_level`(graph, context, device, config)

    Recursively defined function to generate a graph from `device`.

    Parameters: | graph (DiGraph) – the graph context (Context) – the libudev context device (Device) – the device config (SysfsTraversalConfig) – traversal configuration

  classmethod `holders`(context, device, recursive=True)

    Yield graph of slaves of device, including the device.

    Parameters: | context (Context) – the libudev context device (Device) – the device recursive (bool) – True for recursive, False otherwise
    Returns: | a graph
    Return type: | DiGraph

  classmethod `slaves`(context, device, recursive=True)

    Yield graph of slaves of device, including the device.

    Parameters: | context (Context) – the libudev context device (Device) – the device recursive (bool) – True for recursive, False otherwise
    Returns: | a graph
    Return type: | DiGraph

  classmethod `sysfs_traversal`(context, device, config)

    General graph of a sysfs traversal.

    Parameters: | context (Context) – the libudev context device (Device) – the device config (SysfsTraversalConfig) – traversal configuration
    Returns: | a graph
    Return type: | DiGraph

class `pydevDAG._structure._pyudev._utils.` `SysfsTraversalConfig`

  Bases: `tuple`

  SysfsTraversalConfig(recursive, slaves)

  `recursive`

    Alias for field number 0

  `slaves`

    Alias for field number 1

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._structure package »
- pydevDAG._structure._pyudev package »