Skip to content

Commit

Permalink
Add agent tool docu
Browse files Browse the repository at this point in the history
Signed-off-by: Irene Bandera <[email protected]>
  • Loading branch information
irenebm committed Jul 31, 2023
1 parent dfa4b1c commit ab815ca
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 3 deletions.
1 change: 1 addition & 0 deletions amlip_docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@

Scenarios </rst/user_manual/scenarios/scenarios>
Nodes </rst/user_manual/nodes/nodes>
Tools </rst/user_manual/tools/tools>


.. _index_developer_manual:
Expand Down
3 changes: 3 additions & 0 deletions amlip_docs/rst/appendixes/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ DDS
Specification: `<https://www.omg.org/spec/DDS/>`_.
More information in :ref:`User Manual section <technologies_dds>`.

Domain Id
Virtual partition for DDS networks.

Endpoint
Individual Entity that can :term:`Subscribe` or :term:`Publish` in a specific :term:`Topic`.

Expand Down
188 changes: 188 additions & 0 deletions amlip_docs/rst/user_manual/tools/agent.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
.. include:: ../../exports/alias.include

.. _user_manual_tools_agent:

##########
Agent Tool
##########

This tool executes an :ref:`user_manual_nodes_agent` which is the main transport component that manages the dynamic discovery of *AML-IP Algebraic Nodes* deployed within a :term:`LAN` and the discovery of other AML-IP clusters over :term:`WAN`.

Building the tool
=================

If the tool package is not compiled, please refer to :ref:`developer_manual_installation_sources_linux_colcon` or run the command below.

.. code-block:: bash
colcon build --packages-up-to-regex amlip
Once AML-IP packages are installed and built, import the libraries using the following command.

.. code-block:: bash
source install/setup.bash
Application Arguments
=====================

The Agent Tool supports several input arguments:

.. list-table::
:header-rows: 1

* - Command
- Option
- Long option
- Value
- Default Value

* - :ref:`Help <user_manual_tool_agent_help_argument>`
- ``-h``
- ``--help``
-
-

* - Entity
- ``-e``
- ``--entity``
- Agent Entity type.
- ``client``

* - Name
- ``-n``
- ``--name``
- Readable File Path
- ``amlip_agent``

* - DDS Domain
- ``-d``
- ``--domain``
- Configures the :term:`Domain Id`.
- ``0``

* - Connection Address
- ``-c``
- ``--connection-address``
- Address to connect.
- ``127.0.0.1``

* - Connection Port
- ``-p``
- ``--connection-port``
- Address connection port.
- ``12121``

* - Listening Address
- ``-l``
- ``--listening-address``
- Address where listen.
- ``127.0.0.1``

* - Listening Port
- ``-q``
- ``--listening-port``
- Address listening port.
- ``12121``

* - Transport
- ``-t``
- ``--transport``
- Use only TCPv4 or UDPv4 transport.
- ``TCPv4``

.. _user_manual_tool_agent_help_argument:

Help Argument
-------------

It shows the usage information of the tool.

.. code-block:: console
Usage: ./agent tool
General options:
-h, --help
Produce help message.
-e, --entity <client|server|repeater>
Agent Entity type (Default: client). Allowed options:
• client -> Run an Agent Client Node.
• server -> Run an Agent Server Node.
• repeater -> Run an Agent Repeater Node.
Client options:
-n, --name <name>
Name (Default: amlip_agent).
-d, --domain <id>
DDS domain ID (Default: 0).
-c, --connection-address <address>
Address to connect (Default: 127.0.0.1).
-p, --connection-port <num>
Address connection port (Default: 12121).
-t, --transport <tcp|udp>
Use only TCPv4 or UDPv4 transport. (Default: TCPv4).
Server options:
-n, --name <name>
Name (Default: agent_tool).
-d, --domain <id>
DDS domain ID (Default: 0).
-l, --listening-address <address>
Address where listen (Default: 127.0.0.1).
-q, --listening-port <num>
Address listening port (Default: 12121).
-t, --transport <tcp|udp>
Use only TCPv4 or UDPv4 transport. (Default: TCPv4).
Repeater options:
-n, --name <name>
Name (Default: agent_tool).
-d, --domain <id>
DDS domain ID (Default: 0).
-c, --connection-address <address>
Address to connect (Default: 127.0.0.1).
-l, --listening-address <address>
Address where listen (Default: 127.0.0.1).
-p, --connection-port <num>
Address connection port (Default: 12121).
-q, --listening-port <num>
Address listening port (Default: 12121).
-t, --transport <tcp|udp>
Use only TCPv4 or UDPv4 transport. (Default: TCPv4).
Run tool
========

Source the following file to setup the AML-IP environment:

.. code-block:: bash
source <path-to-amlip-installation>/install/setup.bash
Launching an :ref:`Agent Client Node <user_manual_nodes_agent_client>` instance is as easy as executing the following command:

.. code-block:: bash
amlip_agent -e client
To launch an :ref:`Agent Server Node <user_manual_nodes_agent_server>`, execute:

.. code-block:: bash
amlip_agent -e server
To launch an :ref:`Agent Repeater Node <user_manual_nodes_agent_repeater>`, execute:

.. code-block:: bash
amlip_agent -e repeater
Close tool
==========

In order to stop the *Agent* tool, press ``Ctrl + C`` in the terminal where the process is running.
12 changes: 12 additions & 0 deletions amlip_docs/rst/user_manual/tools/tools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. include:: ../../exports/alias.include

.. _user_manual_tools:

############
AML-IP Tools
############

.. toctree::
:maxdepth: 1

agent
2 changes: 1 addition & 1 deletion tools/agent_tool/project_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

###############################################################################
# Set settings for project fastddsspy_tool
# Set settings for project agent_tool
###############################################################################

set(MODULE_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const option::Descriptor usage[] = {
" -p, --connection-port <num> \tAddress connection port (Default: 12121)." },
{ TRANSPORT, 0, "t", "transport", Arg::Transport,
" -t, --transport <tcp|udp> \tUse only TCPv4 or UDPv4 transport. (Default: TCPv4)." },
{ 0, 0, 0, 0, 0, 0 },

/// SERVER OPTIONS
{UNKNOWN_OPT, 0, "", "", Arg::None, "\nServer options:"},
{ NAME, 0, "n", "name", Arg::String,
Expand All @@ -204,7 +204,7 @@ const option::Descriptor usage[] = {
" -q, --listening-port <num> \tAddress listening port (Default: 12121)." },
{ TRANSPORT, 0, "t", "transport", Arg::Transport,
" -t, --transport <tcp|udp> \tUse only TCPv4 or UDPv4 transport. (Default: TCPv4)." },
{ 0, 0, 0, 0, 0, 0 },

/// REPEATER OPTIONS
{UNKNOWN_OPT, 0, "", "", Arg::None, "\nRepeater options:"},
{ NAME, 0, "n", "name", Arg::String,
Expand All @@ -221,6 +221,7 @@ const option::Descriptor usage[] = {
" -q, --listening-port <num> \tAddress listening port (Default: 12121)." },
{ TRANSPORT, 0, "t", "transport", Arg::Transport,
" -t, --transport <tcp|udp> \tUse only TCPv4 or UDPv4 transport. (Default: TCPv4)." },

{ 0, 0, 0, 0, 0, 0 }
};

Expand Down

0 comments on commit ab815ca

Please sign in to comment.