Polhemus digitizer connection (mock + serial-port backends).
More...
#include <polhemus_connection.h>
|
| static QStringList | availablePorts () |
| | Enumerate every serial port currently visible to the OS.
|
| static QString | autoDetectPortName () |
| | Best-effort auto-detection of an attached Fastrak/FastSCAN.
|
Polhemus digitizer connection (mock + serial-port backends).
Definition at line 84 of file polhemus_connection.h.
◆ PolhemusConnection()
| PolhemusConnection::PolhemusConnection |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ ~PolhemusConnection()
| PolhemusConnection::~PolhemusConnection |
( |
| ) |
|
|
override |
◆ autoDetectPortName()
| QString PolhemusConnection::autoDetectPortName |
( |
| ) |
|
|
static |
Best-effort auto-detection of an attached Fastrak/FastSCAN.
Polhemus Fastrak/FastSCAN units ship with an FTDI USB-serial bridge (vendor id 0x0F44 for newer Polhemus-branded units, 0x0403 for the generic FTDI chip used in older units). This scan returns the first matching port name, or an empty string if no candidate is found.
Definition at line 126 of file polhemus_connection.cpp.
◆ availablePorts()
| QStringList PolhemusConnection::availablePorts |
( |
| ) |
|
|
static |
Enumerate every serial port currently visible to the OS.
Convenience wrapper around QSerialPortInfo::availablePorts that returns just the system port names (e.g. /dev/cu.usbserial-AB0, COM3) so callers can populate a combo box without pulling in QSerialPortInfo themselves.
Definition at line 115 of file polhemus_connection.cpp.
◆ backendName()
| QString PolhemusConnection::backendName |
( |
| ) |
const |
◆ close()
| void PolhemusConnection::close |
( |
| ) |
|
◆ connectedChanged
| void UTILSLIB::PolhemusConnection::connectedChanged |
( |
bool | isConnected | ) |
|
|
signal |
◆ errorOccurred
| void UTILSLIB::PolhemusConnection::errorOccurred |
( |
const QString & | message | ) |
|
|
signal |
Non-fatal protocol/IO error (already logged by the backend).
◆ isConnected()
| bool PolhemusConnection::isConnected |
( |
| ) |
const |
◆ open()
Open the connection.
- Parameters
-
| portName | Empty → mock backend. Non-empty → hardware backend. |
| cfg | Serial transport configuration; ignored by the mock backend. |
Definition at line 57 of file polhemus_connection.cpp.
◆ penButtonPressed
| void UTILSLIB::PolhemusConnection::penButtonPressed |
( |
int | station, |
|
|
const QVector3D & | position, |
|
|
const QQuaternion & | orientation ) |
|
signal |
Emitted when the continuous stream pauses (pen button pressed). The last received position/orientation are provided so the caller can record the capture without a separate GUI button click.
After emitting, the connection automatically restarts the continuous stream so the live feed resumes on button release.
◆ pointReceived
| void UTILSLIB::PolhemusConnection::pointReceived |
( |
int | station, |
|
|
const QVector3D & | position, |
|
|
const QQuaternion & | orientation ) |
|
signal |
- Parameters
-
| station | Polhemus station id (1..4 for FastSCAN). |
| position | Sample point in metres, sensor-frame. |
| orientation | Sensor orientation; identity if N/A. |
The documentation for this class was generated from the following files: