SurgSim::Devices::LabJackScaffold::DeviceData Struct Reference

The per-device data. More...

## Public Member Functions

| DeviceData (LabJackDevice *device, std::unique_ptr< Handle > &&handle)
| Initialize the data, creating a thread. More...
| ~DeviceData ()
| DeviceData (LabJackDevice *device, std::unique_ptr< Handle > &&handle)
| Initialize the data, creating a thread. More...
| ~DeviceData ()

## Public Attributes

LabJackDevice *const | deviceObject
| The corresponding device object. More...
std::unique_ptr< LabJackThread > | thread
| Processing thread. More...
std::unique_ptr< Handle > | deviceHandle
| Device handle to read from. More...
const std::unordered_set< int > | digitalInputChannels
| The channels read for digital inputs. More...
const std::unordered_set< int > | digitalOutputChannels
| The channels set for digital outputs. More...
const std::unordered_set< int > | timerInputChannels
| The timer channels that provide inputs. More...
const std::unordered_set< int > | timerOutputChannels
| The timer channels set for timer outputs (e.g., PWM outputs). More...
const std::unordered_map< int, LabJack::AnalogInputSettings > | analogInputs
| The analog inputs. More...
const std::unordered_set< int > | analogOutputChannels
| The channels set for analog outputs. More...
std::unordered_map< int, int > | digitalOutputIndices
| The DataGroup indices for the digital outputs. More...
std::unordered_map< int, int > | digitalInputIndices
| The DataGroup indices for the digital inputs. More...
std::unordered_map< int, int > | timerOutputIndices
| The DataGroup indices for the timer outputs. More...
std::unordered_map< int, int > | timerInputIndices
| The DataGroup indices for the timer inputs. More...
std::unordered_map< int, int > | analogOutputIndices
| The DataGroup indices for the analog outputs. More...
std::unordered_map< int, int > | analogInputIndices
| The DataGroup indices for the analog inputs. More...
bool | cachedOutputIndices
| True if the output indices have been cached. More...
double | calibration [40]
| Calibration constants. The meaning of each entry is specific to the model (i.e., LabJack::Model). More...
bool | configured
| True if the device has been successfully configured. More...

## Private Member Functions

const std::unordered_set< int > | getTimerInputChannels (const std::unordered_map< int, LabJack::TimerSettings > &timers) const
| Given all the timers, return just the ones that provide inputs. More...
const std::unordered_set< int > | getTimerOutputChannels (const std::unordered_map< int, LabJack::TimerSettings > &timers) const
| Given all the timers, return just the ones that take outputs. More...
| DeviceData (const DeviceData &)
DeviceData & | operator= (const DeviceData &)
const std::unordered_set< int > | getTimerInputChannels (const std::unordered_map< int, LabJack::TimerSettings > &timers) const
| Given all the timers, return just the ones that provide inputs. More...
const std::unordered_set< int > | getTimerOutputChannels (const std::unordered_map< int, LabJack::TimerSettings > &timers) const
| Given all the timers, return just the ones that take outputs. More...
| DeviceData (const DeviceData &)
DeviceData & | operator= (const DeviceData &)

## Detailed Description

The per-device data.

## Constructor & Destructor Documentation

## DeviceData() [1/4]

SurgSim::Devices::LabJackScaffold::DeviceData::DeviceData | ( | LabJackDevice * | device,
|  | std::unique_ptr< Handle > && | handle
| ) |  |

inline

Initialize the data, creating a thread.

## ~DeviceData() [1/2]

SurgSim::Devices::LabJackScaffold::DeviceData::~DeviceData | ( |  | ) |

inline

## DeviceData() [2/4]

SurgSim::Devices::LabJackScaffold::DeviceData::DeviceData | ( | const DeviceData & |  | ) |

private

## DeviceData() [3/4]

SurgSim::Devices::LabJackScaffold::DeviceData::DeviceData | ( | LabJackDevice * | device,
|  | std::unique_ptr< Handle > && | handle
| ) |  |

inline

Initialize the data, creating a thread.

## ~DeviceData() [2/2]

SurgSim::Devices::LabJackScaffold::DeviceData::~DeviceData | ( |  | ) |

inline

## DeviceData() [4/4]

SurgSim::Devices::LabJackScaffold::DeviceData::DeviceData | ( | const DeviceData & |  | ) |

private

## Member Function Documentation

## getTimerInputChannels() [1/2]

const std::unordered_set<int> SurgSim::Devices::LabJackScaffold::DeviceData::getTimerInputChannels | ( | const std::unordered_map< int, LabJack::TimerSettings > & | timers | ) | const

inline private

Given all the timers, return just the ones that provide inputs.

Parameters

  timers | The timers.

Returns
  The timers that provide inputs.

## getTimerInputChannels() [2/2]

const std::unordered_set<int> SurgSim::Devices::LabJackScaffold::DeviceData::getTimerInputChannels | ( | const std::unordered_map< int, LabJack::TimerSettings > & | timers | ) | const

inline private

Given all the timers, return just the ones that provide inputs.

Parameters

  timers | The timers.

Returns
  The timers that provide inputs.

## getTimerOutputChannels() [1/2]

const std::unordered_set<int> SurgSim::Devices::LabJackScaffold::DeviceData::getTimerOutputChannels | ( | const std::unordered_map< int, LabJack::TimerSettings > & | timers | ) | const

inline private

Given all the timers, return just the ones that take outputs.

Parameters

  timers | The timers.

Returns
  The timers that take outputs.

## getTimerOutputChannels() [2/2]

const std::unordered_set<int> SurgSim::Devices::LabJackScaffold::DeviceData::getTimerOutputChannels | ( | const std::unordered_map< int, LabJack::TimerSettings > & | timers | ) | const

inline private

Given all the timers, return just the ones that take outputs.

Parameters

  timers | The timers.

Returns
  The timers that take outputs.

## operator=() [1/2]

DeviceData& SurgSim::Devices::LabJackScaffold::DeviceData::operator= | ( | const DeviceData & |  | ) |

private

## operator=() [2/2]

DeviceData& SurgSim::Devices::LabJackScaffold::DeviceData::operator= | ( | const DeviceData & |  | ) |

private

## Member Data Documentation

## analogInputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::analogInputIndices

The DataGroup indices for the analog inputs.

## analogInputs

const std::unordered_map< int, LabJack::AnalogInputSettings > SurgSim::Devices::LabJackScaffold::DeviceData::analogInputs

The analog inputs.

## analogOutputChannels

const std::unordered_set< int > SurgSim::Devices::LabJackScaffold::DeviceData::analogOutputChannels

The channels set for analog outputs.

## analogOutputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::analogOutputIndices

The DataGroup indices for the analog outputs.

## cachedOutputIndices

bool SurgSim::Devices::LabJackScaffold::DeviceData::cachedOutputIndices

True if the output indices have been cached.

## calibration

double SurgSim::Devices::LabJackScaffold::DeviceData::calibration[40]

Calibration constants. The meaning of each entry is specific to the model (i.e., LabJack::Model).

## configured

bool SurgSim::Devices::LabJackScaffold::DeviceData::configured

True if the device has been successfully configured.

## deviceHandle

std::unique_ptr< Handle > SurgSim::Devices::LabJackScaffold::DeviceData::deviceHandle

Device handle to read from.

## deviceObject

LabJackDevice *const SurgSim::Devices::LabJackScaffold::DeviceData::deviceObject

The corresponding device object.

## digitalInputChannels

const std::unordered_set< int > SurgSim::Devices::LabJackScaffold::DeviceData::digitalInputChannels

The channels read for digital inputs.

## digitalInputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::digitalInputIndices

The DataGroup indices for the digital inputs.

## digitalOutputChannels

const std::unordered_set< int > SurgSim::Devices::LabJackScaffold::DeviceData::digitalOutputChannels

The channels set for digital outputs.

## digitalOutputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::digitalOutputIndices

The DataGroup indices for the digital outputs.

## thread

std::unique_ptr< LabJackThread > SurgSim::Devices::LabJackScaffold::DeviceData::thread

Processing thread.

## timerInputChannels

const std::unordered_set< int > SurgSim::Devices::LabJackScaffold::DeviceData::timerInputChannels

The timer channels that provide inputs.

## timerInputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::timerInputIndices

The DataGroup indices for the timer inputs.

## timerOutputChannels

const std::unordered_set< int > SurgSim::Devices::LabJackScaffold::DeviceData::timerOutputChannels

The timer channels set for timer outputs (e.g., PWM outputs).

## timerOutputIndices

std::unordered_map< int, int > SurgSim::Devices::LabJackScaffold::DeviceData::timerOutputIndices

The DataGroup indices for the timer outputs.

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

- SurgSim/Devices/LabJack/linux/LabJackScaffold.cpp