- //check if type is already defined
- if (xbt_dict_get_or_null(defined_types, type)) {
- THROW1(tracing_error, TRACE_ERROR_TYPE_ALREADY_DEFINED,
- "Type %s is already defined", type);
- }
- //check if parent_type is already defined
- if (strcmp(parent_type, "0")
- && !xbt_dict_get_or_null(defined_types, parent_type)) {
- THROW1(tracing_error, TRACE_ERROR_TYPE_NOT_DEFINED,
- "Type (used as parent) %s is not defined", parent_type);
- }
-
- pajeDefineContainerType(type, parent_type, type);
- if (final) {
- //for m_process_t
- if (IS_TRACING_PROCESSES)
- pajeDefineContainerType("process", type, "process");
- if (IS_TRACING_PROCESSES)
- pajeDefineStateType("process-state", "process", "process-state");
-
- if (IS_TRACING_TASKS)
- pajeDefineContainerType("task", type, "task");
- if (IS_TRACING_TASKS)
- pajeDefineStateType("task-state", "task", "task-state");
+ xbt_assert (instr_platform_traced(),
+ "%s must be called after environment creation", __FUNCTION__);
+
+ char valuestr[100];
+ snprintf(valuestr, 100, "%g", value);
+
+ if (strcmp(what, "declare") == 0) {
+ instr_new_user_link_variable_type (variable, NULL);
+ } else{
+ container_t container = getContainerByName (resource);
+ type_t type = getVariableType (variable, NULL, container->type);
+ if (strcmp(what, "set") == 0) {
+ new_pajeSetVariable(time, container, type, value);
+ } else if (strcmp(what, "add") == 0) {
+ new_pajeAddVariable(time, container, type, value);
+ } else if (strcmp(what, "sub") == 0) {
+ new_pajeSubVariable(time, container, type, value);
+ }