THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION THIS PAGE IS UNDER CONSTRUCTION
NatNet: Class/Function Reference is under development. It will be available soon. Thank you for your patience!
Back to the NatNet SDK page
This page provides function and class references of the NatNet SDK library.
The NatNetClient class (or NatNetClientML from the managed assembly) is the key object of the SDK. An instance of this client class allows an application to connect to a server application and query data. For additional information, refer to the provided headers files (native) or reference the NatNatML.dll file (managed).
Note:
Most of the NatNet SDK functions return their operation results in an integer type representation named ErrorCode, which is just an enumerator that describes operation results as the following:
The NatNetClient class is the main component of the NatNet SDK. Using an instance of the NatNetClient class, you can establish a network connection with a server application (e.g. Motive) and query data descriptions, tracking data, and send/receive remote commands. For detailed declarations, refer to the NatNetClient.h header file included in the SDK.
Constructor: Creates a new instance of a NatNetClient class. Defaults to multicast connection if no input is given.
Constructor: Creates a new instance of a NatNet Client using the specified connection protocol; either unicast or multicast.
Input: iConnectionType: (0 = Multicast, 1 = Unicast).
Destructor: Destructor
int Initialize( const char* szLocalAddress, const char* szServerAddress );
int Initialize( const char* szLocalAddress, const char* szServerAddress, int hostCommandPort=0, const char* szMulticastAddress = 0 );
int Uninitialize();
int GetServerDescription( sServerDescription* pServerDescription );
int SetDataCallback(void (*CallbackFunction)(sFrameOfMocapData* pFrameOfData, void* pUserData), void* pUserData=0);
This method sets a frame handler function and creates a new thread for receiving and processing each frame of capture data.
void __cdecl DataHandler(sFrameOfMocapData* data, void* pUserData);
int SendMessageAndWait( const char* szRequest, void** ppServerResponse, int* pResponseSize );
int SendMessageAndWait( const char* szRequest, int tries, int timeout, void** ppServerResponse, int* pResponseSize );
void NatNetVersion( unsigned char outVersion[4] );
int SetMessageCallback(void (*CallbackFunction)(int id, char *szTraceMessage));
void __cdecl MessageHandler(int msgType, char* msg);
void DecodeID( int compositeId, int* pOutEntityId, int* pOutMemberId );
bool DecodeTimecode(unsigned int inTimecode, unsigned int inTimecodeSubframe, int* hour, int* minute, int* second, int* frame, int* subframe);
bool DecodeTimecode( unsigned int inTimecode, unsigned int inTimecodeSubframe, char* Buffer, int BufferSize );
void CopyFrame( sFrameOfMocapData* pSrc, sFrameOfMocapData* pDst );
void FreeFrame( sFrameOfMocapData* pFrame );