29 #ifndef INCLUDED_DeviceInterfaceC_h_GUID_8B82B108_1B20_4D80_9FE5_C31E424E3652
30 #define INCLUDED_DeviceInterfaceC_h_GUID_8B82B108_1B20_4D80_9FE5_C31E424E3652
33 #include <osvr/PluginKit/Export.h>
87 OSVR_FUNC_NONNULL((1));
98 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
100 OSVR_IN_STRZ
const char *name,
102 OSVR_FUNC_NONNULL((1, 2, 3));
109 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
112 OSVR_IN_READS(len)
const char *bytestream,
113 OSVR_IN
size_t len) OSVR_FUNC_NONNULL((1, 2));
120 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
124 OSVR_IN_READS(len)
const char *bytestream,
125 OSVR_IN
size_t len) OSVR_FUNC_NONNULL((1, 2, 3));
131 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
133 OSVR_IN_READS(len)
const char *json,
134 OSVR_IN
size_t len) OSVR_FUNC_NONNULL((1, 2));
155 OSVR_IN_OPT
void *userData OSVR_CPP_ONLY(= NULL)) OSVR_FUNC_NONNULL((1));
183 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
185 OSVR_IN_STRZ const
char *name,
187 OSVR_FUNC_NONNULL((1, 2, 3));
196 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
198 OSVR_IN_STRZ const
char *name,
201 OSVR_FUNC_NONNULL((1, 2, 3, 4));
228 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
230 OSVR_IN_STRZ const
char *name,
232 OSVR_FUNC_NONNULL((1, 2, 3));
241 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
243 OSVR_IN_STRZ const
char *name,
246 OSVR_FUNC_NONNULL((1, 2, 3, 4));
257 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode
OSVR_ReturnCode osvrDeviceAsyncInit(OSVR_PluginRegContext ctx, const char *name, OSVR_DeviceToken *device)
Initialize an asynchronous device token.
OSVR_ReturnCode osvrDeviceSendTimestampedData(OSVR_DeviceToken dev, const OSVR_TimeValue *timestamp, OSVR_MessageType msg, const char *bytestream, size_t len)
Send a raw bytestream from your device, with a known timestamp.
OSVR_ReturnCode osvrDeviceAsyncInitWithOptions(OSVR_PluginRegContext ctx, const char *name, OSVR_DeviceInitOptions options, OSVR_DeviceToken *device)
Initialize an asynchronous device token.
OSVR_ReturnCode osvrDeviceRegisterUpdateCallback(OSVR_DeviceToken dev, OSVR_DeviceUpdateCallback updateCallback, void *userData=NULL)
Register the update callback of a device.
OSVR_ReturnCode osvrDeviceMicrosleep(uint64_t microseconds)
Request a thread sleep for at least the given number of microseconds. DO NOT use within a Sync plugin...
struct OSVR_DeviceTokenObject * OSVR_DeviceToken
Opaque type of a registered device token within the core library.
struct OSVR_MessageTypeObject * OSVR_MessageType
Opaque type of a registered message type within the core library.
Header declaring device callback types.
struct OSVR_DeviceInitObject * OSVR_DeviceInitOptions
Opaque type of a device initialization object.
OSVR_ReturnCode osvrDeviceSendData(OSVR_DeviceToken dev, OSVR_MessageType msg, const char *bytestream, size_t len)
Send a raw bytestream from your device.
OSVR_DeviceInitOptions osvrDeviceCreateInitOptions(OSVR_PluginRegContext ctx)
Create a OSVR_DeviceInitOptions object.
OSVR_ReturnCode osvrDeviceSendJsonDescriptor(OSVR_DeviceToken dev, const char *json, size_t len)
Submit a JSON self-descriptor string for the device.
OSVR_ReturnCode osvrDeviceSyncInitWithOptions(OSVR_PluginRegContext ctx, const char *name, OSVR_DeviceInitOptions options, OSVR_DeviceToken *device)
Initialize a synchronous device token.
Header containing macros for source-level annotation.
Header defining a dependency-free, cross-platform substitute for struct timeval.
OSVR_EXTERN_C_BEGIN typedef void * OSVR_PluginRegContext
A context pointer passed in to your plugin's entry point and other locations of control flow transfer...
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
OSVR_ReturnCode(* OSVR_DeviceUpdateCallback)(void *userData)
Function type of a Device Update callback.
OSVR_ReturnCode osvrDeviceSyncInit(OSVR_PluginRegContext ctx, const char *name, OSVR_DeviceToken *device)
Initialize a synchronous device token.
Header shared between multiple C API headers.
OSVR_ReturnCode osvrDeviceRegisterMessageType(OSVR_PluginRegContext ctx, const char *name, OSVR_MessageType *msgtype)
Register (or recall) a message type by name.