Executive Summary
-----------------
The dataNodeBase class is used to generate a standard interface and list of features for modules that generate or downlink simulated onboard data (ie. science or telemetry data). Specifically, each DataNodeBase:

1. Writes out a :ref:`DataNodeUsageMsgPayload` describing its data name and the amount of data it has generated or downlinked (using baud rates) at each sim update.
2. Can be switched on or off using an optional :ref:`DeviceCmdMsgPayload`
3. Can also be switched on or off using the public variable ``dataStatus``

Core functionality is wrapped in the ``evaluateDataModel()`` protected virtual void method, which is assumed to compute data usage based on a module specific mathematical model. Typically, this will be a straightforward static baud rate. However, some modules may wish to perform computations to generate variable baud rates based on data content.

Protected methods prepended with ``custom`` are intended for module developers to override with additional, module-specific functionality.

For more information on how to set up and use classes derived from this module, see the simple data system example: :ref:`scenarioDataDemo`.

Module Assumptions and Limitations
----------------------------------
The data draw or supply for this module is assumed to be constant between scenario time steps.

Message Connection Descriptions
-------------------------------
The following table lists all the module input and output messages.  The module msg variable name is set by the user from python.  The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

.. table:: Module I/O Messages
    :widths: 25 25 100

    +-----------------------+---------------------------------+---------------------------------------------------+
    | Msg Variable Name     | Msg Type                        | Description                                       |
    +=======================+=================================+===================================================+
    | nodeDataOutMsg        | :ref:`DataNodeUsageMsgPayload`  | Writes out the data name and amount               |
    |                       |                                 | used/generated by a DataNodeBase instance.        |
    +-----------------------+---------------------------------+---------------------------------------------------+
    | nodeStatusInMsg       | :ref:`DeviceCmdMsgPayload`      | (optional). If deviceCmd is 0,                    |
    |                       |                                 | the node is disabled; other values indicate       |
    |                       |                                 | various data modes depending on the module.       |
    +-----------------------+---------------------------------+---------------------------------------------------+


User Guide
----------
- To specify the module's simulated data consumption (neg. value) or generation (pos. value), set the variable ``nodeBaudRate`` to the desired value in units of bps (baud) in Python.
- To specify the name of the data so that it may be partitioned in a storage unit, set the variable 'nodeDataName' in Python.
- Connect to the module output message using the variable ``nodeDataOutMsg`` in Python.
- The module data status can be set using the public variable ``dataStatus``.  The default value is 1 meaning the device is on.  If set to 0 the device is off and the data value returns to 0.
- The module data status can be set also through an optional input message.  By subscribing to ``nodeStatusInMsg`` the status message is read in at every time step.
