.. _tools:

Tools
=====

WRTD provides two comand-line, Python based tools for accessing a :ref:`node`. One
(:ref:`wrtd_config`) is used to add/remove/configure :ref:`Rules <rule>` and :ref:`Alarms <alarm>`,
and to display information about the :ref:`node` while the other (:ref:`wrtd_logging`) is used for
reading entries from the :ref:`event_log`.

Both tools have a built-in help system that can be accessed by passing the ``-h`` option to the
tool.

Both tools take an obligatory ``-D`` option to specify the :ref:`node` to access. For more details,
please refer to :ref:`node_id`.

For details on how to install these tools (and their dependencies), please refer to
:numref:`installation`.

.. _wrtd_config:

wrtd_config
-----------

.. code-block:: console

   > python wrtd-config.py -h
   usage: wrtd-config.py [-h] -D DEV <command> ...

   WRTD node configuration tool

   optional arguments:
     -h, --help            show this help message and exit
     -D DEV, --dev-id DEV  MockTurtle device ID (integer) to open

   Available commands:
     <command>             (Use "<command> -h" to get more details)
       sys-info            Show system information
       sys-time            Show current system time
       set-log             Enable/Disable logging
       clear-log           Clear pending log entries
       list-rules          List all defined Rules
       add-rule            Define a new Rule
       set-rule            Configure a Rule
       remove-rule         Delete a Rule
       remove-all-rules    Delete all Rules
       enable-rule         Enable a Rule
       disable-rule        Disable a Rule
       disable-all-rules   Disable all Rules
       rule-info           Display information about a Rule
       reset-rule-stats    Reset all statistics of a Rule
       list-alarms         List all defined Alarms
       add-alarm           Define a new Alarm
       set-alarm           Configure an Alarm
       remove-alarm        Delete an Alarm
       remove-all-alarms   Delete all Alarms
       enable-alarm        Enable an Alarm
       disable-alarm       Disable an Alarm
       disable-all-alarms  Disable all Alarms
       alarm-info          Display information about an Alarm
                
.. _wrtd_logging:

wrtd_logging
------------
