********************
Pulse Device
********************

.. index:: Pulse Device

Overview
====================

The Pulse device is a driver with a single Boolean channel.  When the 
channel is set to its opposite Boolean value, it will have that
value for a specified period of time, then returning to its initial value.

The pulse device is a virtual device driver.  It connects to no hardware
peripheral directly.

The channel for pulse device has the following properties:

   *  An boolean initial value which the channel will use as a reference
      state.  During the pulse, the channel's value will be opposite to
      this initial value.
   *  A specified period of time to pulse for, before returning to
      the channels initial value.
   *  The pulse is stoppable, reverting the initial value before it
      was scheduled to revert.

.. note:: You can stop a curent pulse by setting ``pulse_channel`` to 
   its initial value.  However, you cannot increase the duration of a
   pulse.  Trying to pulse ``pulse_channel`` while it is in a pulse
   does nothing.

Configuration
====================

A typical pulse device configuration block looks like this::

  - name: pulse
    driver: devices.pulse_device:PulseDevice
    settings:
        duration: 5.0
        initial_value: False

Settings
--------------------

initial_value (optional, default: 5.0)
  Defines what the initial value of the pulse_channel should be
  and what value the pulse channel should return to.
    
duration  (optional, default: false)
  Defines the time in seconds pulse_channel should wait before
  reverting to its initial value.

Channels
====================

pulse_channel  (Get and Set, type: bool) 
    The name of the channel that will be pulsed.

