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_DOWNLOAD_MAX_BLOCK_SIZE
59/* Valid values: 16, 32, 64, 128, 256, 512, 1024 */
60#define CONFIG_GOLIOTH_BLOCKWISE_DOWNLOAD_MAX_BLOCK_SIZE 1024
61#endif
62
63#ifndef CONFIG_GOLIOTH_BLOCKWISE_UPLOAD_MAX_BLOCK_SIZE
64/* Valid values: 16, 32, 64, 128, 256, 512, 1024 */
65#define CONFIG_GOLIOTH_BLOCKWISE_UPLOAD_MAX_BLOCK_SIZE 1024
66#endif
67
68#ifndef CONFIG_GOLIOTH_OTA_THREAD_STACK_SIZE
69#define CONFIG_GOLIOTH_OTA_THREAD_STACK_SIZE 4096
70#endif
71
72#ifndef CONFIG_GOLIOTH_OTA_MAX_PACKAGE_NAME_LEN
73#define CONFIG_GOLIOTH_OTA_MAX_PACKAGE_NAME_LEN 16
74#endif
75
76#ifndef CONFIG_GOLIOTH_OTA_MAX_VERSION_LEN
77#define CONFIG_GOLIOTH_OTA_MAX_VERSION_LEN 16
78#endif
79
80#ifndef CONFIG_GOLIOTH_OTA_MAX_NUM_COMPONENTS
81#define CONFIG_GOLIOTH_OTA_MAX_NUM_COMPONENTS 1
82#endif
83
84#ifndef CONFIG_GOLIOTH_OTA_OBSERVATION_RETRY_MAX_DELAY_S
85#define CONFIG_GOLIOTH_OTA_OBSERVATION_RETRY_MAX_DELAY_S 3600
86#endif
87
88#ifndef CONFIG_GOLIOTH_COAP_MAX_PATH_LEN
89#define CONFIG_GOLIOTH_COAP_MAX_PATH_LEN 39
90#endif
91
92#ifndef CONFIG_GOLIOTH_MAX_NUM_SETTINGS
93#define CONFIG_GOLIOTH_MAX_NUM_SETTINGS 16
94#endif
95
96#ifndef CONFIG_GOLIOTH_SETTINGS_MAX_RESPONSE_LEN
97#define CONFIG_GOLIOTH_SETTINGS_MAX_RESPONSE_LEN 256
98#endif
99
100#ifndef CONFIG_GOLIOTH_RPC_MAX_NUM_METHODS
101#define CONFIG_GOLIOTH_RPC_MAX_NUM_METHODS 8
102#endif
103
104#ifndef CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN
105#define CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN 256
106#endif
107
108#ifndef CONFIG_GOLIOTH_AUTO_LOG_TO_CLOUD
109#define CONFIG_GOLIOTH_AUTO_LOG_TO_CLOUD 0
110#endif
111
112#ifndef CONFIG_GOLIOTH_DEBUG_DEFAULT_LOG_LEVEL
113#define CONFIG_GOLIOTH_DEBUG_DEFAULT_LOG_LEVEL GOLIOTH_DEBUG_LOG_LEVEL_INFO
114#endif
115
116#ifndef GOLIOTH_OVERRIDE_LIBCOAP_LOG_HANDLER
117#define GOLIOTH_OVERRIDE_LIBCOAP_LOG_HANDLER 1
118#endif
119
120#ifdef __cplusplus
121}
122#endif