Skip to content

Update mbed-client-c version 3.0.4 #3500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 288 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-client-c/CHANGELOG.md

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-client-c/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Makefile for combined NSDL+COAP library
#

# Define compiler toolchain with CC or PLATFORM variables
# Example (GCC toolchains, default $CC and $AR are used)
# make
#
# OR (Cross-compile GCC toolchain)
# make PLATFORM=arm-linux-gnueabi-
#
# OR (armcc/Keil)
# make CC=armcc AR=ArmAR
#
# OR (IAR-ARM)
# make CC=iccarm

LIB = libnsdl.a
SRCS := \
source/libNsdl/src/sn_grs.c \
source/libNsdl/src/sn_nsdl.c \
source/libCoap/src/sn_coap_protocol.c \
source/libCoap/src/sn_coap_parser.c \
source/libCoap/src/sn_coap_header_check.c \
source/libCoap/src/sn_coap_builder.c \

override CFLAGS += -DVERSION='"$(VERSION)"'

override CFLAGS += -Isource/libNsdl/src/include/
override CFLAGS += -Isource/libCoap/src/include/
SERVLIB_DIR := ../libService
override CFLAGS += -I$(SERVLIB_DIR)/libService
override CFLAGS += -Insdl-c/

include ../libService/toolchain_rules.mk

$(eval $(call generate_rules,$(LIB),$(SRCS)))

.PHONY: release
release:
7z a nsdl-c_$(VERSION).zip *.a *.lib include

.PHONY: deploy_to
deploy_to: all
tar --transform 's,^,nsdl-c/,' --append -f $(TO) *.a nsdl-c
5 changes: 3 additions & 2 deletions features/FEATURE_COMMON_PAL/mbed-client-c/module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mbed-client-c",
"version": "3.0.2",
"version": "3.0.4",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has the version jumped 2 patch versions instead of one ?

"description": "Nanostack NSDL and COAP library",
"keywords": [
"coap",
Expand All @@ -14,7 +14,8 @@
],
"dependencies": {
"nanostack-libservice": "^3.0.0",
"mbed-trace": ">=0.2.0,<2.0.0"
"mbed-trace": ">=0.2.0,<2.0.0",
"nanostack-randlib": "^1.2.0"
},
"targetDependencies": {}
}
38 changes: 38 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-client-c/nsdl-c/sn_nsdl_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
#ifndef SN_NSDL_LIB_H_
#define SN_NSDL_LIB_H_

#ifdef MBED_CLIENT_C_NEW_API

#include "nsdl-c/sn_nsdl_lib2.h"

#else

#include "ns_list.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -723,8 +729,40 @@ extern int8_t sn_nsdl_set_block_size(struct nsdl_s *handle, uint16_t block_size)
*/
extern int8_t sn_nsdl_set_duplicate_buffer_size(struct nsdl_s *handle, uint8_t message_count);

/**
* \fn void *sn_nsdl_set_context(const struct nsdl_s *handle, void *context)
*
* \brief Set the application defined context parameter for given handle.
* This is useful for example when interfacing with c++ objects where a
* pointer to object is set as the context, and in the callback functions
* the context pointer can be used to call methods for the correct instance
* of the c++ object.
*
* \param *handle Pointer to library handle
* \param *context Pointer to the application defined context
* \return 0 = success, -1 = failure
*/
extern int8_t sn_nsdl_set_context(struct nsdl_s * const handle, void * const context);

/**
* \fn void *sn_nsdl_get_context(const struct nsdl_s *handle)
*
* \brief Get the application defined context parameter for given handle.
* This is useful for example when interfacing with c++ objects where a
* pointer to object is set as the context, and in the callback functions
* the context pointer can be used to call methods for the correct instance
* of the c++ object.
*
* \param *handle Pointer to library handle
* \return Pointer to the application defined context
*/
extern void *sn_nsdl_get_context(const struct nsdl_s * const handle);

#ifdef __cplusplus
}
#endif

#endif /* MBED_CLIENT_C_NEW_API */


#endif /* SN_NSDL_LIB_H_ */
Loading