3.1. Agent Tool

This tool launches an Agent Node, which is the node in charge of communicating a local node or AML-IP cluster with the rest of the network in WANs. It centralizes the WAN discovery and communication, i.e. it is the bridge for all the nodes in their LANs with the rest of the AML-IP components.

3.1.1. Building the tool

If the tool package is not compiled, please refer to Linux installation from sources using colcon or run the command below.

colcon build --packages-up-to amlip_agent

Once AML-IP packages are installed and built, source the workspace using the following command.

source install/setup.bash

3.1.2. Application Arguments

The Agent Tool supports several input arguments:

Command

Option

Long option

Value

Default Value

Help

-h

--help

Entity

-e

--entity

Agent Entity type.

client

Debug

-d

--debug

Enables the AML-IP
logs so the execution can be
followed by internal
debugging information.
Sets Log Verbosity
to info and
Log Filter
to AMLIP.

Log Verbosity

Set the verbosity level so
only log messages with equal
or higher importance level
are shown.

--log-verbosity

warning

Log Filter

Set a regex string as filter.

--log-filter

AMLIP

Name

-n

--name

Readable File Path

amlip_agent

DDS Domain

-d

--domain

Configures the 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

3.1.2.1. Help Argument

It shows the usage information of the tool.

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.

Debug options:
-d, --debug                           Set log verbosity to Info (Using this option with --log-filter and/or --log-verbosity will head to undefined behaviour).
    --log-filter                      Set a Regex Filter to filter by category the info and warning log entries. (Default = "AMLIP").
    --log-verbosity <info|warning|error>
                                        Set a Log Verbosity Level higher or equal the one given (Default: warning).

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: amlip_agent).
-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: amlip_agent).
-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).

3.1.3. Run tool

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

source <path-to-amlip-installation>/install/setup.bash

Launching an Agent Client Node instance is as easy as executing the following command:

amlip_agent -e client -c 87.111.115.111 -p 18000 -t tcp

To launch an Agent Server Node, execute:

amlip_agent -e server -l 87.111.115.111 -q 18000 -t tcp

To launch an Agent Repeater Node, execute:

amlip_agent -e repeater -l 87.111.115.111 -q 18000 -t tcp

3.1.4. Close tool

In order to stop the Agent tool, press Ctrl + C in the terminal where the process is running.