39 inline typename std::enable_if<T == task_id || T == dds_slot_id, uint64_t>::type
env_prop()
46 envName =
"DDS_TASK_ID";
49 envName =
"DDS_SLOT_ID";
54 const char* env = std::getenv(envName.c_str());
60 ret = std::stoull(env);
79 inline typename std::enable_if<T == task_index || T == collection_index, size_t>::type
env_prop()
86 envName =
"DDS_TASK_INDEX";
89 envName =
"DDS_COLLECTION_INDEX";
94 const char* env = std::getenv(envName.c_str());
100 ret = std::stoi(env);
118 template <EEnvProp T>
128 envName =
"DDS_TASK_NAME";
131 envName =
"DDS_COLLECTION_NAME";
134 envName =
"DDS_GROUP_NAME";
137 envName =
"DDS_LOCATION";
140 envName =
"DDS_TASK_PATH";
143 envName =
"DDS_SESSION_ID";
148 const char* env = std::getenv(envName.c_str());
152 return std::string(env);
std::enable_if< T==task_id||T==dds_slot_id, uint64_t >::type env_prop()
The function returns a value for a given environment property.
Definition: EnvProp.h:39
associated with $DDS_COLLECTION_NAME - ID of the parent collection.
Definition: EnvProp.h:23
associated with $DDS_TASK_PATH - full path to the user task, for example, main/group1/collection_12/t...
Definition: EnvProp.h:20
associated with $DDS_SLOT_ID - slot ID
Definition: EnvProp.h:27
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
associated with $DDS_TASK_ID environment variable.
Definition: EnvProp.h:17
associated with $DDS_GROUP_NAME - ID of the parent group.
Definition: EnvProp.h:24
EEnvProp
a list of envioronment properties
Definition: EnvProp.h:15
associated with $DDS_TASK_NAME - ID of the task.
Definition: EnvProp.h:19
associated with $DDS_SESSION_ID - session ID of the DDS.
Definition: EnvProp.h:26
associated with $DDS_TASK_INDEX environment variable.
Definition: EnvProp.h:18
associated with $DDS_COLLECTION_INDEX environemnt variable.
Definition: EnvProp.h:22
associated with $DDS_LOCATION environemnt variable.
Definition: EnvProp.h:25