5#ifndef VRPN_NATIONALINSTRUMENTS_H
6#define VRPN_NATIONALINSTRUMENTS_H
8#ifdef VRPN_USE_NATIONAL_INSTRUMENTS_MX
19#define vrpn_NI_INPUT_MODE_DIFFERENTIAL (0)
20#define vrpn_NI_INPUT_MODE_REF_SINGLE_ENDED (1)
21#define vrpn_NI_INPUT_MODE_NON_REF_SINGLE_ENDED (2)
22#define vrpn_NI_INPUT_RANGE_5V (5)
23#define vrpn_NI_INPUT_RANGE_10V (10)
24#define vrpn_NI_INPUT_RANGE_20V (20)
33 const char *boardName =
"PCI-6713",
36 double minInputReportDelaySecs = 0.0,
37 bool inBipolar =
false,
40 bool driveAIS =
false,
42 bool outBipolar =
false,
43 double minOutVoltage = 0.0,
44 double maxOutVoltage = 10.0);
51#ifdef VRPN_USE_NATIONAL_INSTRUMENTS_MX
55 void reportError(int32 errnumber, vrpn_bool exitProgram = vrpn_false);
57 short d_device_number;
106 const char *boardName =
"PCI-6713",
108 bool bipolar =
false,
109 double minVoltage = 0.0,
110 double maxVoltage = 10.0);
virtual vrpn_int32 encode_num_channels_to(char *buf, vrpn_int32 num)
vrpn_int32 setNumChannels(vrpn_int32 sizeRequested)
Sets the size of the array; returns the size actually set. (May be clamped to vrpn_CHANNEL_MAX) This ...
virtual bool report_num_channels(vrpn_uint32 class_of_service=vrpn_CONNECTION_RELIABLE)
static int VRPN_CALLBACK handle_request_channels_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to change a number of channels Derived class must either install handlers for t...
static int VRPN_CALLBACK handle_got_connection(void *userdata, vrpn_HANDLERPARAM p)
Used to notify us when a new connection is requested, so that we can let the client know how many cha...
static int VRPN_CALLBACK handle_request_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to change one of the values by setting the channel to that value....
vrpn_Analog_Output_Server_NI(const char *name, vrpn_Connection *c, const char *boardName="PCI-6713", vrpn_int16 numChannels=vrpn_CHANNEL_MAX, bool bipolar=false, double minVoltage=0.0, double maxVoltage=10.0)
vrpn_Analog_Output(const char *name, vrpn_Connection *c=NULL)
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
static int VRPN_CALLBACK handle_request_channels_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to change a number of channels Derived class must either install handlers for t...
void reportError(int32 errnumber, vrpn_bool exitProgram=vrpn_false)
int setNumOutChannels(int sizeRequested)
Sets the size of the array; returns the size actually set. (May be clamped to vrpn_CHANNEL_MAX) This ...
virtual bool report_num_channels(vrpn_uint32 class_of_service=vrpn_CONNECTION_RELIABLE)
TaskHandle d_analog_task_handle
TaskHandle d_analog_out_task_handle
int setNumInChannels(int sizeRequested)
Sets the size of the array; returns the size actually set. (May be clamped to vrpn_CHANNEL_MAX) This ...
static int VRPN_CALLBACK handle_got_connection(void *userdata, vrpn_HANDLERPARAM p)
Used to notify us when a new connection is requested, so that we can let the client know how many cha...
struct timeval d_last_report_time
static int VRPN_CALLBACK handle_request_message(void *userdata, vrpn_HANDLERPARAM p)
Responds to a request to the AnalogOutput to change one of the values by setting the channel to that ...
vrpn_National_Instruments_Server(const char *name, vrpn_Connection *c, const char *boardName="PCI-6713", int numInChannels=vrpn_CHANNEL_MAX, int numOutChannels=vrpn_CHANNEL_MAX, double minInputReportDelaySecs=0.0, bool inBipolar=false, int inputMode=vrpn_NI_INPUT_MODE_DIFFERENTIAL, int inputRange=vrpn_NI_INPUT_RANGE_10V, bool driveAIS=false, int inputGain=1, bool outBipolar=false, double minOutVoltage=0.0, double maxOutVoltage=10.0)
virtual vrpn_int32 encode_num_channels_to(char *buf, vrpn_int32 num)
This structure is what is passed to a vrpn_Connection message callback.
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
Classes of service for messages, specify multiple by ORing them together Priority of satisfying these...
#define vrpn_NI_INPUT_RANGE_10V
#define vrpn_NI_INPUT_MODE_DIFFERENTIAL