25 #ifndef INCLUDED_VrpnButtonServer_h_GUID_264EFE6E_C328_45AE_B296_10980DD053AE 26 #define INCLUDED_VrpnButtonServer_h_GUID_264EFE6E_C328_45AE_B296_10980DD053AE 33 #include <vrpn_Button.h> 39 namespace connection {
43 typedef vrpn_Button_Filter Base;
45 : vrpn_Button_Filter(init.getQualifiedName().c_str(), init.conn) {
47 std::min(*init.obj.getButtons(),
50 memset(Base::buttons, 0,
sizeof(Base::buttons));
51 memset(Base::lastbuttons, 0,
sizeof(Base::lastbuttons));
59 if (chan >= m_getNumChannels()) {
62 Base::buttons[chan] = val;
69 if (chans > m_getNumChannels()) {
70 chans = m_getNumChannels();
73 Base::buttons[i] = val[i];
83 Base::num_buttons = chans;
86 util::time::toStructTimeval(Base::timestamp, tv);
87 Base::report_changes();
94 #endif // INCLUDED_VrpnButtonServer_h_GUID_264EFE6E_C328_45AE_B296_10980DD053AE uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
Definition: ChannelCountC.h:51
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Definition: DeviceConstructionData.h:41
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
void returnButtonInterface(osvr::connection::ButtonServerInterface &iface)
Returns a button interface through the pointer-pointer.
Definition: DeviceInitObject.cpp:90