Public Member Functions | Protected Attributes

cedrus::base_device_t Class Reference

#include <base_device_t.h>

Inheritance diagram for cedrus::base_device_t:
cedrus::stim_tracker_t cedrus::xid_device_t

List of all members.

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_txid_con_
boost::shared_ptr
< cedrus::xid_device_config_t
config_

Detailed Description

Definition at line 42 of file base_device_t.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

std::string base_device_t::get_device_name (  )

Returns the name of the device.

Returns:
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.

Parameters:
[in]in_commandcommand to send to the device. Commands are detailed at http://www.cedrus.com/xid/
[in]expected_bytes_recexpected number of bytes to receive
[in]timeouttime in miliseconds the device should respond in
[in]delaysome devices need an additional delay between receiving a command and issuing a response. Defaults to 0
Returns:
an integer value of the response

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.

Returns:
model id of the device 1: RB-530 2: RB-730 3: RB-830 4: RB-834

Definition at line 212 of file base_device_t.cpp.

int base_device_t::get_product_id (  ) const

product id of the device.

Returns:
product id 0: Lumina LP-400 response pad system 1: SV-1 voice key system 2: RB series response pad.

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.


Member Data Documentation

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.


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