MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnGetErrorCodeData

Function xnGetErrorCodeData

Source/OpenNI/XnStatusRegister.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49//---------------------------------------------------------------------------
50
51XnErrorCodeData* xnGetErrorCodeData(const XnStatus Status)
52{
53 // search for it
54 XnUInt16 nGroup = XN_STATUS_GROUP(Status);
55 XnUInt16 nCode = XN_STATUS_CODE(Status);
56
57 if (g_pErrorGroups == NULL)
58 {
59 return NULL;
60 }
61
62 XnStatusHash* pStatusHash = NULL;
63 if (g_pErrorGroups->Get(nGroup, pStatusHash) != XN_STATUS_OK)
64 {
65 // unregistered group
66 return NULL;
67 }
68
69 XnErrorCodeData* pResult = NULL;
70 pStatusHash->Get(nCode, pResult);
71 return pResult;
72}
73
74XN_C_API XnStatus xnRegisterErrorCodeMessages(XnUInt16 nGroup, XnUInt16 nFirst, XnUInt16 nCount, XnErrorCodeData* pErrorCodeData)
75{

Callers 2

xnGetStatusStringFunction · 0.85
xnGetStatusNameFunction · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected