DeviceDetection
Haply::HardwareAPI::Devices::DeviceDetection
Utilities to automatically find the serial ports associated with Haply devices.
It's worth noting that on Windows serial ports numbered above 9 must be prefixed with to be valid. As an example, or should be used to open the serial port .
Index
Methods
Name | Type | Description |
---|---|---|
DetectInverse3s | static std::vector< std::string >() | Automatically detects the Inverse3 ... |
DetectHandles | static std::vector< std::string >() | Automatically detects the handle device(s) on the computer. |
DetectWiredHandles | static std::vector< std::string >() | Automatically detects the wired handle device(s) on the ... |
DetectWirelessHandles | static std::vector< std::string >() | Automatically detects the wireless handle device(s) on the ... |
AutoDetectInverse3 | static int(std::string) | Automatically detects the Inverse3 ... |
AutoDetectHandle | static int(std::string) | Automatically detects the Handle ... |
IsInverse3 | static int(const char *) | Test a serial port to determine if it's connected to an ... |
IsHandle | static bool(const char *) | Test a serial port to determine if it's connected to a ... |
Methods
DetectInverse3s
static std::vector< std::string > DetectInverse3s()
Automatically detects the Inverse3 device(s) on the computer.
This function provides a cleaner interface then AutoDetectInverse3 and the internals have been reworked to be more stable.
Returns
A vector of strings representing the COM ports of the Inverse3 device(s) connected on the computer. An empty vector indicate that no Inverse3 devices are currently connected to the computer.
DetectHandles
static std::vector< std::string > DetectHandles()
Automatically detects the handle device(s) on the computer.
This function provides a cleaner interface then AutoDetectHandle and the internals have been reworked to be more stable. It is also provided for backwards compatibility for the old wireless handles.
Returns
A vector of strings representing the COM ports of the handle device(s) connected on the computer. An empty vector indicate that no handle devices are currently connected to the computer.
DetectWiredHandles
static std::vector< std::string > DetectWiredHandles()
Automatically detects the wired handle device(s) on the computer.
This function should be prefered over because it will skip COM ports that tend to be very slow to test.
This function provides a cleaner interface then AutoDetectHandle and the internals have been reworked to be more stable. It should also be prefered over DetectHandles because it will skip COM ports that tend to be very slow to test.
Returns
A vector of strings representing the COM ports of the wired handle device(s) connected on the computer. An empty vector indicate that no wired handle devices are currently connected to the computer.
DetectWirelessHandles
static std::vector< std::string > DetectWirelessHandles()
Automatically detects the wireless handle device(s) on the computer.
This function is provided for backwards compatibility with the old wireless handles.
This function provides a cleaner interface then AutoDetectHandle and the internals have been reworked to be more stable. It is also provided for backwards compatibility for the old wireless handles.
Returns
A vector of strings representing the COM ports of the wireless handle device(s) connected on the computer. An empty vector indicate that no wireless handle devices are currently connected to the computer.
AutoDetectInverse3
static int AutoDetectInverse3(std::string portNames)
Automatically detects the Inverse3 device(s) on the computer.
DEPRECATED Deprecated in favour of DetectInverse3s.
AutoDetectHandle
static int AutoDetectHandle(std::string portNames)
Automatically detects the Handle device(s) on the computer.
DEPRECATED Deprecated in favour of DetectHandles.
IsInverse3
static int IsInverse3(const char * port)
Test a serial port to determine if it's connected to an inverse3 device.
WARNING This function is mostly meant for internal use only.
Parameters
- port The serial port to test.
Returns
A non-zero value if the device connected to port is an inverse3 device.
IsHandle
static bool IsHandle(const char * port)
Test a serial port to determine if it's connected to a handle.
WARNING This function is mostly meant for internal use only.
Parameters
- port The serial port to test.
Returns
A non-zero value if the device connected to port is an inverse3 device.