Skip to content

Commit ce0b86a

Browse files
Yogesh PandeYogesh Pande
authored andcommitted
Updating mbed-client-c and sal-stack-nanostack-eventloop
**mbed-client-c** [Full Changelog](ARMmbed/mbed-client-c@v3.0.1...v3.0.2) **New feature** - Make resending flags configurable through Yotta and mbed-cli build systems - Introducing Configuration management through Config file **Closed issues:** - IOTCLT-882 - Confirmable messages sending **sal-stack-nanostack-eventloop** [Full Changelog](PelionIoT/sal-stack-nanostack-eventloop@mbed-os-5.0-rc1...mbed-os.5.2-rc1) **New features** - Move configuration parameter resolution to separate header and allow user definable configuration header to be used. - Port eventloop system timer to use new tick timer functions platform_tick_timer_register, platform_tick_timer_start and platform_tick_timer_stop.
1 parent 86e0841 commit ce0b86a

File tree

35 files changed

+514
-1146
lines changed

35 files changed

+514
-1146
lines changed

features/FEATURE_COMMON_PAL/mbed-client-c/CHANGELOG.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,131 @@
11
# Change Log
22

3+
## [v3.0.2](https://github.com/ARMmbed/mbed-client-c/releases/tag/v3.0.2) (24-Sep-2016)
4+
[Full Changelog](https://github.com/ARMmbed/mbed-client-c/compare/v3.0.1...v3.0.2)
5+
6+
**New feature**
7+
8+
- Make resending flags configurable through Yotta and mbed-cli build systems
9+
- Introducing Configuration management through Config file
10+
11+
**Closed issues:**
12+
13+
- IOTCLT-882 - Confirmable messages sending
14+
15+
**Merged pull requests:**
16+
17+
commit 58f712b9f684bede1905ce35a1a39ebb257c049c (HEAD, tag: v3.0.2, origin/master, origin/HEAD, master)
18+
Author: Yogesh Pande <[email protected]>
19+
Date: Sat Sep 24 15:04:36 2016 +0300
20+
21+
version v3.0.2
22+
23+
commit 39d5e98025f3d8067cea85c4a06470e0e9374812
24+
Merge: cf4c119 31d6566
25+
Author: Yogesh Pande <[email protected]>
26+
Date: Sat Sep 24 14:51:30 2016 +0300
27+
28+
Merge pull request #79 from ARMmbed/config-mechanism
29+
30+
Introducing Configuration management through Config file
31+
32+
commit 31d6566dddfe449e87819244027b847f53f53a96 (origin/config-mechanism)
33+
Author: Yogesh Pande <[email protected]>
34+
Date: Sat Sep 24 12:53:47 2016 +0300
35+
36+
Fixing valgrind with unit tests
37+
38+
commit a95a90a31e8f6123d14df84688b4e2e2f32e5507
39+
Author: Yogesh Pande <[email protected]>
40+
Date: Sat Sep 24 12:00:44 2016 +0300
41+
42+
Fixing valgrind memory leaks for unit tests
43+
44+
commit 248fc713a4303cb1f724d10f4aa6d68933bb5aed
45+
Author: Yogesh Pande <[email protected]>
46+
Date: Sat Sep 24 11:32:01 2016 +0300
47+
48+
Fix for failing unit tests
49+
50+
commit cec0980b4ccff9708cd0130fea936a69839739b8
51+
Merge: cf09b2b cf4c119
52+
Author: Yogesh Pande <[email protected]>
53+
Date: Thu Sep 22 18:02:39 2016 +0300
54+
55+
Merge branch 'master' into config-mechanism
56+
57+
commit cf4c1196520d64bf863b39efefc663ee60e58c61
58+
Merge: 330a16b f5f15cc
59+
Author: Antti Yli-Tokola <[email protected]>
60+
Date: Thu Sep 22 12:55:33 2016 +0300
61+
62+
Merge pull request #80 from ARMmbed/revert-77-duplication
63+
64+
Revert "Enable message duplication by default"
65+
66+
commit f5f15ccce5fd719aa8d7de14a583d02fd0fd05b9 (origin/revert-77-duplication)
67+
Author: Antti Yli-Tokola <[email protected]>
68+
Date: Thu Sep 22 12:30:50 2016 +0300
69+
70+
Revert "Enable message duplication by default"
71+
72+
commit cf09b2b6233bf897a17bdb0102962947df87f4ae
73+
Author: Yogesh Pande <[email protected]>
74+
Date: Thu Sep 22 09:57:41 2016 +0300
75+
76+
Fixed comments from PR#79
77+
78+
This commit includes
79+
- Fixing comments from PR-79
80+
81+
commit 8fd7cc258168047c29aca27a659de448f45e0e6f
82+
Author: Yogesh Pande <[email protected]>
83+
Date: Wed Sep 21 20:42:28 2016 +0300
84+
85+
Introducing Configuration management through Config file
86+
87+
This commit includes
88+
- Support for configuring various build time parameters throuh user supplied config file
89+
that can be passed at compile time through Makefile system which will work for
90+
non mbed-OS and non yotta build system as well.
91+
92+
commit 330a16bbfc5dc597015c7bdd935b603282d7064e
93+
Merge: b7d909e e268081
94+
Author: Antti Yli-Tokola <[email protected]>
95+
Date: Wed Sep 21 12:05:29 2016 +0300
96+
97+
Merge pull request #78 from ARMmbed/resend_flags
98+
99+
Make resend flags configurable through Yotta and mbed-cli build sy…
100+
101+
commit e268081bae1fa1db3b5b64dfb77d5b7a5bfed748
102+
Merge: dc16b29 b7d909e
103+
Author: Antti Yli-Tokola <[email protected]>
104+
Date: Wed Sep 21 12:02:32 2016 +0300
105+
106+
Merge branch 'master' into resend_flags
107+
108+
commit b7d909eca1c2259453dbe9c094b8a0c53d638fea
109+
Merge: 7f0eaea ad3b468
110+
Author: Antti Yli-Tokola <[email protected]>
111+
Date: Wed Sep 21 12:02:15 2016 +0300
112+
113+
Merge pull request #77 from ARMmbed/duplication
114+
115+
Enable message duplication by default
116+
117+
commit dc16b299ab9ff4bd1eaa9d3ec120fa58180820c4
118+
Author: Antti Yli-Tokola <[email protected]>
119+
Date: Mon Sep 19 14:35:31 2016 +0300
120+
121+
Make resending flags configurable through Yotta and mbed-cli build systems
122+
123+
commit ad3b46881bb61dfc2510d13d373bcd1faad114f4
124+
Author: Antti Yli-Tokola <[email protected]>
125+
Date: Fri Sep 16 08:58:38 2016 +0300
126+
127+
Enable message duplication by default
128+
3129
## [v3.0.1](https://github.com/ARMmbed/mbed-client-c/releases/tag/v3.0.1) (15-Sep-2016)
4130
[Full Changelog](https://github.com/ARMmbed/mbed-client-c/compare/mbed-os-5.0-rc1...v3.0.1)
5131

features/FEATURE_COMMON_PAL/mbed-client-c/module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mbed-client-c",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Nanostack NSDL and COAP library",
55
"keywords": [
66
"coap",
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright (c) 2016 ARM Limited. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
* Licensed under the Apache License, Version 2.0 (the License); you may
5+
* not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef SN_CONFIG_H
18+
#define SN_CONFIG_H
19+
20+
/**
21+
* \brief Configuration options (set of defines and values)
22+
*
23+
* This lists set of compile-time options that needs to be used to enable
24+
* or disable features selectively, and set the values for the mandatory
25+
* parameters.
26+
*/
27+
28+
/**
29+
* \def SN_COAP_DUPLICATION_MAX_MSGS_COUNT
30+
* \brief For Message duplication detection
31+
* Init value for the maximum count of messages to be stored for duplication detection
32+
* Setting of this value to 0 will disable duplication check, also reduce use of ROM memory
33+
* Default is set to 1.
34+
*/
35+
#undef SN_COAP_DUPLICATION_MAX_MSGS_COUNT /* 1 */
36+
37+
/**
38+
* \def SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
39+
*
40+
* \brief For Message blockwising
41+
* Init value for the maximum payload size to be sent and received at one blockwise message
42+
* Setting of this value to 0 will disable this feature, and also reduce use of ROM memory
43+
* Note: This define is common for both received and sent Blockwise messages
44+
*/
45+
#undef SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE /* 0 */ // < Must be 2^x and x is at least 4. Suitable values: 0, 16, 32, 64, 128, 256, 512 and 1024
46+
47+
/**
48+
* \def COAP_DISABLE_OBS_FEATURE
49+
*
50+
* \brief Disables CoAP 'obs' sending feature
51+
* as part of registration message, this might be
52+
* needed to be enabled for some strict LWM2M server implementation.
53+
* By default, this feature is disabled.
54+
*/
55+
#undef COAP_DISABLE_OBS_FEATURE
56+
57+
/**
58+
* \def SN_COAP_RESENDING_QUEUE_SIZE_MSGS
59+
*
60+
* \brief Sets the number of messages stored
61+
* in the resending queue. Default is 2
62+
*/
63+
#undef SN_COAP_RESENDING_QUEUE_SIZE_MSGS /* 2 */ // < Default re-sending queue size - defines how many messages can be stored. Setting this to 0 disables feature
64+
65+
/**
66+
* \def SN_COAP_RESENDING_QUEUE_SIZE_BYTES
67+
*
68+
* \brief Sets the size of the re-sending buffer.
69+
* Setting this to 0 disables this feature.
70+
* By default, this feature is disabled.
71+
*/
72+
#undef SN_COAP_RESENDING_QUEUE_SIZE_BYTES /* 0 */ // Default re-sending queue size - defines size of the re-sending buffer. Setting this to 0 disables feature
73+
74+
/**
75+
* \def SN_COAP_MAX_INCOMING_MESSAGE_SIZE
76+
*
77+
* \brief Sets the maximum size (in bytes) that
78+
* mbed Client will allow to be handled while
79+
* receiving big payload in blockwise mode.
80+
* Application can set this value based on their
81+
* available storage capability.
82+
* By default, maximum size is UINT16_MAX, 65535 bytes.
83+
*/
84+
#undef SN_COAP_MAX_INCOMING_MESSAGE_SIZE /* UINT16_MAX */
85+
86+
#ifdef MBED_CLIENT_USER_CONFIG_FILE
87+
#include MBED_CLIENT_USER_CONFIG_FILE
88+
#endif
89+
90+
#endif // SN_CONFIG_H

features/FEATURE_COMMON_PAL/mbed-client-c/nsdl-c/sn_nsdl_lib.h

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/run_unit_tests.sh

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/run_unit_tests_with_valgrind.sh

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/source/libCoap/src/include/sn_coap_protocol_internal.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "ns_list.h"
2828
#include "sn_coap_header_internal.h"
29+
#include "sn_config.h"
2930

3031
#ifdef __cplusplus
3132
extern "C" {
@@ -41,8 +42,27 @@ struct sn_coap_hdr_;
4142
#define ENABLE_RESENDINGS 1 /**< Enable / Disable resending from library in building */
4243

4344
#define SN_COAP_RESENDING_MAX_COUNT 3 /**< Default number of re-sendings */
45+
46+
#ifdef YOTTA_CFG_COAP_RESENDING_QUEUE_SIZE_MSGS
47+
#define SN_COAP_RESENDING_QUEUE_SIZE_MSGS YOTTA_CFG_COAP_RESENDING_QUEUE_SIZE_MSGS
48+
#elif defined MBED_CONF_MBED_CLIENT_SN_COAP_RESENDING_QUEUE_SIZE_MSGS
49+
#define SN_COAP_RESENDING_QUEUE_SIZE_MSGS MBED_CONF_MBED_CLIENT_SN_COAP_RESENDING_QUEUE_SIZE_MSGS
50+
#endif
51+
52+
#ifndef SN_COAP_RESENDING_QUEUE_SIZE_MSGS
4453
#define SN_COAP_RESENDING_QUEUE_SIZE_MSGS 2 /**< Default re-sending queue size - defines how many messages can be stored. Setting this to 0 disables feature */
54+
#endif
55+
56+
#ifdef YOTTA_CFG_COAP_RESENDING_QUEUE_SIZE_BYTES
57+
#define SN_COAP_RESENDING_QUEUE_SIZE_BYTES YOTTA_CFG_COAP_RESENDING_QUEUE_SIZE_BYTES
58+
#elif defined MBED_CONF_MBED_CLIENT_SN_COAP_RESENDING_QUEUE_SIZE_BYTES
59+
#define SN_COAP_RESENDING_QUEUE_SIZE_BYTES MBED_CONF_MBED_CLIENT_SN_COAP_RESENDING_QUEUE_SIZE_BYTES
60+
#endif
61+
62+
#ifndef SN_COAP_RESENDING_QUEUE_SIZE_BYTES
4563
#define SN_COAP_RESENDING_QUEUE_SIZE_BYTES 0 /**< Default re-sending queue size - defines size of the re-sending buffer. Setting this to 0 disables feature */
64+
#endif
65+
4666
#define DEFAULT_RESPONSE_TIMEOUT 10 /**< Default re-sending timeout as seconds */
4767

4868
/* These parameters sets maximum values application can set with API */
@@ -81,7 +101,6 @@ struct sn_coap_hdr_;
81101

82102
/* Init value for the maximum payload size to be sent and received at one blockwise message */
83103
/* Setting of this value to 0 will disable this feature, and also reduce use of ROM memory */
84-
/* Note: Current Coap implementation supports Blockwise transfers specification version draft-ietf-core-block-03 */
85104
/* Note: This define is common for both received and sent Blockwise messages */
86105

87106
#ifdef YOTTA_CFG_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE

features/FEATURE_COMMON_PAL/mbed-client-c/source/libNsdl/src/include/sn_grs.h

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/source/libNsdl/src/sn_grs.c

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/source/libNsdl/src/sn_nsdl.c

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "sn_coap_protocol_internal.h"
3030
#include "sn_nsdl_lib.h"
3131
#include "sn_grs.h"
32+
#include "sn_config.h"
3233
#include "mbed-trace/mbed_trace.h"
3334

3435
#define TRACE_GROUP "coap"

features/FEATURE_COMMON_PAL/mbed-client-c/test/multithread-linux-test/tester.sh

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/MakefileWorker.mk

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/makefile_defines.txt

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/run_tests

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/sn_coap_protocol/libCoap_protocol_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "sn_coap_parser_stub.h"
2828
#include "sn_coap_header_check_stub.h"
2929

30+
3031
int retCounter = 0;
3132
static coap_s *coap_handle = NULL;
3233
void myFree(void* addr);
@@ -87,9 +88,13 @@ TEST(libCoap_protocol, sn_coap_protocol_destroy)
8788
msg_ptr->send_msg_ptr->uri_path_len = 2;
8889

8990
ns_list_add_to_end(&handle->linked_list_resent_msgs, msg_ptr);
91+
#if SN_COAP_DUPLICATION_MAX_MSGS_COUNT
9092
ns_list_init(&handle->linked_list_duplication_msgs);
93+
#endif
94+
#if SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
9195
ns_list_init(&handle->linked_list_blockwise_sent_msgs);
9296
ns_list_init(&handle->linked_list_blockwise_received_payloads);
97+
#endif
9398
CHECK( 0 == sn_coap_protocol_destroy(handle));
9499
}
95100

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef TEST_CONFIG_H
2+
#define TEST_CONFIG_H
3+
4+
/**
5+
* \def SN_COAP_DUPLICATION_MAX_MSGS_COUNT
6+
* \brief For Message duplication detection
7+
* Init value for the maximum count of messages to be stored for duplication detection
8+
* Setting of this value to 0 will disable duplication check, also reduce use of ROM memory
9+
* Default is set to 0.
10+
*/
11+
#define SN_COAP_DUPLICATION_MAX_MSGS_COUNT 1
12+
13+
#endif

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/stubs/sn_grs_stub.c

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/test/nsdl-c/unittest/stubs/sn_nsdl_stub.c

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/mbed-client-c/xsl_script.sh

100644100755
File mode changed.

features/FEATURE_COMMON_PAL/sal-stack-nanostack-eventloop/.mbedignore

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Change Log
2+
3+
## [mbed-os.5.2-rc1](https://github.com/ARMmbed/sal-stack-nanostack-eventloop/releases/tag/mbed-os.5.2-rc1) (24-Sep-2016)
4+
[Full Changelog](https://github.com/ARMmbed/sal-stack-nanostack-eventloop/compare/mbed-os-5.0-rc1...mbed-os.5.2-rc1)
5+
6+
**New features**
7+
8+
- Move configuration parameter resolution to separate header and allow user definable configuration header to be used.
9+
- Port eventloop system timer to use new tick timer functions platform_tick_timer_register, platform_tick_timer_start and platform_tick_timer_stop.
10+
11+
**Merged pull requests:**
12+
13+
commit 283299dbd744c91cb30810ad263798842905c054 (HEAD, tag: mbed-os.5.2-rc1, origin/master, origin/HEAD, master)
14+
Author: Jaakko Kukkohovi <[email protected]>
15+
Date: Fri Sep 23 10:05:55 2016 +0300
16+
17+
Change configuration method (#23)
18+
19+
Move configuration parameter resolution to separate header and allow
20+
user definable configuration header to be used.
21+
22+
commit 269b00fba6a637c363f7d1690db0889118bca010
23+
Author: Jaakko Kukkohovi <[email protected]>
24+
Date: Wed Sep 21 11:27:40 2016 +0300
25+
26+
Systimer using platform tick timer (#22)
27+
28+
* Port eventloop system timer to use new tick timer functions platform_tick_timer_register, platform_tick_timer_start and platform_tick_timer_stop.Existing functionality is preserved by implementing these functions by default using the high resolution timer as before
29+
* New configuration parameter use_platform_tick_timer disables the high resolution timer based tick timer implementation and allows platform to implement the tick timer functions.
30+
* New configuration parameter exclude_highres_timer removes the high resolution timer from the build thus providing only eventloop.
31+
* Minar support now implemented by providing platform tick timer using minar timers and implicitly using platform tick timers for eventloop when using minar
32+

0 commit comments

Comments
 (0)