30#ifndef UTILS_POLHEMUS_CONNECTION_H
31#define UTILS_POLHEMUS_CONNECTION_H
47#include <QSerialPortInfo>
105 bool open(
const QString& portName,
147 void pointReceived(
int station,
const QVector3D& position,
const QQuaternion& orientation);
163 void penButtonPressed(
int station,
const QVector3D& position,
const QQuaternion& orientation);
167 void onSerialReadyRead();
168 void onSerialError(QSerialPort::SerialPortError err);
169 void onStreamPauseTimeout();
179 bool m_isConnected =
false;
180 QString m_backendName;
184 int m_mockSampleIdx = 0;
187 QSerialPort* m_pSerial =
nullptr;
191 QTimer m_streamPauseTimer;
195 QQuaternion orientation;
197 QMap<int, StationSample> m_lastSamples;
Polhemus Fastrak / FastSCAN ASCII record parser.
Public umbrella header for UTILSLIB exposing the UTILSSHARED_EXPORT macro and build-info accessors.
#define UTILSSHARED_EXPORT
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Streaming parser for Fastrak / FastSCAN ASCII records.
@ Inches
Fastrak factory default.
Settings used to open a real Polhemus serial connection.
FastrakParser::Units units
void connectedChanged(bool isConnected)
void penButtonPressed(int station, const QVector3D &position, const QQuaternion &orientation)
void pointReceived(int station, const QVector3D &position, const QQuaternion &orientation)
PolhemusConnection(QObject *parent=nullptr)
void errorOccurred(const QString &message)
bool open(const QString &portName, const PolhemusSerialConfig &cfg=PolhemusSerialConfig{})
static QString autoDetectPortName()
Best-effort auto-detection of an attached Fastrak/FastSCAN.
QString backendName() const
static QStringList availablePorts()
Enumerate every serial port currently visible to the OS.