Class PoseStream
- Namespace
- Enpose
- Assembly
- Enpose.Api.dll
A live pose stream from one device.
public sealed class PoseStream : IDisposable
- Inheritance
-
PoseStream
- Implements
- Inherited Members
Remarks
Disconnects on Dispose() — use it with using — and,
as a backstop, when the handle is finalized.
Constructors
PoseStream(DeviceInfo, bool)
Connect to a discovered device.
public PoseStream(DeviceInfo device, bool createThread = true)
Parameters
deviceDeviceInfoA device returned by Discover().
createThreadboolWhen true (the default and preferred mode), a background thread receives and buffers poses.
Exceptions
- EnposeException
The stream could not be connected.
PoseStream(string, bool)
Connect to the device at ip.
public PoseStream(string ip, bool createThread = true)
Parameters
ipstringDevice IPv4 address; the Enpose API is IPv4-only.
createThreadboolWhen true (the default and preferred mode), a background thread receives and buffers poses; otherwise poses are collected when Receive(bool) is called.
Exceptions
- EnposeException
The stream could not be connected.
Methods
Dispose()
Disconnect and release the stream. Idempotent.
public void Dispose()
Receive(bool)
Return poses received from the stream.
public IReadOnlyList<MarkerPose> Receive(bool block = false)
Parameters
blockboolWhen false (the default), returns the poses that have arrived since the previous call (empty if none) without waiting. When true, waits for at least one pose update, up to a 3-second timeout — so the result is still empty if none arrives in that window.
Returns
- IReadOnlyList<MarkerPose>
The poses received, in arrival order.
Exceptions
- EnposeException
An unrecoverable failure occurred.
- ObjectDisposedException
The stream is already disposed.