ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
gige_device_tab.h
Go to the documentation of this file.
1//
2// Copyright (c) 2026, Astute Systems PTY LTD
3//
4// This file is part of the VivoeX project developed by Astute Systems.
5//
6// License. See the LICENSE file in the project root for full license details.
7//
13
14#ifndef STREAMS_GIGE_DEVICE_TAB_H
15#define STREAMS_GIGE_DEVICE_TAB_H
16
17#include <cstdint>
18
19#include <QObject>
20#include <QJsonObject>
21#include <QTimer>
22
24#include "../ui_toolx.h"
25
26class GigEDeviceTab : public QObject
27{
28 Q_OBJECT
29
30public:
37 explicit GigEDeviceTab(Ui::Dialog &ui, QObject *parent = nullptr);
38
42 ~GigEDeviceTab() final;
43
49 bool isRunning() const { return m_generator.isRunning(); }
50
57 QJsonObject toJson() const;
58
66 void fromJson(const QJsonObject &device);
67
68public slots:
72 void toggle();
73
77 void updateStatus();
78
79private slots:
81 void pixelFormatChanged();
83 void patternChanged(int index);
84
85private:
87 void loadSettings();
89 void saveSettings() const;
91 void setConfigEnabled(bool enabled);
94
96 Ui::Dialog &m_ui;
100 QTimer m_timer;
102 uint64_t m_last_frames = 0;
103};
104
105#endif // STREAMS_GIGE_DEVICE_TAB_H
void fromJson(const QJsonObject &device)
Apply the device settings of a JSON object.
Definition gige_device_tab.cpp:93
void saveSettings() const
Save the widget values.
Definition gige_device_tab.cpp:223
toolx::streams::GigEGenerator m_generator
The frame generator.
Definition gige_device_tab.h:98
GigEDeviceTab(Ui::Dialog &ui, QObject *parent=nullptr)
Construct a new GigE device tab and wire up the widgets.
Definition gige_device_tab.cpp:36
bool isRunning() const
Whether the device is transmitting.
Definition gige_device_tab.h:49
~GigEDeviceTab() final
Stop the device and save the settings.
Definition gige_device_tab.cpp:70
void toggle()
Start the device if stopped, stop it if running.
Definition gige_device_tab.cpp:137
void setConfigEnabled(bool enabled)
Enable or disable the configuration widgets.
Definition gige_device_tab.cpp:240
uint64_t m_last_frames
Frame count at the previous status update.
Definition gige_device_tab.h:102
void loadSettings()
Load the saved settings into the widgets.
Definition gige_device_tab.cpp:206
toolx::streams::GigEDeviceConfig currentConfig() const
Build the device configuration from the widgets.
Definition gige_device_tab.cpp:251
QJsonObject toJson() const
The device settings as a JSON object for the configuration file.
Definition gige_device_tab.cpp:77
void pixelFormatChanged()
The pixel format changed, update which patterns are available.
Definition gige_device_tab.cpp:185
Ui::Dialog & m_ui
The main dialogue UI.
Definition gige_device_tab.h:96
void updateStatus()
Refresh the state label.
Definition gige_device_tab.cpp:165
QTimer m_timer
Status refresh timer.
Definition gige_device_tab.h:100
void patternChanged(int index)
The pattern changed, apply it to the running device.
Definition gige_device_tab.cpp:201
Generates test pattern frames and sends them with a mediax::gev::Transmitter.
Definition gige_generator.h:60
Transmits test patterns as a GigE Vision device (camera emulation).
The configuration of the emulated GigE Vision device.
Definition gige_generator.h:30