63 vrpn_uint32 numChannels,
64 vrpn_int32 reportOnChangeOnly) :
66_SEIopened(vrpn_false),
68_reportChange(reportOnChangeOnly!=0),
71#ifdef VRPN_USE_USDIGITAL
73 this->setNumChannels( numChannels );
77 fprintf(stderr,
"vrpn_Analog_USDigital_A2: Can't get connection!\n");
83#ifdef VRPN_USE_USDIGITAL
84 err = InitializeSEI(portNum, AUTOASSIGN) ;
86 fprintf(stderr,
"vrpn_Analog_USDigital_A2::vrpn_Analog_USDigital_A2(): Not yet implemented for this architecture\n");
90 fprintf(stderr,
"vrpn_Analog_USDigital_A2: Can't initialize SEI bus for port %d.\n",
91#ifdef VRPN_USE_USDIGITAL
100 _SEIopened = vrpn_true ;
104#ifdef VRPN_USE_USDIGITAL
105 _numDevices = GetNumberOfDevices() ;
109 "vrpn_Analog_USDigital_A2: Error (%d) returned from GetNumberOfDevices call on SEI bus",
113 if (_numDevices != numChannels)
115 "vrpn_Analog_USDigital_A2: Warning, number of requested devices (%d) is not the same as found (%d)\n",
116 numChannels, _numDevices) ;
123 for (vrpn_uint32 d=0 ; d<_numDevices ; d++) {
124 long deviceInfoErr, model, serialnum, version, addr ;
125#ifdef VRPN_USE_USDIGITAL
126 deviceInfoErr = GetDeviceInfo(d, &model, &serialnum, &version, &addr) ;
134 fprintf(stderr,
"vrpn_Analog_USDigital_A2: could not get information on Device #%d!\n", d) ;
136 fprintf(stderr,
"vrpn_Analog_USDigital_A2: Device #%d: model=%d, serialnum=%d, version=%d, addr=%d\n",
137 d, model, serialnum, version, addr) ;
141 fprintf(stderr,
"vrpn_Analog_USDigital_A2::vrpn_Analog_USDigital_A2(): Not compiled in; define VRPN_USE_USDIGITAL in vrpn_Configure.h and recompile VRPN\n");
142 portNum = portNum + 1;
143 numChannels = numChannels + 1;
144 _SEIopened = !_SEIopened;
145 _devAddr = _devAddr + 1;
146 _numDevices = _numDevices + 1;
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...