Golioth Firmware SDK
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Golioth, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifdef __cplusplus
8extern "C"
9{
10#endif
11
12#pragma once
13
14// This file defines default configuration values.
15//
16// These can be overridden from golioth_user_config.h or
17// golioth_port_config.h, with user config taking priority
18// over port config.
19
20#ifdef CONFIG_GOLIOTH_USER_CONFIG_INCLUDE
21#include CONFIG_GOLIOTH_USER_CONFIG_INCLUDE
22#endif
23
24#include "golioth_port_config.h"
25
26#ifndef CONFIG_GOLIOTH_COAP_HOST_URI
27#define CONFIG_GOLIOTH_COAP_HOST_URI "coaps://coap.golioth.io"
28#endif
29
30#ifndef CONFIG_GOLIOTH_COAP_RESPONSE_TIMEOUT_S
31#define CONFIG_GOLIOTH_COAP_RESPONSE_TIMEOUT_S 10
32#endif
33
34#ifndef CONFIG_GOLIOTH_COAP_REQUEST_QUEUE_TIMEOUT_MS
35#define CONFIG_GOLIOTH_COAP_REQUEST_QUEUE_TIMEOUT_MS 1000
36#endif
37
38#ifndef CONFIG_GOLIOTH_COAP_REQUEST_QUEUE_MAX_ITEMS
39#define CONFIG_GOLIOTH_COAP_REQUEST_QUEUE_MAX_ITEMS 10
40#endif
41
42#ifndef CONFIG_GOLIOTH_COAP_THREAD_PRIORITY
43#define CONFIG_GOLIOTH_COAP_THREAD_PRIORITY 5
44#endif
45
46#ifndef CONFIG_GOLIOTH_COAP_THREAD_STACK_SIZE
47#define CONFIG_GOLIOTH_COAP_THREAD_STACK_SIZE 6144
48#endif
49
50#ifndef CONFIG_GOLIOTH_COAP_KEEPALIVE_INTERVAL_S
51#define CONFIG_GOLIOTH_COAP_KEEPALIVE_INTERVAL_S 9
52#endif
53
54#ifndef CONFIG_GOLIOTH_MAX_NUM_OBSERVATIONS
55#define CONFIG_GOLIOTH_MAX_NUM_OBSERVATIONS 8
56#endif
57
58#ifndef CONFIG_GOLIOTH_BLOCKWISE_UPLOAD_BLOCK_SIZE
59#define CONFIG_GOLIOTH_BLOCKWISE_UPLOAD_BLOCK_SIZE 1024
60#endif
61
62#ifndef CONFIG_GOLIOTH_BLOCKWISE_DOWNLOAD_BUFFER_SIZE
63#define CONFIG_GOLIOTH_BLOCKWISE_DOWNLOAD_BUFFER_SIZE 1024
64#endif
65
66#ifndef CONFIG_GOLIOTH_OTA_THREAD_STACK_SIZE
67#define CONFIG_GOLIOTH_OTA_THREAD_STACK_SIZE 4096
68#endif
69
70#ifndef CONFIG_GOLIOTH_OTA_MAX_PACKAGE_NAME_LEN
71#define CONFIG_GOLIOTH_OTA_MAX_PACKAGE_NAME_LEN 16
72#endif
73
74#ifndef CONFIG_GOLIOTH_OTA_MAX_VERSION_LEN
75#define CONFIG_GOLIOTH_OTA_MAX_VERSION_LEN 16
76#endif
77
78#ifndef CONFIG_GOLIOTH_OTA_MAX_NUM_COMPONENTS
79#define CONFIG_GOLIOTH_OTA_MAX_NUM_COMPONENTS 1
80#endif
81
82#ifndef CONFIG_GOLIOTH_OTA_OBSERVATION_RETRY_MAX_DELAY_S
83#define CONFIG_GOLIOTH_OTA_OBSERVATION_RETRY_MAX_DELAY_S 3600
84#endif
85
86#ifndef CONFIG_GOLIOTH_OTA_DECOMPRESS_METHOD_ZLIB
87#define CONFIG_GOLIOTH_OTA_DECOMPRESS_METHOD_ZLIB 0
88#endif
89
90#ifndef CONFIG_GOLIOTH_OTA_DECOMPRESS_METHOD_HEATSHRINK
91#define CONFIG_GOLIOTH_OTA_DECOMPRESS_METHOD_HEATSHRINK 0
92#endif
93
94#ifndef CONFIG_GOLIOTH_OTA_PATCH
95#define CONFIG_GOLIOTH_OTA_PATCH 0
96#endif
97
98#ifndef CONFIG_GOLIOTH_COAP_MAX_PATH_LEN
99#define CONFIG_GOLIOTH_COAP_MAX_PATH_LEN 39
100#endif
101
102#ifndef CONFIG_GOLIOTH_MAX_NUM_SETTINGS
103#define CONFIG_GOLIOTH_MAX_NUM_SETTINGS 16
104#endif
105
106#ifndef CONFIG_GOLIOTH_SETTINGS_MAX_RESPONSE_LEN
107#define CONFIG_GOLIOTH_SETTINGS_MAX_RESPONSE_LEN 256
108#endif
109
110#ifndef CONFIG_GOLIOTH_RPC_MAX_NUM_METHODS
111#define CONFIG_GOLIOTH_RPC_MAX_NUM_METHODS 8
112#endif
113
114#ifndef CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN
115#define CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN 256
116#endif
117
118#ifndef CONFIG_GOLIOTH_AUTO_LOG_TO_CLOUD
119#define CONFIG_GOLIOTH_AUTO_LOG_TO_CLOUD 0
120#endif
121
122#ifndef CONFIG_GOLIOTH_DEBUG_DEFAULT_LOG_LEVEL
123#define CONFIG_GOLIOTH_DEBUG_DEFAULT_LOG_LEVEL GOLIOTH_DEBUG_LOG_LEVEL_INFO
124#endif
125
126#ifndef GOLIOTH_OVERRIDE_LIBCOAP_LOG_HANDLER
127#define GOLIOTH_OVERRIDE_LIBCOAP_LOG_HANDLER 1
128#endif
129
130#ifdef __cplusplus
131}
132#endif