Skip to main content
Wuji SDK uses a subscription mechanism to receive device data. Each data stream corresponds to a sensor or computed result, accessed through semantic APIs.

Subscription Modes

Async Receive

Sync Non-blocking Receive

Callback Receive

Every C callback carries a WujiFrameKind. WUJI_FRAME_KIND_OK means the frame is readable, _LAG means the consumer fell behind and carries a lag count, and _END and _ERROR are terminal. The frame pointer is valid only for the duration of the callback, so copy anything you need to keep.

Closing Subscriptions

Callback subscriptions must be manually closed:
All subscriptions on a device are automatically closed when the device is disconnected. After a terminal frame the stream delivers no more data, but the handle still needs closing.

Adjusting the Stream Output Rate

Adjust the firmware push rate of a subscribed stream. The call returns the rate the device applies:
  • Call it on an open subscription handle. The setting stays in effect for the life of the subscription.
  • Rates can only go down, not above the native rate. The device quantizes the request to a supported rate (an integer division of the native rate), and the applied rate is what counts. In C, pass NULL for out_actual_hz when the applied rate isn’t needed.
  • The rate belongs to the stream, not to the handle: all subscribers of the stream share the setting, and the last write wins.
  • The setting doesn’t persist: the rate resets to the device default full rate when the last subscription to the stream is closed or the device reconnects.
  • Only streams produced directly by the device support rate control. Derived streams follow their source rate automatically, and global resources such as tf_static are aggregated by the SDK. Adjusting either raises WujiException in Python and returns WUJI_STATUS_ERR_UNSUPPORTED (-8) in C.
  • Requires firmware with stream rate control support. Firmware without it raises WujiException in Python and returns WUJI_STATUS_ERR_UNSUPPORTED (-8) in C.
Rate-adjustable streams and the derived streams that follow them, per device: joint_states and joint_diagnostics on the Wuji Hand 2 share one device stream, so adjusting either changes both. For complete examples, see examples/python/wuji_glove/6.set_stream_rate.py, examples/python/wuji_hand_2/4.set_stream_rate.py, examples/c/wuji_glove/1_set_stream_rate.c, and examples/c/wuji_hand_2/4_set_stream_rate.c.

Cross-device Merged Subscription

Global resources automatically aggregate data from all connected devices. Global resources in the current version: Query the full list of global resources at runtime, then subscribe:
Differences between device resources and global resources:

Available Data Streams

Index by Product

Interface List

Python offers three ways to take frames: async, sync non-blocking, and callback. C offers callbacks only, and the frame pointer is valid only for the duration of the callback. For memory ownership and callback constraints in C, see the C Interface Reference.