OSVR-Core
ButtonServerInterface.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_ButtonServerInterface_h_GUID_864E9363_E9EE_42AD_E0D6_990E6E61B137
26 #define INCLUDED_ButtonServerInterface_h_GUID_864E9363_E9EE_42AD_E0D6_990E6E61B137
27 
28 // Internal Includes
30 #include <osvr/Util/TimeValue.h>
32 
33 // Library/third-party includes
34 // - none
35 
36 // Standard includes
37 // - none
38 
39 namespace osvr {
40 namespace connection {
46  public:
47  typedef OSVR_ButtonState value_type;
50  virtual bool setValue(value_type val, OSVR_ChannelCount chan,
51  util::time::TimeValue const &timestamp) = 0;
52 
55  virtual void setValues(value_type val[], OSVR_ChannelCount chans,
56  util::time::TimeValue const &timestamp) = 0;
57  };
58 
59 } // namespace connection
60 } // namespace osvr
61 
62 #endif // INCLUDED_ButtonServerInterface_h_GUID_864E9363_E9EE_42AD_E0D6_990E6E61B137
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
Definition: ChannelCountC.h:51
Interface for external access to generating button reports.
Definition: ButtonServerInterface.h:45
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
virtual bool setValue(value_type val, OSVR_ChannelCount chan, util::time::TimeValue const &timestamp)=0
Sets the value to val at channel chan, and reports changes with the given timestamp.
virtual void setValues(value_type val[], OSVR_ChannelCount chans, util::time::TimeValue const &timestamp)=0
Sets the values from the val array at channels [0, chans), and reports changes with the given timesta...
Header providing a C++ wrapper around TimeValueC.h.
uint8_t OSVR_ButtonState
Type of button state.
Definition: ClientReportTypesC.h:120
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81