Compound Sensor
===============


**Special sensor that merges other sensors' outputs**


This special sensor is constructed by passing a list of other sensors, and
creates a new datastream from the concatenation of other sensors'
`local_data`.

More accurately, it streams a dictionary of `{<sensor name>: <sensor
local_data>}`.

Note that services exposed by original sensors *are not* exposed by the
compound sensor.




.. cssclass:: properties morse-section

Configuration parameters for Compound Sensor
--------------------------------------------


You can set these properties in your scripts with ``<component>.properties(<property1>=..., <property2>=...)``.

- ``sensors`` (The list of sensor names to merge., default: ``[]``)
	(no documentation available yet)


.. cssclass:: fields morse-section

Data fields
-----------


This sensor exports these datafields at each simulation step:

- ``timestamp`` (float, initial value: ``0.0``)
	number of seconds in simulated time

*Interface support:*

(attention, no interface support!)

.. cssclass:: services morse-section

Services for Compound Sensor
----------------------------

- ``set_property(prop_name, prop_val)`` (blocking)
    Modify one property on a component
    
    
  - Parameters

    - ``prop_name``: the name of the property to modify (as shown the documentation)
    - ``prop_val``: the new value of the property. Note that there is no checking about the type of the value so be careful

  - Return value

    nothing 

- ``get_properties()`` (blocking)
    Returns the properties of a component.
    
    
  - Return value

    a dictionary of the current component's properties  

- ``get_local_data()`` (blocking)
    Returns the current data stored in the sensor.
    
    
  - Return value

    a dictionary of the current sensor's data 

- ``get_configurations()`` (blocking)
    Returns the configurations of a component (parsed from the properties).
    
    
  - Return value

    a dictionary of the current component's configurations  



.. cssclass:: files morse-section

Other sources of examples
+++++++++++++++++++++++++

- `Source code <../../_modules/morse/sensors/compound.html>`_
- `Unit-test <../../_modules/base/compound_testing.html>`_




*(This page has been auto-generated from MORSE module morse.sensors.compound.)*
