-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure the domain through the command-line (#82)
* Replace FOXGLOVEWS with FASTDDSSPY as the logging tag Signed-off-by: tempate <[email protected]> * Configure the domain through the terminal Signed-off-by: tempate <[email protected]> * Update the latest help in tests Signed-off-by: tempate <[email protected]> * Documentation Signed-off-by: tempate <[email protected]> * Apply suggestions Signed-off-by: tempate <[email protected]> * Tests Signed-off-by: tempate <[email protected]> * Fix valid_output to accept several guids and rates Signed-off-by: tempate <[email protected]> * Fix python linter Signed-off-by: tempate <[email protected]> --------- Signed-off-by: tempate <[email protected]>
- Loading branch information
Showing
18 changed files
with
267 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
################### | ||
|
||
This release includes the following **Configuration Features**: | ||
|
||
* New :ref:`domain argument <user_manual_user_interface_domain_argument>` to configure the ``domain`` through the command-line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,7 @@ enum optionIndex | |
VERSION, | ||
LOG_FILTER, | ||
LOG_VERBOSITY, | ||
DOMAIN, | ||
}; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
fastddsspy_tool/test/application/test_cases/one_shot__domain.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Tests for the fastddsspy executable.""" | ||
|
||
import test_class | ||
|
||
|
||
class TestCase_instance (test_class.TestCase): | ||
"""@brief A subclass of `test_class.TestCase` representing a specific test case.""" | ||
|
||
def __init__(self): | ||
""" | ||
@brief Initialize the TestCase_instance object. | ||
This test launches: | ||
fastddsspy --domain 84 | ||
""" | ||
super().__init__( | ||
name='--DomainCommand', | ||
one_shot=True, | ||
command=[], | ||
dds=False, | ||
config='', | ||
arguments_dds=[], | ||
arguments_spy=['--domain', '84', 'exit'], | ||
commands_spy=[], | ||
output='' | ||
) |
76 changes: 76 additions & 0 deletions
76
fastddsspy_tool/test/application/test_cases/one_shot__domain_fail.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Tests for the fastddsspy executable.""" | ||
|
||
import test_class | ||
|
||
|
||
class TestCase_instance (test_class.TestCase): | ||
"""@brief A subclass of `test_class.TestCase` representing a specific test case.""" | ||
|
||
def __init__(self): | ||
""" | ||
@brief Initialize the TestCase_instance object. | ||
This test launches: | ||
fastddsspy --domain | ||
""" | ||
super().__init__( | ||
name='--DomainFailCommand', | ||
one_shot=True, | ||
command=[], | ||
dds=False, | ||
config='', | ||
arguments_dds=[], | ||
arguments_spy=['--domain'], | ||
commands_spy=[], | ||
output="""\x1b[37;1m%%time%% \x1b[31;1m[\x1b[37;1mFASTDDSSPY_ARGS\x1b[31;1m Error] \ | ||
\x1b[37mOption \'--domain\' requires a numeric argument.\x1b[34;1m -> Function \ | ||
\x1b[36mString\x1b[m\n\ | ||
Usage: Fast DDS Spy \n\ | ||
Start an interactive CLI to introspect a DDS network.\n\ | ||
General options:\n\ | ||
Application help and information.\n\ | ||
-h --help Print this help message.\n\ | ||
-v --version Print version, branch and commit hash.\n\ | ||
\n\ | ||
Application parameters\n\ | ||
-c --config-path Path to the Configuration File (yaml format) \ | ||
[Default: ./FASTDDSSPY_CONFIGURATION.yaml].\n\ | ||
-r --reload-time Time period in seconds to reload configuration file. \ | ||
This is needed when FileWatcher functionality is not available \ | ||
(e.g. config file is a symbolic link). Value 0 does not reload file. [Default: 0].\n\ | ||
--domain Set the domain (0-255) to spy on. [Default = 0].\n\ | ||
\n\ | ||
Debug parameters\n\ | ||
-d --debug Set log verbosity to Info \ | ||
\n\ | ||
(Using this option with \ | ||
--log-filter and/or --log-verbosity will head to undefined behaviour).\n\ | ||
--log-filter Set a Regex Filter to filter by category the info and warning \ | ||
log entries. [Default = "FASTDDSSPY"]. \n\ | ||
--log-verbosity Set a Log Verbosity Level higher or equal the one given. \ | ||
(Values accepted: "info","warning","error" no Case Sensitive) [Default = "warning"]. \n\n""" | ||
) | ||
|
||
def valid_output(self, output): | ||
""" | ||
@brief Validate the output. | ||
@param output: The actual output obtained from executing a command. | ||
@return Always returns True. | ||
""" | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.