device configuration class More...
#include <xid_device_driver/xid_device_config.h>
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. |
device configuration class
Definition at line 46 of file xid_device_config_t.h.
cedrus::xid_device_config_t::~xid_device_config_t | ( | void | ) |
Definition at line 76 of file xid_device_config_t.cpp.
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.
[in] | product_id | product id of the XID device |
[in] | model_id | Used with RB-series devices. 0 otherwise. |
[in] | devconfig_location | Path to the devconfig files. See the constructor of CedrusXidDeviceEnumerator for an example of looking up the path to the devconfig files. |
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.
[in] | key | key reported by the response pad |
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.