| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
WirelessTimeline Class Reference

Widget that renders a time-domain timeline of 802.11 wireless frames, enabling navigation, selection, zooming, and per-packet radio metadata visualisation for a captured WLAN session. More...

`#include <wireless_timeline.h>`

Inheritance diagram for WirelessTimeline:

## Public Slots
void | bgColorizationProgress (int first, int last)
| Triggers a partial repaint after background colourisation completes for the given packet range.
void | appInitialized ()
| Called once the application has finished initialising; registers the wireless tap and performs any deferred setup.

## Public Member Functions
| WirelessTimeline (QWidget *parent)
| Constructs the WirelessTimeline widget.
| ~WirelessTimeline ()
| Destroys the timeline widget and frees associated tap and radio data.
void | setPacketList (PacketList *packet_list)
| Associates the packet list view used for frame selection and navigation.
void | captureFileReadStarted (capture_file *cf)
| Registers the wireless timeline tap and prepares for incoming packet data.
void | captureFileReadFinished ()
| Finalises timeline state after all packets have been read and triggers an initial repaint.

## Protected Slots
void | selectedFrameChanged (QList< int > frames)
| Scrolls the timeline to keep the selected frames visible and triggers a repaint.

## Protected Member Functions
void | resizeEvent (QResizeEvent *event) override
| Recalculates layout parameters when the widget is resized.
void | paintEvent (QPaintEvent *event) override
| Renders the wireless timeline, colouring each pixel column according to the radio properties of the frame occupying that time slot.
void | mousePressEvent (QMouseEvent *event) override
| Begins a pan or selection drag operation on button press.
void | mouseMoveEvent (QMouseEvent *event) override
| Pans the visible time range while the mouse button is held and moved.
void | mouseReleaseEvent (QMouseEvent *event) override
| Finalises a pan or selection drag on button release.
bool | event (QEvent *event) override
| Handles tooltip requests and other non-standard events.
void | wheelEvent (QWheelEvent *event) override
| Zooms the visible time range in or out in response to the scroll wheel.
struct wlan_radio * | get_wlan_radio (uint32_t packet_num)
| Looks up the wlan_radio record for a given packet number.
void | clip_tsf ()
| Clamps start_tsf and end_tsf to the valid range of the capture file.
int | position (uint64_t tsf, float ratio)
| Converts a TSF timestamp to an x pixel position within the widget.
int | find_packet_tsf (uint64_t tsf)
| Finds the packet whose TSF timestamp is closest to the given value.
void | doToolTip (struct wlan_radio *wr, QPoint pos, int x)
| Builds and displays a tooltip for a specific frame at the given position.
void | zoom (double x_fraction)
| Zooms the visible time range, keeping the given x fraction stationary.
unsigned | find_packet (qreal x)
| Returns the packet number of the frame at the given x pixel coordinate.

## Static Protected Member Functions
static void | tap_timeline_reset (void *tapdata)
| Tap reset callback; clears all accumulated radio packet data.
static tap_packet_status | tap_timeline_packet (void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data, tap_flags_t flags)
| Tap packet callback; extracts and stores wlan_radio metadata for each frame.

## Protected Attributes
double | zoom_level
qreal | start_x
qreal | last_x
PacketList * | packet_list
float | rgb [64][3]
uint64_t | start_tsf
uint64_t | end_tsf
int | first_packet
struct wlan_radio * | first
struct wlan_radio * | last
capture_file * | capfile
GHashTable * | radio_packet_list

## Detailed Description

Widget that renders a time-domain timeline of 802.11 wireless frames, enabling navigation, selection, zooming, and per-packet radio metadata visualisation for a captured WLAN session.

## Constructor & Destructor Documentation

## ◆ WirelessTimeline()

WirelessTimeline::WirelessTimeline | ( | QWidget * | parent | ) |
| explicit

Constructs the WirelessTimeline widget.

Parameters

  parent | Parent widget; must not be `nullptr`.

## Member Function Documentation

## ◆ bgColorizationProgress

void WirelessTimeline::bgColorizationProgress | ( | int | first,
|  | int | last )
| slot

Triggers a partial repaint after background colourisation completes for the given packet range.

Parameters

  first | Index of the first packet whose colourisation changed.
  last | Index of the last packet whose colourisation changed.

## ◆ captureFileReadStarted()

void WirelessTimeline::captureFileReadStarted | ( | capture_file * | cf | ) |

Registers the wireless timeline tap and prepares for incoming packet data.

Parameters

  cf | The capture file being read.

## ◆ doToolTip()

void WirelessTimeline::doToolTip | ( | struct wlan_radio * | wr,
|  | QPoint | pos,
|  | int | x )
| protected

Builds and displays a tooltip for a specific frame at the given position.

Parameters

  wr | wlan_radio data for the frame under the cursor.
  pos | Global screen position for the tooltip.
  x | Widget-local x coordinate of the cursor.

## ◆ event()

bool WirelessTimeline::event | ( | QEvent * | event | ) |
| override protected

Handles tooltip requests and other non-standard events.

Parameters

  event | The event to process.

Returns
  `true` if the event was handled; `false` otherwise.

## ◆ find_packet()

unsigned WirelessTimeline::find_packet | ( | qreal | x | ) |
| protected

Returns the packet number of the frame at the given x pixel coordinate.

Parameters

  x | Widget-local x coordinate to query.

Returns
  One-based packet number of the frame at `x`, or 0 if none.

## ◆ find_packet_tsf()

int WirelessTimeline::find_packet_tsf | ( | uint64_t | tsf | ) |
| protected

Finds the packet whose TSF timestamp is closest to the given value.

Parameters

  tsf | TSF timestamp to search for.

Returns
  One-based packet number of the nearest matching packet.

## ◆ get_wlan_radio()

struct wlan_radio * WirelessTimeline::get_wlan_radio | ( | uint32_t | packet_num | ) |
| protected

Looks up the wlan_radio record for a given packet number.

Parameters

  packet_num | One-based packet number to look up.

Returns
  Pointer to the wlan_radio structure, or `nullptr` if not found.

## ◆ mouseMoveEvent()

void WirelessTimeline::mouseMoveEvent | ( | QMouseEvent * | event | ) |
| override protected

Pans the visible time range while the mouse button is held and moved.

Parameters

  event | The mouse move event.

## ◆ mousePressEvent()

void WirelessTimeline::mousePressEvent | ( | QMouseEvent * | event | ) |
| override protected

Begins a pan or selection drag operation on button press.

Parameters

  event | The mouse press event.

## ◆ mouseReleaseEvent()

void WirelessTimeline::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
| override protected

Finalises a pan or selection drag on button release.

Parameters

  event | The mouse release event.

## ◆ paintEvent()

void WirelessTimeline::paintEvent | ( | QPaintEvent * | event | ) |
| override protected

Renders the wireless timeline, colouring each pixel column according to the radio properties of the frame occupying that time slot.

Parameters

  event | The paint event describing the region to update.

## ◆ position()

int WirelessTimeline::position | ( | uint64_t | tsf,
|  | float | ratio )
| protected

Converts a TSF timestamp to an x pixel position within the widget.

Parameters

  tsf | TSF timestamp value to convert.
  ratio | Pixels-per-microsecond scaling ratio for the current zoom level.

Returns
  Pixel x coordinate corresponding to `tsf`.

## ◆ resizeEvent()

void WirelessTimeline::resizeEvent | ( | QResizeEvent * | event | ) |
| override protected

Recalculates layout parameters when the widget is resized.

Parameters

  event | The resize event containing old and new sizes.

## ◆ selectedFrameChanged

void WirelessTimeline::selectedFrameChanged | ( | QList< int > | frames | ) |
| protected slot

Scrolls the timeline to keep the selected frames visible and triggers a repaint.

Parameters

  frames | List of selected frame numbers.

## ◆ setPacketList()

void WirelessTimeline::setPacketList | ( | PacketList * | packet_list | ) |

Associates the packet list view used for frame selection and navigation.

Parameters

  packet_list | Pointer to the main PacketList widget.

## ◆ tap_timeline_packet()

tap_packet_status WirelessTimeline::tap_timeline_packet | ( | void * | tapdata,
|  | packet_info * | pinfo,
|  | epan_dissect_t * | edt,
|  | const void * | data,
|  | tap_flags_t | flags )
| static protected

Tap packet callback; extracts and stores wlan_radio metadata for each frame.

Parameters

  tapdata | Pointer to the WirelessTimeline instance acting as tap data.
  pinfo | Packet info for the current frame.
  edt | Epan dissect tree for the current frame.
  data | Protocol-specific tap data (wlan_radio struct).
  flags | Tap flags for this packet.

Returns
  TAP_PACKET_REDRAW if the display should be updated; TAP_PACKET_DONT_REDRAW otherwise.

## ◆ tap_timeline_reset()

void WirelessTimeline::tap_timeline_reset | ( | void * | tapdata | ) |
| static protected

Tap reset callback; clears all accumulated radio packet data.

Parameters

  tapdata | Pointer to the WirelessTimeline instance acting as tap data.

## ◆ wheelEvent()

void WirelessTimeline::wheelEvent | ( | QWheelEvent * | event | ) |
| override protected

Zooms the visible time range in or out in response to the scroll wheel.

Parameters

  event | The wheel event.

## ◆ zoom()

void WirelessTimeline::zoom | ( | double | x_fraction | ) |
| protected

Zooms the visible time range, keeping the given x fraction stationary.

Parameters

  x_fraction | Normalised [0, 1] horizontal position that should remain fixed during the zoom.

## Member Data Documentation

## ◆ capfile

capture_file* WirelessTimeline::capfile
| protected

The currently open capture file.

## ◆ end_tsf

uint64_t WirelessTimeline::end_tsf
| protected

TSF timestamp of the right edge of the visible time range.

## ◆ first

struct wlan_radio* WirelessTimeline::first
| protected

wlan_radio record for the earliest frame in the capture.

## ◆ first_packet

int WirelessTimeline::first_packet
| protected

One-based index of the first packet visible in the current view.

## ◆ last

struct wlan_radio* WirelessTimeline::last
| protected

wlan_radio record for the latest frame in the capture.

## ◆ last_x

qreal WirelessTimeline::last_x
| protected

Widget-local x coordinate of the last drag mouse position.

## ◆ packet_list

PacketList* WirelessTimeline::packet_list
| protected

Associated packet list widget used for frame selection.

## ◆ radio_packet_list

GHashTable* WirelessTimeline::radio_packet_list
| protected

Hash table mapping packet numbers to wlan_radio records.

## ◆ rgb

float WirelessTimeline::rgb[64][3]
| protected

Per-row RGB colour buffer used to render the timeline.

## ◆ start_tsf

uint64_t WirelessTimeline::start_tsf
| protected

TSF timestamp of the left edge of the visible time range.

## ◆ start_x

qreal WirelessTimeline::start_x
| protected

Widget-local x coordinate where the current drag started.

## ◆ zoom_level

double WirelessTimeline::zoom_level
| protected

Current zoom level; higher values show a narrower time range.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/widgets/wireless_timeline.h
- /builds/wireshark/wireshark/ui/qt/widgets/wireless_timeline.cpp