Public Member Functions | Private Member Functions | Private Attributes | List of all members
SurgSim::Devices::LabJackScaffold::Handle Class Reference

Public Member Functions

 Handle (SurgSim::Devices::LabJack::Model model, SurgSim::Devices::LabJack::Connection connection, const std::string &address)
 Constructor that attempts to open a device. More...
 
 ~Handle ()
 Destructor. More...
 
bool isValid () const
 
void destroy (bool reset=false)
 Close communication with the hardware. More...
 
LJ_HANDLE get () const
 
 Handle (LabJack::Model model, LabJack::Connection connection, const std::string &address)
 Constructor that attempts to open a device. More...
 
 ~Handle ()
 Destructor. More...
 
bool isValid () const
 
void destroy (bool reset=false)
 Close communication with the hardware. More...
 
LJ_HANDLE get () const
 

Private Member Functions

 Handle (const Handle &)
 
Handleoperator= (const Handle &)
 
 Handle (const Handle &)
 
Handleoperator= (const Handle &)
 

Private Attributes

LJ_HANDLE m_deviceHandle
 The exodriver device handle (or LABJACK_INVALID_HANDLE if not valid). More...
 
std::string m_address
 The address used to open the device. Can be the empty string if the first-found device was opened. More...
 
SurgSim::Devices::LabJack::Model m_model
 The model of the device. More...
 
SurgSim::Devices::LabJack::Connection m_connection
 The connection to the device. More...
 
std::shared_ptr< Framework::Loggerm_logger
 The logger. More...
 
LabJack::Model m_model
 The device model. More...
 
LabJack::Connection m_connection
 The connection to the device. More...
 

Constructor & Destructor Documentation

◆ Handle() [1/4]

SurgSim::Devices::LabJackScaffold::Handle::Handle ( SurgSim::Devices::LabJack::Model  model,
SurgSim::Devices::LabJack::Connection  connection,
const std::string &  address 
)
inline

Constructor that attempts to open a device.

Parameters
modelThe model of LabJack device to open (see strings in LabJackUD.h).
connectionHow to connect to the device (e.g., USB) (see strings in LabJackUD.h).
addressEither the ID or serial number (if USB), or the IP address.

◆ ~Handle() [1/2]

SurgSim::Devices::LabJackScaffold::Handle::~Handle ( )
inline

Destructor.

◆ Handle() [2/4]

SurgSim::Devices::LabJackScaffold::Handle::Handle ( const Handle )
private

◆ Handle() [3/4]

SurgSim::Devices::LabJackScaffold::Handle::Handle ( LabJack::Model  model,
LabJack::Connection  connection,
const std::string &  address 
)
inline

Constructor that attempts to open a device.

Parameters
modelThe model of LabJack device to open (see strings in LabJackUD.h).
connectionHow to connect to the device (e.g., USB) (see strings in LabJackUD.h).
addressEither the ID or serial number (if USB), or the IP address.

◆ ~Handle() [2/2]

SurgSim::Devices::LabJackScaffold::Handle::~Handle ( )
inline

Destructor.

◆ Handle() [4/4]

SurgSim::Devices::LabJackScaffold::Handle::Handle ( const Handle )
private

Member Function Documentation

◆ destroy() [1/2]

void SurgSim::Devices::LabJackScaffold::Handle::destroy ( bool  reset = false)
inline

Close communication with the hardware.

Parameters
resettrue to cause a hardware reset & USB re-enumeration. Otherwise the hardware's settings will be unchanged (i.e., it will continue timing, counting, and outputting).

◆ destroy() [2/2]

void SurgSim::Devices::LabJackScaffold::Handle::destroy ( bool  reset = false)
inline

Close communication with the hardware.

Parameters
resettrue to cause a hardware reset & USB re-enumeration. Otherwise the hardware's settings will be unchanged (i.e., it will continue timing, counting, and outputting).

◆ get() [1/2]

LJ_HANDLE SurgSim::Devices::LabJackScaffold::Handle::get ( ) const
inline
Returns
The LabJackUD's handle wrapped by this Handle.

◆ get() [2/2]

LJ_HANDLE SurgSim::Devices::LabJackScaffold::Handle::get ( ) const
inline
Returns
The LabJack SDK's handle wrapped by this Handle.

◆ isValid() [1/2]

bool SurgSim::Devices::LabJackScaffold::Handle::isValid ( ) const
inline
Returns
Whether or not the wrapped handle is valid.

◆ isValid() [2/2]

bool SurgSim::Devices::LabJackScaffold::Handle::isValid ( ) const
inline
Returns
Whether or not the wrapped handle is valid.

◆ operator=() [1/2]

Handle& SurgSim::Devices::LabJackScaffold::Handle::operator= ( const Handle )
private

◆ operator=() [2/2]

Handle& SurgSim::Devices::LabJackScaffold::Handle::operator= ( const Handle )
private

Member Data Documentation

◆ m_address

std::string SurgSim::Devices::LabJackScaffold::Handle::m_address
private

The address used to open the device. Can be the empty string if the first-found device was opened.

◆ m_connection [1/2]

LabJack::Connection SurgSim::Devices::LabJackScaffold::Handle::m_connection
private

The connection to the device.

◆ m_connection [2/2]

SurgSim::Devices::LabJack::Connection SurgSim::Devices::LabJackScaffold::Handle::m_connection
private

The connection to the device.

◆ m_deviceHandle

LJ_HANDLE SurgSim::Devices::LabJackScaffold::Handle::m_deviceHandle
private

The exodriver device handle (or LABJACK_INVALID_HANDLE if not valid).

The HDAL device handle (or LABJACK_INVALID_HANDLE if not valid).

◆ m_logger

std::shared_ptr< Framework::Logger > SurgSim::Devices::LabJackScaffold::Handle::m_logger
private

The logger.

◆ m_model [1/2]

LabJack::Model SurgSim::Devices::LabJackScaffold::Handle::m_model
private

The device model.

◆ m_model [2/2]

SurgSim::Devices::LabJack::Model SurgSim::Devices::LabJackScaffold::Handle::m_model
private

The model of the device.


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