| @@ -16,21 +16,21 @@ individually. | |||||||
|     page for more information. |     page for more information. | ||||||
|  |  | ||||||
| LEDBoard | LEDBoard | ||||||
| ========= | ======== | ||||||
|  |  | ||||||
| .. autoclass:: LEDBoard(\*pins, pwm=False, active_high=True, initial_value=False, \*\*named_pins) | .. autoclass:: LEDBoard(\*pins, pwm=False, active_high=True, initial_value=False, \*\*named_pins) | ||||||
|     :inherited-members: |     :inherited-members: | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
| LEDBarGraph | LEDBarGraph | ||||||
| ============= | =========== | ||||||
|  |  | ||||||
| .. autoclass:: LEDBarGraph(\*pins, initial_value=0) | .. autoclass:: LEDBarGraph(\*pins, initial_value=0) | ||||||
|     :inherited-members: |     :inherited-members: | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
| TrafficLights | TrafficLights | ||||||
| ============== | ============= | ||||||
|  |  | ||||||
| .. autoclass:: TrafficLights | .. autoclass:: TrafficLights | ||||||
|     :inherited-members: |     :inherited-members: | ||||||
| @@ -106,3 +106,38 @@ Energenie | |||||||
|     :inherited-members: |     :inherited-members: | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|  | Base Classes | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | The classes in the sections above are derived from a series of base classes, | ||||||
|  | some of which are effectively abstract. The classes form the (partial) | ||||||
|  | hierarchy displayed in the graph below: | ||||||
|  |  | ||||||
|  | .. image:: images/composite_device_hierarchy.* | ||||||
|  |  | ||||||
|  | For composite devices, the following chart shows which devices are composed of | ||||||
|  | which other devices: | ||||||
|  |  | ||||||
|  | .. image:: images/composed_devices.* | ||||||
|  |  | ||||||
|  | The following sections document these base classes for advanced users that wish | ||||||
|  | to construct classes for their own devices. | ||||||
|  |  | ||||||
|  | LEDCollection | ||||||
|  | ============= | ||||||
|  |  | ||||||
|  | .. autoclass:: LEDCollection | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | CompositeOutputDevice | ||||||
|  | ===================== | ||||||
|  |  | ||||||
|  | .. autoclass:: CompositeOutputDevice(\*args, _order=None, \*\*kwargs) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | CompositeDevice | ||||||
|  | =============== | ||||||
|  |  | ||||||
|  | .. autoclass:: CompositeDevice(\*args, _order=None, \*\*kwargs) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| =============== | =============== | ||||||
| Generic Devices | Generic Classes | ||||||
| =============== | =============== | ||||||
|  |  | ||||||
| .. currentmodule:: gpiozero | .. currentmodule:: gpiozero | ||||||
|  |  | ||||||
| The GPIO Zero class hierarchy is quite extensive. It contains several base | The GPIO Zero class hierarchy is quite extensive. It contains several base | ||||||
| classes: | classes (most of which are documented in their corresponding chapters): | ||||||
|  |  | ||||||
| * :class:`Device` is the root of the hierarchy, implementing base functionality | * :class:`Device` is the root of the hierarchy, implementing base functionality | ||||||
|   like :meth:`~Device.close` and context manager handlers. |   like :meth:`~Device.close` and context manager handlers. | ||||||
| @@ -22,125 +22,46 @@ classes: | |||||||
| * :class:`CompositeDevice` represents devices composed of multiple other | * :class:`CompositeDevice` represents devices composed of multiple other | ||||||
|   devices like HATs |   devices like HATs | ||||||
|  |  | ||||||
| There are also several `mixin classes`_: | There are also several `mixin classes`_ for adding important functionality | ||||||
|  | at numerous points in the hierarchy, which is illustrated below: | ||||||
|  |  | ||||||
| * :class:`ValuesMixin` which defines the ``values`` properties; there is rarely | .. image:: images/device_hierarchy.* | ||||||
|   a need to use this as the base classes mentioned above both include it |  | ||||||
|   (so all classes in GPIO Zero include the ``values`` property) |  | ||||||
|  |  | ||||||
| * :class:`SourceMixin` which defines the ``source`` property; this is generally |  | ||||||
|   included in novel output device classes |  | ||||||
|  |  | ||||||
| * :class:`SharedMixin` which causes classes to track their construction and |  | ||||||
|   return existing instances when equivalent constructor arguments are passed |  | ||||||
|  |  | ||||||
| * :class:`EventsMixin` which adds activated/deactivated events to devices |  | ||||||
|   along with the machinery to trigger those events |  | ||||||
|  |  | ||||||
| * :class:`HoldMixin` which derives from :class:`EventsMixin` and adds the |  | ||||||
|   held event to devices along with the machinery to repeatedly trigger it |  | ||||||
|  |  | ||||||
| .. _mixin classes: https://en.wikipedia.org/wiki/Mixin | .. _mixin classes: https://en.wikipedia.org/wiki/Mixin | ||||||
|  |  | ||||||
| The current class hierarchies are displayed below. For brevity, the mixin | Device | ||||||
| classes (and some other details) are omitted, and the chart is broken into | ====== | ||||||
| pieces by base class. The lighter boxes represent classes that are "effectively |  | ||||||
| abstract". These classes aren't directly useful without sub-classing them and |  | ||||||
| adding bits. |  | ||||||
|  |  | ||||||
| First, the classes below :class:`GPIODevice`: |  | ||||||
|  |  | ||||||
| .. image:: images/gpio_device_hierarchy.* |  | ||||||
|  |  | ||||||
| Next, the classes below :class:`SPIDevice`: |  | ||||||
|  |  | ||||||
| .. image:: images/spi_device_hierarchy.* |  | ||||||
|  |  | ||||||
| Next, the classes below :class:`InternalDevice`: |  | ||||||
|  |  | ||||||
| .. image:: images/other_device_hierarchy.* |  | ||||||
|  |  | ||||||
| Next, the classes below :class:`CompositeDevice`: |  | ||||||
|  |  | ||||||
| .. image:: images/composite_device_hierarchy.* |  | ||||||
|  |  | ||||||
| Finally, for composite devices, the following chart shows which devices are |  | ||||||
| composed of which other devices: |  | ||||||
|  |  | ||||||
| .. image:: images/composed_devices.* |  | ||||||
|  |  | ||||||
| Base Classes |  | ||||||
| ============ |  | ||||||
|  |  | ||||||
| .. autoclass:: Device | .. autoclass:: Device | ||||||
|     :members: close, closed, value, is_active |     :members: close, closed, value, is_active | ||||||
|  |  | ||||||
| .. autoclass:: GPIODevice(pin) | ValuesMixin | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: SPIDevice |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: InternalDevice() |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: CompositeDevice(\*args, _order=None, \*\*kwargs) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: CompositeOutputDevice(\*args, _order=None, \*\*kwargs) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| Input Devices |  | ||||||
| ============= |  | ||||||
|  |  | ||||||
| .. autoclass:: InputDevice(pin, pull_up=False) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: DigitalInputDevice(pin, pull_up=False, bounce_time=None) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: SmoothedInputDevice |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| Output Devices |  | ||||||
| ============== |  | ||||||
|  |  | ||||||
| .. autoclass:: OutputDevice(pin, active_high=True, initial_value=False) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: DigitalOutputDevice(pin, active_high=True, initial_value=False) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| .. autoclass:: PWMOutputDevice(pin, active_high=True, initial_value=0, frequency=100) |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| SPI Devices |  | ||||||
| =========== | =========== | ||||||
|  |  | ||||||
| .. autoclass:: AnalogInputDevice |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| Composite Devices |  | ||||||
| ================= |  | ||||||
|  |  | ||||||
| .. autoclass:: LEDCollection |  | ||||||
|     :members: |  | ||||||
|  |  | ||||||
| Mixin Classes |  | ||||||
| ============= |  | ||||||
|  |  | ||||||
| .. autoclass:: ValuesMixin(...) | .. autoclass:: ValuesMixin(...) | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|  | SourceMixin | ||||||
|  | =========== | ||||||
|  |  | ||||||
| .. autoclass:: SourceMixin(...) | .. autoclass:: SourceMixin(...) | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|  | SharedMixin | ||||||
|  | =========== | ||||||
|  |  | ||||||
| .. autoclass:: SharedMixin(...) | .. autoclass:: SharedMixin(...) | ||||||
|     :members: _shared_key |     :members: _shared_key | ||||||
|  |  | ||||||
|  | EventsMixin | ||||||
|  | =========== | ||||||
|  |  | ||||||
| .. autoclass:: EventsMixin(...) | .. autoclass:: EventsMixin(...) | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|  | HoldMixin | ||||||
|  | ========= | ||||||
|  |  | ||||||
| .. autoclass:: HoldMixin(...) | .. autoclass:: HoldMixin(...) | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -47,3 +47,39 @@ Distance Sensor (HC-SR04) | |||||||
| .. autoclass:: DistanceSensor(echo, trigger, queue_len=30, max_distance=1, threshold_distance=0.3, partial=False) | .. autoclass:: DistanceSensor(echo, trigger, queue_len=30, max_distance=1, threshold_distance=0.3, partial=False) | ||||||
|     :members: wait_for_in_range, wait_for_out_of_range, trigger, echo, when_in_range, when_out_of_range, max_distance, distance, threshold_distance |     :members: wait_for_in_range, wait_for_out_of_range, trigger, echo, when_in_range, when_out_of_range, max_distance, distance, threshold_distance | ||||||
|  |  | ||||||
|  | Base Classes | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | The classes in the sections above are derived from a series of base classes, | ||||||
|  | some of which are effectively abstract. The classes form the (partial) | ||||||
|  | hierarchy displayed in the graph below: | ||||||
|  |  | ||||||
|  | .. image:: images/input_device_hierarchy.* | ||||||
|  |  | ||||||
|  | The following sections document these base classes for advanced users that wish | ||||||
|  | to construct classes for their own devices. | ||||||
|  |  | ||||||
|  | DigitalInputDevice | ||||||
|  | ================== | ||||||
|  |  | ||||||
|  | .. autoclass:: DigitalInputDevice(pin, pull_up=False, bounce_time=None) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | SmoothedInputDevice | ||||||
|  | =================== | ||||||
|  |  | ||||||
|  | .. autoclass:: SmoothedInputDevice | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | InputDevice | ||||||
|  | =========== | ||||||
|  |  | ||||||
|  | .. autoclass:: InputDevice(pin, pull_up=False) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | GPIODevice | ||||||
|  | ========== | ||||||
|  |  | ||||||
|  | .. autoclass:: GPIODevice(pin) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,7 +8,38 @@ GPIO Zero also provides several "internal" devices which represent facilities | |||||||
| provided by the operating system itself. These can be used to react to things | provided by the operating system itself. These can be used to react to things | ||||||
| like the time of day, or whether a server is available on the network. | like the time of day, or whether a server is available on the network. | ||||||
|  |  | ||||||
|  | .. warning:: | ||||||
|  |  | ||||||
|  |     These devices are experimental and their API is not yet considered stable. | ||||||
|  |     We welcome any comments from testers, especially regarding new "internal | ||||||
|  |     devices" that you'd find useful! | ||||||
|  |  | ||||||
|  |  | ||||||
|  | TimeOfDay | ||||||
|  | ========= | ||||||
|  |  | ||||||
| .. autoclass:: TimeOfDay | .. autoclass:: TimeOfDay | ||||||
|  |  | ||||||
|  | PingServer | ||||||
|  | ========== | ||||||
|  |  | ||||||
| .. autoclass:: PingServer | .. autoclass:: PingServer | ||||||
|  |  | ||||||
|  | Base Classes | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | The classes in the sections above are derived from a series of base classes, | ||||||
|  | some of which are effectively abstract. The classes form the (partial) | ||||||
|  | hierarchy displayed in the graph below: | ||||||
|  |  | ||||||
|  | .. image:: images/other_device_hierarchy.* | ||||||
|  |  | ||||||
|  | The following sections document these base classes for advanced users that wish | ||||||
|  | to construct classes for their own devices. | ||||||
|  |  | ||||||
|  | InternalDevice | ||||||
|  | ============== | ||||||
|  |  | ||||||
|  | .. autoclass:: InternalDevice() | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -42,3 +42,41 @@ Motor | |||||||
|  |  | ||||||
| .. autoclass:: Motor(forward, backward) | .. autoclass:: Motor(forward, backward) | ||||||
|     :members: forward, backward, stop |     :members: forward, backward, stop | ||||||
|  |  | ||||||
|  | Base Classes | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | The classes in the sections above are derived from a series of base classes, | ||||||
|  | some of which are effectively abstract. The classes form the (partial) | ||||||
|  | hierarchy displayed in the graph below: | ||||||
|  |  | ||||||
|  | .. image:: images/output_device_hierarchy.* | ||||||
|  |  | ||||||
|  | The following sections document these base classes for advanced users that wish | ||||||
|  | to construct classes for their own devices. | ||||||
|  |  | ||||||
|  | DigitalOutputDevice | ||||||
|  | =================== | ||||||
|  |  | ||||||
|  | .. autoclass:: DigitalOutputDevice(pin, active_high=True, initial_value=False) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | PWMOutputDevice | ||||||
|  | =============== | ||||||
|  |  | ||||||
|  | .. autoclass:: PWMOutputDevice(pin, active_high=True, initial_value=0, frequency=100) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | OutputDevice | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | .. autoclass:: OutputDevice(pin, active_high=True, initial_value=False) | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | GPIODevice | ||||||
|  | ========== | ||||||
|  |  | ||||||
|  | .. autoclass:: GPIODevice(pin) | ||||||
|  |     :members: | ||||||
|  |     :noindex: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -83,12 +83,24 @@ implementation if not. | |||||||
| Analog to Digital Converters (ADC) | Analog to Digital Converters (ADC) | ||||||
| ================================== | ================================== | ||||||
|  |  | ||||||
|  | .. autoclass:: MCP3001 | ||||||
|  |     :members: value | ||||||
|  |  | ||||||
|  | .. autoclass:: MCP3002 | ||||||
|  |     :members: channel, value, differential | ||||||
|  |  | ||||||
| .. autoclass:: MCP3004 | .. autoclass:: MCP3004 | ||||||
|     :members: channel, value, differential |     :members: channel, value, differential | ||||||
|  |  | ||||||
| .. autoclass:: MCP3008 | .. autoclass:: MCP3008 | ||||||
|     :members: channel, value, differential |     :members: channel, value, differential | ||||||
|  |  | ||||||
|  | .. autoclass:: MCP3201 | ||||||
|  |     :members: value | ||||||
|  |  | ||||||
|  | .. autoclass:: MCP3202 | ||||||
|  |     :members: channel, value, differential | ||||||
|  |  | ||||||
| .. autoclass:: MCP3204 | .. autoclass:: MCP3204 | ||||||
|     :members: channel, value, differential |     :members: channel, value, differential | ||||||
|  |  | ||||||
| @@ -104,3 +116,27 @@ Analog to Digital Converters (ADC) | |||||||
| .. autoclass:: MCP3304 | .. autoclass:: MCP3304 | ||||||
|     :members: channel, value, differential |     :members: channel, value, differential | ||||||
|  |  | ||||||
|  | Base Classes | ||||||
|  | ============ | ||||||
|  |  | ||||||
|  | The classes in the sections above are derived from a series of base classes, | ||||||
|  | some of which are effectively abstract. The classes form the (partial) | ||||||
|  | hierarchy displayed in the graph below: | ||||||
|  |  | ||||||
|  | .. image:: images/spi_device_hierarchy.* | ||||||
|  |  | ||||||
|  | The following sections document these base classes for advanced users that wish | ||||||
|  | to construct classes for their own devices. | ||||||
|  |  | ||||||
|  | AnalogInputDevice | ||||||
|  | ================= | ||||||
|  |  | ||||||
|  | .. autoclass:: AnalogInputDevice | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  | SPIDevice | ||||||
|  | ========= | ||||||
|  |  | ||||||
|  | .. autoclass:: SPIDevice | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -17,16 +17,23 @@ Given that :attr:`~gpiozero.SourceMixin.source` and | |||||||
| excellent source of utilities is the :mod:`itertools` module in the standard | excellent source of utilities is the :mod:`itertools` module in the standard | ||||||
| library. | library. | ||||||
|  |  | ||||||
|  | .. warning:: | ||||||
|  |  | ||||||
|  |     While the devices API is now considered stable and won't change in | ||||||
|  |     backwards incompatible ways, the tools API is *not* yet considered stable. | ||||||
|  |     It is potentially subject to change in future versions. We welcome any | ||||||
|  |     comments from testers! | ||||||
|  |  | ||||||
| Single source conversions | Single source conversions | ||||||
| ========================= | ========================= | ||||||
|  |  | ||||||
| .. autofunction:: negated | .. autofunction:: absoluted | ||||||
|  |  | ||||||
|  | .. autofunction:: clamped | ||||||
|  |  | ||||||
| .. autofunction:: inverted | .. autofunction:: inverted | ||||||
|  |  | ||||||
| .. autofunction:: scaled | .. autofunction:: negated | ||||||
|  |  | ||||||
| .. autofunction:: clamped |  | ||||||
|  |  | ||||||
| .. autofunction:: post_delayed | .. autofunction:: post_delayed | ||||||
|  |  | ||||||
| @@ -36,21 +43,23 @@ Single source conversions | |||||||
|  |  | ||||||
| .. autofunction:: queued | .. autofunction:: queued | ||||||
|  |  | ||||||
|  | .. autofunction:: scaled | ||||||
|  |  | ||||||
| Combining sources | Combining sources | ||||||
| ================= | ================= | ||||||
|  |  | ||||||
| .. autofunction:: conjunction | .. autofunction:: all_values | ||||||
|  |  | ||||||
| .. autofunction:: disjunction | .. autofunction:: any_values | ||||||
|  |  | ||||||
| .. autofunction:: averaged | .. autofunction:: averaged | ||||||
|  |  | ||||||
| Artifical sources | Artifical sources | ||||||
| ================= | ================= | ||||||
|  |  | ||||||
|  | .. autofunction:: cos_values | ||||||
|  |  | ||||||
| .. autofunction:: random_values | .. autofunction:: random_values | ||||||
|  |  | ||||||
| .. autofunction:: sin_values | .. autofunction:: sin_values | ||||||
|  |  | ||||||
| .. autofunction:: cos_values |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -31,6 +31,6 @@ digraph classes { | |||||||
|     Robot->CompositeDevice; |     Robot->CompositeDevice; | ||||||
|     RyanteckRobot->Robot; |     RyanteckRobot->Robot; | ||||||
|     CamJamKitRobot->Robot; |     CamJamKitRobot->Robot; | ||||||
|  |  | ||||||
|     Motor->CompositeDevice; |     Motor->CompositeDevice; | ||||||
|  |     Energenie->Device; | ||||||
| } | } | ||||||
|   | |||||||
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 46 KiB | 
| @@ -1,7 +1,7 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||||||
|  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||||||
| <!-- Generated by graphviz version 2.36.0 (20140111.2315) | <!-- Generated by graphviz version 2.38.0 (20140413.2041) | ||||||
|  --> |  --> | ||||||
| <!-- Title: classes Pages: 1 --> | <!-- Title: classes Pages: 1 --> | ||||||
| <svg width="587pt" height="476pt" | <svg width="587pt" height="476pt" | ||||||
| @@ -11,8 +11,8 @@ | |||||||
| <polygon fill="white" stroke="none" points="-4,4 -4,-472 583,-472 583,4 -4,4"/> | <polygon fill="white" stroke="none" points="-4,4 -4,-472 583,-472 583,4 -4,4"/> | ||||||
| <!-- Device --> | <!-- Device --> | ||||||
| <g id="node1" class="node"><title>Device</title> | <g id="node1" class="node"><title>Device</title> | ||||||
| <polygon fill="#9ec6e0" stroke="#9ec6e0" points="449,-468 395,-468 395,-432 449,-432 449,-468"/> | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="499,-468 445,-468 445,-432 499,-432 499,-468"/> | ||||||
| <text text-anchor="middle" x="422" y="-447.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> | <text text-anchor="middle" x="472" y="-447.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> | ||||||
| </g> | </g> | ||||||
| <!-- CompositeDevice --> | <!-- CompositeDevice --> | ||||||
| <g id="node2" class="node"><title>CompositeDevice</title> | <g id="node2" class="node"><title>CompositeDevice</title> | ||||||
| @@ -21,8 +21,8 @@ | |||||||
| </g> | </g> | ||||||
| <!-- CompositeDevice->Device --> | <!-- CompositeDevice->Device --> | ||||||
| <g id="edge1" class="edge"><title>CompositeDevice->Device</title> | <g id="edge1" class="edge"><title>CompositeDevice->Device</title> | ||||||
| <path fill="none" stroke="black" d="M422,-396.303C422,-404.017 422,-413.288 422,-421.888"/> | <path fill="none" stroke="black" d="M434.36,-396.303C440.233,-404.526 447.369,-414.517 453.842,-423.579"/> | ||||||
| <polygon fill="black" stroke="black" points="418.5,-421.896 422,-431.896 425.5,-421.896 418.5,-421.896"/> | <polygon fill="black" stroke="black" points="451.122,-425.793 459.783,-431.896 456.818,-421.724 451.122,-425.793"/> | ||||||
| </g> | </g> | ||||||
| <!-- CompositeOutputDevice --> | <!-- CompositeOutputDevice --> | ||||||
| <g id="node3" class="node"><title>CompositeOutputDevice</title> | <g id="node3" class="node"><title>CompositeOutputDevice</title> | ||||||
| @@ -174,5 +174,15 @@ | |||||||
| <path fill="none" stroke="black" d="M476.202,-324.303C467.396,-332.865 456.618,-343.344 446.999,-352.696"/> | <path fill="none" stroke="black" d="M476.202,-324.303C467.396,-332.865 456.618,-343.344 446.999,-352.696"/> | ||||||
| <polygon fill="black" stroke="black" points="444.323,-350.415 439.593,-359.896 449.203,-355.434 444.323,-350.415"/> | <polygon fill="black" stroke="black" points="444.323,-350.415 439.593,-359.896 449.203,-355.434 444.323,-350.415"/> | ||||||
| </g> | </g> | ||||||
|  | <!-- Energenie --> | ||||||
|  | <g id="node18" class="node"><title>Energenie</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="555.5,-396 490.5,-396 490.5,-360 555.5,-360 555.5,-396"/> | ||||||
|  | <text text-anchor="middle" x="523" y="-375.5" font-family="Sans" font-size="10.00" fill="#ffffff">Energenie</text> | ||||||
|  | </g> | ||||||
|  | <!-- Energenie->Device --> | ||||||
|  | <g id="edge17" class="edge"><title>Energenie->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M510.393,-396.303C504.403,-404.526 497.124,-414.517 490.521,-423.579"/> | ||||||
|  | <polygon fill="black" stroke="black" points="487.522,-421.752 484.462,-431.896 493.179,-425.874 487.522,-421.752"/> | ||||||
|  | </g> | ||||||
| </g> | </g> | ||||||
| </svg> | </svg> | ||||||
|   | |||||||
| Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB | 
							
								
								
									
										99
									
								
								docs/images/device_hierarchy.dot
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,99 @@ | |||||||
|  | /* vim: set et sw=4 sts=4: */ | ||||||
|  |  | ||||||
|  | digraph classes { | ||||||
|  |     graph [rankdir=BT]; | ||||||
|  |     node [shape=rect, style=filled, fontname=Sans, fontsize=10]; | ||||||
|  |     edge []; | ||||||
|  |  | ||||||
|  |     /* Mixin classes */ | ||||||
|  |     node [color="#c69ee0", fontcolor="#000000"] | ||||||
|  |  | ||||||
|  |     ValuesMixin; | ||||||
|  |     SourceMixin; | ||||||
|  |     SharedMixin; | ||||||
|  |     EventsMixin; | ||||||
|  |     HoldMixin; | ||||||
|  |  | ||||||
|  |     /* Abstract classes */ | ||||||
|  |     node [color="#9ec6e0", fontcolor="#000000"] | ||||||
|  |  | ||||||
|  |     Device; | ||||||
|  |     GPIODevice; | ||||||
|  |  | ||||||
|  |     SmoothedInputDevice; | ||||||
|  |     AnalogInputDevice; | ||||||
|  |     MCP3xxx; | ||||||
|  |     MCP33xx; | ||||||
|  |     CompositeDevice; | ||||||
|  |     CompositeOutputDevice; | ||||||
|  |     LEDCollection; | ||||||
|  |     InternalDevice; | ||||||
|  |  | ||||||
|  |     GPIODevice->Device; | ||||||
|  |     Device->ValuesMixin; | ||||||
|  |  | ||||||
|  |     /* Concrete classes */ | ||||||
|  |     node [color="#2980b9", fontcolor="#ffffff"]; | ||||||
|  |  | ||||||
|  |     InputDevice->GPIODevice; | ||||||
|  |     DigitalInputDevice->InputDevice; | ||||||
|  |     DigitalInputDevice->EventsMixin; | ||||||
|  |     SmoothedInputDevice->InputDevice; | ||||||
|  |     SmoothedInputDevice->EventsMixin; | ||||||
|  |     Button->DigitalInputDevice; | ||||||
|  |     Button->HoldMixin; | ||||||
|  |     MotionSensor->SmoothedInputDevice; | ||||||
|  |     LightSensor->SmoothedInputDevice; | ||||||
|  |     LineSensor->SmoothedInputDevice; | ||||||
|  |     DistanceSensor->SmoothedInputDevice; | ||||||
|  |  | ||||||
|  |     OutputDevice->GPIODevice; | ||||||
|  |     OutputDevice->SourceMixin; | ||||||
|  |     DigitalOutputDevice->OutputDevice; | ||||||
|  |     LED->DigitalOutputDevice; | ||||||
|  |     Buzzer->DigitalOutputDevice; | ||||||
|  |     PWMOutputDevice->OutputDevice; | ||||||
|  |     PWMLED->PWMOutputDevice; | ||||||
|  |     RGBLED->Device; | ||||||
|  |     RGBLED->SourceMixin; | ||||||
|  |  | ||||||
|  |     SPIDevice->Device; | ||||||
|  |     AnalogInputDevice->SPIDevice; | ||||||
|  |     MCP3xxx->AnalogInputDevice; | ||||||
|  |     MCP33xx->MCP3xxx; | ||||||
|  |     MCP3004->MCP3xxx; | ||||||
|  |     MCP3008->MCP3xxx; | ||||||
|  |     MCP3204->MCP3xxx; | ||||||
|  |     MCP3208->MCP3xxx; | ||||||
|  |     MCP3301->MCP33xx; | ||||||
|  |     MCP3302->MCP33xx; | ||||||
|  |     MCP3304->MCP33xx; | ||||||
|  |  | ||||||
|  |     CompositeDevice->Device; | ||||||
|  |     CompositeOutputDevice->CompositeDevice; | ||||||
|  |     CompositeOutputDevice->SourceMixin; | ||||||
|  |     LEDCollection->CompositeOutputDevice; | ||||||
|  |     LEDBoard->LEDCollection; | ||||||
|  |     LEDBarGraph->LEDCollection; | ||||||
|  |     PiLiter->LEDBoard; | ||||||
|  |     PiLiterBarGraph->LEDBarGraph; | ||||||
|  |     TrafficLights->LEDBoard; | ||||||
|  |     PiTraffic->TrafficLights; | ||||||
|  |     TrafficLightsBuzzer->CompositeOutputDevice; | ||||||
|  |     FishDish->TrafficLightsBuzzer; | ||||||
|  |     TrafficHat->TrafficLightsBuzzer; | ||||||
|  |     Robot->CompositeDevice; | ||||||
|  |     Robot->SourceMixin; | ||||||
|  |     Energenie->Device; | ||||||
|  |     Energenie->SourceMixin; | ||||||
|  |     RyanteckRobot->Robot; | ||||||
|  |     CamJamKitRobot->Robot; | ||||||
|  |     Motor->CompositeDevice; | ||||||
|  |     Motor->SourceMixin; | ||||||
|  |  | ||||||
|  |     InternalDevice->Device; | ||||||
|  |     InternalDevice->EventsMixin; | ||||||
|  |     TimeOfDay->InternalDevice; | ||||||
|  |     PingServer->InternalDevice; | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								docs/images/device_hierarchy.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								docs/images/device_hierarchy.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 164 KiB | 
							
								
								
									
										568
									
								
								docs/images/device_hierarchy.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,568 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
|  | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||||||
|  |  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||||||
|  | <!-- Generated by graphviz version 2.36.0 (20140111.2315) | ||||||
|  |  --> | ||||||
|  | <!-- Title: classes Pages: 1 --> | ||||||
|  | <svg width="1698pt" height="548pt" | ||||||
|  |  viewBox="0.00 0.00 1698.00 548.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||||
|  | <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 544)"> | ||||||
|  | <title>classes</title> | ||||||
|  | <polygon fill="white" stroke="none" points="-4,4 -4,-544 1694,-544 1694,4 -4,4"/> | ||||||
|  | <!-- ValuesMixin --> | ||||||
|  | <g id="node1" class="node"><title>ValuesMixin</title> | ||||||
|  | <polygon fill="#c69ee0" stroke="#c69ee0" points="602,-540 530,-540 530,-504 602,-504 602,-540"/> | ||||||
|  | <text text-anchor="middle" x="566" y="-519.5" font-family="Sans" font-size="10.00" fill="#000000">ValuesMixin</text> | ||||||
|  | </g> | ||||||
|  | <!-- SourceMixin --> | ||||||
|  | <g id="node2" class="node"><title>SourceMixin</title> | ||||||
|  | <polygon fill="#c69ee0" stroke="#c69ee0" points="448,-396 374,-396 374,-360 448,-360 448,-396"/> | ||||||
|  | <text text-anchor="middle" x="411" y="-375.5" font-family="Sans" font-size="10.00" fill="#000000">SourceMixin</text> | ||||||
|  | </g> | ||||||
|  | <!-- SharedMixin --> | ||||||
|  | <g id="node3" class="node"><title>SharedMixin</title> | ||||||
|  | <polygon fill="#c69ee0" stroke="#c69ee0" points="423.5,-36 348.5,-36 348.5,-0 423.5,-0 423.5,-36"/> | ||||||
|  | <text text-anchor="middle" x="386" y="-15.5" font-family="Sans" font-size="10.00" fill="#000000">SharedMixin</text> | ||||||
|  | </g> | ||||||
|  | <!-- EventsMixin --> | ||||||
|  | <g id="node4" class="node"><title>EventsMixin</title> | ||||||
|  | <polygon fill="#c69ee0" stroke="#c69ee0" points="725.5,-324 652.5,-324 652.5,-288 725.5,-288 725.5,-324"/> | ||||||
|  | <text text-anchor="middle" x="689" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">EventsMixin</text> | ||||||
|  | </g> | ||||||
|  | <!-- HoldMixin --> | ||||||
|  | <g id="node5" class="node"><title>HoldMixin</title> | ||||||
|  | <polygon fill="#c69ee0" stroke="#c69ee0" points="785,-252 723,-252 723,-216 785,-216 785,-252"/> | ||||||
|  | <text text-anchor="middle" x="754" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">HoldMixin</text> | ||||||
|  | </g> | ||||||
|  | <!-- Device --> | ||||||
|  | <g id="node6" class="node"><title>Device</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="593,-468 539,-468 539,-432 593,-432 593,-468"/> | ||||||
|  | <text text-anchor="middle" x="566" y="-447.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> | ||||||
|  | </g> | ||||||
|  | <!-- Device->ValuesMixin --> | ||||||
|  | <g id="edge2" class="edge"><title>Device->ValuesMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M566,-468.303C566,-476.017 566,-485.288 566,-493.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="562.5,-493.896 566,-503.896 569.5,-493.896 562.5,-493.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice --> | ||||||
|  | <g id="node7" class="node"><title>GPIODevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="858,-396 786,-396 786,-360 858,-360 858,-396"/> | ||||||
|  | <text text-anchor="middle" x="822" y="-375.5" font-family="Sans" font-size="10.00" fill="#000000">GPIODevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice->Device --> | ||||||
|  | <g id="edge1" class="edge"><title>GPIODevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M785.864,-388.881C737.483,-402.11 652.094,-425.459 603.185,-438.832"/> | ||||||
|  | <polygon fill="black" stroke="black" points="602.051,-435.514 593.328,-441.527 603.897,-442.266 602.051,-435.514"/> | ||||||
|  | </g> | ||||||
|  | <!-- SmoothedInputDevice --> | ||||||
|  | <g id="node8" class="node"><title>SmoothedInputDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="926.5,-252 803.5,-252 803.5,-216 926.5,-216 926.5,-252"/> | ||||||
|  | <text text-anchor="middle" x="865" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">SmoothedInputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- SmoothedInputDevice->EventsMixin --> | ||||||
|  | <g id="edge7" class="edge"><title>SmoothedInputDevice->EventsMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M821.946,-252.124C795.57,-262.614 761.832,-276.033 734.943,-286.727"/> | ||||||
|  | <polygon fill="black" stroke="black" points="733.372,-283.585 725.373,-290.533 735.959,-290.09 733.372,-283.585"/> | ||||||
|  | </g> | ||||||
|  | <!-- InputDevice --> | ||||||
|  | <g id="node16" class="node"><title>InputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="858.5,-324 785.5,-324 785.5,-288 858.5,-288 858.5,-324"/> | ||||||
|  | <text text-anchor="middle" x="822" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">InputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- SmoothedInputDevice->InputDevice --> | ||||||
|  | <g id="edge6" class="edge"><title>SmoothedInputDevice->InputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M854.371,-252.303C849.372,-260.441 843.309,-270.311 837.788,-279.299"/> | ||||||
|  | <polygon fill="black" stroke="black" points="834.759,-277.543 832.507,-287.896 840.723,-281.207 834.759,-277.543"/> | ||||||
|  | </g> | ||||||
|  | <!-- AnalogInputDevice --> | ||||||
|  | <g id="node9" class="node"><title>AnalogInputDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="1306,-324 1200,-324 1200,-288 1306,-288 1306,-324"/> | ||||||
|  | <text text-anchor="middle" x="1253" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">AnalogInputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- SPIDevice --> | ||||||
|  | <g id="node30" class="node"><title>SPIDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1112,-396 1048,-396 1048,-360 1112,-360 1112,-396"/> | ||||||
|  | <text text-anchor="middle" x="1080" y="-375.5" font-family="Sans" font-size="10.00" fill="#ffffff">SPIDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- AnalogInputDevice->SPIDevice --> | ||||||
|  | <g id="edge24" class="edge"><title>AnalogInputDevice->SPIDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1210.68,-324.124C1183.6,-335.083 1148.61,-349.237 1121.66,-360.144"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1120.08,-357.007 1112.12,-364.003 1122.7,-363.496 1120.08,-357.007"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3xxx --> | ||||||
|  | <g id="node10" class="node"><title>MCP3xxx</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="1488.5,-252 1429.5,-252 1429.5,-216 1488.5,-216 1488.5,-252"/> | ||||||
|  | <text text-anchor="middle" x="1459" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">MCP3xxx</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3xxx->AnalogInputDevice --> | ||||||
|  | <g id="edge25" class="edge"><title>MCP3xxx->AnalogInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1429.49,-245.029C1399.13,-255.345 1351,-271.699 1312.66,-284.726"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1311.49,-281.429 1303.15,-287.96 1313.74,-288.056 1311.49,-281.429"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP33xx --> | ||||||
|  | <g id="node11" class="node"><title>MCP33xx</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="1450,-180 1390,-180 1390,-144 1450,-144 1450,-180"/> | ||||||
|  | <text text-anchor="middle" x="1420" y="-159.5" font-family="Sans" font-size="10.00" fill="#000000">MCP33xx</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP33xx->MCP3xxx --> | ||||||
|  | <g id="edge26" class="edge"><title>MCP33xx->MCP3xxx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1429.64,-180.303C1434.13,-188.356 1439.56,-198.106 1444.52,-207.018"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1441.55,-208.863 1449.47,-215.896 1447.66,-205.456 1441.55,-208.863"/> | ||||||
|  | </g> | ||||||
|  | <!-- CompositeDevice --> | ||||||
|  | <g id="node12" class="node"><title>CompositeDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="319.5,-396 218.5,-396 218.5,-360 319.5,-360 319.5,-396"/> | ||||||
|  | <text text-anchor="middle" x="269" y="-375.5" font-family="Sans" font-size="10.00" fill="#000000">CompositeDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- CompositeDevice->Device --> | ||||||
|  | <g id="edge34" class="edge"><title>CompositeDevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M319.382,-390.875C378.806,-404.88 476.173,-427.829 529.039,-440.289"/> | ||||||
|  | <polygon fill="black" stroke="black" points="528.458,-443.747 538.994,-442.635 530.064,-436.934 528.458,-443.747"/> | ||||||
|  | </g> | ||||||
|  | <!-- CompositeOutputDevice --> | ||||||
|  | <g id="node13" class="node"><title>CompositeOutputDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="439,-324 305,-324 305,-288 439,-288 439,-324"/> | ||||||
|  | <text text-anchor="middle" x="372" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">CompositeOutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- CompositeOutputDevice->SourceMixin --> | ||||||
|  | <g id="edge36" class="edge"><title>CompositeOutputDevice->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M381.64,-324.303C386.127,-332.356 391.559,-342.106 396.524,-351.018"/> | ||||||
|  | <polygon fill="black" stroke="black" points="393.546,-352.863 401.47,-359.896 399.661,-349.456 393.546,-352.863"/> | ||||||
|  | </g> | ||||||
|  | <!-- CompositeOutputDevice->CompositeDevice --> | ||||||
|  | <g id="edge35" class="edge"><title>CompositeOutputDevice->CompositeDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M346.803,-324.124C333.586,-333.107 317.208,-344.237 302.893,-353.966"/> | ||||||
|  | <polygon fill="black" stroke="black" points="300.597,-351.295 294.293,-359.81 304.532,-357.084 300.597,-351.295"/> | ||||||
|  | </g> | ||||||
|  | <!-- LEDCollection --> | ||||||
|  | <g id="node14" class="node"><title>LEDCollection</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="424,-252 342,-252 342,-216 424,-216 424,-252"/> | ||||||
|  | <text text-anchor="middle" x="383" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">LEDCollection</text> | ||||||
|  | </g> | ||||||
|  | <!-- LEDCollection->CompositeOutputDevice --> | ||||||
|  | <g id="edge37" class="edge"><title>LEDCollection->CompositeOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M380.281,-252.303C379.069,-260.017 377.612,-269.288 376.261,-277.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="372.783,-277.474 374.688,-287.896 379.698,-278.56 372.783,-277.474"/> | ||||||
|  | </g> | ||||||
|  | <!-- InternalDevice --> | ||||||
|  | <g id="node15" class="node"><title>InternalDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="583.5,-252 498.5,-252 498.5,-216 583.5,-216 583.5,-252"/> | ||||||
|  | <text text-anchor="middle" x="541" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">InternalDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- InternalDevice->EventsMixin --> | ||||||
|  | <g id="edge56" class="edge"><title>InternalDevice->EventsMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M577.205,-252.124C597.258,-261.608 622.372,-273.487 643.714,-283.581"/> | ||||||
|  | <polygon fill="black" stroke="black" points="642.376,-286.82 652.913,-287.932 645.369,-280.492 642.376,-286.82"/> | ||||||
|  | </g> | ||||||
|  | <!-- InternalDevice->Device --> | ||||||
|  | <g id="edge55" class="edge"><title>InternalDevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M543.004,-252.151C547.328,-289.168 557.568,-376.819 562.801,-421.614"/> | ||||||
|  | <polygon fill="black" stroke="black" points="559.35,-422.241 563.987,-431.768 566.303,-421.429 559.35,-422.241"/> | ||||||
|  | </g> | ||||||
|  | <!-- InputDevice->GPIODevice --> | ||||||
|  | <g id="edge3" class="edge"><title>InputDevice->GPIODevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M822,-324.303C822,-332.017 822,-341.288 822,-349.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="818.5,-349.896 822,-359.896 825.5,-349.896 818.5,-349.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalInputDevice --> | ||||||
|  | <g id="node17" class="node"><title>DigitalInputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="704.5,-252 601.5,-252 601.5,-216 704.5,-216 704.5,-252"/> | ||||||
|  | <text text-anchor="middle" x="653" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalInputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalInputDevice->EventsMixin --> | ||||||
|  | <g id="edge5" class="edge"><title>DigitalInputDevice->EventsMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M661.899,-252.303C665.997,-260.272 670.949,-269.9 675.493,-278.736"/> | ||||||
|  | <polygon fill="black" stroke="black" points="672.517,-280.604 680.203,-287.896 678.742,-277.402 672.517,-280.604"/> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalInputDevice->InputDevice --> | ||||||
|  | <g id="edge4" class="edge"><title>DigitalInputDevice->InputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M694.342,-252.124C719.124,-262.389 750.675,-275.457 776.21,-286.034"/> | ||||||
|  | <polygon fill="black" stroke="black" points="775.097,-289.361 785.676,-289.954 777.776,-282.894 775.097,-289.361"/> | ||||||
|  | </g> | ||||||
|  | <!-- Button --> | ||||||
|  | <g id="node18" class="node"><title>Button</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="680,-180 626,-180 626,-144 680,-144 680,-180"/> | ||||||
|  | <text text-anchor="middle" x="653" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">Button</text> | ||||||
|  | </g> | ||||||
|  | <!-- Button->HoldMixin --> | ||||||
|  | <g id="edge9" class="edge"><title>Button->HoldMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M677.707,-180.124C690.669,-189.107 706.728,-200.237 720.765,-209.966"/> | ||||||
|  | <polygon fill="black" stroke="black" points="718.985,-212.991 729.198,-215.81 722.972,-207.237 718.985,-212.991"/> | ||||||
|  | </g> | ||||||
|  | <!-- Button->DigitalInputDevice --> | ||||||
|  | <g id="edge8" class="edge"><title>Button->DigitalInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M653,-180.303C653,-188.017 653,-197.288 653,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="649.5,-205.896 653,-215.896 656.5,-205.896 649.5,-205.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- MotionSensor --> | ||||||
|  | <g id="node19" class="node"><title>MotionSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="891.5,-180 808.5,-180 808.5,-144 891.5,-144 891.5,-180"/> | ||||||
|  | <text text-anchor="middle" x="850" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">MotionSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- MotionSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge10" class="edge"><title>MotionSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M853.708,-180.303C855.361,-188.017 857.347,-197.288 859.19,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="855.817,-206.851 861.335,-215.896 862.662,-205.384 855.817,-206.851"/> | ||||||
|  | </g> | ||||||
|  | <!-- LightSensor --> | ||||||
|  | <g id="node20" class="node"><title>LightSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="984,-180 910,-180 910,-144 984,-144 984,-180"/> | ||||||
|  | <text text-anchor="middle" x="947" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">LightSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- LightSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge11" class="edge"><title>LightSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M926.73,-180.303C916.502,-189.035 903.939,-199.76 892.822,-209.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="890.37,-206.741 885.037,-215.896 894.915,-212.065 890.37,-206.741"/> | ||||||
|  | </g> | ||||||
|  | <!-- LineSensor --> | ||||||
|  | <g id="node21" class="node"><title>LineSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1072,-180 1002,-180 1002,-144 1072,-144 1072,-180"/> | ||||||
|  | <text text-anchor="middle" x="1037" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">LineSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- LineSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge12" class="edge"><title>LineSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1001.78,-177.334C977.161,-187.353 943.897,-200.891 916.336,-212.107"/> | ||||||
|  | <polygon fill="black" stroke="black" points="914.792,-208.957 906.849,-215.968 917.431,-215.441 914.792,-208.957"/> | ||||||
|  | </g> | ||||||
|  | <!-- DistanceSensor --> | ||||||
|  | <g id="node22" class="node"><title>DistanceSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="790,-180 698,-180 698,-144 790,-144 790,-180"/> | ||||||
|  | <text text-anchor="middle" x="744" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">DistanceSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- DistanceSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge13" class="edge"><title>DistanceSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M773.6,-180.124C789.567,-189.361 809.46,-200.869 826.606,-210.788"/> | ||||||
|  | <polygon fill="black" stroke="black" points="824.878,-213.832 835.286,-215.81 828.383,-207.773 824.878,-213.832"/> | ||||||
|  | </g> | ||||||
|  | <!-- OutputDevice --> | ||||||
|  | <g id="node23" class="node"><title>OutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1016,-324 934,-324 934,-288 1016,-288 1016,-324"/> | ||||||
|  | <text text-anchor="middle" x="975" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">OutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- OutputDevice->SourceMixin --> | ||||||
|  | <g id="edge15" class="edge"><title>OutputDevice->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M933.773,-313.89C913.661,-317.149 889.097,-320.978 867,-324 718.01,-344.376 540.934,-363.507 458.107,-372.16"/> | ||||||
|  | <polygon fill="black" stroke="black" points="457.589,-368.694 448.006,-373.212 458.315,-375.657 457.589,-368.694"/> | ||||||
|  | </g> | ||||||
|  | <!-- OutputDevice->GPIODevice --> | ||||||
|  | <g id="edge14" class="edge"><title>OutputDevice->GPIODevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M937.572,-324.124C916.439,-333.792 889.869,-345.949 867.535,-356.167"/> | ||||||
|  | <polygon fill="black" stroke="black" points="865.888,-353.072 858.251,-360.415 868.8,-359.437 865.888,-353.072"/> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalOutputDevice --> | ||||||
|  | <g id="node24" class="node"><title>DigitalOutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1249,-252 1137,-252 1137,-216 1249,-216 1249,-252"/> | ||||||
|  | <text text-anchor="middle" x="1193" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalOutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalOutputDevice->OutputDevice --> | ||||||
|  | <g id="edge16" class="edge"><title>DigitalOutputDevice->OutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1139.95,-252.034C1105.31,-263.158 1060.32,-277.603 1026.08,-288.598"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1024.73,-285.357 1016.28,-291.746 1026.87,-292.022 1024.73,-285.357"/> | ||||||
|  | </g> | ||||||
|  | <!-- LED --> | ||||||
|  | <g id="node25" class="node"><title>LED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1292,-180 1238,-180 1238,-144 1292,-144 1292,-180"/> | ||||||
|  | <text text-anchor="middle" x="1265" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">LED</text> | ||||||
|  | </g> | ||||||
|  | <!-- LED->DigitalOutputDevice --> | ||||||
|  | <g id="edge17" class="edge"><title>LED->DigitalOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1247.2,-180.303C1238.4,-188.865 1227.62,-199.344 1218,-208.696"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1215.32,-206.415 1210.59,-215.896 1220.2,-211.434 1215.32,-206.415"/> | ||||||
|  | </g> | ||||||
|  | <!-- Buzzer --> | ||||||
|  | <g id="node26" class="node"><title>Buzzer</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1220,-180 1166,-180 1166,-144 1220,-144 1220,-180"/> | ||||||
|  | <text text-anchor="middle" x="1193" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">Buzzer</text> | ||||||
|  | </g> | ||||||
|  | <!-- Buzzer->DigitalOutputDevice --> | ||||||
|  | <g id="edge18" class="edge"><title>Buzzer->DigitalOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1193,-180.303C1193,-188.017 1193,-197.288 1193,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1189.5,-205.896 1193,-215.896 1196.5,-205.896 1189.5,-205.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- PWMOutputDevice --> | ||||||
|  | <g id="node27" class="node"><title>PWMOutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1084,-252 980,-252 980,-216 1084,-216 1084,-252"/> | ||||||
|  | <text text-anchor="middle" x="1032" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMOutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- PWMOutputDevice->OutputDevice --> | ||||||
|  | <g id="edge19" class="edge"><title>PWMOutputDevice->OutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1017.91,-252.303C1011.08,-260.695 1002.74,-270.93 995.244,-280.139"/> | ||||||
|  | <polygon fill="black" stroke="black" points="992.528,-277.931 988.928,-287.896 997.956,-282.351 992.528,-277.931"/> | ||||||
|  | </g> | ||||||
|  | <!-- PWMLED --> | ||||||
|  | <g id="node28" class="node"><title>PWMLED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1148,-180 1090,-180 1090,-144 1148,-144 1148,-180"/> | ||||||
|  | <text text-anchor="middle" x="1119" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMLED</text> | ||||||
|  | </g> | ||||||
|  | <!-- PWMLED->PWMOutputDevice --> | ||||||
|  | <g id="edge20" class="edge"><title>PWMLED->PWMOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M1097.49,-180.303C1086.54,-189.119 1073.05,-199.968 1061.18,-209.526"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1058.86,-206.9 1053.26,-215.896 1063.24,-212.354 1058.86,-206.9"/> | ||||||
|  | </g> | ||||||
|  | <!-- RGBLED --> | ||||||
|  | <g id="node29" class="node"><title>RGBLED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="513,-324 457,-324 457,-288 513,-288 513,-324"/> | ||||||
|  | <text text-anchor="middle" x="485" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">RGBLED</text> | ||||||
|  | </g> | ||||||
|  | <!-- RGBLED->SourceMixin --> | ||||||
|  | <g id="edge22" class="edge"><title>RGBLED->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M466.708,-324.303C457.567,-332.95 446.36,-343.551 436.4,-352.973"/> | ||||||
|  | <polygon fill="black" stroke="black" points="433.941,-350.481 429.082,-359.896 438.752,-355.566 433.941,-350.481"/> | ||||||
|  | </g> | ||||||
|  | <!-- RGBLED->Device --> | ||||||
|  | <g id="edge21" class="edge"><title>RGBLED->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M491.955,-324.232C499.61,-342.539 512.738,-372.08 527,-396 532.617,-405.42 539.505,-415.228 545.922,-423.808"/> | ||||||
|  | <polygon fill="black" stroke="black" points="543.265,-426.097 552.117,-431.92 548.829,-421.848 543.265,-426.097"/> | ||||||
|  | </g> | ||||||
|  | <!-- SPIDevice->Device --> | ||||||
|  | <g id="edge23" class="edge"><title>SPIDevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M1047.85,-383.379C957.18,-395.726 699.802,-430.778 603.224,-443.931"/> | ||||||
|  | <polygon fill="black" stroke="black" points="602.494,-440.498 593.057,-445.315 603.438,-447.434 602.494,-440.498"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3004 --> | ||||||
|  | <g id="node31" class="node"><title>MCP3004</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1530,-180 1468,-180 1468,-144 1530,-144 1530,-180"/> | ||||||
|  | <text text-anchor="middle" x="1499" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3004</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3004->MCP3xxx --> | ||||||
|  | <g id="edge27" class="edge"><title>MCP3004->MCP3xxx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1489.11,-180.303C1484.51,-188.356 1478.94,-198.106 1473.85,-207.018"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1470.7,-205.477 1468.77,-215.896 1476.77,-208.95 1470.7,-205.477"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3008 --> | ||||||
|  | <g id="node32" class="node"><title>MCP3008</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1610,-180 1548,-180 1548,-144 1610,-144 1610,-180"/> | ||||||
|  | <text text-anchor="middle" x="1579" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3008</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3008->MCP3xxx --> | ||||||
|  | <g id="edge28" class="edge"><title>MCP3008->MCP3xxx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1549.64,-180.124C1533.95,-189.276 1514.44,-200.658 1497.55,-210.515"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1495.34,-207.748 1488.47,-215.81 1498.87,-213.795 1495.34,-207.748"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3204 --> | ||||||
|  | <g id="node33" class="node"><title>MCP3204</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1690,-180 1628,-180 1628,-144 1690,-144 1690,-180"/> | ||||||
|  | <text text-anchor="middle" x="1659" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3204</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3204->MCP3xxx --> | ||||||
|  | <g id="edge29" class="edge"><title>MCP3204->MCP3xxx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1628.2,-176.047C1624.77,-177.417 1621.32,-178.76 1618,-180 1577.49,-195.129 1530.42,-210.556 1498.07,-220.834"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1497,-217.501 1488.52,-223.853 1499.11,-224.175 1497,-217.501"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3208 --> | ||||||
|  | <g id="node34" class="node"><title>MCP3208</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1372,-180 1310,-180 1310,-144 1372,-144 1372,-180"/> | ||||||
|  | <text text-anchor="middle" x="1341" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3208</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3208->MCP3xxx --> | ||||||
|  | <g id="edge30" class="edge"><title>MCP3208->MCP3xxx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1369.87,-180.124C1385.29,-189.276 1404.48,-200.658 1421.1,-210.515"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1419.64,-213.718 1430.02,-215.81 1423.21,-207.698 1419.64,-213.718"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3301 --> | ||||||
|  | <g id="node35" class="node"><title>MCP3301</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1371,-108 1309,-108 1309,-72 1371,-72 1371,-108"/> | ||||||
|  | <text text-anchor="middle" x="1340" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3301</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3301->MCP33xx --> | ||||||
|  | <g id="edge31" class="edge"><title>MCP3301->MCP33xx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1359.78,-108.303C1369.75,-117.035 1382.01,-127.76 1392.86,-137.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1390.62,-139.945 1400.45,-143.896 1395.23,-134.677 1390.62,-139.945"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3302 --> | ||||||
|  | <g id="node36" class="node"><title>MCP3302</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1451,-108 1389,-108 1389,-72 1451,-72 1451,-108"/> | ||||||
|  | <text text-anchor="middle" x="1420" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3302</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3302->MCP33xx --> | ||||||
|  | <g id="edge32" class="edge"><title>MCP3302->MCP33xx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1420,-108.303C1420,-116.017 1420,-125.288 1420,-133.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1416.5,-133.896 1420,-143.896 1423.5,-133.896 1416.5,-133.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3304 --> | ||||||
|  | <g id="node37" class="node"><title>MCP3304</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="1531,-108 1469,-108 1469,-72 1531,-72 1531,-108"/> | ||||||
|  | <text text-anchor="middle" x="1500" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">MCP3304</text> | ||||||
|  | </g> | ||||||
|  | <!-- MCP3304->MCP33xx --> | ||||||
|  | <g id="edge33" class="edge"><title>MCP3304->MCP33xx</title> | ||||||
|  | <path fill="none" stroke="black" d="M1480.22,-108.303C1470.25,-117.035 1457.99,-127.76 1447.14,-137.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="1444.77,-134.677 1439.55,-143.896 1449.38,-139.945 1444.77,-134.677"/> | ||||||
|  | </g> | ||||||
|  | <!-- LEDBoard --> | ||||||
|  | <g id="node38" class="node"><title>LEDBoard</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="335,-180 271,-180 271,-144 335,-144 335,-180"/> | ||||||
|  | <text text-anchor="middle" x="303" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">LEDBoard</text> | ||||||
|  | </g> | ||||||
|  | <!-- LEDBoard->LEDCollection --> | ||||||
|  | <g id="edge38" class="edge"><title>LEDBoard->LEDCollection</title> | ||||||
|  | <path fill="none" stroke="black" d="M322.775,-180.303C332.754,-189.035 345.011,-199.76 355.857,-209.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="353.622,-211.945 363.452,-215.896 358.231,-206.677 353.622,-211.945"/> | ||||||
|  | </g> | ||||||
|  | <!-- LEDBarGraph --> | ||||||
|  | <g id="node39" class="node"><title>LEDBarGraph</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="434.5,-180 353.5,-180 353.5,-144 434.5,-144 434.5,-180"/> | ||||||
|  | <text text-anchor="middle" x="394" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">LEDBarGraph</text> | ||||||
|  | </g> | ||||||
|  | <!-- LEDBarGraph->LEDCollection --> | ||||||
|  | <g id="edge39" class="edge"><title>LEDBarGraph->LEDCollection</title> | ||||||
|  | <path fill="none" stroke="black" d="M391.281,-180.303C390.069,-188.017 388.612,-197.288 387.261,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="383.783,-205.474 385.688,-215.896 390.698,-206.56 383.783,-205.474"/> | ||||||
|  | </g> | ||||||
|  | <!-- PiLiter --> | ||||||
|  | <g id="node40" class="node"><title>PiLiter</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="249,-108 195,-108 195,-72 249,-72 249,-108"/> | ||||||
|  | <text text-anchor="middle" x="222" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">PiLiter</text> | ||||||
|  | </g> | ||||||
|  | <!-- PiLiter->LEDBoard --> | ||||||
|  | <g id="edge40" class="edge"><title>PiLiter->LEDBoard</title> | ||||||
|  | <path fill="none" stroke="black" d="M242.022,-108.303C252.126,-117.035 264.536,-127.76 275.518,-137.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="273.353,-140.005 283.208,-143.896 277.93,-134.709 273.353,-140.005"/> | ||||||
|  | </g> | ||||||
|  | <!-- PiLiterBarGraph --> | ||||||
|  | <g id="node41" class="node"><title>PiLiterBarGraph</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="449,-108 357,-108 357,-72 449,-72 449,-108"/> | ||||||
|  | <text text-anchor="middle" x="403" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">PiLiterBarGraph</text> | ||||||
|  | </g> | ||||||
|  | <!-- PiLiterBarGraph->LEDBarGraph --> | ||||||
|  | <g id="edge41" class="edge"><title>PiLiterBarGraph->LEDBarGraph</title> | ||||||
|  | <path fill="none" stroke="black" d="M400.775,-108.303C399.783,-116.017 398.592,-125.288 397.486,-133.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="394.003,-133.531 396.199,-143.896 400.946,-134.424 394.003,-133.531"/> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficLights --> | ||||||
|  | <g id="node42" class="node"><title>TrafficLights</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="339,-108 267,-108 267,-72 339,-72 339,-108"/> | ||||||
|  | <text text-anchor="middle" x="303" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLights</text> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficLights->LEDBoard --> | ||||||
|  | <g id="edge42" class="edge"><title>TrafficLights->LEDBoard</title> | ||||||
|  | <path fill="none" stroke="black" d="M303,-108.303C303,-116.017 303,-125.288 303,-133.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="299.5,-133.896 303,-143.896 306.5,-133.896 299.5,-133.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- PiTraffic --> | ||||||
|  | <g id="node43" class="node"><title>PiTraffic</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="330,-36 276,-36 276,-0 330,-0 330,-36"/> | ||||||
|  | <text text-anchor="middle" x="303" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">PiTraffic</text> | ||||||
|  | </g> | ||||||
|  | <!-- PiTraffic->TrafficLights --> | ||||||
|  | <g id="edge43" class="edge"><title>PiTraffic->TrafficLights</title> | ||||||
|  | <path fill="none" stroke="black" d="M303,-36.3034C303,-44.0173 303,-53.2875 303,-61.8876"/> | ||||||
|  | <polygon fill="black" stroke="black" points="299.5,-61.8956 303,-71.8957 306.5,-61.8957 299.5,-61.8956"/> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficLightsBuzzer --> | ||||||
|  | <g id="node44" class="node"><title>TrafficLightsBuzzer</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="323.5,-252 218.5,-252 218.5,-216 323.5,-216 323.5,-252"/> | ||||||
|  | <text text-anchor="middle" x="271" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficLightsBuzzer</text> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficLightsBuzzer->CompositeOutputDevice --> | ||||||
|  | <g id="edge44" class="edge"><title>TrafficLightsBuzzer->CompositeOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M295.707,-252.124C308.669,-261.107 324.728,-272.237 338.765,-281.966"/> | ||||||
|  | <polygon fill="black" stroke="black" points="336.985,-284.991 347.198,-287.81 340.972,-279.237 336.985,-284.991"/> | ||||||
|  | </g> | ||||||
|  | <!-- FishDish --> | ||||||
|  | <g id="node45" class="node"><title>FishDish</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="253,-180 197,-180 197,-144 253,-144 253,-180"/> | ||||||
|  | <text text-anchor="middle" x="225" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">FishDish</text> | ||||||
|  | </g> | ||||||
|  | <!-- FishDish->TrafficLightsBuzzer --> | ||||||
|  | <g id="edge45" class="edge"><title>FishDish->TrafficLightsBuzzer</title> | ||||||
|  | <path fill="none" stroke="black" d="M236.371,-180.303C241.718,-188.441 248.204,-198.311 254.111,-207.299"/> | ||||||
|  | <polygon fill="black" stroke="black" points="251.343,-209.461 259.76,-215.896 257.193,-205.616 251.343,-209.461"/> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficHat --> | ||||||
|  | <g id="node46" class="node"><title>TrafficHat</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="178.5,-180 117.5,-180 117.5,-144 178.5,-144 178.5,-180"/> | ||||||
|  | <text text-anchor="middle" x="148" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">TrafficHat</text> | ||||||
|  | </g> | ||||||
|  | <!-- TrafficHat->TrafficLightsBuzzer --> | ||||||
|  | <g id="edge46" class="edge"><title>TrafficHat->TrafficLightsBuzzer</title> | ||||||
|  | <path fill="none" stroke="black" d="M178.089,-180.124C194.32,-189.361 214.542,-200.869 231.971,-210.788"/> | ||||||
|  | <polygon fill="black" stroke="black" points="230.373,-213.906 240.795,-215.81 233.835,-207.822 230.373,-213.906"/> | ||||||
|  | </g> | ||||||
|  | <!-- Robot --> | ||||||
|  | <g id="node47" class="node"><title>Robot</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="287,-324 233,-324 233,-288 287,-288 287,-324"/> | ||||||
|  | <text text-anchor="middle" x="260" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">Robot</text> | ||||||
|  | </g> | ||||||
|  | <!-- Robot->SourceMixin --> | ||||||
|  | <g id="edge48" class="edge"><title>Robot->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M287.114,-319.837C290.111,-321.246 293.119,-322.656 296,-324 318.546,-334.518 343.631,-346.094 364.605,-355.737"/> | ||||||
|  | <polygon fill="black" stroke="black" points="363.381,-359.027 373.929,-360.021 366.303,-352.666 363.381,-359.027"/> | ||||||
|  | </g> | ||||||
|  | <!-- Robot->CompositeDevice --> | ||||||
|  | <g id="edge47" class="edge"><title>Robot->CompositeDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M262.225,-324.303C263.217,-332.017 264.408,-341.288 265.514,-349.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="262.054,-350.424 266.801,-359.896 268.997,-349.531 262.054,-350.424"/> | ||||||
|  | </g> | ||||||
|  | <!-- Energenie --> | ||||||
|  | <g id="node48" class="node"><title>Energenie</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="634.5,-324 569.5,-324 569.5,-288 634.5,-288 634.5,-324"/> | ||||||
|  | <text text-anchor="middle" x="602" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">Energenie</text> | ||||||
|  | </g> | ||||||
|  | <!-- Energenie->SourceMixin --> | ||||||
|  | <g id="edge50" class="edge"><title>Energenie->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M569.599,-318.875C538.857,-330.141 492.325,-347.195 457.603,-359.92"/> | ||||||
|  | <polygon fill="black" stroke="black" points="456.33,-356.659 448.145,-363.387 458.739,-363.232 456.33,-356.659"/> | ||||||
|  | </g> | ||||||
|  | <!-- Energenie->Device --> | ||||||
|  | <g id="edge49" class="edge"><title>Energenie->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M597.658,-324.129C591.495,-348.436 580.151,-393.181 572.848,-421.987"/> | ||||||
|  | <polygon fill="black" stroke="black" points="569.423,-421.257 570.358,-431.811 576.208,-422.978 569.423,-421.257"/> | ||||||
|  | </g> | ||||||
|  | <!-- RyanteckRobot --> | ||||||
|  | <g id="node49" class="node"><title>RyanteckRobot</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="200,-252 114,-252 114,-216 200,-216 200,-252"/> | ||||||
|  | <text text-anchor="middle" x="157" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">RyanteckRobot</text> | ||||||
|  | </g> | ||||||
|  | <!-- RyanteckRobot->Robot --> | ||||||
|  | <g id="edge51" class="edge"><title>RyanteckRobot->Robot</title> | ||||||
|  | <path fill="none" stroke="black" d="M182.197,-252.124C195.414,-261.107 211.792,-272.237 226.107,-281.966"/> | ||||||
|  | <polygon fill="black" stroke="black" points="224.468,-285.084 234.707,-287.81 228.403,-279.295 224.468,-285.084"/> | ||||||
|  | </g> | ||||||
|  | <!-- CamJamKitRobot --> | ||||||
|  | <g id="node50" class="node"><title>CamJamKitRobot</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="96,-252 0,-252 0,-216 96,-216 96,-252"/> | ||||||
|  | <text text-anchor="middle" x="48" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">CamJamKitRobot</text> | ||||||
|  | </g> | ||||||
|  | <!-- CamJamKitRobot->Robot --> | ||||||
|  | <g id="edge52" class="edge"><title>CamJamKitRobot->Robot</title> | ||||||
|  | <path fill="none" stroke="black" d="M96.3575,-249.468C139.41,-262.36 198.475,-280.08 222.949,-288.168"/> | ||||||
|  | <polygon fill="black" stroke="black" points="222.071,-291.569 232.665,-291.578 224.389,-284.964 222.071,-291.569"/> | ||||||
|  | </g> | ||||||
|  | <!-- Motor --> | ||||||
|  | <g id="node51" class="node"><title>Motor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="215,-324 161,-324 161,-288 215,-288 215,-324"/> | ||||||
|  | <text text-anchor="middle" x="188" y="-303.5" font-family="Sans" font-size="10.00" fill="#ffffff">Motor</text> | ||||||
|  | </g> | ||||||
|  | <!-- Motor->SourceMixin --> | ||||||
|  | <g id="edge54" class="edge"><title>Motor->SourceMixin</title> | ||||||
|  | <path fill="none" stroke="black" d="M215.316,-320.47C218.22,-321.73 221.152,-322.932 224,-324 270.698,-341.507 325.803,-356.464 364.044,-365.981"/> | ||||||
|  | <polygon fill="black" stroke="black" points="363.327,-369.409 373.873,-368.4 364.999,-362.612 363.327,-369.409"/> | ||||||
|  | </g> | ||||||
|  | <!-- Motor->CompositeDevice --> | ||||||
|  | <g id="edge53" class="edge"><title>Motor->CompositeDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M208.022,-324.303C218.126,-333.035 230.536,-343.76 241.518,-353.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="239.353,-356.005 249.208,-359.896 243.93,-350.709 239.353,-356.005"/> | ||||||
|  | </g> | ||||||
|  | <!-- TimeOfDay --> | ||||||
|  | <g id="node52" class="node"><title>TimeOfDay</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="521.5,-180 452.5,-180 452.5,-144 521.5,-144 521.5,-180"/> | ||||||
|  | <text text-anchor="middle" x="487" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">TimeOfDay</text> | ||||||
|  | </g> | ||||||
|  | <!-- TimeOfDay->InternalDevice --> | ||||||
|  | <g id="edge57" class="edge"><title>TimeOfDay->InternalDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M500.348,-180.303C506.757,-188.611 514.558,-198.723 521.606,-207.859"/> | ||||||
|  | <polygon fill="black" stroke="black" points="518.926,-210.116 527.805,-215.896 524.468,-205.84 518.926,-210.116"/> | ||||||
|  | </g> | ||||||
|  | <!-- PingServer --> | ||||||
|  | <g id="node53" class="node"><title>PingServer</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="608,-180 540,-180 540,-144 608,-144 608,-180"/> | ||||||
|  | <text text-anchor="middle" x="574" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">PingServer</text> | ||||||
|  | </g> | ||||||
|  | <!-- PingServer->InternalDevice --> | ||||||
|  | <g id="edge58" class="edge"><title>PingServer->InternalDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M565.843,-180.303C562.086,-188.272 557.547,-197.9 553.382,-206.736"/> | ||||||
|  | <polygon fill="black" stroke="black" points="550.162,-205.358 549.063,-215.896 556.494,-208.343 550.162,-205.358"/> | ||||||
|  | </g> | ||||||
|  | </g> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 36 KiB | 
| Before Width: | Height: | Size: 45 KiB | 
| @@ -1,178 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> |  | ||||||
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" |  | ||||||
|  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |  | ||||||
| <!-- Generated by graphviz version 2.36.0 (20140111.2315) |  | ||||||
|  --> |  | ||||||
| <!-- Title: classes Pages: 1 --> |  | ||||||
| <svg width="721pt" height="332pt" |  | ||||||
|  viewBox="0.00 0.00 721.00 332.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |  | ||||||
| <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 328)"> |  | ||||||
| <title>classes</title> |  | ||||||
| <polygon fill="white" stroke="none" points="-4,4 -4,-328 717,-328 717,4 -4,4"/> |  | ||||||
| <!-- Device --> |  | ||||||
| <g id="node1" class="node"><title>Device</title> |  | ||||||
| <polygon fill="#9ec6e0" stroke="#9ec6e0" points="540,-324 486,-324 486,-288 540,-288 540,-324"/> |  | ||||||
| <text text-anchor="middle" x="513" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> |  | ||||||
| </g> |  | ||||||
| <!-- GPIODevice --> |  | ||||||
| <g id="node2" class="node"><title>GPIODevice</title> |  | ||||||
| <polygon fill="#9ec6e0" stroke="#9ec6e0" points="508,-252 436,-252 436,-216 508,-216 508,-252"/> |  | ||||||
| <text text-anchor="middle" x="472" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">GPIODevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- GPIODevice->Device --> |  | ||||||
| <g id="edge1" class="edge"><title>GPIODevice->Device</title> |  | ||||||
| <path fill="none" stroke="black" d="M482.135,-252.303C486.852,-260.356 492.562,-270.106 497.782,-279.018"/> |  | ||||||
| <polygon fill="black" stroke="black" points="494.908,-281.036 502.982,-287.896 500.948,-277.498 494.908,-281.036"/> |  | ||||||
| </g> |  | ||||||
| <!-- SmoothedInputDevice --> |  | ||||||
| <g id="node3" class="node"><title>SmoothedInputDevice</title> |  | ||||||
| <polygon fill="#9ec6e0" stroke="#9ec6e0" points="289.5,-108 166.5,-108 166.5,-72 289.5,-72 289.5,-108"/> |  | ||||||
| <text text-anchor="middle" x="228" y="-87.5" font-family="Sans" font-size="10.00" fill="#000000">SmoothedInputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- InputDevice --> |  | ||||||
| <g id="node4" class="node"><title>InputDevice</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="445.5,-180 372.5,-180 372.5,-144 445.5,-144 445.5,-180"/> |  | ||||||
| <text text-anchor="middle" x="409" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">InputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- SmoothedInputDevice->InputDevice --> |  | ||||||
| <g id="edge4" class="edge"><title>SmoothedInputDevice->InputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M272.278,-108.124C299.802,-118.769 335.123,-132.429 362.97,-143.198"/> |  | ||||||
| <polygon fill="black" stroke="black" points="361.893,-146.535 372.483,-146.877 364.418,-140.006 361.893,-146.535"/> |  | ||||||
| </g> |  | ||||||
| <!-- InputDevice->GPIODevice --> |  | ||||||
| <g id="edge2" class="edge"><title>InputDevice->GPIODevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M424.573,-180.303C432.202,-188.78 441.523,-199.136 449.876,-208.417"/> |  | ||||||
| <polygon fill="black" stroke="black" points="447.315,-210.804 456.606,-215.896 452.518,-206.121 447.315,-210.804"/> |  | ||||||
| </g> |  | ||||||
| <!-- DigitalInputDevice --> |  | ||||||
| <g id="node5" class="node"><title>DigitalInputDevice</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="460.5,-108 357.5,-108 357.5,-72 460.5,-72 460.5,-108"/> |  | ||||||
| <text text-anchor="middle" x="409" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalInputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- DigitalInputDevice->InputDevice --> |  | ||||||
| <g id="edge3" class="edge"><title>DigitalInputDevice->InputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M409,-108.303C409,-116.017 409,-125.288 409,-133.888"/> |  | ||||||
| <polygon fill="black" stroke="black" points="405.5,-133.896 409,-143.896 412.5,-133.896 405.5,-133.896"/> |  | ||||||
| </g> |  | ||||||
| <!-- Button --> |  | ||||||
| <g id="node6" class="node"><title>Button</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="445,-36 391,-36 391,-0 445,-0 445,-36"/> |  | ||||||
| <text text-anchor="middle" x="418" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Button</text> |  | ||||||
| </g> |  | ||||||
| <!-- Button->DigitalInputDevice --> |  | ||||||
| <g id="edge5" class="edge"><title>Button->DigitalInputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M415.775,-36.3034C414.783,-44.0173 413.592,-53.2875 412.486,-61.8876"/> |  | ||||||
| <polygon fill="black" stroke="black" points="409.003,-61.531 411.199,-71.8957 415.946,-62.4237 409.003,-61.531"/> |  | ||||||
| </g> |  | ||||||
| <!-- MotionSensor --> |  | ||||||
| <g id="node7" class="node"><title>MotionSensor</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="82.5,-36 -0.5,-36 -0.5,-0 82.5,-0 82.5,-36"/> |  | ||||||
| <text text-anchor="middle" x="41" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">MotionSensor</text> |  | ||||||
| </g> |  | ||||||
| <!-- MotionSensor->SmoothedInputDevice --> |  | ||||||
| <g id="edge6" class="edge"><title>MotionSensor->SmoothedInputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M82.5014,-34.5353C109.086,-44.4869 143.895,-57.5168 172.8,-68.3368"/> |  | ||||||
| <polygon fill="black" stroke="black" points="171.763,-71.6859 182.356,-71.9139 174.217,-65.1302 171.763,-71.6859"/> |  | ||||||
| </g> |  | ||||||
| <!-- LightSensor --> |  | ||||||
| <g id="node8" class="node"><title>LightSensor</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="175,-36 101,-36 101,-0 175,-0 175,-36"/> |  | ||||||
| <text text-anchor="middle" x="138" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LightSensor</text> |  | ||||||
| </g> |  | ||||||
| <!-- LightSensor->SmoothedInputDevice --> |  | ||||||
| <g id="edge7" class="edge"><title>LightSensor->SmoothedInputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M160.247,-36.3034C171.582,-45.1193 185.53,-55.9679 197.819,-65.5258"/> |  | ||||||
| <polygon fill="black" stroke="black" points="195.966,-68.519 206.009,-71.8957 200.264,-62.9935 195.966,-68.519"/> |  | ||||||
| </g> |  | ||||||
| <!-- LineSensor --> |  | ||||||
| <g id="node9" class="node"><title>LineSensor</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="263,-36 193,-36 193,-0 263,-0 263,-36"/> |  | ||||||
| <text text-anchor="middle" x="228" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LineSensor</text> |  | ||||||
| </g> |  | ||||||
| <!-- LineSensor->SmoothedInputDevice --> |  | ||||||
| <g id="edge8" class="edge"><title>LineSensor->SmoothedInputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M228,-36.3034C228,-44.0173 228,-53.2875 228,-61.8876"/> |  | ||||||
| <polygon fill="black" stroke="black" points="224.5,-61.8956 228,-71.8957 231.5,-61.8957 224.5,-61.8956"/> |  | ||||||
| </g> |  | ||||||
| <!-- DistanceSensor --> |  | ||||||
| <g id="node10" class="node"><title>DistanceSensor</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="373,-36 281,-36 281,-0 373,-0 373,-36"/> |  | ||||||
| <text text-anchor="middle" x="327" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">DistanceSensor</text> |  | ||||||
| </g> |  | ||||||
| <!-- DistanceSensor->SmoothedInputDevice --> |  | ||||||
| <g id="edge9" class="edge"><title>DistanceSensor->SmoothedInputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M302.782,-36.1239C290.077,-45.1069 274.336,-56.2375 260.577,-65.9659"/> |  | ||||||
| <polygon fill="black" stroke="black" points="258.456,-63.1791 252.311,-71.8102 262.497,-68.8947 258.456,-63.1791"/> |  | ||||||
| </g> |  | ||||||
| <!-- OutputDevice --> |  | ||||||
| <g id="node11" class="node"><title>OutputDevice</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="576,-180 494,-180 494,-144 576,-144 576,-180"/> |  | ||||||
| <text text-anchor="middle" x="535" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">OutputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- OutputDevice->GPIODevice --> |  | ||||||
| <g id="edge10" class="edge"><title>OutputDevice->GPIODevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M519.427,-180.303C511.798,-188.78 502.477,-199.136 494.124,-208.417"/> |  | ||||||
| <polygon fill="black" stroke="black" points="491.482,-206.121 487.394,-215.896 496.685,-210.804 491.482,-206.121"/> |  | ||||||
| </g> |  | ||||||
| <!-- DigitalOutputDevice --> |  | ||||||
| <g id="node12" class="node"><title>DigitalOutputDevice</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="591,-108 479,-108 479,-72 591,-72 591,-108"/> |  | ||||||
| <text text-anchor="middle" x="535" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalOutputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- DigitalOutputDevice->OutputDevice --> |  | ||||||
| <g id="edge11" class="edge"><title>DigitalOutputDevice->OutputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M535,-108.303C535,-116.017 535,-125.288 535,-133.888"/> |  | ||||||
| <polygon fill="black" stroke="black" points="531.5,-133.896 535,-143.896 538.5,-133.896 531.5,-133.896"/> |  | ||||||
| </g> |  | ||||||
| <!-- LED --> |  | ||||||
| <g id="node13" class="node"><title>LED</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="534,-36 480,-36 480,-0 534,-0 534,-36"/> |  | ||||||
| <text text-anchor="middle" x="507" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LED</text> |  | ||||||
| </g> |  | ||||||
| <!-- LED->DigitalOutputDevice --> |  | ||||||
| <g id="edge12" class="edge"><title>LED->DigitalOutputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M513.921,-36.3034C517.075,-44.1868 520.878,-53.6958 524.381,-62.4536"/> |  | ||||||
| <polygon fill="black" stroke="black" points="521.195,-63.9108 528.158,-71.8957 527.694,-61.311 521.195,-63.9108"/> |  | ||||||
| </g> |  | ||||||
| <!-- Buzzer --> |  | ||||||
| <g id="node14" class="node"><title>Buzzer</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="606,-36 552,-36 552,-0 606,-0 606,-36"/> |  | ||||||
| <text text-anchor="middle" x="579" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Buzzer</text> |  | ||||||
| </g> |  | ||||||
| <!-- Buzzer->DigitalOutputDevice --> |  | ||||||
| <g id="edge13" class="edge"><title>Buzzer->DigitalOutputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M568.124,-36.3034C563.008,-44.4411 556.805,-54.311 551.155,-63.2987"/> |  | ||||||
| <polygon fill="black" stroke="black" points="548.11,-61.5667 545.751,-71.8957 554.036,-65.2919 548.11,-61.5667"/> |  | ||||||
| </g> |  | ||||||
| <!-- PWMOutputDevice --> |  | ||||||
| <g id="node15" class="node"><title>PWMOutputDevice</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="713,-108 609,-108 609,-72 713,-72 713,-108"/> |  | ||||||
| <text text-anchor="middle" x="661" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMOutputDevice</text> |  | ||||||
| </g> |  | ||||||
| <!-- PWMOutputDevice->OutputDevice --> |  | ||||||
| <g id="edge14" class="edge"><title>PWMOutputDevice->OutputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M630.177,-108.124C613.55,-117.361 592.835,-128.869 574.981,-138.788"/> |  | ||||||
| <polygon fill="black" stroke="black" points="572.983,-135.894 565.942,-143.81 576.383,-142.013 572.983,-135.894"/> |  | ||||||
| </g> |  | ||||||
| <!-- PWMLED --> |  | ||||||
| <g id="node16" class="node"><title>PWMLED</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="690,-36 632,-36 632,-0 690,-0 690,-36"/> |  | ||||||
| <text text-anchor="middle" x="661" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMLED</text> |  | ||||||
| </g> |  | ||||||
| <!-- PWMLED->PWMOutputDevice --> |  | ||||||
| <g id="edge15" class="edge"><title>PWMLED->PWMOutputDevice</title> |  | ||||||
| <path fill="none" stroke="black" d="M661,-36.3034C661,-44.0173 661,-53.2875 661,-61.8876"/> |  | ||||||
| <polygon fill="black" stroke="black" points="657.5,-61.8956 661,-71.8957 664.5,-61.8957 657.5,-61.8956"/> |  | ||||||
| </g> |  | ||||||
| <!-- RGBLED --> |  | ||||||
| <g id="node17" class="node"><title>RGBLED</title> |  | ||||||
| <polygon fill="#2980b9" stroke="#2980b9" points="582,-252 526,-252 526,-216 582,-216 582,-252"/> |  | ||||||
| <text text-anchor="middle" x="554" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">RGBLED</text> |  | ||||||
| </g> |  | ||||||
| <!-- RGBLED->Device --> |  | ||||||
| <g id="edge16" class="edge"><title>RGBLED->Device</title> |  | ||||||
| <path fill="none" stroke="black" d="M543.865,-252.303C539.148,-260.356 533.438,-270.106 528.218,-279.018"/> |  | ||||||
| <polygon fill="black" stroke="black" points="525.052,-277.498 523.018,-287.896 531.092,-281.036 525.052,-277.498"/> |  | ||||||
| </g> |  | ||||||
| </g> |  | ||||||
| </svg> |  | ||||||
| Before Width: | Height: | Size: 11 KiB | 
| @@ -23,13 +23,5 @@ digraph classes { | |||||||
|     LightSensor->SmoothedInputDevice; |     LightSensor->SmoothedInputDevice; | ||||||
|     LineSensor->SmoothedInputDevice; |     LineSensor->SmoothedInputDevice; | ||||||
|     DistanceSensor->SmoothedInputDevice; |     DistanceSensor->SmoothedInputDevice; | ||||||
| 
 |  | ||||||
|     OutputDevice->GPIODevice; |  | ||||||
|     DigitalOutputDevice->OutputDevice; |  | ||||||
|     LED->DigitalOutputDevice; |  | ||||||
|     Buzzer->DigitalOutputDevice; |  | ||||||
|     PWMOutputDevice->OutputDevice; |  | ||||||
|     PWMLED->PWMOutputDevice; |  | ||||||
|     RGBLED->Device; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
							
								
								
									
										
											BIN
										
									
								
								docs/images/input_device_hierarchy.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								docs/images/input_device_hierarchy.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 28 KiB | 
							
								
								
									
										108
									
								
								docs/images/input_device_hierarchy.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,108 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
|  | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||||||
|  |  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||||||
|  | <!-- Generated by graphviz version 2.36.0 (20140111.2315) | ||||||
|  |  --> | ||||||
|  | <!-- Title: classes Pages: 1 --> | ||||||
|  | <svg width="453pt" height="332pt" | ||||||
|  |  viewBox="0.00 0.00 453.00 332.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||||
|  | <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 328)"> | ||||||
|  | <title>classes</title> | ||||||
|  | <polygon fill="white" stroke="none" points="-4,4 -4,-328 449,-328 449,4 -4,4"/> | ||||||
|  | <!-- Device --> | ||||||
|  | <g id="node1" class="node"><title>Device</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="335,-324 281,-324 281,-288 335,-288 335,-324"/> | ||||||
|  | <text text-anchor="middle" x="308" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice --> | ||||||
|  | <g id="node2" class="node"><title>GPIODevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="344,-252 272,-252 272,-216 344,-216 344,-252"/> | ||||||
|  | <text text-anchor="middle" x="308" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">GPIODevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice->Device --> | ||||||
|  | <g id="edge1" class="edge"><title>GPIODevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M308,-252.303C308,-260.017 308,-269.288 308,-277.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="304.5,-277.896 308,-287.896 311.5,-277.896 304.5,-277.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- SmoothedInputDevice --> | ||||||
|  | <g id="node3" class="node"><title>SmoothedInputDevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="289.5,-108 166.5,-108 166.5,-72 289.5,-72 289.5,-108"/> | ||||||
|  | <text text-anchor="middle" x="228" y="-87.5" font-family="Sans" font-size="10.00" fill="#000000">SmoothedInputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- InputDevice --> | ||||||
|  | <g id="node4" class="node"><title>InputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="344.5,-180 271.5,-180 271.5,-144 344.5,-144 344.5,-180"/> | ||||||
|  | <text text-anchor="middle" x="308" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">InputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- SmoothedInputDevice->InputDevice --> | ||||||
|  | <g id="edge4" class="edge"><title>SmoothedInputDevice->InputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M247.775,-108.303C257.754,-117.035 270.011,-127.76 280.857,-137.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="278.622,-139.945 288.452,-143.896 283.231,-134.677 278.622,-139.945"/> | ||||||
|  | </g> | ||||||
|  | <!-- InputDevice->GPIODevice --> | ||||||
|  | <g id="edge2" class="edge"><title>InputDevice->GPIODevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M308,-180.303C308,-188.017 308,-197.288 308,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="304.5,-205.896 308,-215.896 311.5,-205.896 304.5,-205.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalInputDevice --> | ||||||
|  | <g id="node5" class="node"><title>DigitalInputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="439.5,-108 336.5,-108 336.5,-72 439.5,-72 439.5,-108"/> | ||||||
|  | <text text-anchor="middle" x="388" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalInputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalInputDevice->InputDevice --> | ||||||
|  | <g id="edge3" class="edge"><title>DigitalInputDevice->InputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M368.225,-108.303C358.246,-117.035 345.989,-127.76 335.143,-137.25"/> | ||||||
|  | <polygon fill="black" stroke="black" points="332.769,-134.677 327.548,-143.896 337.378,-139.945 332.769,-134.677"/> | ||||||
|  | </g> | ||||||
|  | <!-- Button --> | ||||||
|  | <g id="node6" class="node"><title>Button</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="445,-36 391,-36 391,-0 445,-0 445,-36"/> | ||||||
|  | <text text-anchor="middle" x="418" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Button</text> | ||||||
|  | </g> | ||||||
|  | <!-- Button->DigitalInputDevice --> | ||||||
|  | <g id="edge5" class="edge"><title>Button->DigitalInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M410.584,-36.3034C407.206,-44.1868 403.13,-53.6958 399.377,-62.4536"/> | ||||||
|  | <polygon fill="black" stroke="black" points="396.053,-61.3255 395.33,-71.8957 402.487,-64.0829 396.053,-61.3255"/> | ||||||
|  | </g> | ||||||
|  | <!-- MotionSensor --> | ||||||
|  | <g id="node7" class="node"><title>MotionSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="82.5,-36 -0.5,-36 -0.5,-0 82.5,-0 82.5,-36"/> | ||||||
|  | <text text-anchor="middle" x="41" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">MotionSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- MotionSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge6" class="edge"><title>MotionSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M82.5014,-34.5353C109.086,-44.4869 143.895,-57.5168 172.8,-68.3368"/> | ||||||
|  | <polygon fill="black" stroke="black" points="171.763,-71.6859 182.356,-71.9139 174.217,-65.1302 171.763,-71.6859"/> | ||||||
|  | </g> | ||||||
|  | <!-- LightSensor --> | ||||||
|  | <g id="node8" class="node"><title>LightSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="175,-36 101,-36 101,-0 175,-0 175,-36"/> | ||||||
|  | <text text-anchor="middle" x="138" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LightSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- LightSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge7" class="edge"><title>LightSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M160.247,-36.3034C171.582,-45.1193 185.53,-55.9679 197.819,-65.5258"/> | ||||||
|  | <polygon fill="black" stroke="black" points="195.966,-68.519 206.009,-71.8957 200.264,-62.9935 195.966,-68.519"/> | ||||||
|  | </g> | ||||||
|  | <!-- LineSensor --> | ||||||
|  | <g id="node9" class="node"><title>LineSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="263,-36 193,-36 193,-0 263,-0 263,-36"/> | ||||||
|  | <text text-anchor="middle" x="228" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LineSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- LineSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge8" class="edge"><title>LineSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M228,-36.3034C228,-44.0173 228,-53.2875 228,-61.8876"/> | ||||||
|  | <polygon fill="black" stroke="black" points="224.5,-61.8956 228,-71.8957 231.5,-61.8957 224.5,-61.8956"/> | ||||||
|  | </g> | ||||||
|  | <!-- DistanceSensor --> | ||||||
|  | <g id="node10" class="node"><title>DistanceSensor</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="373,-36 281,-36 281,-0 373,-0 373,-36"/> | ||||||
|  | <text text-anchor="middle" x="327" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">DistanceSensor</text> | ||||||
|  | </g> | ||||||
|  | <!-- DistanceSensor->SmoothedInputDevice --> | ||||||
|  | <g id="edge9" class="edge"><title>DistanceSensor->SmoothedInputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M302.782,-36.1239C290.077,-45.1069 274.336,-56.2375 260.577,-65.9659"/> | ||||||
|  | <polygon fill="black" stroke="black" points="258.456,-63.1791 252.311,-71.8102 262.497,-68.8947 258.456,-63.1791"/> | ||||||
|  | </g> | ||||||
|  | </g> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 6.5 KiB | 
							
								
								
									
										25
									
								
								docs/images/output_device_hierarchy.dot
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,25 @@ | |||||||
|  | /* vim: set et sw=4 sts=4: */ | ||||||
|  |  | ||||||
|  | digraph classes { | ||||||
|  |     graph [rankdir=BT]; | ||||||
|  |     node [shape=rect, style=filled, fontname=Sans, fontsize=10]; | ||||||
|  |     edge []; | ||||||
|  |  | ||||||
|  |     /* Abstract classes */ | ||||||
|  |     node [color="#9ec6e0", fontcolor="#000000"] | ||||||
|  |     Device; | ||||||
|  |     GPIODevice; | ||||||
|  |  | ||||||
|  |     /* Concrete classes */ | ||||||
|  |     node [color="#2980b9", fontcolor="#ffffff"]; | ||||||
|  |  | ||||||
|  |     GPIODevice->Device; | ||||||
|  |     OutputDevice->GPIODevice; | ||||||
|  |     DigitalOutputDevice->OutputDevice; | ||||||
|  |     LED->DigitalOutputDevice; | ||||||
|  |     Buzzer->DigitalOutputDevice; | ||||||
|  |     PWMOutputDevice->OutputDevice; | ||||||
|  |     PWMLED->PWMOutputDevice; | ||||||
|  |     RGBLED->Device; | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								docs/images/output_device_hierarchy.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								docs/images/output_device_hierarchy.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 21 KiB | 
							
								
								
									
										98
									
								
								docs/images/output_device_hierarchy.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,98 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
|  | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||||||
|  |  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||||||
|  | <!-- Generated by graphviz version 2.36.0 (20140111.2315) | ||||||
|  |  --> | ||||||
|  | <!-- Title: classes Pages: 1 --> | ||||||
|  | <svg width="259pt" height="332pt" | ||||||
|  |  viewBox="0.00 0.00 259.00 332.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||||
|  | <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 328)"> | ||||||
|  | <title>classes</title> | ||||||
|  | <polygon fill="white" stroke="none" points="-4,4 -4,-328 255,-328 255,4 -4,4"/> | ||||||
|  | <!-- Device --> | ||||||
|  | <g id="node1" class="node"><title>Device</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="204,-324 150,-324 150,-288 204,-288 204,-324"/> | ||||||
|  | <text text-anchor="middle" x="177" y="-303.5" font-family="Sans" font-size="10.00" fill="#000000">Device</text> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice --> | ||||||
|  | <g id="node2" class="node"><title>GPIODevice</title> | ||||||
|  | <polygon fill="#9ec6e0" stroke="#9ec6e0" points="172,-252 100,-252 100,-216 172,-216 172,-252"/> | ||||||
|  | <text text-anchor="middle" x="136" y="-231.5" font-family="Sans" font-size="10.00" fill="#000000">GPIODevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- GPIODevice->Device --> | ||||||
|  | <g id="edge1" class="edge"><title>GPIODevice->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M146.135,-252.303C150.852,-260.356 156.562,-270.106 161.782,-279.018"/> | ||||||
|  | <polygon fill="black" stroke="black" points="158.908,-281.036 166.982,-287.896 164.948,-277.498 158.908,-281.036"/> | ||||||
|  | </g> | ||||||
|  | <!-- OutputDevice --> | ||||||
|  | <g id="node3" class="node"><title>OutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="177,-180 95,-180 95,-144 177,-144 177,-180"/> | ||||||
|  | <text text-anchor="middle" x="136" y="-159.5" font-family="Sans" font-size="10.00" fill="#ffffff">OutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- OutputDevice->GPIODevice --> | ||||||
|  | <g id="edge2" class="edge"><title>OutputDevice->GPIODevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M136,-180.303C136,-188.017 136,-197.288 136,-205.888"/> | ||||||
|  | <polygon fill="black" stroke="black" points="132.5,-205.896 136,-215.896 139.5,-205.896 132.5,-205.896"/> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalOutputDevice --> | ||||||
|  | <g id="node4" class="node"><title>DigitalOutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="129,-108 17,-108 17,-72 129,-72 129,-108"/> | ||||||
|  | <text text-anchor="middle" x="73" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">DigitalOutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- DigitalOutputDevice->OutputDevice --> | ||||||
|  | <g id="edge3" class="edge"><title>DigitalOutputDevice->OutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M88.573,-108.303C96.2022,-116.78 105.523,-127.136 113.876,-136.417"/> | ||||||
|  | <polygon fill="black" stroke="black" points="111.315,-138.804 120.606,-143.896 116.518,-134.121 111.315,-138.804"/> | ||||||
|  | </g> | ||||||
|  | <!-- LED --> | ||||||
|  | <g id="node5" class="node"><title>LED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="54,-36 0,-36 0,-0 54,-0 54,-36"/> | ||||||
|  | <text text-anchor="middle" x="27" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">LED</text> | ||||||
|  | </g> | ||||||
|  | <!-- LED->DigitalOutputDevice --> | ||||||
|  | <g id="edge4" class="edge"><title>LED->DigitalOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M38.3708,-36.3034C43.7185,-44.4411 50.2043,-54.311 56.1106,-63.2987"/> | ||||||
|  | <polygon fill="black" stroke="black" points="53.3432,-65.4607 61.76,-71.8957 59.1932,-61.6165 53.3432,-65.4607"/> | ||||||
|  | </g> | ||||||
|  | <!-- Buzzer --> | ||||||
|  | <g id="node6" class="node"><title>Buzzer</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="126,-36 72,-36 72,-0 126,-0 126,-36"/> | ||||||
|  | <text text-anchor="middle" x="99" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">Buzzer</text> | ||||||
|  | </g> | ||||||
|  | <!-- Buzzer->DigitalOutputDevice --> | ||||||
|  | <g id="edge5" class="edge"><title>Buzzer->DigitalOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M92.573,-36.3034C89.6449,-44.1868 86.113,-53.6958 82.8601,-62.4536"/> | ||||||
|  | <polygon fill="black" stroke="black" points="79.554,-61.3027 79.353,-71.8957 86.116,-63.7401 79.554,-61.3027"/> | ||||||
|  | </g> | ||||||
|  | <!-- PWMOutputDevice --> | ||||||
|  | <g id="node7" class="node"><title>PWMOutputDevice</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="251,-108 147,-108 147,-72 251,-72 251,-108"/> | ||||||
|  | <text text-anchor="middle" x="199" y="-87.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMOutputDevice</text> | ||||||
|  | </g> | ||||||
|  | <!-- PWMOutputDevice->OutputDevice --> | ||||||
|  | <g id="edge6" class="edge"><title>PWMOutputDevice->OutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M183.427,-108.303C175.798,-116.78 166.477,-127.136 158.124,-136.417"/> | ||||||
|  | <polygon fill="black" stroke="black" points="155.482,-134.121 151.394,-143.896 160.685,-138.804 155.482,-134.121"/> | ||||||
|  | </g> | ||||||
|  | <!-- PWMLED --> | ||||||
|  | <g id="node8" class="node"><title>PWMLED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="228,-36 170,-36 170,-0 228,-0 228,-36"/> | ||||||
|  | <text text-anchor="middle" x="199" y="-15.5" font-family="Sans" font-size="10.00" fill="#ffffff">PWMLED</text> | ||||||
|  | </g> | ||||||
|  | <!-- PWMLED->PWMOutputDevice --> | ||||||
|  | <g id="edge7" class="edge"><title>PWMLED->PWMOutputDevice</title> | ||||||
|  | <path fill="none" stroke="black" d="M199,-36.3034C199,-44.0173 199,-53.2875 199,-61.8876"/> | ||||||
|  | <polygon fill="black" stroke="black" points="195.5,-61.8956 199,-71.8957 202.5,-61.8957 195.5,-61.8956"/> | ||||||
|  | </g> | ||||||
|  | <!-- RGBLED --> | ||||||
|  | <g id="node9" class="node"><title>RGBLED</title> | ||||||
|  | <polygon fill="#2980b9" stroke="#2980b9" points="246,-252 190,-252 190,-216 246,-216 246,-252"/> | ||||||
|  | <text text-anchor="middle" x="218" y="-231.5" font-family="Sans" font-size="10.00" fill="#ffffff">RGBLED</text> | ||||||
|  | </g> | ||||||
|  | <!-- RGBLED->Device --> | ||||||
|  | <g id="edge8" class="edge"><title>RGBLED->Device</title> | ||||||
|  | <path fill="none" stroke="black" d="M207.865,-252.303C203.148,-260.356 197.438,-270.106 192.218,-279.018"/> | ||||||
|  | <polygon fill="black" stroke="black" points="189.052,-277.498 187.018,-287.896 195.092,-281.036 189.052,-277.498"/> | ||||||
|  | </g> | ||||||
|  | </g> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 5.7 KiB | 
| Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 121 KiB | 
| Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 63 KiB | 
| @@ -264,7 +264,7 @@ class CompositeDevice(Device): | |||||||
|     def __init__(self, *args, **kwargs): |     def __init__(self, *args, **kwargs): | ||||||
|         self._all = () |         self._all = () | ||||||
|         self._named = {} |         self._named = {} | ||||||
|         self._tuple = None |         self._namedtuple = None | ||||||
|         self._order = kwargs.pop('_order', None) |         self._order = kwargs.pop('_order', None) | ||||||
|         if self._order is None: |         if self._order is None: | ||||||
|             self._order = sorted(kwargs.keys()) |             self._order = sorted(kwargs.keys()) | ||||||
| @@ -279,7 +279,7 @@ class CompositeDevice(Device): | |||||||
|             if not isinstance(dev, Device): |             if not isinstance(dev, Device): | ||||||
|                 raise CompositeDeviceBadDevice("%s doesn't inherit from Device" % dev) |                 raise CompositeDeviceBadDevice("%s doesn't inherit from Device" % dev) | ||||||
|         self._named = kwargs |         self._named = kwargs | ||||||
|         self._tuple = namedtuple('%sValue' % self.__class__.__name__, chain( |         self._namedtuple = namedtuple('%sValue' % self.__class__.__name__, chain( | ||||||
|             (str(i) for i in range(len(args))), self._order), |             (str(i) for i in range(len(args))), self._order), | ||||||
|             rename=True) |             rename=True) | ||||||
|  |  | ||||||
| @@ -333,12 +333,12 @@ class CompositeDevice(Device): | |||||||
|         return all(device.closed for device in self) |         return all(device.closed for device in self) | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def tuple(self): |     def namedtuple(self): | ||||||
|         return self._tuple |         return self._namedtuple | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def value(self): |     def value(self): | ||||||
|         return self.tuple(*(device.value for device in self)) |         return self.namedtuple(*(device.value for device in self)) | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def is_active(self): |     def is_active(self): | ||||||
|   | |||||||
| @@ -66,10 +66,10 @@ class DigitalInputDevice(EventsMixin, InputDevice): | |||||||
|     """ |     """ | ||||||
|     Represents a generic input device with typical on/off behaviour. |     Represents a generic input device with typical on/off behaviour. | ||||||
|  |  | ||||||
|     This class extends :class:`WaitableInputDevice` with machinery to fire the |     This class extends :class:`InputDevice` with machinery to fire the active | ||||||
|     active and inactive events for devices that operate in a typical digital |     and inactive events for devices that operate in a typical digital manner: | ||||||
|     manner: straight forward on / off states with (reasonably) clean |     straight forward on / off states with (reasonably) clean transitions | ||||||
|     transitions between the two. |     between the two. | ||||||
|  |  | ||||||
|     :param float bouncetime: |     :param float bouncetime: | ||||||
|         Specifies the length of time (in seconds) that the component will |         Specifies the length of time (in seconds) that the component will | ||||||
| @@ -94,11 +94,10 @@ class SmoothedInputDevice(EventsMixin, InputDevice): | |||||||
|     Represents a generic input device which takes its value from the mean of a |     Represents a generic input device which takes its value from the mean of a | ||||||
|     queue of historical values. |     queue of historical values. | ||||||
|  |  | ||||||
|     This class extends :class:`WaitableInputDevice` with a queue which is |     This class extends :class:`InputDevice` with a queue which is filled by a | ||||||
|     filled by a background thread which continually polls the state of the |     background thread which continually polls the state of the underlying | ||||||
|     underlying device. The mean of the values in the queue is compared to a |     device. The mean of the values in the queue is compared to a threshold | ||||||
|     threshold which is used to determine the state of the :attr:`is_active` |     which is used to determine the state of the :attr:`is_active` property. | ||||||
|     property. |  | ||||||
|  |  | ||||||
|     .. note:: |     .. note:: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,9 @@ from .exc import ( | |||||||
| class ValuesMixin(object): | class ValuesMixin(object): | ||||||
|     """ |     """ | ||||||
|     Adds a :attr:`values` property to the class which returns an infinite |     Adds a :attr:`values` property to the class which returns an infinite | ||||||
|     generator of readings from the :attr:`value` property. |     generator of readings from the :attr:`value` property. There is rarely a | ||||||
|  |     need to use this mixin directly as all base classes in GPIO Zero include | ||||||
|  |     it. | ||||||
|  |  | ||||||
|     .. note:: |     .. note:: | ||||||
|  |  | ||||||
| @@ -50,8 +52,10 @@ class ValuesMixin(object): | |||||||
|  |  | ||||||
| class SourceMixin(object): | class SourceMixin(object): | ||||||
|     """ |     """ | ||||||
|     Adds a :attr:`source` property to the class which, given an iterable, |     Adds a :attr:`source` property to the class which, given an iterable, sets | ||||||
|     sets :attr:`value` to each member of that iterable until it is exhausted. |     :attr:`value` to each member of that iterable until it is exhausted.  This | ||||||
|  |     mixin is generally included in novel output devices to allow their state to | ||||||
|  |     be driven from another device. | ||||||
|  |  | ||||||
|     .. note:: |     .. note:: | ||||||
|  |  | ||||||
| @@ -312,6 +316,11 @@ class EventsMixin(object): | |||||||
|  |  | ||||||
|  |  | ||||||
| class HoldMixin(EventsMixin): | class HoldMixin(EventsMixin): | ||||||
|  |     """ | ||||||
|  |     Extends :class:`EventsMixin` to add the :attr:`when_held` event and the | ||||||
|  |     machinery to fire that event repeatedly (when :attr:`hold_repeat` is | ||||||
|  |     ``True``) at internals defined by :attr:`hold_time`. | ||||||
|  |     """ | ||||||
|     def __init__(self, *args, **kwargs): |     def __init__(self, *args, **kwargs): | ||||||
|         super(HoldMixin, self).__init__(*args, **kwargs) |         super(HoldMixin, self).__init__(*args, **kwargs) | ||||||
|         self._when_held = None |         self._when_held = None | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ from .mixins import EventsMixin | |||||||
| class InternalDevice(EventsMixin, Device): | class InternalDevice(EventsMixin, Device): | ||||||
|     """ |     """ | ||||||
|     Extends :class:`Device` to provide a basis for devices which have no |     Extends :class:`Device` to provide a basis for devices which have no | ||||||
|     specific hardware representation. This are effectively pseudo-devices and |     specific hardware representation. These are effectively pseudo-devices and | ||||||
|     usually represent operating system services like the internal clock, file |     usually represent operating system services like the internal clock, file | ||||||
|     systems or network facilities. |     systems or network facilities. | ||||||
|     """ |     """ | ||||||
|   | |||||||
| @@ -228,7 +228,7 @@ class MCP3001(MCP3xxx): | |||||||
| class MCP3002(MCP3xxx): | class MCP3002(MCP3xxx): | ||||||
|     """ |     """ | ||||||
|     The `MCP3002`_ is a 10-bit analog to digital converter with 2 channels |     The `MCP3002`_ is a 10-bit analog to digital converter with 2 channels | ||||||
|     (0-3). |     (0-1). | ||||||
|  |  | ||||||
|     .. _MCP3002: http://www.farnell.com/datasheets/1599363.pdf |     .. _MCP3002: http://www.farnell.com/datasheets/1599363.pdf | ||||||
|     """ |     """ | ||||||
|   | |||||||
| @@ -28,7 +28,8 @@ def negated(values): | |||||||
|     Returns the negation of the supplied values (``True`` becomes ``False``, |     Returns the negation of the supplied values (``True`` becomes ``False``, | ||||||
|     and ``False`` becomes ``True``). For example:: |     and ``False`` becomes ``True``). For example:: | ||||||
|  |  | ||||||
|         from gpiozero import Button, LED, negated |         from gpiozero import Button, LED | ||||||
|  |         from gpiozero.tools import negated | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = LED(4) |         led = LED(4) | ||||||
| @@ -45,7 +46,8 @@ def inverted(values): | |||||||
|     Returns the inversion of the supplied values (1 becomes 0, 0 becomes 1, |     Returns the inversion of the supplied values (1 becomes 0, 0 becomes 1, | ||||||
|     0.1 becomes 0.9, etc.). For example:: |     0.1 becomes 0.9, etc.). For example:: | ||||||
|  |  | ||||||
|         from gpiozero import MCP3008, PWMLED, inverted |         from gpiozero import MCP3008, PWMLED | ||||||
|  |         from gpiozero.tools import inverted | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = PWMLED(4) |         led = PWMLED(4) | ||||||
| @@ -57,36 +59,44 @@ def inverted(values): | |||||||
|         yield 1 - v |         yield 1 - v | ||||||
|  |  | ||||||
|  |  | ||||||
| def scaled(values, range_min, range_max, domain_min=0, domain_max=1): | def scaled(values, output_min, output_max, input_min=0, input_max=1): | ||||||
|     """ |     """ | ||||||
|     Returns *values* scaled from *range_min* to *range_max*, assuming that all |     Returns *values* scaled from *output_min* to *output_max*, assuming that | ||||||
|     items in *values* lie between *domain_min* and *domain_max* (which default |     all items in *values* lie between *input_min* and *input_max* (which | ||||||
|     to 0 and 1 respectively). For example, to control the direction of a motor |     default to 0 and 1 respectively). For example, to control the direction of | ||||||
|     (which is represented as a value between -1 and 1) using a potentiometer |     a motor (which is represented as a value between -1 and 1) using a | ||||||
|     (which typically provides values between 0 and 1):: |     potentiometer (which typically provides values between 0 and 1):: | ||||||
|  |  | ||||||
|         from gpiozero import Motor, MCP3008, scaled |         from gpiozero import Motor, MCP3008 | ||||||
|  |         from gpiozero.tools import scaled | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         motor = Motor(20, 21) |         motor = Motor(20, 21) | ||||||
|         pot = MCP3008(channel=0) |         pot = MCP3008(channel=0) | ||||||
|         motor.source = scaled(pot.values, -1, 1) |         motor.source = scaled(pot.values, -1, 1) | ||||||
|         pause() |         pause() | ||||||
|  |  | ||||||
|  |     .. warning:: | ||||||
|  |  | ||||||
|  |         If *values* contains elements that lie outside *input_min* to | ||||||
|  |         *input_max* (inclusive) then the function will not produce values that | ||||||
|  |         lie within *output_min* to *output_max* (inclusive). | ||||||
|     """ |     """ | ||||||
|     domain_size = domain_max - domain_min |     input_size = input_max - input_min | ||||||
|     range_size = range_max - range_min |     output_size = output_max - output_min | ||||||
|     for v in values: |     for v in values: | ||||||
|         yield (((v - domain_min) / domain_size) * range_size) + range_min |         yield (((v - input_min) / input_size) * output_size) + output_min | ||||||
|  |  | ||||||
|  |  | ||||||
| def clamped(values, range_min=0, range_max=1): | def clamped(values, output_min=0, output_max=1): | ||||||
|     """ |     """ | ||||||
|     Returns *values* clamped from *range_min* to *range_max*, i.e. any items |     Returns *values* clamped from *output_min* to *output_max*, i.e. any items | ||||||
|     less than *range_min* will be returned as *range_min* and any items |     less than *output_min* will be returned as *output_min* and any items | ||||||
|     larger than *range_max* will be returned as *range_max* (these default to |     larger than *output_max* will be returned as *output_max* (these default to | ||||||
|     0 and 1 respectively). For example:: |     0 and 1 respectively). For example:: | ||||||
|  |  | ||||||
|         from gpiozero import PWMLED, MCP3008, clamped |         from gpiozero import PWMLED, MCP3008 | ||||||
|  |         from gpiozero.tools import clamped | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = PWMLED(4) |         led = PWMLED(4) | ||||||
| @@ -95,19 +105,40 @@ def clamped(values, range_min=0, range_max=1): | |||||||
|         pause() |         pause() | ||||||
|     """ |     """ | ||||||
|     for v in values: |     for v in values: | ||||||
|         yield min(max(v, range_min), range_max) |         yield min(max(v, output_min), output_max) | ||||||
|  |  | ||||||
|  |  | ||||||
| def quantized(values, steps, range_min=0, range_max=1): | def absoluted(values): | ||||||
|  |     """ | ||||||
|  |     Returns *values* with all negative elements negated (so that they're | ||||||
|  |     positive). For example:: | ||||||
|  |  | ||||||
|  |         from gpiozero import PWMLED, Motor, MCP3008 | ||||||
|  |         from gpiozero.tools import absoluted, scaled | ||||||
|  |         from signal import pause | ||||||
|  |  | ||||||
|  |         led = PWMLED(4) | ||||||
|  |         motor = Motor(22, 27) | ||||||
|  |         pot = MCP3008(channel=0) | ||||||
|  |         motor.source = scaled(pot.values, -1, 1) | ||||||
|  |         led.source = absoluted(motor.values) | ||||||
|  |         pause() | ||||||
|  |     """ | ||||||
|  |     for v in values: | ||||||
|  |         yield abs(v) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def quantized(values, steps, output_min=0, output_max=1): | ||||||
|     """ |     """ | ||||||
|     Returns *values* quantized to *steps* increments. All items in *values* are |     Returns *values* quantized to *steps* increments. All items in *values* are | ||||||
|     assumed to be between *range_min* and *range_max* (use :func:`scaled` to |     assumed to be between *output_min* and *output_max* (use :func:`scaled` to | ||||||
|     ensure this if necessary). |     ensure this if necessary). | ||||||
|  |  | ||||||
|     For example, to quantize values between 0 and 1 to 5 "steps" (0.0, 0.25, |     For example, to quantize values between 0 and 1 to 5 "steps" (0.0, 0.25, | ||||||
|     0.5, 0.75, 1.0):: |     0.5, 0.75, 1.0):: | ||||||
|  |  | ||||||
|         from gpiozero import PWMLED, MCP3008, quantized |         from gpiozero import PWMLED, MCP3008 | ||||||
|  |         from gpiozero.tools import quantized | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = PWMLED(4) |         led = PWMLED(4) | ||||||
| @@ -115,25 +146,26 @@ def quantized(values, steps, range_min=0, range_max=1): | |||||||
|         led.source = quantized(pot.values, 4) |         led.source = quantized(pot.values, 4) | ||||||
|         pause() |         pause() | ||||||
|     """ |     """ | ||||||
|     range_size = range_max - range_min |     output_size = output_max - output_min | ||||||
|     for v in scaled(values, 0, 1, range_min, range_max): |     for v in scaled(values, 0, 1, output_min, output_max): | ||||||
|         yield ((int(v * steps) / steps) * range_size) + range_min |         yield ((int(v * steps) / steps) * output_size) + output_min | ||||||
|  |  | ||||||
|  |  | ||||||
| def conjunction(*values): | def all_values(*values): | ||||||
|     """ |     """ | ||||||
|     Returns the `logical conjunction`_ of all supplied values (the result is |     Returns the `logical conjunction`_ of all supplied values (the result is | ||||||
|     only ``True`` if and only if all input values are simultaneously ``True``). |     only ``True`` if and only if all input values are simultaneously ``True``). | ||||||
|     One or more *values* can be specified. For example, to light an |     One or more *values* can be specified. For example, to light an | ||||||
|     :class:`LED` only when *both* buttons are pressed:: |     :class:`LED` only when *both* buttons are pressed:: | ||||||
|  |  | ||||||
|         from gpiozero import LED, Button, conjunction |         from gpiozero import LED, Button | ||||||
|  |         from gpiozero.tools import all_values | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = LED(4) |         led = LED(4) | ||||||
|         btn1 = Button(20) |         btn1 = Button(20) | ||||||
|         btn2 = Button(21) |         btn2 = Button(21) | ||||||
|         led.source = conjunction(btn1.values, btn2.values) |         led.source = all_values(btn1.values, btn2.values) | ||||||
|         pause() |         pause() | ||||||
|  |  | ||||||
|     .. _logical conjunction: https://en.wikipedia.org/wiki/Logical_conjunction |     .. _logical conjunction: https://en.wikipedia.org/wiki/Logical_conjunction | ||||||
| @@ -142,20 +174,21 @@ def conjunction(*values): | |||||||
|         yield all(v) |         yield all(v) | ||||||
|  |  | ||||||
|  |  | ||||||
| def disjunction(*values): | def any_values(*values): | ||||||
|     """ |     """ | ||||||
|     Returns the `logical disjunction`_ of all supplied values (the result is |     Returns the `logical disjunction`_ of all supplied values (the result is | ||||||
|     ``True`` if any of the input values are currently ``True``). One or more |     ``True`` if any of the input values are currently ``True``). One or more | ||||||
|     *values* can be specified. For example, to light an :class:`LED` when |     *values* can be specified. For example, to light an :class:`LED` when | ||||||
|     *any* button is pressed:: |     *any* button is pressed:: | ||||||
|  |  | ||||||
|         from gpiozero import LED, Button, conjunction |         from gpiozero import LED, Button | ||||||
|  |         from gpiozero.tools import any_values | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = LED(4) |         led = LED(4) | ||||||
|         btn1 = Button(20) |         btn1 = Button(20) | ||||||
|         btn2 = Button(21) |         btn2 = Button(21) | ||||||
|         led.source = disjunction(btn1.values, btn2.values) |         led.source = any_values(btn1.values, btn2.values) | ||||||
|         pause() |         pause() | ||||||
|  |  | ||||||
|     .. _logical disjunction: https://en.wikipedia.org/wiki/Logical_disjunction |     .. _logical disjunction: https://en.wikipedia.org/wiki/Logical_disjunction | ||||||
| @@ -170,7 +203,8 @@ def averaged(*values): | |||||||
|     specified. For example, to light a :class:`PWMLED` as the average of |     specified. For example, to light a :class:`PWMLED` as the average of | ||||||
|     several potentiometers connected to an :class:`MCP3008` ADC:: |     several potentiometers connected to an :class:`MCP3008` ADC:: | ||||||
|  |  | ||||||
|         from gpiozero import MCP3008, PWMLED, averaged |         from gpiozero import MCP3008, PWMLED | ||||||
|  |         from gpiozero.tools import averaged | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         pot1 = MCP3008(channel=0) |         pot1 = MCP3008(channel=0) | ||||||
| @@ -190,7 +224,8 @@ def queued(values, qsize): | |||||||
|     determined by *qsize*) and begins yielding values only when the queue is |     determined by *qsize*) and begins yielding values only when the queue is | ||||||
|     full. For example, to "cascade" values along a sequence of LEDs:: |     full. For example, to "cascade" values along a sequence of LEDs:: | ||||||
|  |  | ||||||
|         from gpiozero import LEDBoard, Button, queued |         from gpiozero import LEDBoard, Button | ||||||
|  |         from gpiozero.tools import queued | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         leds = LEDBoard(5, 6, 13, 19, 26) |         leds = LEDBoard(5, 6, 13, 19, 26) | ||||||
| @@ -236,7 +271,8 @@ def random_values(): | |||||||
|     Provides an infinite source of random values between 0 and 1. For example, |     Provides an infinite source of random values between 0 and 1. For example, | ||||||
|     to produce a "flickering candle" effect with an LED:: |     to produce a "flickering candle" effect with an LED:: | ||||||
|  |  | ||||||
|         from gpiozero import PWMLED, random_values |         from gpiozero import PWMLED | ||||||
|  |         from gpiozero.tools import random_values | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         led = PWMLED(4) |         led = PWMLED(4) | ||||||
| @@ -256,13 +292,14 @@ def sin_values(): | |||||||
|     that increments by one for each requested value. For example, to produce a |     that increments by one for each requested value. For example, to produce a | ||||||
|     "siren" effect with a couple of LEDs:: |     "siren" effect with a couple of LEDs:: | ||||||
|  |  | ||||||
|         from gpiozero import PWMLED, sin_values, scaled, inverted |         from gpiozero import PWMLED | ||||||
|  |         from gpiozero.tools import sin_values, scaled, inverted | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         red = PWMLED(2) |         red = PWMLED(2) | ||||||
|         blue = PWMLED(3) |         blue = PWMLED(3) | ||||||
|         red.source_delay = 0.1 |         red.source_delay = 0.01 | ||||||
|         blue.source_delay = 0.1 |         blue.source_delay = 0.01 | ||||||
|         red.source = scaled(sin_values(), 0, 1, -1, 1) |         red.source = scaled(sin_values(), 0, 1, -1, 1) | ||||||
|         blue.source = inverted(red.values) |         blue.source = inverted(red.values) | ||||||
|         pause() |         pause() | ||||||
| @@ -280,11 +317,14 @@ def cos_values(): | |||||||
|     counter that increments by one for each requested value. For example, to |     counter that increments by one for each requested value. For example, to | ||||||
|     produce a "siren" effect with a couple of LEDs:: |     produce a "siren" effect with a couple of LEDs:: | ||||||
|  |  | ||||||
|         from gpiozero import PWMLED, cos_values, scaled, inverted |         from gpiozero import PWMLED | ||||||
|  |         from gpiozero.tools import cos_values, scaled, inverted | ||||||
|         from signal import pause |         from signal import pause | ||||||
|  |  | ||||||
|         red = PWMLED(2) |         red = PWMLED(2) | ||||||
|         blue = PWMLED(3) |         blue = PWMLED(3) | ||||||
|  |         red.source_delay = 0.01 | ||||||
|  |         blue.source_delay = 0.01 | ||||||
|         red.source = scaled(cos_values(), 0, 1, -1, 1) |         red.source = scaled(cos_values(), 0, 1, -1, 1) | ||||||
|         blue.source = inverted(red.values) |         blue.source = inverted(red.values) | ||||||
|         pause() |         pause() | ||||||
|   | |||||||
| @@ -90,7 +90,7 @@ def test_composite_device_sequence(): | |||||||
|         assert len(device) == 2 |         assert len(device) == 2 | ||||||
|         assert device[0].pin.number == 2 |         assert device[0].pin.number == 2 | ||||||
|         assert device[1].pin.number == 3 |         assert device[1].pin.number == 3 | ||||||
|         assert device.tuple._fields == ('_0', '_1') |         assert device.namedtuple._fields == ('_0', '_1') | ||||||
|  |  | ||||||
| def test_composite_device_values(): | def test_composite_device_values(): | ||||||
|     with CompositeDevice( |     with CompositeDevice( | ||||||
| @@ -109,7 +109,7 @@ def test_composite_device_named(): | |||||||
|             bar=InputDevice(MockPin(3)), |             bar=InputDevice(MockPin(3)), | ||||||
|             _order=('foo', 'bar') |             _order=('foo', 'bar') | ||||||
|             ) as device: |             ) as device: | ||||||
|         assert device.tuple._fields == ('foo', 'bar') |         assert device.namedtuple._fields == ('foo', 'bar') | ||||||
|         assert device.value == (0, 0) |         assert device.value == (0, 0) | ||||||
|         assert not device.is_active |         assert not device.is_active | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,21 +33,24 @@ def test_scaled(): | |||||||
| def test_clamped(): | def test_clamped(): | ||||||
|     assert list(clamped((-1, 0, 1, 2))) == [0, 0, 1, 1] |     assert list(clamped((-1, 0, 1, 2))) == [0, 0, 1, 1] | ||||||
|  |  | ||||||
|  | def test_absoluted(): | ||||||
|  |     assert list(absoluted((-2, -1, 0, 1, 2))) == [2, 1, 0, 1, 2] | ||||||
|  |  | ||||||
| def test_quantized(): | def test_quantized(): | ||||||
|     assert list(quantized((0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1), 4)) == [ |     assert list(quantized((0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1), 4)) == [ | ||||||
|             0.0, 0.0, 0.0, 0.25, 0.25, 0.5, 0.5, 0.5, 0.75, 0.75, 1.0] |             0.0, 0.0, 0.0, 0.25, 0.25, 0.5, 0.5, 0.5, 0.75, 0.75, 1.0] | ||||||
|     assert list(quantized((0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1), 5)) == [ |     assert list(quantized((0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1), 5)) == [ | ||||||
|             0.0, 0.0, 0.2, 0.2, 0.4, 0.4, 0.6, 0.6, 0.8, 0.8, 1.0] |             0.0, 0.0, 0.2, 0.2, 0.4, 0.4, 0.6, 0.6, 0.8, 0.8, 1.0] | ||||||
|  |  | ||||||
| def test_conjunction(): | def test_all_values(): | ||||||
|     assert list(conjunction(())) == [] |     assert list(all_values(())) == [] | ||||||
|     assert list(conjunction((False, True))) == [False, True] |     assert list(all_values((False, True))) == [False, True] | ||||||
|     assert list(conjunction((0, 1, 0, 1), (0, 0, 0, 1))) == [0, 0, 0, 1] |     assert list(all_values((0, 1, 0, 1), (0, 0, 0, 1))) == [0, 0, 0, 1] | ||||||
|  |  | ||||||
| def test_disjunction(): | def test_any_values(): | ||||||
|     assert list(disjunction(())) == [] |     assert list(any_values(())) == [] | ||||||
|     assert list(disjunction((False, True))) == [False, True] |     assert list(any_values((False, True))) == [False, True] | ||||||
|     assert list(disjunction((0, 1, 0, 1), (0, 0, 0, 1))) == [0, 1, 0, 1] |     assert list(any_values((0, 1, 0, 1), (0, 0, 0, 1))) == [0, 1, 0, 1] | ||||||
|  |  | ||||||
| def test_averaged(): | def test_averaged(): | ||||||
|     assert list(averaged(())) == [] |     assert list(averaged(())) == [] | ||||||
|   | |||||||