#include <base_device_t.h>
Public Member Functions | |
base_device_t (boost::shared_ptr< xid_con_t > xid_con, const std::wstring &devconfig_path=L"") | |
virtual | ~base_device_t () |
std::string | get_device_name () |
Returns the name of the device. | |
int | get_product_id () const |
product id of the device. | |
int | get_model_id () const |
model ID of the device. | |
void | reset_rt_timer () |
Resets the internal device reaction time timer. | |
void | reset_base_timer () |
Resets the device's base timer. | |
int | query_base_timer () |
Returns the time elapsed since the base timer was reset. | |
int | get_inquiry (const char in_command[], int expected_bytes_rec=1, int timeout=100, int delay=0) |
Send a command to the device. | |
Protected Attributes | |
boost::shared_ptr< xid_con_t > | xid_con_ |
boost::shared_ptr < cedrus::xid_device_config_t > | config_ |
Definition at line 42 of file base_device_t.h.
base_device_t::base_device_t | ( | boost::shared_ptr< xid_con_t > | xid_con, |
const std::wstring & | devconfig_path = L"" |
||
) |
Definition at line 38 of file base_device_t.cpp.
base_device_t::~base_device_t | ( | ) | [virtual] |
Definition at line 48 of file base_device_t.cpp.
std::string base_device_t::get_device_name | ( | ) |
Returns the name of the device.
Definition at line 202 of file base_device_t.cpp.
int base_device_t::get_inquiry | ( | const char | in_command[], |
int | expected_bytes_rec = 1 , |
||
int | timeout = 100 , |
||
int | delay = 0 |
||
) |
Send a command to the device.
[in] | in_command | command to send to the device. Commands are detailed at http://www.cedrus.com/xid/ |
[in] | expected_bytes_rec | expected number of bytes to receive |
[in] | timeout | time in miliseconds the device should respond in |
[in] | delay | some devices need an additional delay between receiving a command and issuing a response. Defaults to 0 |
Definition at line 170 of file base_device_t.cpp.
int base_device_t::get_model_id | ( | ) | const |
model ID of the device.
This is generally only valid on RB series response pads.
Definition at line 212 of file base_device_t.cpp.
int base_device_t::get_product_id | ( | ) | const |
product id of the device.
Definition at line 207 of file base_device_t.cpp.
int base_device_t::query_base_timer | ( | ) |
Returns the time elapsed since the base timer was reset.
Definition at line 74 of file base_device_t.cpp.
void base_device_t::reset_base_timer | ( | ) |
Resets the device's base timer.
This should be called when the device is initialized or an experiment starts
Definition at line 63 of file base_device_t.cpp.
void base_device_t::reset_rt_timer | ( | ) |
Resets the internal device reaction time timer.
This should be called when a stimulus is presented
Definition at line 52 of file base_device_t.cpp.
boost::shared_ptr<cedrus::xid_device_config_t> cedrus::base_device_t::config_ [protected] |
Definition at line 125 of file base_device_t.h.
boost::shared_ptr<xid_con_t> cedrus::base_device_t::xid_con_ [protected] |
Definition at line 124 of file base_device_t.h.