exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
build/gcc/contiki/exipConfig.h
Go to the documentation of this file.
1 /*==================================================================*\
2 | EXIP - Embeddable EXI Processor in C |
3 |--------------------------------------------------------------------|
4 | This work is licensed under BSD 3-Clause License |
5 | The full license terms and conditions are located in LICENSE.txt |
6 \===================================================================*/
7 
17 #include "d_mem.h"
18 #include <stdlib.h>
19 
20 #ifndef EXIPCONFIG_H_
21 #define EXIPCONFIG_H_
22 
23 #define ON 1
24 #define OFF 0
25 
26 #define EXIP_DEBUG OFF
27 #define EXIP_DEBUG_LEVEL INFO
28 
29 #define DEBUG_STREAM_IO OFF
30 #define DEBUG_COMMON OFF
31 #define DEBUG_CONTENT_IO OFF
32 #define DEBUG_GRAMMAR OFF
33 #define DEBUG_GRAMMAR_GEN OFF
34 #define DEBUG_STRING_TBLS OFF
35 
36 #define DEBUG_CHAR_OUTPUT(character) do {_printf ("%c", character);} while(0)
37 #define DEBUG_OUTPUT(msg) do {_printf msg;} while(0)
38 
39 #define assert(ignore)((void) 0)
40 
44 #define EXIP_MALLOC d_malloc
45 #define EXIP_REALLOC d_realloc
46 #define EXIP_MFREE d_free
47 
48 #define HASH_TABLE_USE OFF
49 #define INITIAL_HASH_TABLE_SIZE 53
50 #define MAX_HASH_TABLE_SIZE 3000
51 #define DYN_ARRAY_USE ON
52 
53 
54 // Some types in procTypes.h
55 #define EXIP_UNSIGNED_INTEGER uint32_t
56 #define EXIP_INTEGER int32_t
57 
58 struct ThinFloat
59 {
61  char exponent;
62 };
63 
64 #define EXIP_FLOAT struct ThinFloat
65 
66 #define LLONG_MAX LONG_MAX
67 #define LLONG_MIN LONG_MIN
68 
69 #define DEFAULT_GRAMMAR_TABLE 40
70 #define DEFAULT_SIMPLE_GRAMMAR_TABLE 55
71 
72 #define EXIP_INDEX uint16_t
73 #define EXIP_INDEX_MAX UINT16_MAX
74 
75 #define EXIP_SMALL_INDEX uint8_t
76 #define EXIP_SMALL_INDEX_MAX UINT8_MAX
77 
92 #define EXIP_IMPLICIT_DATA_TYPE_CONVERSION OFF
93 
111 #define EXI_PROFILE_DEFAULT OFF
112 
113 #if EXI_PROFILE_DEFAULT
114 # define VALUE_CROSSTABLE_USE OFF
115 # define BUILD_IN_GRAMMARS_USE OFF
116 #else
117 // Configure here which of the EXI features/components to be included in the compilation:
118 
119 /* Whether to implement the local value string table.
120  * NOTE: EXI streams that are not encoded using this option cannot be decoded correctly
121  * and will return an error. The opposite is true however - a stream encoded with no
122  * local value tables is valid EXI stream can be decoded with full-fledged EXI processor.
123  * Disabling the local values indexing is used in EXI Profile
124  * and can possibly found use in other application profiles of the EXI spec. */
125 #define VALUE_CROSSTABLE_USE ON
126 
127 /* Whether to enable the use of build-in grammars.
128  * NOTE: Only useful for schema STRICT mode processing without schema extension points
129  * or so called wildcard elements and attributes. */
130 #define BUILD_IN_GRAMMARS_USE ON
131 #endif
132 
133 #endif /* EXIPCONFIG_H_ */