T_defs.h 1.25 KB
Newer Older
1 2 3
#ifndef _T_defs_H_
#define _T_defs_H_

Cedric Roux's avatar
Cedric Roux committed
4 5 6
/* comment (and recompile everything) to not send time in events */
#define T_SEND_TIME

Cedric Roux's avatar
Cedric Roux committed
7 8 9
/* maximum number of arguments for the T macro */
#define T_MAX_ARGS 16

10 11 12 13 14 15
/* maximum size of a message - increase if needed */
#define T_BUFFER_MAX (1024*64)

/* size of the local cache for messages (must be pow(2,something)) */
#define T_CACHE_SIZE (8192 * 2)

16 17 18 19 20 21 22
/* maximum number of bytes a message can contain */
#ifdef T_SEND_TIME
#  define T_PAYLOAD_MAXSIZE (T_BUFFER_MAX-sizeof(int)-sizeof(struct timespec))
#else
#  define T_PAYLOAD_MAXSIZE (T_BUFFER_MAX-sizeof(int))
#endif

23 24 25 26 27 28 29 30
typedef struct {
  volatile int busy;
  char buffer[T_BUFFER_MAX];
  int length;
} T_cache_t;

#define T_SHM_FILENAME "/T_shm_segment"

Cedric Roux's avatar
Cedric Roux committed
31
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
Cedric Roux's avatar
Cedric Roux committed
32
#define VCD_NUM_FUNCTIONS 172
Cedric Roux's avatar
Cedric Roux committed
33 34

/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
Cedric Roux's avatar
Cedric Roux committed
35
#define VCD_NUM_VARIABLES 118
Cedric Roux's avatar
Cedric Roux committed
36 37 38 39 40

/* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION    ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)

/* first VCD variable (to be kept up to date! see in T_messages.txt) */
41
#define VCD_FIRST_VARIABLE    ((uintptr_t)T_VCD_VARIABLE_FRAME_NUMBER_TX0_ENB)
Cedric Roux's avatar
Cedric Roux committed
42

43
#endif /* _T_defs_H_ */