AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
constants.hpp
Go to the documentation of this file.
1//
2// constants.hpp
3// AI Watch A1
4//
5// Created by Denny Caruso on 20/07/22.
6//
7
8// License: Apache 2.0. See LICENSE file in root directory.
9// Copyright(c) 2022. All Rights Reserved.
10
11#ifndef constants_h
12#define constants_h
13
14
15
16// Error codes and error messages declaration.
17static const short int CHECK_USAGE_ERROR = 1;
18static const char * CHECK_USAGE_SCOPE = "usage";
19
20static const short int LOAD_IMAGE_ERROR = 2;
21static const char * LOAD_IMAGE_SCOPE = "Could not open or find the image";
22
23static const short int SAVE_IMAGE_ERROR = 3;
24static const char * SAVE_IMAGE_SCOPE = "Could not save the image on disk";
25
26static const short int LOAD_JSON_ERROR = 4;
27static const char * LOAD_JSON_SCOPE = "Could not open or find the JSON file";
28
29static const short int RS_CAMERA_ERROR = 5;
30static const char * RS_CAMERA_SCOPE = "Troubles during initialization of RealSense Camera";
31
32static const short int FACADE_SINGLETON_NULLPTR_ERROR = 6;
33static const char * FACADE_SINGLETON_NULLPTR_SCOPE = "FacadeSingleton::getInstance() returns nullptr";
34
35static const short int USAGE_MANAGER_NULLPTR_ERROR = 7;
36static const char * USAGE_MANAGER_NULLPTR_SCOPE = "UsageManager::getInstance() returns nullptr";
37
38static const short int RDKAFKA_GET_KEYS_FROM_JSON_ERROR = 8;
39static const char * RDKAFKA_GET_KEYS_FROM_JSON_SCOPE = "KafkaManager::loadConfigurationGroup() error during g_key_file_get_keys()";
40
41static const short int RDKAFKA_GET_KEY_FROM_JSON_ERROR = 9;
42static const char * RDKAFKA_GET_KEY_FROM_JSON_SCOPE = "KafkaManager::loadConfigurationGroup() error during g_key_file_get_string()";
43
44static const short int RDKAFKA_CONF_SET_ERROR = 10;
45static const char * RDKAFKA_CONF_SET_SCOPE = "KafkaManager::loadConfigurationGroup() error during rd_kafka_conf_set()";
46
47static const short int NEW_ALLOC_ERROR = 11;
48static const char * NEW_ALLOC_SCOPE = "Error while allocating dynamic memory with new.";
49
50
51
52// Other useful constants declaration.
53static const short int ESC_KEY = 27;
54
55static const float depth_min = 0.10;
56static const float depth_max = 6.0;
57
58static const char * JSON_FILE_PATH = "skeletonsPoints3D.json";
59static const char * CONF_FILE_PATH = "conf.conf";
60
61static const short int programNameOffset = 0;
62static const short int openPoseFolderOffset = 1;
63static const short int openPoseExecuteCommandOffset = 2;
64static const short int imagesFolderOffset = 3;
65static const short int outputFolderOffset = 4;
66static const short int totalFileParameters = 5;
67
68static const short int openPoseBodyKeyPointsNumber = 25;
69
70static const bool NOT_FIRST_BOOT = false;
71static const bool FIRST_BOOT = true;
72
73#endif /* constants_h */
static const char * LOAD_IMAGE_SCOPE
Definition: constants.hpp:21
static const short int openPoseFolderOffset
Definition: constants.hpp:62
static const char * RDKAFKA_GET_KEYS_FROM_JSON_SCOPE
Definition: constants.hpp:39
static const short int RDKAFKA_CONF_SET_ERROR
Definition: constants.hpp:44
static const char * RDKAFKA_GET_KEY_FROM_JSON_SCOPE
Definition: constants.hpp:42
static const short int RDKAFKA_GET_KEYS_FROM_JSON_ERROR
Definition: constants.hpp:38
static const char * LOAD_JSON_SCOPE
Definition: constants.hpp:27
static const char * CONF_FILE_PATH
Definition: constants.hpp:59
static const char * RS_CAMERA_SCOPE
Definition: constants.hpp:30
static const short int SAVE_IMAGE_ERROR
Definition: constants.hpp:23
static const short int imagesFolderOffset
Definition: constants.hpp:64
static const short int LOAD_JSON_ERROR
Definition: constants.hpp:26
static const float depth_min
Definition: constants.hpp:55
static const bool FIRST_BOOT
Definition: constants.hpp:71
static const short int openPoseExecuteCommandOffset
Definition: constants.hpp:63
static const char * CHECK_USAGE_SCOPE
Definition: constants.hpp:18
static const short int totalFileParameters
Definition: constants.hpp:66
static const float depth_max
Definition: constants.hpp:56
static const short int USAGE_MANAGER_NULLPTR_ERROR
Definition: constants.hpp:35
static const short int FACADE_SINGLETON_NULLPTR_ERROR
Definition: constants.hpp:32
static const short int outputFolderOffset
Definition: constants.hpp:65
static const short int NEW_ALLOC_ERROR
Definition: constants.hpp:47
static const short int RDKAFKA_GET_KEY_FROM_JSON_ERROR
Definition: constants.hpp:41
static const bool NOT_FIRST_BOOT
Definition: constants.hpp:70
static const short int LOAD_IMAGE_ERROR
Definition: constants.hpp:20
static const char * JSON_FILE_PATH
Definition: constants.hpp:58
static const short int programNameOffset
Definition: constants.hpp:61
static const char * RDKAFKA_CONF_SET_SCOPE
Definition: constants.hpp:45
static const char * USAGE_MANAGER_NULLPTR_SCOPE
Definition: constants.hpp:36
static const short int RS_CAMERA_ERROR
Definition: constants.hpp:29
static const char * FACADE_SINGLETON_NULLPTR_SCOPE
Definition: constants.hpp:33
static const short int CHECK_USAGE_ERROR
Definition: constants.hpp:17
static const short int openPoseBodyKeyPointsNumber
Definition: constants.hpp:68
static const char * SAVE_IMAGE_SCOPE
Definition: constants.hpp:24
static const char * NEW_ALLOC_SCOPE
Definition: constants.hpp:48
static const short int ESC_KEY
Definition: constants.hpp:53