labgrid.util.agents package

Submodules

labgrid.util.agents.deditec_relais8 module

labgrid.util.agents.dummy module

labgrid.util.agents.dummy.handle_neg(value)[source]

labgrid.util.agents.network_interface module

class labgrid.util.agents.network_interface.Future[source]

Bases: object

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

set(result)[source]
wait()[source]
__dict__ = mappingproxy({'__module__': 'labgrid.util.agents.network_interface', '__init__': <function Future.__init__>, 'set': <function Future.set>, 'wait': <function Future.wait>, '__dict__': <attribute '__dict__' of 'Future' objects>, '__weakref__': <attribute '__weakref__' of 'Future' objects>, '__doc__': None})
__module__ = 'labgrid.util.agents.network_interface'
__weakref__

list of weak references to the object (if defined)

class labgrid.util.agents.network_interface.BackgroundLoop[source]

Bases: threading.Thread

__init__()[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

block_on(func, *args, **kwargs)[source]
__module__ = 'labgrid.util.agents.network_interface'
labgrid.util.agents.network_interface.address_from_str(s)[source]
labgrid.util.agents.network_interface.connection_from_dict(data)[source]
class labgrid.util.agents.network_interface.NMDev(interface)[source]

Bases: object

__init__(interface)[source]

Initialize self. See help(type(self)) for accurate signature.

get_settings()[source]
get_active_settings()[source]
configure(data)[source]
wait_state(expected, timeout)[source]
disable()[source]
get_state()[source]
request_scan()[source]
get_access_points(scan)[source]
get_dhcpd_leases()[source]
__dict__ = mappingproxy({'__module__': 'labgrid.util.agents.network_interface', '__init__': <function NMDev.__init__>, '_delete_connection': <function NMDev._delete_connection>, 'get_settings': <function NMDev.get_settings>, 'get_active_settings': <function NMDev.get_active_settings>, 'configure': <function NMDev.configure>, 'wait_state': <function NMDev.wait_state>, 'disable': <function NMDev.disable>, '_flags_to_str': <function NMDev._flags_to_str>, '_accesspoint_to_dict': <function NMDev._accesspoint_to_dict>, 'get_state': <function NMDev.get_state>, 'request_scan': <function NMDev.request_scan>, 'get_access_points': <function NMDev.get_access_points>, 'get_dhcpd_leases': <function NMDev.get_dhcpd_leases>, '__dict__': <attribute '__dict__' of 'NMDev' objects>, '__weakref__': <attribute '__weakref__' of 'NMDev' objects>, '__doc__': None})
__module__ = 'labgrid.util.agents.network_interface'
__weakref__

list of weak references to the object (if defined)

labgrid.util.agents.network_interface.handle_configure(interface, settings)[source]
labgrid.util.agents.network_interface.handle_wait_state(interface, expected, timeout=60)[source]
labgrid.util.agents.network_interface.handle_disable(interface)[source]
labgrid.util.agents.network_interface.handle_get_active_settings(interface)[source]
labgrid.util.agents.network_interface.handle_get_settings(interface)[source]
labgrid.util.agents.network_interface.handle_get_state(interface)[source]
labgrid.util.agents.network_interface.handle_get_dhcpd_leases(interface)[source]
labgrid.util.agents.network_interface.handle_request_scan(interface)[source]
labgrid.util.agents.network_interface.handle_get_access_points(interface, scan=None)[source]

labgrid.util.agents.sysfsgpio module

This module implements switching GPIOs via sysfs GPIO kernel interface.

Takes an integer property ‘index’ which refers to the already exported GPIO device.

class labgrid.util.agents.sysfsgpio.GpioDigitalOutput(index)[source]

Bases: object

__init__(index)[source]

Initialize self. See help(type(self)) for accurate signature.

__del__()[source]
get()[source]
set(status)[source]
__dict__ = mappingproxy({'__module__': 'labgrid.util.agents.sysfsgpio', '_gpio_sysfs_path_prefix': '/sys/class/gpio', '_assert_gpio_line_is_exported': <staticmethod object>, '__init__': <function GpioDigitalOutput.__init__>, '__del__': <function GpioDigitalOutput.__del__>, 'get': <function GpioDigitalOutput.get>, 'set': <function GpioDigitalOutput.set>, '__dict__': <attribute '__dict__' of 'GpioDigitalOutput' objects>, '__weakref__': <attribute '__weakref__' of 'GpioDigitalOutput' objects>, '__doc__': None})
__module__ = 'labgrid.util.agents.sysfsgpio'
__weakref__

list of weak references to the object (if defined)

labgrid.util.agents.sysfsgpio.handle_set(index, status)[source]
labgrid.util.agents.sysfsgpio.handle_get(index)[source]

labgrid.util.agents.usb_hid_relay module