7#ifndef NRF_CLOUD_DEFS_H__
8#define NRF_CLOUD_DEFS_H__
10#include <zephyr/toolchain.h>
21#define NRF_CLOUD_JSON_APPID_KEY "appId"
22#define NRF_CLOUD_JSON_APPID_VAL_AGNSS "AGNSS"
23#define NRF_CLOUD_JSON_APPID_VAL_PGPS "PGPS"
24#define NRF_CLOUD_JSON_APPID_VAL_GNSS "GNSS"
25#define NRF_CLOUD_JSON_APPID_VAL_LOCATION "GROUND_FIX"
26#define NRF_CLOUD_JSON_APPID_VAL_DEVICE "DEVICE"
27#define NRF_CLOUD_JSON_APPID_VAL_FLIP "FLIP"
28#define NRF_CLOUD_JSON_APPID_VAL_BTN "BUTTON"
29#define NRF_CLOUD_JSON_APPID_VAL_TEMP "TEMP"
30#define NRF_CLOUD_JSON_APPID_VAL_HUMID "HUMID"
31#define NRF_CLOUD_JSON_APPID_VAL_AIR_PRESS "AIR_PRESS"
32#define NRF_CLOUD_JSON_APPID_VAL_AIR_QUAL "AIR_QUAL"
33#define NRF_CLOUD_JSON_APPID_VAL_RSRP "RSRP"
34#define NRF_CLOUD_JSON_APPID_VAL_LIGHT "LIGHT"
35#define NRF_CLOUD_JSON_APPID_VAL_MODEM "MODEM"
36#define NRF_CLOUD_JSON_APPID_VAL_ALERT "ALERT"
37#define NRF_CLOUD_JSON_APPID_VAL_LOG "LOG"
38#define NRF_CLOUD_JSON_APPID_VAL_DICTIONARY_LOG "DICTLOG"
41#define NRF_CLOUD_JSON_MSG_TYPE_KEY "messageType"
42#define NRF_CLOUD_JSON_MSG_TYPE_VAL_CMD "CMD"
43#define NRF_CLOUD_JSON_MSG_TYPE_VAL_DATA "DATA"
44#define NRF_CLOUD_JSON_MSG_TYPE_VAL_DISCONNECT "DISCON"
47#define NRF_CLOUD_JSON_DATA_KEY "data"
48#define NRF_CLOUD_JSON_ERR_KEY "err"
49#define NRF_CLOUD_JSON_FULFILL_KEY "fulfilledWith"
50#define NRF_CLOUD_JSON_FILTERED_KEY "filtered"
51#define NRF_CLOUD_MSG_TIMESTAMP_KEY "ts"
54#define NRF_CLOUD_JSON_MCC_KEY "mcc"
55#define NRF_CLOUD_JSON_MNC_KEY "mnc"
56#define NRF_CLOUD_JSON_AREA_CODE_KEY "tac"
57#define NRF_CLOUD_JSON_CELL_ID_KEY "eci"
58#define NRF_CLOUD_JSON_PHYCID_KEY "phycid"
59#define NRF_CLOUD_JSON_RSRP_KEY "rsrp"
62#define NRF_CLOUD_CELL_POS_JSON_KEY_LTE "lte"
63#define NRF_CLOUD_CELL_POS_JSON_KEY_ECI NRF_CLOUD_JSON_CELL_ID_KEY
64#define NRF_CLOUD_CELL_POS_JSON_KEY_MCC NRF_CLOUD_JSON_MCC_KEY
65#define NRF_CLOUD_CELL_POS_JSON_KEY_MNC NRF_CLOUD_JSON_MNC_KEY
66#define NRF_CLOUD_CELL_POS_JSON_KEY_TAC NRF_CLOUD_JSON_AREA_CODE_KEY
67#define NRF_CLOUD_CELL_POS_JSON_KEY_AGE "age"
68#define NRF_CLOUD_CELL_POS_JSON_KEY_T_ADV "adv"
69#define NRF_CLOUD_CELL_POS_JSON_KEY_EARFCN "earfcn"
70#define NRF_CLOUD_CELL_POS_JSON_KEY_PCI "pci"
71#define NRF_CLOUD_CELL_POS_JSON_KEY_NBORS "nmr"
72#define NRF_CLOUD_CELL_POS_JSON_KEY_RSRP NRF_CLOUD_JSON_RSRP_KEY
73#define NRF_CLOUD_CELL_POS_JSON_KEY_RSRQ "rsrq"
74#define NRF_CLOUD_CELL_POS_JSON_KEY_TDIFF "timeDiff"
77#define NRF_CLOUD_LOCATION_JSON_KEY_CONFIG "config"
78#define NRF_CLOUD_LOCATION_JSON_KEY_DOREPLY "doReply"
79#define NRF_CLOUD_LOCATION_JSON_KEY_HICONF "hiConf"
80#define NRF_CLOUD_LOCATION_JSON_KEY_FALLBACK "fallback"
81#define NRF_CLOUD_LOCATION_JSON_KEY_WIFI "wifi"
82#define NRF_CLOUD_LOCATION_JSON_KEY_APS "accessPoints"
83#define NRF_CLOUD_LOCATION_JSON_KEY_ANCHORS "anchors"
84#define NRF_CLOUD_LOCATION_JSON_KEY_ANC_NAME "name"
85#define NRF_CLOUD_LOCATION_JSON_KEY_ANC_MAC "macAddress"
86#define NRF_CLOUD_LOCATION_JSON_KEY_WIFI_MAC "macAddress"
87#define NRF_CLOUD_LOCATION_JSON_KEY_WIFI_CH "channel"
88#define NRF_CLOUD_LOCATION_JSON_KEY_WIFI_RSSI "signalStrength"
89#define NRF_CLOUD_LOCATION_JSON_KEY_WIFI_SSID "ssid"
90#define NRF_CLOUD_LOCATION_JSON_KEY_LAT "lat"
91#define NRF_CLOUD_LOCATION_JSON_KEY_LON "lon"
92#define NRF_CLOUD_LOCATION_JSON_KEY_UNCERT "uncertainty"
93#define NRF_CLOUD_LOCATION_TYPE_VAL_MCELL "MCELL"
94#define NRF_CLOUD_LOCATION_TYPE_VAL_SCELL "SCELL"
95#define NRF_CLOUD_LOCATION_TYPE_VAL_WIFI "WIFI"
96#define NRF_CLOUD_LOCATION_TYPE_VAL_ANCHOR "ANCHOR"
99#define NRF_CLOUD_LOCATION_DOREPLY_DEFAULT true
100#define NRF_CLOUD_LOCATION_HICONF_DEFAULT false
101#define NRF_CLOUD_LOCATION_FALLBACK_DEFAULT true
104#define NRF_CLOUD_JSON_PGPS_PRED_COUNT "predictionCount"
105#define NRF_CLOUD_JSON_PGPS_INT_MIN "predictionIntervalMinutes"
106#define NRF_CLOUD_JSON_PGPS_GPS_DAY "startGpsDay"
107#define NRF_CLOUD_JSON_PGPS_GPS_TIME "startGpsTimeOfDaySeconds"
108#define NRF_CLOUD_PGPS_RCV_ARRAY_IDX_HOST 0
109#define NRF_CLOUD_PGPS_RCV_ARRAY_IDX_PATH 1
110#define NRF_CLOUD_PGPS_RCV_REST_HOST "host"
111#define NRF_CLOUD_PGPS_RCV_REST_PATH "path"
114#define NRF_CLOUD_JSON_KEY_ELEVATION_MASK "mask"
115#define NRF_CLOUD_JSON_KEY_AGNSS_TYPES "types"
118#define NRF_CLOUD_FOTA_TYPE_MODEM_DELTA "MODEM"
119#define NRF_CLOUD_FOTA_TYPE_MODEM_FULL "MDM_FULL"
120#define NRF_CLOUD_FOTA_TYPE_BOOT "BOOT"
121#define NRF_CLOUD_FOTA_TYPE_APP "APP"
122#define NRF_CLOUD_FOTA_REST_KEY_JOB_DOC "jobDocument"
123#define NRF_CLOUD_FOTA_REST_KEY_JOB_ID "jobId"
124#define NRF_CLOUD_FOTA_REST_KEY_PATH "path"
125#define NRF_CLOUD_FOTA_REST_KEY_HOST "host"
126#define NRF_CLOUD_FOTA_REST_KEY_TYPE "firmwareType"
127#define NRF_CLOUD_FOTA_REST_KEY_SIZE "fileSize"
128#define NRF_CLOUD_FOTA_REST_KEY_VER "version"
130#define NRF_CLOUD_FOTA_VER 2
133#define NRF_CLOUD_REST_ERROR_CODE_KEY "code"
134#define NRF_CLOUD_REST_ERROR_MSG_KEY "message"
135#define NRF_CLOUD_REST_TOPIC_KEY "topic"
136#define NRF_CLOUD_REST_MSG_KEY "message"
139#define NRF_CLOUD_JSON_GNSS_PVT_KEY_LAT "lat"
140#define NRF_CLOUD_JSON_GNSS_PVT_KEY_LON "lon"
141#define NRF_CLOUD_JSON_GNSS_PVT_KEY_ACCURACY "acc"
142#define NRF_CLOUD_JSON_GNSS_PVT_KEY_ALTITUDE "alt"
143#define NRF_CLOUD_JSON_GNSS_PVT_KEY_SPEED "spd"
144#define NRF_CLOUD_JSON_GNSS_PVT_KEY_HEADING "hdg"
147#define NRF_CLOUD_DEVICE_JSON_KEY_NET_INF "networkInfo"
148#define NRF_CLOUD_DEVICE_JSON_KEY_SIM_INF "simInfo"
149#define NRF_CLOUD_DEVICE_JSON_KEY_DEV_INF "deviceInfo"
152#define NRF_CLOUD_JSON_ALERT_SEQUENCE "seq"
153#define NRF_CLOUD_JSON_ALERT_DESCRIPTION "desc"
154#define NRF_CLOUD_JSON_ALERT_TYPE "type"
155#define NRF_CLOUD_JSON_ALERT_VALUE "value"
158#define NRF_CLOUD_JSON_LOG_KEY_SEQUENCE "seq"
159#define NRF_CLOUD_JSON_LOG_KEY_DOMAIN "dom"
160#define NRF_CLOUD_JSON_LOG_KEY_SOURCE "src"
161#define NRF_CLOUD_JSON_LOG_KEY_LEVEL "lvl"
162#define NRF_CLOUD_JSON_LOG_KEY_MESSAGE "msg"
166#define NRF_CLOUD_SETTINGS_NAME "nrf_cloud"
167#define NRF_CLOUD_SETTINGS_FOTA_KEY "fota"
168#define NRF_CLOUD_SETTINGS_FOTA_JOB "job"
170#define NRF_CLOUD_SETTINGS_FULL_FOTA NRF_CLOUD_SETTINGS_NAME \
172 NRF_CLOUD_SETTINGS_FOTA_KEY
174#define NRF_CLOUD_SETTINGS_FULL_FOTA_JOB NRF_CLOUD_SETTINGS_FULL_FOTA \
176 NRF_CLOUD_SETTINGS_FOTA_JOB
179#define NRF_CLOUD_JSON_KEY_STATE "state"
180#define NRF_CLOUD_JSON_KEY_REP "reported"
181#define NRF_CLOUD_JSON_KEY_DES "desired"
182#define NRF_CLOUD_JSON_KEY_DELTA "delta"
183#define NRF_CLOUD_JSON_KEY_DEVICE "device"
184#define NRF_CLOUD_JSON_KEY_SRVC_INFO "serviceInfo"
185#define NRF_CLOUD_JSON_KEY_SRVC_INFO_UI "ui"
186#define NRF_CLOUD_JSON_KEY_SRVC_INFO_FOTA NRF_CLOUD_FOTA_VER_STR
187#define NRF_CLOUD_JSON_KEY_CFG "config"
188#define NRF_CLOUD_JSON_KEY_CTRL "control"
189#define NRF_CLOUD_JSON_KEY_ALERT "alertsEn"
190#define NRF_CLOUD_JSON_KEY_LOG "logLvl"
191#define NRF_CLOUD_JSON_KEY_TOPICS "topics"
192#define NRF_CLOUD_JSON_KEY_STAGE "stage"
193#define NRF_CLOUD_JSON_KEY_PAIRING "pairing"
194#define NRF_CLOUD_JSON_KEY_PAIR_STAT "pairingStatus"
195#define NRF_CLOUD_JSON_KEY_TOPIC_PRFX "nrfcloud_mqtt_topic_prefix"
196#define NRF_CLOUD_JSON_KEY_KEEPALIVE "keepalive"
197#define NRF_CLOUD_JSON_KEY_CONN "connection"
198#define NRF_CLOUD_JSON_KEY_APP_VER "appVersion"
199#define NRF_CLOUD_JSON_KEY_CONN_INFO "connectionInfo"
200#define NRF_CLOUD_JSON_KEY_PROTOCOL "protocol"
201#define NRF_CLOUD_JSON_KEY_METHOD "method"
202#define NRF_CLOUD_JSON_VAL_NOT_ASSOC "not_associated"
203#define NRF_CLOUD_JSON_VAL_PAIRED "paired"
204#define NRF_CLOUD_JSON_KEY_SHADOW_VERSION "version"
205#define NRF_CLOUD_JSON_KEY_SHADOW_TIMESTAMP "timestamp"
207#define NRF_CLOUD_FOTA_VER_STR "fota_v" STRINGIFY(NRF_CLOUD_FOTA_VER)
209#define NRF_CLOUD_STAGE_ID_MAX_LEN 8
211#define NRF_CLOUD_TENANT_ID_MAX_LEN 64
213#define NRF_CLOUD_CLIENT_ID_MAX_LEN 64
216#ifndef CONFIG_NRF_CLOUD_GATEWAY
217#define NRF_CLOUD_JSON_KEY_DEVICE_TO_CLOUD "d2c"
218#define NRF_CLOUD_JSON_KEY_CLOUD_TO_DEVICE "c2d"
220#define NRF_CLOUD_JSON_KEY_DEVICE_TO_CLOUD "g2c"
221#define NRF_CLOUD_JSON_KEY_CLOUD_TO_DEVICE "c2g"
223#define NRF_CLOUD_BULK_MSG_TOPIC "/bulk"
224#define NRF_CLOUD_JSON_VAL_TOPIC_C2D "/" NRF_CLOUD_JSON_KEY_CLOUD_TO_DEVICE
225#define NRF_CLOUD_JSON_VAL_TOPIC_AGNSS "/agnss"
226#define NRF_CLOUD_JSON_VAL_TOPIC_PGPS "/pgps"
227#define NRF_CLOUD_JSON_VAL_TOPIC_GND_FIX "/ground_fix"
228#define NRF_CLOUD_JSON_VAL_TOPIC_RCV "/r"
229#define NRF_CLOUD_JSON_VAL_TOPIC_WILDCARD "/+"
230#define NRF_CLOUD_JSON_VAL_TOPIC_BIN "/bin"
231#define NRF_CLOUD_JSON_VAL_PROTO_MQTT "MQTT"
232#define NRF_CLOUD_JSON_VAL_PROTO_COAP "CoAP"
233#define NRF_CLOUD_JSON_VAL_PROTO_REST "REST"
234#define NRF_CLOUD_JSON_VAL_METHOD_LTE "LTE"
235#define NRF_CLOUD_JSON_VAL_METHOD_WIFI "Wi-Fi"