Enpose API — C
Enpose 6-DoF tracking API
Loading...
Searching...
No Matches
Enpose C API

Functions, types, and status codes of the Enpose C interface. More...

Data Structures

struct  EnposeDeviceInfo
 C view of one discovered device. More...
 
struct  EnposeMarkerPose
 Pose of one tracked marker in world coordinates. More...
 

Typedefs

typedef struct EnposePoseStream EnposePoseStream
 Opaque handle to a live pose stream.
 

Enumerations

enum  EnposeStatus { ENPOSE_OK = 0 , ENPOSE_ERR_INVALID_ARG = -1 , ENPOSE_ERR_IO = -2 , ENPOSE_ERR_PANIC = -3 }
 Result code returned by the fallible functions. More...
 

Functions

EnposeStatus enpose_discover (EnposeDeviceInfo **out_devices, size_t *out_count)
 Discover Enpose devices on the local network.
 
void enpose_device_info_array_free (EnposeDeviceInfo *devices, size_t count)
 Release an array returned by enpose_discover().
 
EnposePoseStreamenpose_pose_stream_connect (const char *ip, bool create_thread)
 Connect a pose stream to the device at ip (an IPv4 string).
 
EnposeStatus enpose_pose_stream_receive (EnposePoseStream *stream, bool block, EnposeMarkerPose **out_poses, size_t *out_count)
 Return the poses received from the stream.
 
void enpose_marker_pose_array_free (EnposeMarkerPose *poses, size_t count)
 Release an array returned by enpose_pose_stream_receive().
 
void enpose_pose_stream_free (EnposePoseStream *stream)
 Disconnect and free a pose stream handle.
 

Detailed Description

Functions, types, and status codes of the Enpose C interface.

Typedef Documentation

◆ EnposePoseStream

Opaque handle to a live pose stream.

Enumeration Type Documentation

◆ EnposeStatus

Result code returned by the fallible functions.

Enumerator
ENPOSE_OK 

The call succeeded.

ENPOSE_ERR_INVALID_ARG 

A required argument was null/invalid.

ENPOSE_ERR_IO 

An I/O error occurred (e.g.

network failure).

ENPOSE_ERR_PANIC 

Internal error; the call was aborted cleanly.

Function Documentation

◆ enpose_discover()

EnposeStatus enpose_discover ( EnposeDeviceInfo **  out_devices,
size_t *  out_count 
)

Discover Enpose devices on the local network.

On ENPOSE_OK, *out_devices points to a library-allocated array of *out_count entries (or NULL with count 0 when none were found). Release it with enpose_device_info_array_free(). out_devices and out_count must be non-null.

◆ enpose_device_info_array_free()

void enpose_device_info_array_free ( EnposeDeviceInfo devices,
size_t  count 
)

Release an array returned by enpose_discover().

◆ enpose_pose_stream_connect()

EnposePoseStream * enpose_pose_stream_connect ( const char *  ip,
bool  create_thread 
)

Connect a pose stream to the device at ip (an IPv4 string).

The Enpose API is IPv4-only; a non-IPv4 address fails. When create_thread is true, a background thread receives and buffers poses (the preferred mode); otherwise poses are collected when enpose_pose_stream_receive() is called. Returns an opaque handle, or NULL on failure (a non-IPv4 or invalid address, or a connection error). Release the handle with enpose_pose_stream_free().

◆ enpose_pose_stream_receive()

EnposeStatus enpose_pose_stream_receive ( EnposePoseStream stream,
bool  block,
EnposeMarkerPose **  out_poses,
size_t *  out_count 
)

Return the poses received from the stream.

When block is true, waits for at least one pose update before returning, up to a 3-second timeout (after which it returns with none); otherwise returns immediately with whatever has arrived since the previous call (possibly none). On ENPOSE_OK, *out_poses points to a library-allocated array of *out_count entries (or NULL with count 0 when none have arrived). Release it with enpose_marker_pose_array_free().

◆ enpose_marker_pose_array_free()

void enpose_marker_pose_array_free ( EnposeMarkerPose poses,
size_t  count 
)

Release an array returned by enpose_pose_stream_receive().

◆ enpose_pose_stream_free()

void enpose_pose_stream_free ( EnposePoseStream stream)

Disconnect and free a pose stream handle.