version of nsdl to work with lwm2m, updated RD parameters and location option handling

Dependents:   ArchPro_LWM2M_LED_Client Weather_Station_LWM2M mbedEndpointNetwork

Fork of nanoservice_client_1_12 by Zach Shelby

Committer:
michaeljkoster
Date:
Mon Apr 13 22:13:40 2015 +0000
Revision:
10:b5ecd6660d71
Parent:
0:aafd54b05111
Add error return from sn_nsdl_register_endpoint() in sn_nsdl.c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
zdshelby 0:aafd54b05111 1 /**
zdshelby 0:aafd54b05111 2 * \file sn_coap_header_internal.h
zdshelby 0:aafd54b05111 3 *
zdshelby 0:aafd54b05111 4 * \brief Header file for CoAP Header part
zdshelby 0:aafd54b05111 5 *
zdshelby 0:aafd54b05111 6 * Created on: Jun 30, 2011
zdshelby 0:aafd54b05111 7 * Author: tero
zdshelby 0:aafd54b05111 8 *
zdshelby 0:aafd54b05111 9 * \note Supports draft-ietf-core-coap-18
zdshelby 0:aafd54b05111 10 */
zdshelby 0:aafd54b05111 11
zdshelby 0:aafd54b05111 12 #ifdef __cplusplus
zdshelby 0:aafd54b05111 13 extern "C" {
zdshelby 0:aafd54b05111 14 #endif
zdshelby 0:aafd54b05111 15
zdshelby 0:aafd54b05111 16 #ifndef SN_COAP_HEADER_INTERNAL_H_
zdshelby 0:aafd54b05111 17 #define SN_COAP_HEADER_INTERNAL_H_
zdshelby 0:aafd54b05111 18
zdshelby 0:aafd54b05111 19 /* * * * * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 20 /* * * * GLOBAL DECLARATIONS * * * */
zdshelby 0:aafd54b05111 21 /* * * * * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 22
zdshelby 0:aafd54b05111 23 extern void* (*sn_coap_malloc)(uint16_t); /* Function pointer for used malloc() function */
zdshelby 0:aafd54b05111 24 extern void (*sn_coap_free)(void*); /* Function pointer for used free() function */
zdshelby 0:aafd54b05111 25
zdshelby 0:aafd54b05111 26 /* * * * * * * * * * * */
zdshelby 0:aafd54b05111 27 /* * * * DEFINES * * * */
zdshelby 0:aafd54b05111 28 /* * * * * * * * * * * */
zdshelby 0:aafd54b05111 29
zdshelby 0:aafd54b05111 30 #define COAP_VERSION COAP_VERSION_1 /* Tells which IETF CoAP specification version the CoAP message supports. */
zdshelby 0:aafd54b05111 31 /* This value is written to CoAP message header part. */
zdshelby 0:aafd54b05111 32
zdshelby 0:aafd54b05111 33 /* CoAP Header defines */
zdshelby 0:aafd54b05111 34 #define COAP_HEADER_LENGTH 4 /* Fixed Header length of CoAP message as bytes */
zdshelby 0:aafd54b05111 35 #define COAP_HEADER_VERSION_MASK 0xC0
zdshelby 0:aafd54b05111 36 #define COAP_HEADER_MSG_TYPE_MASK 0x30
zdshelby 0:aafd54b05111 37 #define COAP_HEADER_TOKEN_LENGTH_MASK 0x0F
zdshelby 0:aafd54b05111 38 #define COAP_HEADER_MSG_ID_MSB_SHIFT 8
zdshelby 0:aafd54b05111 39
zdshelby 0:aafd54b05111 40 /* CoAP Options defines */
zdshelby 0:aafd54b05111 41 #define COAP_OPTIONS_OPTION_NUMBER_SHIFT 4
zdshelby 0:aafd54b05111 42
zdshelby 0:aafd54b05111 43 /* * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 44 /* * * * ENUMERATIONS * * * */
zdshelby 0:aafd54b05111 45 /* * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 46
zdshelby 0:aafd54b05111 47 /* * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 48 /* * * * STRUCTURES * * * */
zdshelby 0:aafd54b05111 49 /* * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 50
zdshelby 0:aafd54b05111 51 /**
zdshelby 0:aafd54b05111 52 * \brief This structure is returned by sn_coap_exec() for sending
zdshelby 0:aafd54b05111 53 */
zdshelby 0:aafd54b05111 54 typedef struct sn_nsdl_transmit_
zdshelby 0:aafd54b05111 55 {
zdshelby 0:aafd54b05111 56 sn_nsdl_addr_s *dst_addr_ptr;
zdshelby 0:aafd54b05111 57
zdshelby 0:aafd54b05111 58 sn_nsdl_capab_e protocol;
zdshelby 0:aafd54b05111 59
zdshelby 0:aafd54b05111 60 uint16_t packet_len;
zdshelby 0:aafd54b05111 61 uint8_t *packet_ptr;
zdshelby 0:aafd54b05111 62 } sn_nsdl_transmit_s;
zdshelby 0:aafd54b05111 63
zdshelby 0:aafd54b05111 64 /* * * * * * * * * * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 65 /* * * * EXTERNAL FUNCTION PROTOTYPES * * * */
zdshelby 0:aafd54b05111 66 /* * * * * * * * * * * * * * * * * * * * * * */
zdshelby 0:aafd54b05111 67 extern int8_t sn_coap_header_validity_check(sn_coap_hdr_s *src_coap_msg_ptr, coap_version_e coap_version);
zdshelby 0:aafd54b05111 68
zdshelby 0:aafd54b05111 69 #endif /* SN_COAP_HEADER_INTERNAL_H_ */
zdshelby 0:aafd54b05111 70
zdshelby 0:aafd54b05111 71 #ifdef __cplusplus
zdshelby 0:aafd54b05111 72 }
zdshelby 0:aafd54b05111 73 #endif
zdshelby 0:aafd54b05111 74