Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __XN_OPEN_NITE_STATUS_H__
00027 #define __XN_OPEN_NITE_STATUS_H__
00028
00029 #include "XnPlatform.h"
00030
00031
00032
00033
00034
00038 typedef XnUInt32 XnStatus;
00039
00041 static const XnStatus XN_STATUS_OK = 0;
00042
00043
00044
00045
00046
00054 XN_C_API const XnChar* xnGetStatusString(const XnStatus Status);
00055
00063 XN_C_API const XnChar* xnGetStatusName(const XnStatus Status);
00064
00072 XN_C_API void xnPrintError(const XnStatus Status, const XnChar* csUserMessage);
00073
00074
00075
00076
00078 typedef enum XnErrorGroup
00079 {
00080 XN_ERROR_GROUP_NI = 1,
00081 XN_ERROR_GROUP_OS = 2,
00082 XN_ERROR_GROUP_PRIMESENSE = 3,
00083 } XnErrorGroup;
00084
00086 #define XN_STATUS_MAKE(group, code) ((group << 16) | code)
00087
00089 #define XN_STATUS_GROUP(status) (status >> 16)
00090
00092 #define XN_STATUS_CODE(status) (status & 0x0000FFFF)
00093
00095 #define XN_STATUS_MESSAGE_MAP_START_FROM(group, first) \
00096 enum _##group##first##Errors \
00097 { \
00098 group##first##_OK = XN_STATUS_MAKE(group, first),
00099
00100 #define XN_STATUS_MESSAGE_MAP_START(group) \
00101 XN_STATUS_MESSAGE_MAP_START_FROM(group, 0)
00102
00104 #define XN_STATUS_MESSAGE(csName, csMessage) \
00105 csName,
00106
00108 #define XN_STATUS_MESSAGE_MAP_END_FROM(group, first) \
00109 };
00110
00111 #define XN_STATUS_MESSAGE_MAP_END(group) \
00112 XN_STATUS_MESSAGE_MAP_END_FROM(group, 0)
00113
00114 #endif // __XN_OPEN_NITE_STATUS_H__