OSVR-Core
Namespaces | Macros | Functions
USBSerialDevInfo_Windows.h File Reference

Implementation. More...

#include "USBSerialDevInfo.h"
#include <osvr/Util/WideToUTF8.h>
#include <osvr/Util/StdInt.h>
#include <string>
#include <comdef.h>
#include <Wbemidl.h>
#include <tchar.h>
#include <windows.h>
#include <comutils/ComVariant.h>
#include <intrusive_ptr_COM.h>
#include <boost/intrusive_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <regex>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>

Go to the source code of this file.

Namespaces

 osvr
 The main namespace for all C++ elements of the framework, internal and external.
 

Functions

std::string osvr::usbserial::getPNPDeviceIdSearchString (boost::optional< uint16_t > const &vendorID, boost::optional< uint16_t > const &productID)
 
std::vector< USBSerialDevice > osvr::usbserial::getSerialDeviceList (boost::optional< uint16_t > vendorID=boost::optional< uint16_t >(), boost::optional< uint16_t > productID=boost::optional< uint16_t >())
 

Detailed Description

Implementation.

Date
2015
Author
Sensics, Inc. http://sensics.com/osvr

Function Documentation

§ getPNPDeviceIdSearchString()

std::string osvr::usbserial::getPNPDeviceIdSearchString ( boost::optional< uint16_t > const &  vendorID,
boost::optional< uint16_t > const &  productID 
)
inline

The "haystack" these will be used to search through looks like this: USB&PID_0B00&MI_00...

§ getSerialDeviceList()

std::vector< USBSerialDevice > osvr::usbserial::getSerialDeviceList ( boost::optional< uint16_t >  vendorID = boost::optional<uint16_t>(),
boost::optional< uint16_t >  productID = boost::optional<uint16_t>() 
)

DeviceID is the COM port name

PNPDeviceID is the hardware instance ID that has the VID:PID embedded in it.

We had something to search for, and we didn't find it, go on.

Couldn't parse the VID/PID - may not be a USB serial port.

On Windows (NT-based), the "full path" to a serial port with a COM port name is \. (where x is a number)

DeviceID is the COM port name

PNPDeviceID is the hardware instance ID that has the VID:PID embedded in it.

We had something to search for, and we didn't find it, go on.

Couldn't parse the VID/PID - may not be a USB serial port.

On Windows (NT-based), the "full path" to a serial port with a COM port name is \. (where x is a number)