public PoseListener(int port) { _poseListener = PoseListener_Create(port); /// Ensure callbacks we pass to native code are allocated outside our class /// see issue #11 p_onError = new PoseListener_OnErrorCallback(OnError); p_onNewPose = new PoseListener_OnNewPoseCallback(OnNewPose); PoseListener_OnError(_poseListener, p_onError); PoseListener_OnNewPose(_poseListener, p_onNewPose); }
private static extern void PoseListener_OnNewPose(IntPtr pl, PoseListener_OnNewPoseCallback callback);