XnStatus.h File Reference
`#include "XnPlatform.h"`

Go to the source code of this file.

## Macros

#define | XN_STATUS_OK ((XnStatus)0)
#define | XN_STATUS_MAKE(group, code)
#define | XN_STATUS_GROUP(status)
#define | XN_STATUS_CODE(status)
#define | XN_STATUS_MESSAGE_MAP_START_FROM(group, first)
#define | XN_STATUS_MESSAGE_MAP_START(group)
#define | XN_STATUS_MESSAGE(csName, csMessage)
#define | XN_STATUS_MESSAGE_MAP_END_FROM(group, first)
#define | XN_STATUS_MESSAGE_MAP_END(group)

## Typedefs

typedef XnUInt32 | XnStatus
typedef enum XnErrorGroup | XnErrorGroup

## Enumerations

enum | XnErrorGroup { XN_ERROR_GROUP_NI = 1 , XN_ERROR_GROUP_OS = 2 , XN_ERROR_GROUP_PRIMESENSE = 3 }

## Functions

XN_C_API const XnChar *XN_C_DECL | xnGetStatusString (const XnStatus Status)
XN_C_API const XnChar *XN_C_DECL | xnGetStatusName (const XnStatus Status)
XN_C_API void XN_C_DECL | xnPrintError (const XnStatus Status, const XnChar *csUserMessage)

## Macro Definition Documentation

## XN_STATUS_CODE

#define XN_STATUS_CODE | ( |  | status | ) |

Value:
XnUInt16(status & 0x0000FFFF)

Returns the code of the status.

## XN_STATUS_GROUP

#define XN_STATUS_GROUP | ( |  | status | ) |

Value:
XnUInt16(status >> 16)

Returns the group of the status.

## XN_STATUS_MAKE

#define XN_STATUS_MAKE | ( |  | group,
|  |  | code )

Value:
((group << 16) | code)

Constructs a status code from a module and an error code.

## XN_STATUS_MESSAGE

#define XN_STATUS_MESSAGE | ( |  | csName,
|  |  | csMessage )

Value:
csName,

Adds an entry to the message map.

## XN_STATUS_MESSAGE_MAP_END

#define XN_STATUS_MESSAGE_MAP_END | ( |  | group | ) |

Value:
XN_STATUS_MESSAGE_MAP_END_FROM(group, 0)
XN_STATUS_MESSAGE_MAP_END_FROM
#define XN_STATUS_MESSAGE_MAP_END_FROM(group, first)
Definition XnStatus.h:104

## XN_STATUS_MESSAGE_MAP_END_FROM

#define XN_STATUS_MESSAGE_MAP_END_FROM | ( |  | group,
|  |  | first )

Value:
};

Marks the end of a message map.

## XN_STATUS_MESSAGE_MAP_START

#define XN_STATUS_MESSAGE_MAP_START | ( |  | group | ) |

Value:
XN_STATUS_MESSAGE_MAP_START_FROM(group, 0)
XN_STATUS_MESSAGE_MAP_START_FROM
#define XN_STATUS_MESSAGE_MAP_START_FROM(group, first)
Definition XnStatus.h:91

## XN_STATUS_MESSAGE_MAP_START_FROM

#define XN_STATUS_MESSAGE_MAP_START_FROM | ( |  | group,
|  |  | first )

Value:
enum _##group##first##Errors \
{ \
group##first##_OK = XN_STATUS_MAKE(group, first),
XN_STATUS_MAKE
#define XN_STATUS_MAKE(group, code)
Definition XnStatus.h:82

Marks the beginning of a message map of a specific module.

## XN_STATUS_OK

#define XN_STATUS_OK ((XnStatus)0)

Definition of the OK error code.

## Typedef Documentation

## XnErrorGroup

typedef enum XnErrorGroup XnErrorGroup

A list of modules for Xiron status.

## XnStatus

typedef XnUInt32 XnStatus

Defines the XnStatus type. The high word represents the group to which this error belongs to. The low word is a sequential number inside the group.

## Enumeration Type Documentation

## XnErrorGroup

enum XnErrorGroup

A list of modules for Xiron status.

Enumerator
XN_ERROR_GROUP_NI |
XN_ERROR_GROUP_OS |
XN_ERROR_GROUP_PRIMESENSE |

## Function Documentation

## xnGetStatusName()

XN_C_API const XnChar *XN_C_DECL xnGetStatusName | ( | const XnStatus | Status | ) |

Gets the name of a Xiron Status as a string.

Parameters

  Status | [in] The input Xiron Status.

Returns
  A string representation of the Xiron status name.

## xnGetStatusString()

XN_C_API const XnChar *XN_C_DECL xnGetStatusString | ( | const XnStatus | Status | ) |

Converts a Xiron Status enumerator into a meaningful error string.

Parameters

  Status | [in] The input Xiron Status to be converted to a string.

Returns
  A string representation of the Xiron status.

## xnPrintError()

XN_C_API void XN_C_DECL xnPrintError | ( | const XnStatus | Status,
|  | const XnChar * | csUserMessage )

Prints a user message with a description of the error.

Parameters

  Status | [in] The input Xiron Status.
  csUserMessage | [in] A user message.