Public Member Functions | Protected Types | Protected Attributes | List of all members
DeviceRedetector Class Reference

A class which re-detects a device with a certain device Id. More...

#include <deviceredetector.h>

Public Member Functions

 DeviceRedetector (const XsPortInfo &portInfo)
 Construct an Device Redetector object. More...
 
bool redetect (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck=false)
 Base redetect function which calls the appropriate redetect based on deviceId. More...
 
virtual bool redetectEnumerateNetworkDevices (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 
virtual bool redetectEnumerateSerialPorts (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 Redectets and enumerates the serial ports for a given device. More...
 
virtual bool redetectNoScan (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 
virtual bool redetectOneComPort (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 Redectes a device on one com port. More...
 
virtual bool redetectScanPorts (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 Scan for devices until the requested device is found. More...
 
virtual ~DeviceRedetector ()
 

Protected Types

typedef bool(DeviceRedetector::* FunctionPointer) (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
 A typedef for a function pointer. More...
 

Protected Attributes

std::map< XsDeviceId, FunctionPointerm_detectFunctions
 A map filled with detect functions. More...
 

Detailed Description

A class which re-detects a device with a certain device Id.

Definition at line 73 of file deviceredetector.h.

Member Typedef Documentation

◆ FunctionPointer

typedef bool(DeviceRedetector::* DeviceRedetector::FunctionPointer) (const XsDeviceId &deviceId, XsPortInfo &portInfo, bool skipDeviceIdCheck)
protected

A typedef for a function pointer.

Definition at line 90 of file deviceredetector.h.

Constructor & Destructor Documentation

◆ DeviceRedetector()

DeviceRedetector::DeviceRedetector ( const XsPortInfo portInfo)

Construct an Device Redetector object.

Definition at line 79 of file deviceredetector.cpp.

◆ ~DeviceRedetector()

virtual DeviceRedetector::~DeviceRedetector ( )
inlinevirtual

Definition at line 77 of file deviceredetector.h.

Member Function Documentation

◆ redetect()

bool DeviceRedetector::redetect ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck = false 
)

Base redetect function which calls the appropriate redetect based on deviceId.

Parameters
deviceIdThe device ID to look for
portInfoThe updated portinfo when the device is re-detected.
skipDeviceIdCheckIf set to true the it will skip device id check
Returns
True if successful

Definition at line 120 of file deviceredetector.cpp.

◆ redetectEnumerateNetworkDevices()

bool DeviceRedetector::redetectEnumerateNetworkDevices ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck 
)
virtual
Returns
False

This function does nothing

Parameters
deviceIdDevice ID
portInfoPort info
skipDeviceIdCheckSkip device ID check

Definition at line 281 of file deviceredetector.cpp.

◆ redetectEnumerateSerialPorts()

bool DeviceRedetector::redetectEnumerateSerialPorts ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck 
)
virtual

Redectets and enumerates the serial ports for a given device.

Parameters
deviceIdThe device ID to look for
portInfoThe updated portinfo when the device is re-detected.
skipDeviceIdCheckIf set to true then it will skip device ID check
Returns
True if successful

Definition at line 192 of file deviceredetector.cpp.

◆ redetectNoScan()

bool DeviceRedetector::redetectNoScan ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck 
)
virtual
Returns
True

This function does nothing

Parameters
deviceIdDevice ID
portInfoPort info
skipDeviceIdCheckSkip device ID check

Definition at line 140 of file deviceredetector.cpp.

◆ redetectOneComPort()

bool DeviceRedetector::redetectOneComPort ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck 
)
virtual

Redectes a device on one com port.

Parameters
deviceIdThe device ID to look for
portInfoThe updated portinfo when the device is re-detected.
skipDeviceIdCheckIf set to true then it will skip device ID check
Returns
True if successful

Definition at line 228 of file deviceredetector.cpp.

◆ redetectScanPorts()

bool DeviceRedetector::redetectScanPorts ( const XsDeviceId deviceId,
XsPortInfo portInfo,
bool  skipDeviceIdCheck 
)
virtual

Scan for devices until the requested device is found.

Parameters
deviceIdThe device ID to look for
portInfoThe updated portinfo when the device is re-detected.
skipDeviceIdCheckIf set to true then it will skip device ID check

Scans for a certain period all available ports for the device.

Returns
True if successful

Definition at line 155 of file deviceredetector.cpp.

Member Data Documentation

◆ m_detectFunctions

std::map<XsDeviceId, FunctionPointer> DeviceRedetector::m_detectFunctions
protected

A map filled with detect functions.

Definition at line 93 of file deviceredetector.h.


The documentation for this class was generated from the following files:


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:21