Skip to content

Commit

Permalink
Add new verbose modes and search topics using wildcards (#99)
Browse files Browse the repository at this point in the history
* Add new functionalities to spy CommandLine interface

Signed-off-by: Lucia Echevarria <[email protected]>

* Update documentation

Signed-off-by: Lucia Echevarria <[email protected]>

* Change activate to check if there are discovered types for topic prefix and adapt tests

Signed-off-by: Lucia Echevarria <[email protected]>

* Use compact mode by default

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Update documentation

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Remove nightly job after rebase

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Fix help tests

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Fix test suite

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Remove const when passing argument by value

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Remove default values

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Apply some comments from review

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Apply suggested changes

Signed-off-by: Lucia Echevarria <[email protected]>

* Update release notes

Signed-off-by: Lucia Echevarria <[email protected]>

* Update comment in Controller

Signed-off-by: Lucia Echevarria <[email protected]>

* Fix fastddsspy_tool tests

Signed-off-by: Lucia Echevarria <[email protected]>

* Fix bugs in docs

Signed-off-by: Lucia Echevarria <[email protected]>

* Correct link, remove unnecesary attribute and some other minor changes

Signed-off-by: Lucia Echevarria <[email protected]>

* Add information about high verbosity mode

Signed-off-by: Lucia Echevarria <[email protected]>

* Uncrustify

Signed-off-by: Lucia Echevarria <[email protected]>

* Apply suggested changes

Signed-off-by: Lucia Echevarria <[email protected]>

---------

Signed-off-by: Lucia Echevarria <[email protected]>
Signed-off-by: Raul Sanchez-Mateos <[email protected]>
Co-authored-by: Raul Sanchez-Mateos <[email protected]>
  • Loading branch information
LuciaEchevarria99 and rsanchez15 authored Oct 14, 2024
1 parent 3bbc1a9 commit f1fb766
Show file tree
Hide file tree
Showing 41 changed files with 615 additions and 497 deletions.
6 changes: 5 additions & 1 deletion docs/rst/notes/forthcoming_version.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

.. add orphan tag when new info added to this file
:orphan:
.. :orphan:
###################
Forthcoming Version
###################

Next release will include the following **User Interface features**:

* Support wildcard topic search as argument for :ref:`topics <user_manual_command_topic>` and :ref:`echo <user_manual_command_echo>` commands.
6 changes: 3 additions & 3 deletions docs/rst/notes/notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. _notes:

.. .. include:: forthcoming_version.rst
.. include:: forthcoming_version.rst

##############
Version v1.0.0
Expand Down Expand Up @@ -51,8 +51,8 @@ This release includes the following **Dependencies Update**:
- `v1.0.0 <https://github.com/eProsima/dev-utils/releases/tag/v1.0.0>`_
* - DDS Pipe
- `eProsima/DDS-Pipe <https://github.com/eProsima/DDS-Pipe.git>`_
- `v0.4.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.4.0>`_
- `v1.0.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.4.0>`_
- `v0.4.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.4.0>`__
- `v1.0.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v1.0.0>`__


#################
Expand Down
2 changes: 1 addition & 1 deletion docs/rst/notes/previous_versions/v0.3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ This release includes the following **Dependencies Update**:
* - DDS Pipe
- `eProsima/DDS-Pipe <https://github.com/eProsima/DDS-Pipe.git>`_
- `v0.2.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.2.0>`_
- `v0.3.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.3.0>`_
- `v0.3.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.3.0>`__
4 changes: 2 additions & 2 deletions docs/rst/notes/previous_versions/v0.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ This release includes the following **Dependencies Update**:
- `v0.6.0 <https://github.com/eProsima/dev-utils/releases/tag/v0.6.0>`_
* - DDS Pipe
- `eProsima/DDS-Pipe <https://github.com/eProsima/DDS-Pipe.git>`_
- `v0.3.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.3.0>`_
- `v0.4.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.4.0>`_
- `v0.3.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.3.0>`__
- `v0.4.0 <https://github.com/eProsima/DDS-Pipe/releases/tag/v0.4.0>`__
7 changes: 4 additions & 3 deletions docs/rst/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ Colcon
cpp
dataflow
datagram
Dev
fastddsspy
Foonathan
ddspipe
ddsrouter
deserialization
Dev
Diffie
Dockerfile
downsampling
Expand All @@ -23,13 +21,16 @@ eProsima
executables
fastcdr
fastdds
fastddsspy
fastrtps
Foonathan
Foxglove
github
gMock
Gtest
guid
idl
infos
IPv
kubernetes
localhost
Expand Down
3 changes: 2 additions & 1 deletion docs/rst/user_manual/commands/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ Summary
- Show Topic info
- ``_`` |br|
``verbose`` |br|
``vv`` |br|
``<topic name>``
- ``topic`` ``topics`` |br|
``t`` ``T``

* - :ref:`user_manual_command_show`
* - :ref:`user_manual_command_echo`
- Show real-time receiving user data.
- ``<topic name>`` |br|
``<topic name> verbose`` |br|
Expand Down
29 changes: 20 additions & 9 deletions docs/rst/user_manual/commands/data.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. include:: ../../exports/alias.include
.. include:: ../../exports/roles.include

.. _user_manual_command_show:
.. _user_manual_command_echo:

####
Show
Echo
####

This command prints every User Data received in a human readable way.
Expand All @@ -19,7 +19,7 @@ Key-words
=========

These are the key-words recognize as this command:
``show`` ``print`` ``s`` ``S``.
``echo`` ``show`` ``print`` ``s`` ``S``.

Data Type discovered
====================
Expand All @@ -30,25 +30,36 @@ The information whether the topic data type is already discovered be the applica
Arguments
=========

**Show** command support different combination of arguments:
**Echo** command supports different combination of arguments:

Topic name
----------

When a topic name is given, the information shown is the data received in real-time in the topic specified.
The output format is as follows: :ref:`user_manual_command_show_output_simple`.
The output format is as follows: :ref:`user_manual_command_echo_output_simple`.

Topic name with wildcards
-------------------------
When a topic name is provided with wildcards (*), the command will display real-time information for all topics whose names match the given filter.

For example, if you enter ``sensor_*``, the command will print data from all topics starting with ``sensor_``, such as ``sensor_temperature``, ``sensor_humidity``, etc.

Topic name + Verbose
--------------------

Giving a topic name and the the :ref:`verbose argument <user_manual_commands_input_verbose>` the output is the data received in real-time with additional meta-information as the topic name, the source timestamp, and the source :term:`DataWriter` :term:`Guid`.
Data is printing using :ref:`user_manual_command_show_output_verbose`.
Data is printing using :ref:`user_manual_command_echo_output_verbose`.

Topic name wildcard
-------------------

When a topic name is provided with wildcards (*) and the :ref:`verbose argument <user_manual_commands_input_verbose>`, the command displays detailed real-time information and meta-information for all topics that match the given filter.

All
---

This argument prints all topics which Data Type has been discovered.
Data is printing using :ref:`user_manual_command_show_output_verbose`.
Data is printing using :ref:`user_manual_command_echo_output_verbose`.

Output Format
=============
Expand All @@ -60,7 +71,7 @@ Output Format

The data information is retrieved in 2 formats depending on the verbose option.

.. _user_manual_command_show_output_simple:
.. _user_manual_command_echo_output_simple:

Simple Data format
------------------
Expand All @@ -74,7 +85,7 @@ Only shows the data, by
...
---
.. _user_manual_command_show_output_verbose:
.. _user_manual_command_echo_output_verbose:

Verbose Data format
-------------------
Expand Down
15 changes: 15 additions & 0 deletions docs/rst/user_manual/commands/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@

.. _user_manual_commands_input:

.. _user_manual_commands_input_compact:

Compact
=======

The compact argument provides a simplified and concise output format for the information received by the command.
This format is useful when a more streamlined view of the data is preferred, reducing the amount of metadata shown and
focusing on the essential data values from the topics.

Key-words
---------

These are the key-words recognize as this argument:
``compact`` ``c`` ``-c`` ``--c`` ``C``.

.. _user_manual_commands_input_verbose:

Verbose
Expand Down
31 changes: 22 additions & 9 deletions docs/rst/user_manual/commands/topic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ These are the key-words recognize as this command:
Arguments
=========

**Topic** command support 0 or 1 argument:
**Topic** command supports from 0 to 2 arguments:

*No argument*
-------------
Expand All @@ -30,8 +30,7 @@ The output format is as follows: :ref:`user_manual_command_topic_output_simple`.
Verbose
-------

This argument queries for more complete information about each of the topics in the network.
It adds the Guid of each endpoint on the topic and the whether the type has been discovered.
This argument (``v`` or ``vv``) queries for more complete information about each of the topics in the network.
The output is a **list** of data with :ref:`verbose information <user_manual_command_topic_output_verbose>`.
Check the :ref:`verbose <user_manual_commands_input_verbose>` section in order to know which key-words are available for this argument.

Expand All @@ -47,15 +46,28 @@ This Guid must exist inside the DDS network.
If there are 2 topics with the same name and different Topic Data Type, only one of them could be visible.
These is a circumstance that :term:`DDS` allows, but it is strongly suggested not to do.

Topic name with wildcards
-------------------------

When a topic name contains wildcards (*), this command retrieves :ref:`verbose information <user_manual_command_topic_output_verbose>` for all topics that match the given filter.
This allows users to query multiple topics in a single command, making it easier to gather related data quickly.

Output Format
=============

The topic information is retrieved in 2 formats depending on the verbose option.
The topic information is retrieved in multiple formats depending on the verbosity option.

.. _user_manual_command_topic_output_simple:

Simple Writer info
-----------------------
Topics info
-----------

- topic: <topic name> (<topic type name>) (<n writers>|<n readers>) [<rate> Hz]

.. _user_manual_command_topic_output_verbose:

Topics info in verbose mode
---------------------------

.. code-block:: yaml
Expand All @@ -65,10 +77,11 @@ Simple Writer info
datareaders: <number of datareaders currently active>
rate: <samples per second> Hz
.. _user_manual_command_topic_output_verbose:
Topics info in high verbosity mode
----------------------------------

Verbose Writer info
------------------------
This argument queries for more complete information about each of the topics in the network.
It adds the Guid of each endpoint on the topic and the whether the type has been discovered.

.. code-block:: yaml
Expand Down
2 changes: 0 additions & 2 deletions docs/rst/user_manual/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ The type of the logs published is defined as follows:
enable: true
domain: 84
topic-name: "FastDdsSpyLogs"
publish-type: false
stdout: true
.. _user_manual_configuration_default:
Expand Down Expand Up @@ -438,5 +437,4 @@ A complete example of all the configurations described on this page can be found
enable: true
domain: 0
topic-name: "FastDdsSpyLogs"
publish-type: false
stdout: true
10 changes: 5 additions & 5 deletions docs/rst/user_manual/tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ This argument sets the log verbosity to Info.

.. warning::

Using this option with :ref:`log filter <user_manual_user_interface_log_filter_argument>` and/or :ref:`log verbosity <user_manual_user_interface_log_verbosity_argument>` will head to undefined behaviour.
Using this option with :ref:`log filter <user_manual_user_interface_log_filter_argument>` and/or :ref:`log verbosity <user_manual_user_interface_log_verbosity_argument>` will lead to undefined behavior.

.. _user_manual_user_interface_log_filter_argument:

Expand Down Expand Up @@ -247,7 +247,7 @@ Using the :ref:`user_manual_user_interface_interactive_app`, this will be the pr

.. code-block:: console
<path>$ fastddsspy
$ fastddsspy
____| | __ \ __ \ ___| ___|
| _` | __| __| | | | | \___ \ \___ \ __ \ | |
Expand All @@ -263,13 +263,13 @@ Using the :ref:`user_manual_user_interface_interactive_app`, this will be the pr
Insert a command for Fast DDS Spy:
>> quit
<path>$
$
However, using :ref:`user_manual_user_interface_one_shot` this will be expected result:

.. code-block:: console
<path>$ fastddsspy participants
$ fastddsspy participants
- name: Fast DDS ShapesDemo Participant
guid: 01.0f.44.59.21.58.14.d2.00.00.00.00|0.0.1.c1
<path>$
$
Loading

0 comments on commit f1fb766

Please sign in to comment.