Add Trace DASP preference to print protocol transactions to terminal
New checkbox in Preferences (default off). When enabled, every DASP send (>>>) and receive (<<<) prints message type, seq/ack numbers, payload size, and remote address to stdout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1661,7 +1661,7 @@ def open_preferences_dialog():
|
||||
|
||||
dialog = tk.Toplevel(window)
|
||||
dialog.title("Preferences")
|
||||
dialog.geometry("470x290")
|
||||
dialog.geometry("470x330")
|
||||
dialog.resizable(False, False)
|
||||
dialog.transient(window)
|
||||
dialog.grab_set()
|
||||
@@ -1724,7 +1724,18 @@ def open_preferences_dialog():
|
||||
text="Yes",
|
||||
variable=var_timestamp
|
||||
)
|
||||
chk_timestamp.grid(row=4, column=1, sticky="w", pady=(0, 15))
|
||||
chk_timestamp.grid(row=4, column=1, sticky="w", pady=(0, 10))
|
||||
|
||||
lbl_trace = ttk.Label(frame_padded, text="Trace DASP to terminal?", anchor="w")
|
||||
lbl_trace.grid(row=5, column=0, sticky="w", pady=(0, 15), padx=(0, 10))
|
||||
|
||||
var_trace_dasp = tk.BooleanVar(value=app_state.TRACE_DASP)
|
||||
chk_trace_dasp = ttk.Checkbutton(
|
||||
frame_padded,
|
||||
text="Yes",
|
||||
variable=var_trace_dasp
|
||||
)
|
||||
chk_trace_dasp.grid(row=5, column=1, sticky="w", pady=(0, 15))
|
||||
|
||||
def apply_preferences():
|
||||
try:
|
||||
@@ -1781,6 +1792,7 @@ def open_preferences_dialog():
|
||||
app_state.LEFT_PANE_WIDTH = pane_width
|
||||
app_state.GRID_SIZE = val
|
||||
app_state.ADD_TIMESTAMP = var_timestamp.get()
|
||||
app_state.TRACE_DASP = var_trace_dasp.get()
|
||||
app_state.SEDONA_HOME = entry_home.get().strip()
|
||||
|
||||
app_state.save_preferences()
|
||||
@@ -1799,7 +1811,7 @@ def open_preferences_dialog():
|
||||
messagebox.showerror("Invalid Input", message, parent=dialog)
|
||||
|
||||
btn_save_pref = ttk.Button(frame_padded, text="Apply Changes", command=apply_preferences)
|
||||
btn_save_pref.grid(row=5, column=1, sticky="e")
|
||||
btn_save_pref.grid(row=6, column=1, sticky="e")
|
||||
|
||||
if not app_state.SEDONA_HOME:
|
||||
entry_home.focus_set()
|
||||
|
||||
Reference in New Issue
Block a user