-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathKconfig.thingset
124 lines (99 loc) · 4.29 KB
/
Kconfig.thingset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright (c) The ThingSet Project Contributors
# SPDX-License-Identifier: Apache-2.0
config THINGSET
bool "ThingSet Node Library"
select REQUIRES_FULL_LIBC
select ZCBOR
select ZCBOR_CANONICAL
select ZCBOR_STOP_ON_ERROR
help
Enable the ThingSet node library.
if THINGSET
config THINGSET_TEXT_MODE
bool "Enable text mode (JSON)"
default y
help
Whether to enable text mode (JSON). It may be desirable to disable this
to reduce code size in certain circumstances.
Please note that text mode may also be required for the ThingSet shell
in some applications, so one should be careful when disabling it.
config THINGSET_IMMUTABLE_OBJECTS
bool "Make data objects immutable and store them in ROM"
help
This option adds const specifiers to the data object structs and stores them in iterable
sections in ROM instead of RAM.
The data itself still resides in RAM, only the pointers, object names, etc. are stored in
ROM, as they are not changed anyways.
The only disadvantage of this option is that no elements can be added to or removed from
subsets via the protocol anymore, as this information is now stored in read-only memory.
Possible future improvement: Store only subset information in RAM and the rest in ROM.
config THINGSET_OBJECT_LOOKUP_MAP
bool "Enable hashmap for object lookup"
depends on !THINGSET_IMMUTABLE_OBJECTS
help
Enable to speed up performance of object lookup.
if THINGSET_OBJECT_LOOKUP_MAP
config THINGSET_OBJECT_LOOKUP_BUCKETS
int "Object lookup hashmap buckets"
default 8
help
Number of buckets for object lookup. This should ideally be a power of 2.
endif
config THINGSET_ENCODE_ZERO_DECIMAL_FLOATS_AS_INTEGERS
bool "Send 0dp precision floats as integers"
default y
help
In binary mode, when sending float items whose precision is declared as 0dp,
encode them as integers to potentially reduce payload size.
config THINGSET_NUM_JSON_TOKENS
int "Maximum number of expected JSON tokens."
default 50
help
The maximum number of expected JSON tokens (arrays, map keys, values, primitives).
Trying to parse a request with more than the maximum number of tokens will result in an
error.
config THINGSET_BINARY_MAX_DEPTH
int "Max depth of hierarchy serialisable by the binary serialiser."
default 4
help
Configure the maximum depth of a node hierarchy that can be serialised by
the binary serialiser. The default of 4 is usually suitable for most use
cases, but you may wish to increase this in certain scenarios.
config THINGSET_REPORT_RECORD_SERIALIZATION
bool "Enable full record serialization in reports."
help
Switch on support for record serialisation in reports. It may be necessary
to increase THINGSET_BINARY_MAX_DEPTH when using this feature.
config THINGSET_64BIT_TYPES_SUPPORT
bool "Enable support for 64 bit variable types."
help
Switch on support for 64 bit variable types (uint64_t, int64_t, double).
This should be disabled for most 8-bit microcontrollers to increase performance.
config THINGSET_DECFRAC_TYPE_SUPPORT
bool "Enable support for decimal fraction variable type."
help
Switch on support for CBOR decimal fraction data type which stores a decimal mantissa
and a constant decimal exponent. This allows to use e.g. millivolts internally instead
of floating point numbers, while still communicating the SI base unit (volts).
config THINGSET_BYTES_TYPE_SUPPORT
bool "Enable support for byte buffer variable type."
select BASE64
help
Switch on support for CBOR byte strings, which can store any sort of binary data and
can be used e.g. for firmware upgrades. JSON uses base64-encoded data.
config THINGSET_JSON_STRING_ESCAPING
bool "Escape/unescape C strings when serializing/deserializing them to JSON"
help
This is only required if arbitrary strings may end up in data objects of type String,
containing characters like the quotation mark that have to be escaped in JSON. This may
be the case if if ThingSet is used for logging.
config THINGSET_METADATA_ENDPOINT
bool "Enable _Metadata endpoint"
help
The _Metadata endpoint exposes a limited set of metadata like the variable name and type.
The endpoint is disabled by default in order to reduce memory footprint for constrained
devices.
module = THINGSET
module-str = thingset
source "subsys/logging/Kconfig.template.log_config"
endif