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

Table Of Contents

Previous topic

pydevDAG._structure._pyudev._types module

Next topic

pydevDAG._structure._utils module

This Page