OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
AnalogInterfaceC.h
Go to the documentation of this file.
1 
13 /*
14 // Copyright 2014 Sensics, Inc.
15 //
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
27 */
28 
29 #ifndef INCLUDED_AnalogInterfaceC_h_GUID_394913C6_BACB_4A85_EEF8_6765C82907E7
30 #define INCLUDED_AnalogInterfaceC_h_GUID_394913C6_BACB_4A85_EEF8_6765C82907E7
31 
32 /* Internal Includes */
36 
37 /* Library/third-party includes */
38 /* none */
39 
40 /* Standard includes */
41 /* none */
42 
43 OSVR_EXTERN_C_BEGIN
44 
54 typedef struct OSVR_AnalogDeviceInterfaceObject *OSVR_AnalogDeviceInterface;
55 
66 OSVR_PLUGINKIT_EXPORT
67 OSVR_ReturnCode
69  OSVR_OUT_PTR OSVR_AnalogDeviceInterface *iface,
70  OSVR_IN OSVR_ChannelCount numChan)
71  OSVR_FUNC_NONNULL((1, 2));
72 
75 OSVR_PLUGINKIT_EXPORT
76 OSVR_ReturnCode osvrDeviceAnalogSetValue(OSVR_IN_PTR OSVR_DeviceToken dev,
77  OSVR_IN_PTR OSVR_AnalogDeviceInterface
78  iface,
79  OSVR_IN OSVR_AnalogState val,
80  OSVR_IN OSVR_ChannelCount chan)
81  OSVR_FUNC_NONNULL((1, 2));
82 
85 OSVR_PLUGINKIT_EXPORT
87  OSVR_INOUT_PTR OSVR_DeviceToken dev,
88  OSVR_IN_PTR OSVR_AnalogDeviceInterface iface, OSVR_IN OSVR_AnalogState val,
89  OSVR_IN OSVR_ChannelCount chan, OSVR_IN_PTR OSVR_TimeValue const *timestamp)
90  OSVR_FUNC_NONNULL((1, 2, 5));
91 
94 OSVR_PLUGINKIT_EXPORT
95 OSVR_ReturnCode osvrDeviceAnalogSetValues(OSVR_IN_PTR OSVR_DeviceToken dev,
96  OSVR_IN_PTR OSVR_AnalogDeviceInterface
97  iface,
98  OSVR_IN_PTR OSVR_AnalogState val[],
99  OSVR_IN OSVR_ChannelCount chans)
100  OSVR_FUNC_NONNULL((1, 2, 3));
101 
104 OSVR_PLUGINKIT_EXPORT
106  OSVR_IN_PTR OSVR_DeviceToken dev,
107  OSVR_IN_PTR OSVR_AnalogDeviceInterface iface,
108  OSVR_IN_PTR OSVR_AnalogState val[], OSVR_IN OSVR_ChannelCount chans,
109  OSVR_IN_PTR OSVR_TimeValue const *timestamp)
110  OSVR_FUNC_NONNULL((1, 2, 3, 5));
111  /* end of group */
113 
114 OSVR_EXTERN_C_END
115 
116 #endif
OSVR_ReturnCode osvrDeviceAnalogSetValues(OSVR_DeviceToken dev, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val[], OSVR_ChannelCount chans)
Report the value of multiple channels.
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
Definition: ChannelCountC.h:51
OSVR_ReturnCode osvrDeviceAnalogSetValueTimestamped(OSVR_DeviceToken dev, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val, OSVR_ChannelCount chan, OSVR_TimeValue const *timestamp)
Report the value of a single channel with the supplied timestamp.
OSVR_ReturnCode osvrDeviceAnalogSetValue(OSVR_DeviceToken dev, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val, OSVR_ChannelCount chan)
Report the value of a single channel.
double OSVR_AnalogState
Type of analog channel state.
struct OSVR_DeviceTokenObject * OSVR_DeviceToken
Opaque type of a registered device token within the core library.
struct OSVR_DeviceInitObject * OSVR_DeviceInitOptions
Opaque type of a device initialization object.
OSVR_ReturnCode osvrDeviceAnalogSetValuesTimestamped(OSVR_DeviceToken dev, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val[], OSVR_ChannelCount chans, OSVR_TimeValue const *timestamp)
Report the value of multiple channels with the supplied timestamp.
struct OSVR_AnalogDeviceInterfaceObject * OSVR_AnalogDeviceInterface
Opaque type used in conjunction with a device token to send data on an analog interface.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
OSVR_ReturnCode osvrDeviceAnalogConfigure(OSVR_DeviceInitOptions opts, OSVR_AnalogDeviceInterface *iface, OSVR_ChannelCount numChan)
Specify that your device will implement the Analog interface.