55 opts->setAnalogs(numChan, ifaceObj->analog);
78 auto guard = iface->getSendGuard();
80 bool sendResult = iface->analog->setValue(val, chan, *timestamp);
106 auto guard = iface->getSendGuard();
108 iface->analog->setValues(val, chans, *timestamp);
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.
A DeviceToken connects the generic device interaction code in PluginKit's C API with the workings of ...
OSVR_ReturnCode osvrDeviceAnalogSetValueTimestamped(OSVR_DeviceToken, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val, OSVR_ChannelCount chan, OSVR_TimeValue const *timestamp)
Report the value of a single channel with the supplied timestamp.
void osvrTimeValueGetNow(OSVR_TimeValue *dest)
Gets the current time in the TimeValue. Parallel to gettimeofday.
OSVR_ReturnCode osvrDeviceAnalogSetValue(OSVR_DeviceToken dev, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val, OSVR_ChannelCount chan)
Report the value of a single channel.
Structure used internally to construct the desired type of device.
#define OSVR_PLUGIN_HANDLE_NULL_CONTEXT(FUNC, CONTEXT_NAME)
Internal macro for use in C API function implementations to check the validity of a context parameter...
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
double OSVR_AnalogState
Type of analog channel state.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
OSVR_ReturnCode osvrDeviceAnalogSetValuesTimestamped(OSVR_DeviceToken, OSVR_AnalogDeviceInterface iface, OSVR_AnalogState val[], OSVR_ChannelCount chans, OSVR_TimeValue const *timestamp)
Report the value of multiple channels with the supplied timestamp.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Base class for the DeviceInterfaceObjects retrieved by plugins to let them send data on an interface...
OSVR_ReturnCode osvrDeviceAnalogConfigure(OSVR_DeviceInitOptions opts, OSVR_AnalogDeviceInterface *iface, OSVR_ChannelCount numChan)
Specify that your device will implement the Analog interface.