Skip to content

Commit 5b83c55

Browse files
committed
modules: cloud: Rename from cloud_module to cloud
To align with other modules, rename to cloud. Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
1 parent 7727ccb commit 5b83c55

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

app/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "app_common.h"
1515
#include "button.h"
1616
#include "network.h"
17-
#include "cloud_module.h"
17+
#include "cloud.h"
1818
#include "fota.h"
1919
#include "location.h"
2020
#include "cbor_helper.h"

app/src/modules/cloud/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cloud_module.c)
8-
target_sources_ifdef(CONFIG_APP_CLOUD_SHELL app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cloud_module_shell.c)
7+
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cloud.c)
8+
target_sources_ifdef(CONFIG_APP_CLOUD_SHELL app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cloud_shell.c)
99
target_include_directories(app PRIVATE .)
1010

1111
if (CONFIG_NRF_CLOUD_COAP_SEC_TAG GREATER_EQUAL 2147483648 AND CONFIG_NRF_CLOUD_COAP_SEC_TAG LESS_EQUAL 2147483667)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <memfault/panics/coredump.h>
2222
#endif /* CONFIG_MEMFAULT */
2323

24-
#include "cloud_module.h"
24+
#include "cloud.h"
2525
#include "app_common.h"
2626
#include "network.h"
2727

@@ -735,7 +735,7 @@ static void state_connected_paused_run(void *o)
735735

736736
/* End of state handlers */
737737

738-
static void cloud_module_thread(void)
738+
static void cloud_thread(void)
739739
{
740740
int err;
741741
int task_wdt_id;
@@ -787,6 +787,6 @@ static void cloud_module_thread(void)
787787
}
788788
}
789789

790-
K_THREAD_DEFINE(cloud_module_thread_id,
790+
K_THREAD_DEFINE(cloud_thread_id,
791791
CONFIG_APP_CLOUD_THREAD_STACK_SIZE,
792-
cloud_module_thread, NULL, NULL, NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0);
792+
cloud_thread, NULL, NULL, NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#ifndef _CLOUD_MODULE_H_
8-
#define _CLOUD_MODULE_H_
7+
#ifndef _CLOUD_H_
8+
#define _CLOUD_H_
99

1010
#include <zephyr/kernel.h>
1111
#include <zephyr/zbus/zbus.h>
@@ -55,4 +55,4 @@ struct cloud_msg {
5555
}
5656
#endif
5757

58-
#endif /* _CLOUD_MODULE_H_ */
58+
#endif /* _CLOUD_H_ */

app/src/modules/cloud/cloud_module_shell.c renamed to app/src/modules/cloud/cloud_shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <net/nrf_cloud_defs.h>
1212
#include <date_time.h>
1313

14-
#include "cloud_module.h"
14+
#include "cloud.h"
1515

1616
LOG_MODULE_DECLARE(cloud, CONFIG_APP_CLOUD_LOG_LEVEL);
1717

docs/common/tooling_troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ The listed configurations configure the thread analyzer to print thread informat
201201
[00:00:30.726,593] <inf> thread_analyzer: : Total CPU cycles used: 37
202202
[00:00:30.726,715] <inf> thread_analyzer: coap_client_recv_thread: STACK: unused 592 usage 688 / 1280 (53 %); CPU: 0 %
203203
[00:00:30.726,745] <inf> thread_analyzer: : Total CPU cycles used: 273
204-
[00:00:30.726,867] <inf> thread_analyzer: cloud_module_thread_id: STACK: unused 328 usage 3000 / 3328 (90 %); CPU: 0 %
204+
[00:00:30.726,867] <inf> thread_analyzer: cloud_thread_id: STACK: unused 328 usage 3000 / 3328 (90 %); CPU: 0 %
205205
[00:00:30.726,898] <inf> thread_analyzer: : Total CPU cycles used: 1081
206206
[00:00:30.726,959] <inf> thread_analyzer: date_time_work_q : STACK: unused 80 usage 368 / 448 (82 %); CPU: 0 %
207207
[00:00:30.726,989] <inf> thread_analyzer: : Total CPU cycles used: 11

docs/modules/cloud.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ The module's responsibilities include:
1212

1313
nRF Cloud over CoAP utilizes DTLS connection ID which allows the device to quickly re-establish a secure connection with the cloud after a network disconnection without the need for a full DTLS handshake. The module uses the nRF Cloud CoAP library to handle the CoAP communication and DTLS connection management.
1414

15-
Below, the module’s main messages, configurations, and state machine are covered. Refer to the source files (`cloud_module.c`, `cloud_module.h`, and `Kconfig.cloud`) for implementation details.
15+
Below, the module’s main messages, configurations, and state machine are covered. Refer to the source files (`cloud.c`, `cloud.h`, and `Kconfig.cloud`) for implementation details.
1616

1717
## Messages
1818

19-
The cloud module publishes and receives messages over the zbus channel `CLOUD_CHAN`. All module message types are defined in `cloud_module.h` and used within `cloud_module.c`.
19+
The cloud module publishes and receives messages over the zbus channel `CLOUD_CHAN`. All module message types are defined in `cloud.h` and used within `cloud.c`.
2020

2121
### Input Messages
2222

@@ -37,7 +37,7 @@ The cloud module publishes and receives messages over the zbus channel `CLOUD_CH
3737
- **CLOUD_SHADOW_RESPONSE**
3838
Returns shadow data or a shadow delta received from nRF Cloud.
3939

40-
The message structure used by the cloud module is defined in `cloud_module.h`:
40+
The message structure used by the cloud module is defined in `cloud.h`:
4141

4242
```c
4343
struct cloud_msg {
@@ -101,7 +101,7 @@ For more details on these and other configurations, refer to `Kconfig.cloud`.
101101

102102
## State diagram
103103

104-
Below is a simplified representation of the state machine implemented in `cloud_module.c`. The module starts in the **STATE_RUNNING** context, which immediately transitions to **STATE_DISCONNECTED** upon initialization. From there, network events and internal conditions drive state transitions.
104+
Below is a simplified representation of the state machine implemented in `cloud.c`. The module starts in the **STATE_RUNNING** context, which immediately transitions to **STATE_DISCONNECTED** upon initialization. From there, network events and internal conditions drive state transitions.
105105

106106
```mermaid
107107
stateDiagram-v2

docs/patches/magnetometer.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ index e68d98b..1901eca 100644
1313
/ {
1414
chosen {
1515
zephyr,wifi = &nordic_wlan0;
16-
diff --git a/app/src/modules/cloud/cloud_module.c b/app/src/modules/cloud/cloud_module.c
16+
diff --git a/app/src/modules/cloud/cloud.c b/app/src/modules/cloud/cloud.c
1717
index 9696914..a701140 100644
18-
--- a/app/src/modules/cloud/cloud_module.c
19-
+++ b/app/src/modules/cloud/cloud_module.c
18+
--- a/app/src/modules/cloud/cloud.c
19+
+++ b/app/src/modules/cloud/cloud.c
2020
@@ -38,6 +38,7 @@ LOG_MODULE_REGISTER(cloud, CONFIG_APP_CLOUD_LOG_LEVEL);
2121

2222
#define CUSTOM_JSON_APPID_VAL_CONEVAL "CONEVAL"

tests/module/cloud/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test_runner_generate(src/cloud_module_test.c)
1414
target_sources(app
1515
PRIVATE
1616
src/cloud_module_test.c
17-
../../../app/src/modules/cloud/cloud_module.c
17+
../../../app/src/modules/cloud/cloud.c
1818
)
1919

2020
zephyr_include_directories(${ZEPHYR_BASE}/include/zephyr/)

tests/module/cloud/src/cloud_module_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <zephyr/zbus/zbus.h>
1818

1919
#include "environmental.h"
20-
#include "cloud_module.h"
20+
#include "cloud.h"
2121
#include "power.h"
2222
#include "network.h"
2323
#include "app_common.h"

0 commit comments

Comments
 (0)