25 #ifndef INCLUDED_VrpnAnalogServer_h_GUID_16F2A08F_2ECF_4EBB_D7B0_A2B87ACC9272 
   26 #define INCLUDED_VrpnAnalogServer_h_GUID_16F2A08F_2ECF_4EBB_D7B0_A2B87ACC9272 
   33 #include <vrpn_Analog.h> 
   39 namespace connection {
 
   42         typedef vrpn_Analog Base;
 
   44             : Base(init.getQualifiedName().c_str(), init.conn) {
 
   45             m_setNumChannels(std::min(*init.obj.getAnalogs(),
 
   48             memset(Base::channel, 0, 
sizeof(Base::channel));
 
   49             memset(Base::last, 0, 
sizeof(Base::last));
 
   55         static const vrpn_uint32 CLASS_OF_SERVICE = vrpn_CONNECTION_LOW_LATENCY;
 
   59             if (chan >= m_getNumChannels()) {
 
   62             Base::channel[chan] = val;
 
   68             if (chans > m_getNumChannels()) {
 
   69                 chans = m_getNumChannels();
 
   72                 Base::channel[i] = val[i];
 
   82             Base::num_channel = chans;
 
   87             Base::report_changes(CLASS_OF_SERVICE, t);
 
   93 #endif // INCLUDED_VrpnAnalogServer_h_GUID_16F2A08F_2ECF_4EBB_D7B0_A2B87ACC9272 
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index. 
void toStructTimeval(struct timeval &dest, TimeValue const &src)
Convert a TimeValue to a struct timeval. 
::OSVR_TimeValue TimeValue
C++-friendly typedef for the OSVR_TimeValue structure. 
virtual void setValues(value_type val[], OSVR_ChannelCount chans, util::time::TimeValue const &tv)
Sets the values from the val array at channels [0, chans), and reports changes with the given timesta...
Interface for external access to generating analog reports. 
void returnAnalogInterface(osvr::connection::AnalogServerInterface &iface)
Returns an analog interface through the pointer-pointer. 
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
virtual bool setValue(value_type val, OSVR_ChannelCount chan, util::time::TimeValue const &tv)
Sets the value to val at channel chan, and reports changes with the given timestamp.