22#ifndef _PLUGINS_OPENNI_UTILS_SETUP_H_
23#define _PLUGINS_OPENNI_UTILS_SETUP_H_
25#include <core/exception.h>
26#include <core/utils/lockptr.h>
28#include <XnCppWrapper.h>
40void setup_alternate_viewpoint(xn::Generator &gen, xn::Generator &target);
41void setup_synchronization(xn::Generator &gen, xn::Generator &target);
43void get_usb_info(xn::Generator &gen,
unsigned short &vendor,
unsigned short &product);
56template <
class ProdNodeClass>
59 XnProductionNodeType type,
63 if ((st = openni->FindExistingNode(type, *node)) != XN_STATUS_OK) {
64 xn::EnumerationErrors errors;
65 if (node->Create(*(openni.operator->()), 0, &errors) != XN_STATUS_OK) {
66 fawkes::Exception e(
"Failed to create user generator (%s)", xnGetStatusString(st));
67 for (xn::EnumerationErrors::Iterator i = errors.Begin(); i != errors.End(); ++i) {
68 XnProductionNodeDescription d = i.Description();
69 e.append(
"%s: %s/%s/%u.%u.%u.%u: %s",
70 xnProductionNodeTypeToString(d.Type),
75 d.Version.nMaintenance,
77 xnGetStatusString(i.Error()));
Interface for configuration handling.
Base class for exceptions in Fawkes.
Fawkes library namespace.