Nuitrack
1.11.2
3D Skeleton Tracking Middleware
|
Central class for common Nuitrack operations. More...
#include <Nuitrack.h>
Public Types | |
typedef std::function< void(IssuesData::Ptr)> | OnIssueUpdate |
Callback type of the issue update request. More... | |
Static Public Member Functions | |
static void | init (const std::string &config="") |
Initialize Nuitrack. More... | |
static void | run () |
Start processing the data provided by the sensor. More... | |
static void | update () |
Initiate Nuitrack update. More... | |
static void | update (std::shared_ptr< HeaderOnlyAPI_Module > module) |
Initiate Nuitrack module data update. More... | |
static void | waitUpdate (std::shared_ptr< HeaderOnlyAPI_Module > module) |
Initiate Nuitrack module update and wait for it. More... | |
static void | release () |
Stop data processing and destroy all existing Nuitrack modules. More... | |
static void | setConfigValue (const std::string &key, const std::string &value) |
Set the value of a Nuitrack configuration parameter. More... | |
static std::string | getConfigValue (const std::string &key) |
Get the value of a Nuitrack configuration parameter. More... | |
static std::string | getInstancesJson () |
Get the JSON string of Nuitrack instance-based API. More... | |
static int | getVersion () |
Get Nuitrack version. The version is calculated by the formula: major * 10000 + minor * 100 + revision. More... | |
static uint64_t | connectOnIssuesUpdate (const OnIssueUpdate &callback) |
Add a callback for the issue update request. More... | |
static void | onIssuesUpdateCallback (IssueTrackerData *data) |
static void | disconnectOnIssuesUpdate (uint64_t handler) |
Remove a callback of the issue update request. More... | |
static std::vector < device::NuitrackDevice::Ptr > | getDeviceList () |
Get a list of available devices. More... | |
static void | setDevice (device::NuitrackDevice::Ptr dev) |
Setting a device to run. More... | |
static std::string | getLicense () |
Get current device license. More... | |
Central class for common Nuitrack operations.
This class is an access point for common Nuitrack operations. This class does not require instance creation, all member functions are static.
Some issues that may occur when using sensor (user occluded by objects / stays close to sensor FOV borders) can be handled with the Nuitrack::OnIssueUpdate callback. Use Nuitrack::connectOnIssuesUpdate to receive information about issues happening.
Callbacks for updating data from Nuitrack modules and the Nuitrack central class are not automatically called. You should request new data with Nuitrack::update or Nuitrack::waitUpdate methods.
typedef std::function<void (IssuesData::Ptr)> tdv::nuitrack::Nuitrack::OnIssueUpdate |
Callback type of the issue update request.
|
inlinestatic |
Add a callback for the issue update request.
[in] | callback | Callback to be invoked at the issue update request. |
|
inlinestatic |
Remove a callback of the issue update request.
[in] | handler | ID of the previously added callback. |
|
inlinestatic |
Get the value of a Nuitrack configuration parameter.
key | Parameter key |
tdv::nuitrack::Exception |
|
inlinestatic |
Get a list of available devices.
tdv::nuitrack::Exception |
|
inlinestatic |
Get the JSON string of Nuitrack instance-based API.
tdv::nuitrack::Exception |
|
inlinestatic |
|
inlinestatic |
Get Nuitrack version. The version is calculated by the formula: major * 10000 + minor * 100 + revision.
tdv::nuitrack::Exception |
|
inlinestatic |
Initialize Nuitrack.
This should be called before using any other Nuitrack API functions.
config | Config file for Nuitrack initialization. |
tdv::nuitrack::Exception |
|
inlinestatic |
|
inlinestatic |
Stop data processing and destroy all existing Nuitrack modules.
tdv::nuitrack::Exception |
|
inlinestatic |
Start processing the data provided by the sensor.
The stages of data processing are determined by the existing module objects. The data is processed asynchronously.
tdv::nuitrack::Exception |
|
inlinestatic |
Set the value of a Nuitrack configuration parameter.
key | Parameter key |
value | Parameter value |
tdv::nuitrack::Exception |
|
inlinestatic |
Setting a device to run.
dev | A configured device that you want to use. |
tdv::nuitrack::Exception |
|
inlinestatic |
Initiate Nuitrack update.
Request new data from all created Nuitrack modules. All module callbacks will be called. No data synchronization is performed.
tdv::nuitrack::Exception |
|
inlinestatic |
Initiate Nuitrack module data update.
Request new data from Nuitrack module. When data becomes available, corresponding callbacks will be called for given module and all the modules, that are required for it. The data sent to these callbacks will be synchronized, so callback calls will be consistent. Callback call order is defined by module dependency chain: from independent to dependent. The call order of callbacks belonging to a particular module is defined by internal organization of this module.
module | Nuitrack module's Ptr. |
tdv::nuitrack::Exception |
|
inlinestatic |
Initiate Nuitrack module update and wait for it.
Similar to Nuitrack::update(std::shared_ptr<HeaderOnlyAPI_Module> module), but waits until all the required callbacks are called.
module | Nuitrack module's Ptr. |
tdv::nuitrack::Exception |