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 88 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.
- Returns
- Port name of a Polhemus-vendor port, else the first FTDI port, else an empty string.
Definition at line 127 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.
- Returns
- System port names of all visible serial ports; empty if none.
Definition at line 116 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. |
- Returns
- True if connected (or already connected), false if the backend failed to open.
Definition at line 58 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: