Skip to content

Commit 7404115

Browse files
committed
Merge branch 'master' into size_optimization
* master: (28 commits) Result of is_value_changed printed out unit tests: m2mreporthandler: fix uses of uninitialized memory unit tests: m2minterfaceimpl: fix couple of more valgrind findings unit tests: m2minterfaceimpl: fix a use of uninitialized memory unit tests: m2mresourceinstance: fix uses of uninitialized memory unit tests: m2mnsdlinterface: fix a bunch of uses of uninitialized memory version v1.8.0 version v1.7.3 Fix random update registration fails Update run_unit_tests_with_valgrind.sh Add script for running unit tests with valgrind unit tests: m2base: fix valrgind warnings for uninitialized memory unit tests: m2mobject: fix a use of nullptr pointed by Valgrind Moving TRACE_GROUP define from header to source files to avoid multiple definition error. Changing location version v1.7.2 Change few checks in m2mtlv unit tests Create mbed_Client_Release_Note_16_03.md Creating known issues for 16.03 Fix occasional unregistration failures ... Conflicts: source/m2mnsdlinterface.cpp source/m2mobject.cpp source/m2mobjectinstance.cpp source/m2mresource.cpp source/m2mresourceinstance.cpp
2 parents 71fab4c + 2e5d26c commit 7404115

36 files changed

+439
-351
lines changed
+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
# Release note for mbed Client 16.03
3+
4+
mbed Client is an OS-agnostic embedded software library that provides the means to connect and manage constrained embedded devices to web applications through mbed Device Server.
5+
6+
## Release summary
7+
8+
This is an iterative release of mbed Client, which is available for mbed OS as well as for Ubuntu-like Linux distributions. We’re continuously maturing mbed Client and adding new features to mbed Client.. This release builds on the Technology Preview 15.11 release through the introduction of new APIs, enhanced functionalities and bug fixes.
9+
## Collaboration
10+
We’re building mbed Client as a collaborative project, bringing together industry and open source community contributions. If you’d like to work on mbed Client with us, we’d encourage you [to pitch in](https://github.com/ARMmbed/mbed-os/blob/master/CONTRIBUTING.md). With this technology preview we’re ready to start receiving contributions back from the community.
11+
## Documentation
12+
To get started with mbed Client, please visit our [getting started guide](https://docs.mbed.com/docs/mbed-client-guide/en/latest/).
13+
# Changes since last release
14+
15+
## New APIs and functions
16+
17+
* New APIs:
18+
* Setting the max-age of a resource value. See [https://tools.ietf.org/html/draft-ietf-core-coap-09#section-5.10.6](https://tools.ietf.org/html/draft-ietf-core-coap-09#section-5.10.6).
19+
* Omitting registered resources' URI path from the registration message's body (which is sent from the client to the server).
20+
* Allowing the client to send a delayed response to POST requests. See [https://tools.ietf.org/html/draft-ietf-core-coap-09#section-5.2.2](https://tools.ietf.org/html/draft-ietf-core-coap-09#section-5.2.2).
21+
* Getting Object and Object Instance information from Resource Object.
22+
* Added a new class for handling arguments received from POST method for Resource.
23+
* Enabled CoAP Blockwise payload handling by client. See [https://tools.ietf.org/html/draft-ietf-core-block-08#section-2](https://tools.ietf.org/html/draft-ietf-core-block-08#section-2).
24+
* Added support for handling observation cancellation through a RESET message from Device Connector Server.
25+
* Disabled Bootstrap API functionality from source code.
26+
27+
## Bug fixes
28+
29+
1. Multiple fixes related to Object, Object Instance and Resource Observation.
30+
2. Multiple fixes related to Write Attributes parameter handling for Object, Object Instance and Resource.
31+
3. Multiple fixes for creating and deleting object instances.
32+
4. Fixes related to sending notifications from multiple resource levels.
33+
5. Fixing memory leaks.
34+
6. Fixing mbed Client IPv6 connectivity for Linux.
35+
7. Memory handling in the ``m2mstring`` class.
36+
8. Fix for preventing the client from sending multiple confirmable messages on mbed OS.
37+
38+
# Modules versions
39+
40+
mbed Client is available as part of mbed OS or as a standalone component for Ubuntu-like Linux distributions.
41+
42+
The yotta modules & versions released for these different product configurations are listed below.
43+
44+
mbed Client as part of mbed OS:
45+
46+
1. mbed-client-quickstart (example)
47+
1. mbed-client - 1.6.x
48+
1. mbed-client-c - 2.2.x
49+
1. nanostack-libservice - 3.1.x
50+
1. mbed-client-mbedtls - 1.0.x
51+
1. mbedtls - 2.2.0
52+
1. mbed-client-mbed-os - 1.1.x
53+
1. mbed-client-examples
54+
1. target-frdm-k64f-gcc - 2.0.0
55+
56+
57+
mbed Client as a standalone distribution for Ubuntu-like Linux distributions:
58+
59+
1. mbed-client-linux-example
60+
1. mbed-client - 1.6.x
61+
1. mbed-client-c - 2.2.x
62+
1. nanostack-libservice - 3.1.x
63+
1. mbed-client-mbedtls - 1.0.x
64+
1. mbedtls - 2.2.0
65+
1. mbed-client-linux - 1.1.x
66+
1. target-x86-linux-native - 1.0.0
67+
1. target-linux-native - 1.0.0
68+
69+
70+
### Known issues
71+
72+
The known issues list for this release is available as [a separate document](Known_Issues.md)
73+
74+
### Other ways of accessing this release
75+
76+
77+
We prefer that you access and collaborate with mbed Client online. However, the release may also be downloaded as a [tar archive file](https://mbed-media.mbed.com/filer_public/7b/75/7b75d9fe-bf15-4818-b959-c54e11e767af/mbed-client-1603.zip).
78+
79+
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# mbed Client Known Issues
2+
3+
## About this document
4+
5+
This is the list of known issues for the [16.03 release of mbed Client](Release_Note.md).
6+
7+
We publish mbed Client as a collection of modules on GitHub. Issues are raised in the specific repositories and then tracked internally.
8+
9+
The purpose of this document is to provide a single view of the outstanding key issues that have not been addressed for this release. As such it is a filtered and reviewed list based on priority and potential impact. Each item summarises the problem and includes any known workarounds, along with a link to the GitHub issue (if applicable). We welcome any comments or proposed solutions.
10+
11+
For more information about an issue, contact us on the [forums](http://forums.mbed.com).
12+
13+
## Additional information
14+
15+
For further information regarding this release please refer to the release notes referenced above.
16+
17+
# Known issues
18+
19+
## mbed Client API does not support float data type
20+
* **Description**: mbed Client API doesn't work correctly with float data type, as it is disabled in the FRDM target configuration.
21+
* **Workaround**: No workaround at the moment. There will be a fix for target-mbed-gcc soon, which will enable float data type usage.
22+
* **Reported Issue**: ARM internal reference IOTCLT-649
23+
* **Priority**: Critical
24+
25+
## mbed-trace module has a missing test dependency on Linux and Windows build targets.
26+
* **Description**: The mbed-trace library has a test-dependency on cpputest, which is not yet available in the yotta registry. Since you can't download this dependency, "yt test" for mbed-trace will fail.
27+
* **Workaround**: No workaround available.
28+
* **Reported Issue**: ARM internal reference IOTCLT-650
29+
* **Priority**: Critical
30+
31+
## mbed Client API may not be fully interoperable with other LWM2M servers.
32+
* **Description**: mbed Client API is OMA LWM2M compatible. However, some features may not be fully interoperable against other open source LWM2M servers.
33+
* **Workaround**: mbed Client is compatible with mbed Device Connector Service, which can be tested at [https://connector.mbed.com](https://connector.mbed.com).
34+
* **Reported Issue**: ARM internal reference IOTCLT-366
35+
* **Priority**: Major
36+
37+
## mbed Client example application may drop off from Connector if kept running for a long duration.
38+
* **Description**: mbed Client example application sometimes drops off from Connector after a few hours. This may happen when mbed Client is kept running for long durations (over 24 hours) - it occasionally goes offline due to unstable network conditions, and doesn't send periodic updates to Connector.
39+
* **Workaround**: Set the periodic lifetime value to less than 15 minutes if you want to run stability tests. Also, implement a network error handling mechanism on the application side, to handle error() callbacks received from the mbed-client library.
40+
* **Reported Issue**: [https://github.com/ARMmbed/mbed-client-examples/issues/52](https://github.com/ARMmbed/mbed-client-examples/issues/52)
41+
* **Priority**: Major
42+

mbed-client/m2mconfig.h

-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,4 @@
2222
#include "mbed-client/m2mstring.h"
2323
using namespace m2m;
2424

25-
#if defined(HAVE_DEBUG) || !defined(NDEBUG)
26-
#define TRACE_GROUP "mbed-client"
27-
#endif
28-
2925
#endif // M2MCONFIG_H

mbed-client/m2minterface.h

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class M2MInterface {
8484
LwIP_IPv6,
8585
Reserved,
8686
Nanostack_IPv6,
87+
ATWINC_IPv4,
8788
Unknown
8889
}NetworkStack;
8990

mbed-client/m2mstring.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ namespace m2m
113113

114114
int find_last_of(char c) const;
115115

116-
static uint8_t* convert_integer_to_array(int64_t value, uint8_t &size);
116+
static uint8_t* convert_integer_to_array(int64_t value, uint8_t &size, uint8_t *array = NULL, uint32_t array_size = 0);
117+
static int64_t convert_array_to_integer(uint8_t *value, uint32_t size);
117118

118119
private:
119120
// reallocate the internal memory

module.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mbed-client",
3-
"version": "1.7.0",
3+
"version": "1.8.0",
44
"description": "mbed Client C++ API",
55
"keywords": [],
66
"author": "Yogesh Pande <[email protected]>",
+14-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
text data bss dec hex filename
2-
7434 0 0 7434 1d0a m2mnsdlinterface.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
3-
2054 0 0 2054 806 m2mreporthandler.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
4-
1974 0 0 1974 7b6 m2mstring.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
5-
1225 0 0 1225 4c9 m2mserver.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
2+
1571 0 0 1571 623 m2mtlvserializer.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
3+
272 0 0 272 110 m2minterfacefactory.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
4+
7476 0 0 7476 1d34 m2mnsdlinterface.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
65
4147 0 0 4147 1033 m2minterfaceimpl.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
7-
3128 0 0 3128 c38 m2mresource.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
6+
1382 0 0 1382 566 m2msecurity.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
87
2163 0 0 2163 873 m2mtlvdeserializer.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
8+
2429 4 0 2433 981 m2mdevice.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
9+
1902 0 0 1902 76e m2mstring.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
10+
4062 0 0 4062 fde m2mobjectinstance.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
11+
2062 0 0 2062 80e m2mreporthandler.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
912
1983 0 0 1983 7bf m2mbase.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
10-
252 4 0 256 100 nsdlaccesshelper.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
11-
4078 0 0 4078 fee m2mobjectinstance.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
12-
2707 0 0 2707 a93 m2mobject.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
13+
2693 0 0 2693 a85 m2mobject.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
1314
1672 0 1560 3232 ca0 m2mconstants.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
14-
2429 4 0 2433 981 m2mdevice.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
15+
3108 0 0 3108 c24 m2mresource.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
16+
2344 0 0 2344 928 m2mresourceinstance.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
1517
1942 4 0 1946 79a m2mfirmware.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
16-
272 0 0 272 110 m2minterfacefactory.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
17-
1382 0 0 1382 566 m2msecurity.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
18-
1571 0 0 1571 623 m2mtlvserializer.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
19-
2376 0 0 2376 948 m2mresourceinstance.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
20-
42789 12 1560 44361 ad49 (TOTALS)
18+
1225 0 0 1225 4c9 m2mserver.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
19+
252 4 0 256 100 nsdlaccesshelper.cpp.o (ex ./build/frdm-k64f-armcc/source/mbed-client.ar)
20+
42685 12 1560 44257 ace1 (TOTALS)

run_unit_tests_with_valgrind.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Execute script with root path where to find binaries.
3+
# For example ./run_unit_tests_with_valgrind.sh ./build/x86-linux-native-coverage/test/mbedclient/
4+
5+
input="binaries.txt"
6+
valgrind_logs="valgrind_logs"
7+
rm -rf $valgrind_logs
8+
mkdir $valgrind_logs
9+
find $1 -type f -executable -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; -print > $input
10+
while file= read -r binary
11+
do
12+
valgrind --log-file="${valgrind_logs}/valgrind_$(basename $binary).log" "$binary"
13+
done < "$input"

source/include/m2mnsdlinterface.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ class M2MNsdlInterface : public M2MTimerObserver,
320320
sn_nsdl_addr_s _sn_nsdl_address;
321321
nsdl_s *_nsdl_handle;
322322
uint32_t _counter_for_nsdl;
323-
uint16_t _register_id;
324-
uint16_t _unregister_id;
325-
uint16_t _update_id;
323+
int32_t _register_id;
324+
int32_t _unregister_id;
325+
int32_t _update_id;
326326
uint16_t _bootstrap_id;
327327

328328
friend class Test_M2MNsdlInterface;

source/m2mbase.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <ctype.h>
2525
#include <string.h>
2626

27+
#define TRACE_GROUP "mClt"
28+
2729
M2MBase& M2MBase::operator=(const M2MBase& other)
2830
{
2931
if (this != &other) { // protect against invalid self-assignment

source/m2mdevice.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "mbed-trace/mbed_trace.h"
2323

2424
#define BUFFER_SIZE 21
25+
#define TRACE_GROUP "mClt"
2526

2627
M2MDevice* M2MDevice::_instance = NULL;
2728

source/m2mfirmware.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "mbed-client/m2mresource.h"
2222

2323
#define BUFFER_SIZE 21
24+
#define TRACE_GROUP "mClt"
2425

2526
M2MFirmware* M2MFirmware::_instance = NULL;
2627

source/m2minterfacefactory.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "include/m2minterfaceimpl.h"
2424
#include "mbed-trace/mbed_trace.h"
2525

26+
#define TRACE_GROUP "mClt"
27+
2628
M2MInterface* M2MInterfaceFactory::create_interface(M2MInterfaceObserver &observer,
2729
const String &endpoint_name,
2830
const String &endpoint_type,

source/m2minterfaceimpl.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include "mbed-client/m2mtimer.h"
2626
#include "mbed-trace/mbed_trace.h"
2727

28+
#define TRACE_GROUP "mClt"
29+
2830
M2MInterfaceImpl::M2MInterfaceImpl(M2MInterfaceObserver& observer,
2931
const String &ep_name,
3032
const String &ep_type,
@@ -178,7 +180,7 @@ void M2MInterfaceImpl::register_object(M2MSecurity *security, const M2MObjectLis
178180

179181
void M2MInterfaceImpl::update_registration(M2MSecurity *security_object, const uint32_t lifetime)
180182
{
181-
tr_debug("M2MInterfaceImpl::update_registration(M2MSecurity *security,const uint32_t lifetime) - IN");
183+
tr_debug("M2MInterfaceImpl::update_registration - IN");
182184
// Transition to a new state based upon
183185
// the current state of the state machine
184186
if(lifetime != 0 && (lifetime < MINIMUM_REGISTRATION_TIME)) {
@@ -213,10 +215,10 @@ void M2MInterfaceImpl::update_registration(M2MSecurity *security_object, const u
213215
_observer.error(M2MInterface::NotAllowed);
214216
}
215217
} else {
216-
tr_debug("M2MInterfaceImpl::update_registration(M2MSecurity *security,const M2MObjectList &object_list) - NOT ALLOWED");
218+
tr_debug("M2MInterfaceImpl::update_registration - NOT ALLOWED");
217219
_observer.error(M2MInterface::NotAllowed);
218220
}
219-
tr_debug("M2MInterfaceImpl::update_registration(M2MSecurity *security,const uint32_t lifetime) - OUT");
221+
tr_debug("M2MInterfaceImpl::update_registration - OUT");
220222
}
221223

222224
void M2MInterfaceImpl::unregister_object(M2MSecurity* /*security*/)

0 commit comments

Comments
 (0)