/* Events data types */
typedef enum _data_type {
+ INT_FIXED,
+ UINT_FIXED,
+ POINTER,
+ CHAR,
+ UCHAR,
+ SHORT,
+ USHORT,
INT,
UINT,
- POINTER,
LONG,
ULONG,
SIZE_T,
NONE
} data_type_t;
-/* Event type descriptors */
-
typedef struct _type_descriptor {
char * type_name; //used for named type
data_type_t type;
char *fmt;
- int size;
+ size_t size;
sequence_t labels; // for enumeration
+ sequence_t labels_values; // for enumeration
sequence_t labels_description;
int already_printed;
- sequence_t fields; // for structure
- struct _type_descriptor *nested_type; // for array and sequence
- int alignment;
+ sequence_t fields; // for structure, array and sequence (field_t type)
} type_descriptor_t;
-/* Fields within types */
+/* Fields within types or events */
typedef struct _field{
char *name;
char *description;
typedef struct _event {
char *name;
char *description;
- type_descriptor_t *type;
+ //type_descriptor_t *type;
+ sequence_t fields; /* event fields */
int per_trace; /* Is the event able to be logged to a specific trace ? */
int per_tracefile; /* Must we log this event in a specific tracefile ? */
} event_t;
char * capname;
char * description;
sequence_t events;
- sequence_t unnamed_types;
+ sequence_t unnamed_types; //FIXME : remove
table_t named_types;
+ unsigned int checksum;
} facility_t;
-int getSize(parse_file_t *in);
+int getSizeindex(unsigned int value);
+unsigned long long int getSize(parse_file_t *in);
unsigned long getTypeChecksum(unsigned long aCrc, type_descriptor_t * type);
void parseFacility(parse_file_t *in, facility_t * fac);
sequence_t * unnamed_types, table_t * named_types);
type_descriptor_t *parseType(parse_file_t *in,
type_descriptor_t *t, sequence_t * unnamed_types, table_t * named_types);
-void parseFields(parse_file_t *in, type_descriptor_t *t,
- sequence_t * unnamed_types, table_t * named_types);
+void parseFields(parse_file_t *in, field_t *f,
+ sequence_t * unnamed_types,
+ table_t * named_types,
+ int tag);
void checkNamedTypesImplemented(table_t * namedTypes);
type_descriptor_t * find_named_type(char *name, table_t * named_types);
void generateChecksum(char * facName,
- unsigned long * checksum, sequence_t * events);
+ unsigned int * checksum, sequence_t * events);
/* get attributes */
}
+extern char *intOutputTypes[];
+
+extern char *uintOutputTypes[];
+
+extern char *floatOutputTypes[];
+
+
+
+
#endif // PARSER_H