From 3ed75b7e9e0baa44ebe93cf108c32340ca2ae00a Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sun, 28 Jan 2024 17:56:41 +0000 Subject: [PATCH] test, utils, visualizer: document missing functions and variables in scripts Silences warnings on Doxygen > 1.9.7. --- src/visualizer/visualizer/core.py | 4 ++++ src/visualizer/visualizer/ipython_view.py | 13 ++++++++++++ .../plugins/interface_statistics.py | 20 +++++++++++++++++++ .../visualizer/plugins/ipv4_routing_table.py | 12 ++++++----- src/visualizer/visualizer/plugins/olsr.py | 10 ++++++++++ .../visualizer/plugins/show_last_packets.py | 11 ++++++++++ utils/grid.py | 20 ++++++++++++++++++- utils/python-unit-tests.py | 1 + utils/tests/test-ns3.py | 3 +++ 9 files changed, 88 insertions(+), 6 deletions(-) diff --git a/src/visualizer/visualizer/core.py b/src/visualizer/visualizer/core.py index 80cdcb720..9a2777588 100644 --- a/src/visualizer/visualizer/core.py +++ b/src/visualizer/visualizer/core.py @@ -127,6 +127,10 @@ class Node(PyVizObject): # highlighted property ## @var selected # selected property + ## @var on_enter_notify_event + # on_enter_notify_event function + ## @var on_leave_notify_event + # on_leave_notify_event function ## signal emitted whenever a tooltip is about to be shown for the node ## the first signal parameter is a python list of strings, to which diff --git a/src/visualizer/visualizer/ipython_view.py b/src/visualizer/visualizer/ipython_view.py index 98c3b1ec4..a19043acb 100644 --- a/src/visualizer/visualizer/ipython_view.py +++ b/src/visualizer/visualizer/ipython_view.py @@ -356,6 +356,19 @@ class ConsoleView(Gtk.TextView): # color pattern ## @var line_start # line start + ## @var onKeyPress + # onKeyPress function + ## @var _write + # _write function + ## @var _showPrompt + # _showPrompt function + ## @var _changeLine + # _changeLine function + ## @var _showReturned + # _showReturned function + ## @var prompt + # prompt function + """ Specialized text view for console-like workflow. diff --git a/src/visualizer/visualizer/plugins/interface_statistics.py b/src/visualizer/visualizer/plugins/interface_statistics.py index 5e44fa360..5b6028f4d 100644 --- a/src/visualizer/visualizer/plugins/interface_statistics.py +++ b/src/visualizer/visualizer/plugins/interface_statistics.py @@ -117,6 +117,26 @@ class ShowInterfaceStatistics(InformationWindow): # visualizer node ## @var table_model # table model + ## @var _response_cb + # _response_cb function + ## @var COLUMN_INTERFACE + # COLUMN_INTERFACE constant + ## @var COLUMN_TX_PACKETS + # COLUMN_TX_PACKETS constant + ## @var COLUMN_TX_BYTES + # COLUMN_TX_BYTES constant + ## @var COLUMN_TX_PACKET_RATE + # COLUMN_TX_PACKET_RATE constant + ## @var COLUMN_TX_BIT_RATE + # COLUMN_TX_BIT_RATE constant + ## @var COLUMN_RX_PACKETS + # COLUMN_RX_PACKETS constant + ## @var COLUMN_RX_BYTES + # COLUMN_RX_BYTES constant + ## @var COLUMN_RX_PACKET_RATE + # COLUMN_RX_PACKET_RATE constant + ## @var COLUMN_RX_BIT_RATE + # COLUMN_RX_BIT_RATE constant ( COLUMN_INTERFACE, COLUMN_TX_PACKETS, diff --git a/src/visualizer/visualizer/plugins/ipv4_routing_table.py b/src/visualizer/visualizer/plugins/ipv4_routing_table.py index 3bf0942fc..7aec401b7 100644 --- a/src/visualizer/visualizer/plugins/ipv4_routing_table.py +++ b/src/visualizer/visualizer/plugins/ipv4_routing_table.py @@ -16,16 +16,18 @@ class ShowIpv4RoutingTable(InformationWindow): # node index ## @var table_model # table model + ## @var _response_cb + # _response_cb function ## @var COLUMN_DESTINATION - # column destination + # COLUMN_DESTINATION constant ## @var COLUMN_NEXT_HOP - # column hop + # COLUMN_NEXT_HOP constant ## @var COLUMN_INTERFACE - # column interface + # COLUMN_INTERFACE constant ## @var COLUMN_TYPE - # column type + # COLUMN_TYPE constant ## @var COLUMN_PRIO - # column priority + # COLUMN_PRIO constant ( COLUMN_DESTINATION, COLUMN_NEXT_HOP, diff --git a/src/visualizer/visualizer/plugins/olsr.py b/src/visualizer/visualizer/plugins/olsr.py index 4a27962ee..e4b5ef256 100644 --- a/src/visualizer/visualizer/plugins/olsr.py +++ b/src/visualizer/visualizer/plugins/olsr.py @@ -16,6 +16,16 @@ class ShowOlsrRoutingTable(InformationWindow): # node index ## @var table_model # table model + ## @var _response_cb + # _response_cb function + ## @var COLUMN_DESTINATION + # COLUMN_DESTINATION constant + ## @var COLUMN_NEXT_HOP + # COLUMN_NEXT_HOP constant + ## @var COLUMN_INTERFACE + # COLUMN_INTERFACE constant + ## @var COLUMN_NUM_HOPS + # COLUMN_NUM_HOPS constant ( COLUMN_DESTINATION, COLUMN_NEXT_HOP, diff --git a/src/visualizer/visualizer/plugins/show_last_packets.py b/src/visualizer/visualizer/plugins/show_last_packets.py index dfda5ac64..b5702f1eb 100644 --- a/src/visualizer/visualizer/plugins/show_last_packets.py +++ b/src/visualizer/visualizer/plugins/show_last_packets.py @@ -43,6 +43,9 @@ class ShowLastPackets(InformationWindow): # AND button ## @var op_OR_button # OR button + ## @var _response_cb + # _response_cb function + class PacketList(Gtk.ScrolledWindow): """ PacketList class @@ -50,6 +53,14 @@ class ShowLastPackets(InformationWindow): ## @var table_model # table model + ## @var COLUMN_TIME + # COLUMN_TIME constant + ## @var COLUMN_INTERFACE + # COLUMN_INTERFACE constant + ## @var COLUMN_SIZE + # COLUMN_SIZE constant + ## @var COLUMN_CONTENTS + # COLUMN_CONTENTS constant ( COLUMN_TIME, COLUMN_INTERFACE, diff --git a/utils/grid.py b/utils/grid.py index 853ffc125..c20100529 100644 --- a/utils/grid.py +++ b/utils/grid.py @@ -1388,7 +1388,17 @@ class GtkGraphicRenderer(gtk.DrawingArea): ## @var __height # height ## @var __buffer_surface - # buffer surface + # __buffer_surface + ## @var expose + # expose function + ## @var size_allocate + # size_allocate function + ## @var motion_notify + # motion_notify function + ## @var button_press + # button_press function + ## @var button_release + # button_release function def __init__(self, data): """! Initializer @param self this object @@ -1638,6 +1648,14 @@ class MainWindow: # render ## @var __dialog # dialog + ## @var __set_smaller_cb + # __set_smaller_cb function + ## @var __set_bigger_cb + # __set_bigger_cb function + ## @var __output_png_cb + # __output_png_cb function + ## @var __dialog_response_cb + # __dialog_response_cb function def __init__(self): """! Initializer @param self this object diff --git a/utils/python-unit-tests.py b/utils/python-unit-tests.py index 1c3cf38e5..9482cc0ce 100644 --- a/utils/python-unit-tests.py +++ b/utils/python-unit-tests.py @@ -414,6 +414,7 @@ class TestSimulator(unittest.TestCase): return None """ super().__init__() + ## __python_owns__ flag indicates that Cppyy should not manage the lifetime of this variable self.__python_owns__ = False # Let C++ destroy this on Simulator::Destroy ## Listen port for the server self.port = port diff --git a/utils/tests/test-ns3.py b/utils/tests/test-ns3.py index 0f0e32591..f8692d303 100755 --- a/utils/tests/test-ns3.py +++ b/utils/tests/test-ns3.py @@ -858,6 +858,7 @@ class NS3ConfigureTestCase(NS3BaseTestCase): self.config_ok(return_code, stdout, stderr) # If nothing went wrong, we should have more executables in the list after enabling the examples. + ## ns3_executables self.assertGreater(len(get_programs_list()), len(self.ns3_executables)) # Now we disabled them back. @@ -909,6 +910,7 @@ class NS3ConfigureTestCase(NS3BaseTestCase): # At this point we should have fewer modules enabled_modules = get_enabled_modules() + ## ns3_modules self.assertLess(len(get_enabled_modules()), len(self.ns3_modules)) self.assertIn("ns3-network", enabled_modules) self.assertIn("ns3-wifi", enabled_modules) @@ -1032,6 +1034,7 @@ class NS3ConfigureTestCase(NS3BaseTestCase): ns3rc_templates = {"python": ns3rc_python_template, "cmake": ns3rc_cmake_template} def __init__(self, type_ns3rc): + ## type contains the ns3rc variant type (deprecated python-based or current cmake-based) self.type = type_ns3rc def format(self, **args):