ahio provides access to various I/O devices. More...
Namespaces | |
| abstract_driver | |
| Contains abstract classes that should be implemented by drivers. | |
| drivers | |
Functions | |
| def | list_available_drivers () |
| Returns a list of string with the names of available drivers. More... | |
| def | driver_info (name) |
| Returns driver metadata. More... | |
| def | new_driver (name) |
| Instantiates a new object of the named driver. More... | |
Variables | |
| PortType = Enum('PortType', 'Analog Digital') | |
| Direction = Enum('Direction', 'Output Input') | |
| LogicValue = Enum('LogicValue', 'Low High') | |
ahio provides access to various I/O devices.
This package provides abstracted access to various digital and analogic I/O devices, such as Arduino, Raspberry PI, MyRIO and PLC. It allows the developer to write and read data from such devices without needing to worry about the specifics of each device, and to easily switch devices without code refactoring.
The functions in this package list and instantiate the drivers. For the driver api, see ahio.abstract_driver.AbstractDriver. Driver metadata format can be found in ahio.abstract_driver.AbstractahioDriverInfo
| def ahio.driver_info | ( | name | ) |
Returns driver metadata.
Returns a class which static properties contains metadata from the driver, such as name and availability.
ahio.abstract_driver.AbstractahioDriverInfo with metadata from the driver. Definition at line 80 of file __init__.py.
| def ahio.list_available_drivers | ( | ) |
Returns a list of string with the names of available drivers.
Available means that the driver is installed and can be used. For example, it will not contain "Raspberry" if you're not running on a Raspberry Pi, even if the raspberry.py script is present in the drivers directory.
ahio.new_driver to get an instance of the desired driver. Definition at line 67 of file __init__.py.
| def ahio.new_driver | ( | name | ) |
Instantiates a new object of the named driver.
The API used by the returned object can be seen in ahio.abstract_driver.AbstractDriver
Definition at line 93 of file __init__.py.
| ahio.Direction = Enum('Direction', 'Output Input') |
Definition at line 53 of file __init__.py.
| ahio.LogicValue = Enum('LogicValue', 'Low High') |
Definition at line 54 of file __init__.py.
| ahio.PortType = Enum('PortType', 'Analog Digital') |
Definition at line 52 of file __init__.py.