Public Member Functions | Static Public Member Functions

cedrus::xid_device_config_t Class Reference

device configuration class More...

#include <xid_device_driver/xid_device_config.h>

List of all members.

Public Member Functions

 ~xid_device_config_t (void)
int get_mapped_key (int key) const
 Gets the actual button pressed based on the devconfig key mapping.
int number_of_lines () const
 Number of response lines (or buttons) a device has.
bool needs_interbyte_delay () const
 Whether or not the device requires an inter-byte delay.
char digital_out_prefix () const
 The digital output prefix.

Static Public Member Functions

static boost::shared_ptr
< xid_device_config_t
config_for_device (int product_id, int model_id, const std::wstring &devconfig_location)
 Returns a device configuration object.

Detailed Description

device configuration class

Definition at line 46 of file xid_device_config_t.h.


Constructor & Destructor Documentation

cedrus::xid_device_config_t::~xid_device_config_t ( void   )

Definition at line 76 of file xid_device_config_t.cpp.


Member Function Documentation

boost::shared_ptr< cedrus::xid_device_config_t > cedrus::xid_device_config_t::config_for_device ( int  product_id,
int  model_id,
const std::wstring &  devconfig_location 
) [static]

Returns a device configuration object.

This class reads the .devconfig files distributed with this library. The user must specify the runtime path to the devconfig files otherwise very conservative defaults are used. Button counts on the device may not match up with reality and button ordering may be different than expected.

If the path passed into this function is empty, an invalid boost::shared_ptr will be returned.

Parameters:
[in]product_idproduct id of the XID device
[in]model_idUsed with RB-series devices. 0 otherwise.
[in]devconfig_locationPath to the devconfig files. See the constructor of CedrusXidDeviceEnumerator for an example of looking up the path to the devconfig files.
Returns:
a device configuration object

Definition at line 39 of file xid_device_config_t.cpp.

char cedrus::xid_device_config_t::digital_out_prefix (  ) const

The digital output prefix.

Definition at line 286 of file xid_device_config_t.cpp.

int cedrus::xid_device_config_t::get_mapped_key ( int  key ) const

Gets the actual button pressed based on the devconfig key mapping.

Parameters:
[in]keykey reported by the response pad
Returns:
the mapped key number based on the .devconfig file.

Definition at line 262 of file xid_device_config_t.cpp.

bool cedrus::xid_device_config_t::needs_interbyte_delay (  ) const

Whether or not the device requires an inter-byte delay.

Definition at line 281 of file xid_device_config_t.cpp.

int cedrus::xid_device_config_t::number_of_lines (  ) const

Number of response lines (or buttons) a device has.

Definition at line 276 of file xid_device_config_t.cpp.


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