Fix a couple of Kerberos socket class threading problems Stop drawing garbage in trace viewer when trace data partially intialized Add FloatSpinBox explicit data accessormaster
parent
a4eb3d14df
commit
5d4ae8c1ec
@ -1 +1 @@
|
||||
SUBDIRS = scope logicanalyzer commanalyzer fpgaview fpgaprogram sensormonitor adminconsole adminusermgmt serialconsole prototerminal
|
||||
SUBDIRS = scope logicanalyzer commanalyzer companalyzer fpgaview fpgaprogram sensormonitor adminconsole adminusermgmt serialconsole prototerminal
|
||||
|
@ -0,0 +1,12 @@
|
||||
INCLUDES = $(all_includes) -I$(top_srcdir)/src -I$(top_srcdir)/src/widgets $(KDE_INCLUDES)/tde
|
||||
KDE_CXXFLAGS = $(USE_EXCEPTIONS)
|
||||
METASOURCES = AUTO
|
||||
|
||||
KDE_ICON = libremotelab_companalyzer
|
||||
|
||||
#Part
|
||||
kde_module_LTLIBRARIES = libremotelab_companalyzer.la
|
||||
libremotelab_companalyzer_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la ../../widgets/libsevensegment.la $(LIB_KFILE) $(LIB_TDEPARTS) $(LIB_TDEUI) $(LIB_QT)
|
||||
libremotelab_companalyzer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -ltdecore -ltdeui -ltdeio -ltdefx -ltdekrbsocket -ltqtrla
|
||||
libremotelab_companalyzer_la_SOURCES = \
|
||||
part.cpp layout.ui
|
After Width: | Height: | Size: 749 B |
@ -0,0 +1,488 @@
|
||||
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
|
||||
<class>CompAnalyzerBase</class>
|
||||
<widget class="TQWidget">
|
||||
<property name="name">
|
||||
<cstring>CompAnalyzerBase</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>519</width>
|
||||
<height>356</height>
|
||||
</rect>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>unnamed_layout</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="TQGroupBox" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>groupParameterADisplay</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Parameter A:</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed_grid</cstring>
|
||||
</property>
|
||||
<widget class="Display7SegmentArray" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>parameterADisplay</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupParameterBDisplay</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Parameter B:</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed_grid</cstring>
|
||||
</property>
|
||||
<widget class="Display7SegmentArray" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>parameterBDisplay</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="0" column="2">
|
||||
<property name="name">
|
||||
<cstring>groupFrequencyDisplay</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed_grid</cstring>
|
||||
</property>
|
||||
<widget class="Display7SegmentArray" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>frequencyDisplay</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed_layout</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="3">
|
||||
<property name="name">
|
||||
<cstring>groupMonitorView</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Trace Viewer</string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>7</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQSplitter" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>splitter1</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<widget class="TraceWidget" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>traceWidget</cstring>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TraceWidget" row="1" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>traceZoomWidget</cstring>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupControl</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Controls</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQGroupBox" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupMonitorCaptureControls</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Capture Controls</string>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="TQLabel" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parameter A:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQComboBox" row="0" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>parameterASourceCombo</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="1" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parameter B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQComboBox" row="1" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>parameterBSourceCombo</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="2" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frequency:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="FloatSpinBox" row="2" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>measurementFrequencyBox</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupSweepControls</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Sweep Configuration</string>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="TQLabel" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start Frequency:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="FloatSpinBox" row="0" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>sweepStartFrequencyBox</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="1" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>End Frequency:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="FloatSpinBox" row="1" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>sweepEndFrequencyBox</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="2" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Step Frequency:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="FloatSpinBox" row="2" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>sweepStepFrequencyBox</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupAcquisitionControls</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Acquisition Controls</string>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="TQPushButton" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>sweepStartButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start Sweep</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQPushButton" row="0" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>sweepStopButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stop Sweep</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQPushButton" row="1" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>waveformSave</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Waveforms</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQPushButton" row="1" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>waveformRecall</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Recall Waveforms</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQCheckBox" row="2" column="0" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>autoSave</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable Automatic Saving</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KURLRequester" row="3" column="0" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>autoSaveFile</cstring>
|
||||
</property>
|
||||
<property name="mode">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="filter">
|
||||
<cstring>*.wfm|Waveform Files (*.wfm)</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQGroupBox" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>groupTestNotes</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Notes</string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>3</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<grid>
|
||||
<widget class="KTextEdit" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>userNotes</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>3</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">CompAnalyzerBase.ui.h</include>
|
||||
</includes>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">tracewidget.h</include>
|
||||
<include location="local" impldecl="in implementation">floatspinbox.h</include>
|
||||
<include location="local" impldecl="in implementation">sevensegment.h</include>
|
||||
</includes>
|
||||
<layoutdefaults spacing="3" margin="6"/>
|
||||
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
|
||||
</UI>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,260 @@
|
||||
/*
|
||||
* Remote Laboratory Component Analyzer Part
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (c) 2014 - 2015 Timothy Pearson
|
||||
* Raptor Engineering
|
||||
* http://www.raptorengineeringinc.com
|
||||
*/
|
||||
|
||||
#ifndef REMOTELAB_COMPANALYZERPART_H
|
||||
#define REMOTELAB_COMPANALYZERPART_H
|
||||
|
||||
#include <ntqthread.h>
|
||||
#include <ntqeventloop.h>
|
||||
|
||||
#include <tqvariant.h>
|
||||
#include <tqvaluevector.h>
|
||||
|
||||
#include <tdeparts/browserextension.h>
|
||||
#include <tdeparts/statusbarextension.h>
|
||||
#include <tdeparts/part.h>
|
||||
#include <kurl.h>
|
||||
|
||||
#include <tqtrla.h>
|
||||
|
||||
#include <sevensegment.h>
|
||||
|
||||
#define MAXTRACES 255
|
||||
|
||||
class TDEAboutData;
|
||||
using KParts::StatusBarExtension;
|
||||
class TraceWidget;
|
||||
class TQSocket;
|
||||
class TQTimer;
|
||||
class TQMutex;
|
||||
class TQRectF;
|
||||
class CompAnalyzerBase;
|
||||
|
||||
namespace RemoteLab
|
||||
{
|
||||
typedef enum CompAnalyzerEventType {
|
||||
NoEvent = 0,
|
||||
Initialize = 1,
|
||||
TxRxSyncPoint = 2,
|
||||
StateChanged = 3,
|
||||
ExtendedErrorReceived = 4,
|
||||
ConfigurationDataReceived = 5,
|
||||
ChangeMeasurementSource = 6,
|
||||
GetMeasurement = 7,
|
||||
GetMaximumFrequency = 8,
|
||||
GetMinimumFrequency = 9,
|
||||
SetFrequency = 10,
|
||||
MeasurementsReceived = 11,
|
||||
SweepMeasurementsReceived = 12,
|
||||
StartSweep = 13,
|
||||
AbortSweep = 14,
|
||||
OtherEvent = 15
|
||||
} CompAnalyzerEventType;
|
||||
|
||||
typedef enum CompAnalyzerStartupState {
|
||||
StartSelectInstrument = 0,
|
||||
StartGetMaximumFrequency = 1,
|
||||
StartGetMinimumFrequency = 2,
|
||||
StartDone = 3
|
||||
} CompAnalyzerStartupState;
|
||||
|
||||
typedef enum CompAnalyzerPartState {
|
||||
Idle = 0,
|
||||
Initializing = 1,
|
||||
FreeRunning = 2,
|
||||
FrequencySweepWrite = 3,
|
||||
FrequencySweepRead = 4,
|
||||
CommunicationFailure = 5
|
||||
} CompAnalyzerPartState;
|
||||
|
||||
typedef struct CompAnalyzerMeasurement {
|
||||
TQ_UINT32 status;
|
||||
TQ_UINT32 parameter;
|
||||
TQ_UINT32 type;
|
||||
double value;
|
||||
double frequency;
|
||||
} CompAnalyzerMeasurement;
|
||||
|
||||
typedef TQPair<CompAnalyzerEventType, TQVariant> CompAnalyzerEvent;
|
||||
typedef TQValueVector<CompAnalyzerEvent> CompAnalyzerEventQueue;
|
||||
typedef TQValueList<CompAnalyzerMeasurement> CompAnalyzerMeasurementList;
|
||||
|
||||
typedef TQPair<unsigned int,TQString> AllowedMeasurementInfo;
|
||||
typedef TQValueList<AllowedMeasurementInfo> AllowedMeasurementInfoList;
|
||||
|
||||
typedef struct CompAnalyzerInstrumentLimits {
|
||||
TQValueList<AllowedMeasurementInfoList> allowedMeasurements;
|
||||
double maxFrequency;
|
||||
double minFrequency;
|
||||
} CompAnalyzerInstrumentLimits;
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
Q_EXPORT TQDataStream &operator<<(TQDataStream &, const CompAnalyzerMeasurement &);
|
||||
Q_EXPORT TQDataStream &operator>>(TQDataStream &, CompAnalyzerMeasurement &);
|
||||
#endif
|
||||
|
||||
class CompAnalyzerWorker : public TQObject
|
||||
{
|
||||
TQ_OBJECT
|
||||
|
||||
public:
|
||||
CompAnalyzerWorker();
|
||||
~CompAnalyzerWorker();
|
||||
|
||||
signals:
|
||||
void outboundQueueUpdated();
|
||||
|
||||
public slots:
|
||||
void run();
|
||||
void wake();
|
||||
void dataReceived();
|
||||
|
||||
public:
|
||||
void resetInboundQueue();
|
||||
void appendItemToInboundQueue(CompAnalyzerEvent item, bool syncPoint=false);
|
||||
bool itemTypeInInboundQueue(CompAnalyzerEventType type);
|
||||
bool syncPointActive();
|
||||
void lockOutboundQueue();
|
||||
void unlockOutboundQueue();
|
||||
CompAnalyzerEventQueue* outboundQueue();
|
||||
CompAnalyzerPartState currentState();
|
||||
|
||||
CompAnalyzerInstrumentLimits getInstrumentLimits();
|
||||
void setNewParameterSourceList(TQValueList<TQ_UINT32>);
|
||||
|
||||
void setSweepStartFrequency(double hz);
|
||||
void setSweepEndFrequency(double hz);
|
||||
void setSweepStepFrequency(double hz);
|
||||
double sweepStartFrequency();
|
||||
double sweepEndFrequency();
|
||||
unsigned int sweepStepNumber();
|
||||
|
||||
private:
|
||||
CompAnalyzerEventType nextInboundQueueEvent();
|
||||
void clearInboundQueueSyncPoint();
|
||||
void eraseNextInboundQueueEvent(bool clearSyncPoint=false);
|
||||
void setCurrentState(CompAnalyzerPartState state);
|
||||
|
||||
public:
|
||||
TDEKerberosClientSocket* m_socket;
|
||||
TQMutex* m_instrumentMutex;
|
||||
|
||||
private:
|
||||
CompAnalyzerEventQueue m_outboundQueue;
|
||||
CompAnalyzerEventQueue m_inboundQueue;
|
||||
TQMutex* m_outboundQueueMutex;
|
||||
TQMutex* m_inboundQueueMutex;
|
||||
TQMutex* m_networkDataMutex;
|
||||
TQMutex* m_currentStateMutex;
|
||||
TQMutex* m_sweepStepMutex;
|
||||
CompAnalyzerPartState m_currentState;
|
||||
CompAnalyzerStartupState m_startupState;
|
||||
CompAnalyzerEventType m_lastNetworkTransmissionEvent;
|
||||
bool m_newData;
|
||||
TQValueList<TQ_UINT32> m_sourceList;
|
||||
CompAnalyzerInstrumentLimits m_instrumentLimits;
|
||||
|
||||
double m_sweepStart;
|
||||
double m_sweepEnd;
|
||||
double m_sweepStep;
|
||||
double m_sweepCurrentFrequency;
|
||||
TQ_UINT32 m_sweepStepNumber;
|
||||
};
|
||||
|
||||
class CompAnalyzerPart : public KParts::RemoteInstrumentPart
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CompAnalyzerPart( QWidget *, const char *, TQObject *, const char *, const TQStringList&);
|
||||
~CompAnalyzerPart();
|
||||
|
||||
virtual bool openFile() { return false; } // pure virtual in the base class
|
||||
virtual bool closeURL();
|
||||
static TDEAboutData *createAboutData();
|
||||
|
||||
signals:
|
||||
void wakeWorkerThread();
|
||||
|
||||
public slots:
|
||||
virtual bool openURL(const KURL &url);
|
||||
void processOutboundQueue();
|
||||
void updateZoomWidgetLimits(const TQRectF& zoomRect);
|
||||
|
||||
private slots:
|
||||
void postInit();
|
||||
void processLockouts();
|
||||
void connectionFinishedCallback();
|
||||
void disconnectFromServerCallback();
|
||||
void connectionStatusChangedCallback();
|
||||
void setTickerMessage(TQString message);
|
||||
void networkTick();
|
||||
void networkTimeout();
|
||||
void parameterASourceChanged(int);
|
||||
void parameterBSourceChanged(int);
|
||||
void frequencyInputChanged(double);
|
||||
void startSweepClicked();
|
||||
void stopSweepClicked();
|
||||
|
||||
void processAutosave();
|
||||
void saveWaveforms();
|
||||
void saveWaveforms(TQString fileName);
|
||||
void recallWaveforms();
|
||||
|
||||
void updateGraticule();
|
||||
|
||||
private:
|
||||
TQString parameterMeasurementUnits(TQ_UINT32 parameter);
|
||||
TQString parameterNameToMeasurementUnits(TQString name, unsigned int parameter_index);
|
||||
void requestNetworkOperation(CompAnalyzerEvent item, bool syncPoint=false);
|
||||
void patWatchDog();
|
||||
|
||||
private:
|
||||
int m_commHandlerState;
|
||||
int m_commHandlerMode;
|
||||
int m_commHandlerCommandState;
|
||||
TQTimer* m_updateTimeoutTimer;
|
||||
bool m_connectionActiveAndValid;
|
||||
bool m_instrumentSettingsValid;
|
||||
unsigned char m_tickerState;
|
||||
CompAnalyzerBase* m_base;
|
||||
TQMutex* m_instrumentMutex;
|
||||
TQString m_TextToSend;
|
||||
TQValueList<AllowedMeasurementInfoList> m_parameterSourceValues;
|
||||
|
||||
TraceWidget* m_traceWidget;
|
||||
TQGridLayout* m_traceControlWidgetGrid;
|
||||
|
||||
SensorList m_sensorList;
|
||||
TQ_INT16 m_maxNumberOfTraces;
|
||||
TQ_INT16 m_hdivs;
|
||||
TQ_INT16 m_vdivs;
|
||||
TQ_INT32 m_samplesInTrace[MAXTRACES+1];
|
||||
bool m_channelActive[MAXTRACES+1];
|
||||
TQString m_traceUnits[MAXTRACES+1];
|
||||
|
||||
CompAnalyzerWorker* m_worker;
|
||||
TQEventLoopThread* m_workerThread;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in new issue