Generic Trace Generator (GTG) 0.1
Data Structures | Macros | Typedefs
GTGOTF_Structs.h File Reference

OTF_Structs gives the global types and functions needed to have the OTF implementation. More...

#include <stdint.h>
#include "GTGList.h"
#include "GTGStack.h"

Go to the source code of this file.

Data Structures

struct  StateType
 
struct  State
 
struct  ContainerType
 
struct  Container
 
struct  EntityValue
 
struct  EventType
 
struct  LinkType
 
struct  Link
 
struct  VariableType
 
struct  Variable
 
struct  otf_color
 

Macros

#define MAX_PROCESS   64
 
#define ContainerType_NIL   0
 
#define Container_NIL   0
 
#define StateType_NIL   0
 
#define State_NIL   0
 
#define EntityValue_NIL   0
 
#define EventType_NIL   0
 
#define LinkType_NIL   0
 
#define VariableType_NIL   0
 
#define Variable_NIL   0
 
#define init_ContainerType(var)
 
#define init_Container(var)
 
#define init_StateType(var)
 
#define init_EntityValue(var)
 
#define init_EventType(var)
 
#define init_LinkType(var)
 
#define init_VariableType(var)
 
#define init_Variable(var)
 
#define init_State(var)
 
#define alloc_struct(ptr, type, list_head)
 
#define alloc_init_struct(type, ptr, list_head, _name_, _alias_)
 
#define alloc_Variable(_ptr_, _id_, _parent_, _type_, _value_)
 
#define alloc_State(_ptr_, _value_, _cont_, _stateType_)
 
#define free_struct(_type_, _list_head_)
 

Typedefs

typedef struct StateType StateType_t
 
typedef struct State State_t
 
typedef struct ContainerType ContainerType_t
 
typedef struct Container Container_t
 
typedef struct EntityValue EntityValue_t
 
typedef struct EventType EventType_t
 
typedef struct LinkType LinkType_t
 
typedef struct Link Link_t
 
typedef struct VariableType VariableType_t
 
typedef struct Variable Variable_t
 
typedef struct otf_colorotf_color_t
 

Detailed Description

OTF_Structs gives the global types and functions needed to have the OTF implementation.

Version
0.1
Authors
Developers are :
Francois Rue - franc.nosp@m.ois..nosp@m.rue@l.nosp@m.abri.nosp@m..fr
Francois Trahay - franc.nosp@m.ois..nosp@m.traha.nosp@m.y@la.nosp@m.bri.f.nosp@m.r
Johnny Jazeix - jazei.nosp@m.x@en.nosp@m.seirb.nosp@m.-mat.nosp@m.meca..nosp@m.fr
Kevin Coulomb - kevin.nosp@m..cou.nosp@m.lomb@.nosp@m.gmai.nosp@m.l.com
Mathieu Faverge - faver.nosp@m.ge@l.nosp@m.abri..nosp@m.fr
Olivier Lagrasse - lagra.nosp@m.sse@.nosp@m.ensei.nosp@m.rb-m.nosp@m.atmec.nosp@m.a.fr

Macro Definition Documentation

◆ alloc_init_struct

#define alloc_init_struct (   type,
  ptr,
  list_head,
  _name_,
  _alias_ 
)
Value:
do { \
alloc_struct(ptr, type, list_head); \
(ptr)->name = (char *)malloc(sizeof(char)*(strlen(_name_)+1)); \
strcpy((ptr)->name, _name_); \
(ptr)->alias = (char *)malloc(sizeof(char)*(strlen(_alias_)+1)); \
strcpy((ptr)->alias, _alias_); \
}while(0)

◆ alloc_State

#define alloc_State (   _ptr_,
  _value_,
  _cont_,
  _stateType_ 
)
Value:
do { \
_ptr_ = (State_t*) malloc(sizeof(State_t)); \
init_State(*(_ptr_)); \
(_ptr_)->value = _value_; \
(_ptr_)->cont = _cont_; \
(_ptr_)->stateType = _stateType_; \
}while(0)
Definition GTGOTF_Structs.h:37

◆ alloc_struct

#define alloc_struct (   ptr,
  type,
  list_head 
)
Value:
do { \
ptr = (type*) malloc(sizeof(type)); \
GTG_LIST_INIT(&(ptr->token)); \
ptr->id = (gtg_list_entry((list_head)->prev, type, token)->id) + 1; \
gtg_list_add_tail(&(ptr->token), list_head); \
} while(0)
#define gtg_list_entry(ptr, type, member)
get the structure corresponding to a list entry
Definition GTGList.h:39

◆ alloc_Variable

#define alloc_Variable (   _ptr_,
  _id_,
  _parent_,
  _type_,
  _value_ 
)
Value:
do { \
(_ptr_) = (Variable_t*) malloc(sizeof(Variable_t)); \
init_Variable(*(_ptr_)); \
(_ptr_)->id = _id_; \
(_ptr_)->parent = _parent_; \
(_ptr_)->type = _type_; \
(_ptr_)->value = _value_; \
}while(0)
Definition GTGOTF_Structs.h:106

◆ Container_NIL

#define Container_NIL   0

◆ ContainerType_NIL

#define ContainerType_NIL   0

◆ EntityValue_NIL

#define EntityValue_NIL   0

◆ EventType_NIL

#define EventType_NIL   0

◆ free_struct

#define free_struct (   _type_,
  _list_head_ 
)
Value:
do{\
_type_ *ptr, *tmp; \
gtg_list_for_each_entry_safe(ptr, tmp, &(_list_head_).token, token) { \
gtg_list_del(&(ptr->token));\
free(ptr->name);\
free(ptr->alias);\
free(ptr);\
}\
}while(0)

◆ init_Container

#define init_Container (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).ctType = ContainerType_NIL; \
(var).id = Container_NIL; \
GTG_LIST_INIT(&(var).token); \
GTG_STACK_INIT(&(var).state_stack.token); \
}while(0)
#define ContainerType_NIL
Definition GTGOTF_Structs.h:123
#define Container_NIL
Definition GTGOTF_Structs.h:124

◆ init_ContainerType

#define init_ContainerType (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).id = ContainerType_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)

◆ init_EntityValue

#define init_EntityValue (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).groupId = 0; \
(var).id = EntityValue_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)
#define EntityValue_NIL
Definition GTGOTF_Structs.h:127

◆ init_EventType

#define init_EventType (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).contType = ContainerType_NIL; \
(var).id = EventType_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)
#define EventType_NIL
Definition GTGOTF_Structs.h:128

◆ init_LinkType

#define init_LinkType (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).contType = ContainerType_NIL; \
(var).srcType = ContainerType_NIL; \
(var).destType = ContainerType_NIL; \
(var).id = LinkType_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)
#define LinkType_NIL
Definition GTGOTF_Structs.h:129

◆ init_State

#define init_State (   var)
Value:
do { \
(var).value = EntityValue_NIL; \
(var).cont = Container_NIL; \
(var).stateType = StateType_NIL; \
GTG_STACK_INIT(&(var).token); \
}while(0)
#define StateType_NIL
Definition GTGOTF_Structs.h:125

◆ init_StateType

#define init_StateType (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).groupId = 0; \
(var).id = StateType_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)

◆ init_Variable

#define init_Variable (   var)
Value:
do { \
(var).parent = Container_NIL; \
(var).parent = VariableType_NIL; \
(var).value = 0; \
(var).id = Variable_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)
#define VariableType_NIL
Definition GTGOTF_Structs.h:130
#define Variable_NIL
Definition GTGOTF_Structs.h:131

◆ init_VariableType

#define init_VariableType (   var)
Value:
do { \
(var).name = NULL; \
(var).alias = NULL; \
(var).contType = ContainerType_NIL; \
(var).id = VariableType_NIL; \
GTG_LIST_INIT(&(var).token); \
}while(0)

◆ LinkType_NIL

#define LinkType_NIL   0

◆ MAX_PROCESS

#define MAX_PROCESS   64

◆ State_NIL

#define State_NIL   0

◆ StateType_NIL

#define StateType_NIL   0

◆ Variable_NIL

#define Variable_NIL   0

◆ VariableType_NIL

#define VariableType_NIL   0

Typedef Documentation

◆ Container_t

typedef struct Container Container_t

Containers

◆ ContainerType_t

◆ EntityValue_t

typedef struct EntityValue EntityValue_t

EntityValue, contains the name of the functions/states

◆ EventType_t

typedef struct EventType EventType_t

Events/Markers

◆ Link_t

typedef struct Link Link_t

◆ LinkType_t

typedef struct LinkType LinkType_t

Links/Messages

◆ otf_color_t

typedef struct otf_color* otf_color_t

◆ State_t

typedef struct State State_t

States

◆ StateType_t

typedef struct StateType StateType_t

StateTypes

◆ Variable_t

typedef struct Variable Variable_t

◆ VariableType_t

typedef struct VariableType VariableType_t

Variables/Counters