Module ffi

Module ffi 

Source
Expand description

C ABI for the Enpose API.

This is a thin wrapper over the idiomatic Rust API (DeviceDiscovery, PoseStream, MarkerPose); Rust applications should use those types directly. The functions here exist so C (and other languages with a C FFI) can drive the same discover-then-stream workflow. The matching C declarations live in the hand-written c/enpose_api.h.

Conventions:

  • Stateful objects are exposed as opaque pointers created by a connect function and released by a free function.
  • Variable-length results (the device list, a pose batch) are returned as library-allocated arrays; the caller must release each with the matching *_array_free function and must not free the memory itself.
  • Functions returning EnposeStatus report success as EnposeStatus::Ok; functions returning a pointer report failure as NULL.
  • Every entry point is panic-safe: a panic is caught at the boundary and turned into an error result rather than unwinding into C.

Structs§

EnposeDeviceInfo
C-compatible view of one discovered device.

Enums§

EnposeStatus
Result code returned by the fallible C API functions.

Functions§

enpose_device_info_array_free
Release an array returned by enpose_discover.
enpose_discover
Discover Enpose devices on the local network.
enpose_marker_pose_array_free
Release an array returned by enpose_pose_stream_receive.
enpose_pose_stream_connect
Connect a pose stream to the device at ip (an IPv4 string).
enpose_pose_stream_free
Disconnect and free a pose stream handle.
enpose_pose_stream_receive
Return the marker poses received from the stream.