OSVR-Core
AnalogServerInterface.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_AnalogServerInterface_h_GUID_C64EDC9F_8073_4682_7415_5623C4C2129C
26 #define INCLUDED_AnalogServerInterface_h_GUID_C64EDC9F_8073_4682_7415_5623C4C2129C
27 
28 // Internal Includes
31 #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_AnalogState 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_AnalogServerInterface_h_GUID_C64EDC9F_8073_4682_7415_5623C4C2129C
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
Interface for external access to generating analog reports.
Definition: AnalogServerInterface.h:45
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...
double OSVR_AnalogState
Type of analog channel state.
Definition: ClientReportTypesC.h:129
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.
Header providing a C++ wrapper around TimeValueC.h.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81