aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-04-28 21:26:53 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2017-05-02 09:34:01 +0000
commit741d4f5898082f29c6732f16dd57139021545c15 (patch)
tree92f378c9557fd526f5469d8a4f30ea6563cd52e4 /doc
parentafb4de370a4c54e08e9367b55ae142414efc6e8f (diff)
Qt: Interface Toolbar improvements
- Select one of the capturing interfaces when start capture - Only send user changed control values when start capture - Don't show hidden interfaces - Allow a toolbar with no interfaces - Renamed button role "reset" to "restore" - Improved control number validation - Updated documentation Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a Reviewed-on: https://code.wireshark.org/review/21445 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/README.extcap16
-rwxr-xr-xdoc/extcap_example.py6
2 files changed, 12 insertions, 10 deletions
diff --git a/doc/README.extcap b/doc/README.extcap
index 50db8f67a3..f1e27ce01c 100644
--- a/doc/README.extcap
+++ b/doc/README.extcap
@@ -238,7 +238,7 @@ TYPE provides the type of control to add to the toolbar and DISPLAY the name in
Additionally TOOLTIP and PLACEHOLDER may be provided, which will give the user an
explanation within the GUI.
-All controls, except from the logger, help and reset buttons, may be disabled
+All controls, except from the logger, help and restore buttons, may be disabled
(and enabled) in GUI by the extcap during capture. This can be because of set-once
operations, or operations which takes some time to complete.
@@ -260,8 +260,9 @@ This TYPEs are defined as controls:
* BUTTON - This provides a button with different ROLEs:
- ** CONTROL - This button will send a signal.
- This is the default role if nothing is configured.
+ ** CONTROL - This button will send a signal when pressed.
+ This is the default if no role is configured.
+ The button is only enabled when capturing.
The extcap utility can set the button text at startup, and can change (set) the
button text and receive button press signals while capturing. The button is
@@ -282,12 +283,13 @@ This TYPEs are defined as controls:
The Set command will clear the log before adding the entry.
** HELP - This button opens the help page, if configured.
- This type has no controls and will not be used in communication.
+ This role has no controls and will not be used in communication.
Valid Commands: NONE.
- ** RESET - This button will restore all control values to default.
- This type has no controls and will not be used in communication.
+ ** RESTORE - This button will restore all control values to default.
+ This role has no controls and will not be used in communication.
+ The button is only enabled when not capturing.
Valid Commands: NONE.
@@ -376,7 +378,7 @@ Control packet:
The length of the following payload. Maximum length is 65535 bytes.
The Initialized command will be sent from the GUI to the extcap utility when all
-initial control values are sent after starting a capture. This is an indication
+user changed control values are sent after starting a capture. This is an indication
that the GUI is ready to receive control values.
The GUI will only send Initialized and Set commands. The extcap utility shall not
diff --git a/doc/extcap_example.py b/doc/extcap_example.py
index e7ea7b2d6b..10c294d940 100755
--- a/doc/extcap_example.py
+++ b/doc/extcap_example.py
@@ -73,7 +73,7 @@ CTRL_ARG_DELAY = 1
CTRL_ARG_VERIFY = 2
CTRL_ARG_BUTTON = 3
CTRL_ARG_HELP = 4
-CTRL_ARG_RESET = 5
+CTRL_ARG_RESTORE = 5
CTRL_ARG_LOGGER = 6
CTRL_ARG_NONE = 255
@@ -161,7 +161,7 @@ def extcap_interfaces():
print ("control {number=%d}{type=boolean}{display=Verify}{default=true}{tooltip=Verify package content}" % CTRL_ARG_VERIFY)
print ("control {number=%d}{type=button}{display=Turn on}{tooltip=Turn on or off}" % CTRL_ARG_BUTTON)
print ("control {number=%d}{type=button}{role=help}{display=Help}{tooltip=Show help}" % CTRL_ARG_HELP)
- print ("control {number=%d}{type=button}{role=reset}{display=Reset}{tooltip=Restore default values}" % CTRL_ARG_RESET)
+ print ("control {number=%d}{type=button}{role=restore}{display=Restore}{tooltip=Restore default values}" % CTRL_ARG_RESTORE)
print ("control {number=%d}{type=button}{role=logger}{display=Log}{tooltip=Show capture log}" % CTRL_ARG_LOGGER)
print ("value {control=%d}{value=1}{display=1}" % CTRL_ARG_DELAY)
print ("value {control=%d}{value=2}{display=2}" % CTRL_ARG_DELAY)
@@ -320,7 +320,7 @@ def control_write_defaults(fn_out):
# Write startup configuration to Toolbar controls
control_write(fn_out, CTRL_ARG_MESSAGE, CTRL_CMD_SET, message)
- control_write(fn_out, CTRL_ARG_DELAY, CTRL_CMD_SET, str(delay))
+ control_write(fn_out, CTRL_ARG_DELAY, CTRL_CMD_SET, str(int(delay)))
control_write(fn_out, CTRL_ARG_VERIFY, CTRL_CMD_SET, struct.pack('B', verify))
for i in range(1,16):