moved CoAP, LWM2M and IPSO Objects
This commit is contained in:
parent
69581dffe2
commit
08613960e2
@ -1,2 +0,0 @@
|
||||
# Erbium will implement the REST Engine
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
@ -6,9 +6,9 @@ all: $(CONTIKI_PROJECT)
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
APPS += er-coap
|
||||
APPS += oma-lwm2m
|
||||
APPS += ipso-objects
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/services/lwm2m
|
||||
MODULES += os/services/ipso-objects
|
||||
|
||||
CONTIKI=../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
@ -37,8 +37,8 @@
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "lwm2m-engine.h"
|
||||
#include "ipso-objects.h"
|
||||
#include "services/lwm2m/lwm2m-engine.h"
|
||||
#include "services/ipso-objects/ipso-objects.h"
|
||||
|
||||
#define DEBUG DEBUG_NONE
|
||||
#include "net/ip/uip-debug.h"
|
||||
|
@ -35,7 +35,7 @@
|
||||
* Niclas Finne <nfi@sics.se>
|
||||
*/
|
||||
|
||||
#include "ipso-objects.h"
|
||||
#include "services/ipso-objects/ipso-objects.h"
|
||||
#include "lib/random.h"
|
||||
|
||||
static int32_t last_value = 27000;
|
||||
|
@ -14,10 +14,8 @@ PROJECTDIRS += .. ../../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
|
||||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
APPS += er-coap
|
||||
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
@ -14,8 +14,7 @@ PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
APPS += er-coap
|
||||
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
@ -24,7 +24,7 @@ PROJECTDIRS += $(REST_RESOURCES_DIR)
|
||||
PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
||||
|
||||
# REST Engine shall use Erbium CoAP implementation
|
||||
APPS += er-coap
|
||||
MODULE += coap
|
||||
|
||||
CONTIKI_WITH_RPL = 0
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-block1.h"
|
||||
#include "coap.h"
|
||||
#include "coap-block1.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -40,7 +40,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "er-coap-engine.h"
|
||||
#include "coap-engine.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -40,11 +40,11 @@
|
||||
#define ER_COAP_ENGINE_H_
|
||||
|
||||
#include "pt.h"
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "er-coap-observe.h"
|
||||
#include "er-coap-separate.h"
|
||||
#include "er-coap-observe-client.h"
|
||||
#include "coap.h"
|
||||
#include "coap-transactions.h"
|
||||
#include "coap-observe.h"
|
||||
#include "coap-separate.h"
|
||||
#include "coap-observe-client.h"
|
||||
|
||||
#define SERVER_LISTEN_PORT UIP_HTONS(COAP_SERVER_PORT)
|
||||
|
@ -40,8 +40,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-observe-client.h"
|
||||
#include "coap.h"
|
||||
#include "coap-observe-client.h"
|
||||
|
||||
/* Compile this code only if client-side support for CoAP Observe is required */
|
||||
#if COAP_OBSERVE_CLIENT
|
@ -40,8 +40,8 @@
|
||||
#ifndef COAP_OBSERVING_CLIENT_H_
|
||||
#define COAP_OBSERVING_CLIENT_H_
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "coap.h"
|
||||
#include "coap-transactions.h"
|
||||
|
||||
#ifndef COAP_OBSERVE_CLIENT
|
||||
#define COAP_OBSERVE_CLIENT 0
|
||||
@ -115,7 +115,7 @@ coap_observee_t *coap_obs_request_registration(uip_ipaddr_t *addr,
|
||||
notification_callback_t
|
||||
notification_callback,
|
||||
void *data);
|
||||
/* TODO: this function may be moved to er-coap.c */
|
||||
/* TODO: this function may be moved to coap.c */
|
||||
uint8_t coap_generate_token(uint8_t **token_ptr);
|
||||
|
||||
#endif /* COAP_OBSERVING_CLIENT_H_ */
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "er-coap-observe.h"
|
||||
#include "coap-observe.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -39,8 +39,8 @@
|
||||
#ifndef COAP_OBSERVE_H_
|
||||
#define COAP_OBSERVE_H_
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "coap.h"
|
||||
#include "coap-transactions.h"
|
||||
#include "stimer.h"
|
||||
|
||||
#define COAP_OBSERVER_URL_LEN 20
|
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "er-coap-engine.h"
|
||||
#include "coap-engine.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -39,8 +39,8 @@
|
||||
#include "sys/cc.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "er-coap-separate.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "coap-separate.h"
|
||||
#include "coap-transactions.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -39,7 +39,7 @@
|
||||
#ifndef COAP_SEPARATE_H_
|
||||
#define COAP_SEPARATE_H_
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "coap.h"
|
||||
|
||||
typedef struct coap_separate {
|
||||
|
@ -38,8 +38,8 @@
|
||||
|
||||
#include "contiki.h"
|
||||
#include "contiki-net.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "er-coap-observe.h"
|
||||
#include "coap-transactions.h"
|
||||
#include "coap-observe.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -39,7 +39,7 @@
|
||||
#ifndef COAP_TRANSACTIONS_H_
|
||||
#define COAP_TRANSACTIONS_H_
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "coap.h"
|
||||
|
||||
/*
|
||||
* Modulo mask (thus +1) for a random number to get the tick number for the random
|
@ -42,8 +42,8 @@
|
||||
#include "sys/cc.h"
|
||||
#include "contiki-net.h"
|
||||
|
||||
#include "er-coap.h"
|
||||
#include "er-coap-transactions.h"
|
||||
#include "coap.h"
|
||||
#include "coap-transactions.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
@ -883,7 +883,7 @@ coap_set_header_proxy_uri(void *packet, const char *uri)
|
||||
{
|
||||
coap_packet_t *const coap_pkt = (coap_packet_t *)packet;
|
||||
|
||||
/*TODO Provide alternative that sets Proxy-Scheme and Uri-* options and provide er-coap-conf define */
|
||||
/*TODO Provide alternative that sets Proxy-Scheme and Uri-* options and provide coap-conf define */
|
||||
|
||||
coap_pkt->proxy_uri = uri;
|
||||
coap_pkt->proxy_uri_len = strlen(uri);
|
@ -41,8 +41,8 @@
|
||||
|
||||
#include <stddef.h> /* for size_t */
|
||||
#include "contiki-net.h"
|
||||
#include "er-coap-constants.h"
|
||||
#include "er-coap-conf.h"
|
||||
#include "coap-constants.h"
|
||||
#include "coap-conf.h"
|
||||
|
||||
/* sanity check for configured values */
|
||||
#define COAP_MAX_PACKET_SIZE (COAP_MAX_HEADER_SIZE + REST_MAX_CHUNK_SIZE)
|
@ -45,14 +45,8 @@
|
||||
#include "contiki-lib.h"
|
||||
#include "rest-constants.h"
|
||||
|
||||
/* list of valid REST Enigne implementations */
|
||||
#define REGISTERED_ENGINE_ERBIUM coap_rest_implementation
|
||||
#define REGISTERED_ENGINE_HELIUM http_rest_implementation
|
||||
|
||||
/* sanity check for configured implementation */
|
||||
#if !defined(REST) || (REST != REGISTERED_ENGINE_ERBIUM && REST != REGISTERED_ENGINE_HELIUM)
|
||||
#error "Define a valid REST Engine implementation (REST define)!"
|
||||
#endif
|
||||
/* NOTE: this will be removed - now it is always set to erbium CoAP implementation */
|
||||
#define REST coap_rest_implementation
|
||||
|
||||
/*
|
||||
* The maximum buffer size that is provided for resource responses and must be respected due to the limited IP buffer.
|
@ -44,7 +44,7 @@
|
||||
#include "contiki.h"
|
||||
#include "lwm2m-object.h"
|
||||
#include "lwm2m-engine.h"
|
||||
#include "er-coap-engine.h"
|
||||
#include "coap-engine.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
@ -44,7 +44,7 @@
|
||||
|
||||
#include "lwm2m-object.h"
|
||||
#include "lwm2m-engine.h"
|
||||
#include "er-coap-engine.h"
|
||||
#include "coap-engine.h"
|
||||
#include "dev/leds.h"
|
||||
#include <stdint.h>
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "ipso-objects.h"
|
||||
#include "lwm2m-object.h"
|
||||
#include "lwm2m-engine.h"
|
||||
#include "er-coap-engine.h"
|
||||
#include "coap-engine.h"
|
||||
|
||||
#ifdef IPSO_TEMPERATURE
|
||||
extern const struct ipso_objects_sensor IPSO_TEMPERATURE;
|
@ -47,9 +47,9 @@
|
||||
#include "lwm2m-device.h"
|
||||
#include "lwm2m-plain-text.h"
|
||||
#include "lwm2m-json.h"
|
||||
#include "rest-engine.h"
|
||||
#include "er-coap-constants.h"
|
||||
#include "er-coap-engine.h"
|
||||
#include "net/app-layer/coap/rest-engine.h"
|
||||
#include "net/app-layer/coap/coap-constants.h"
|
||||
#include "net/app-layer/coap/coap-engine.h"
|
||||
#include "oma-tlv.h"
|
||||
#include "oma-tlv-reader.h"
|
||||
#include "oma-tlv-writer.h"
|
@ -51,8 +51,8 @@
|
||||
#ifndef LWM2M_OBJECT_H_
|
||||
#define LWM2M_OBJECT_H_
|
||||
|
||||
#include "rest-engine.h"
|
||||
#include "er-coap-observe.h"
|
||||
#include "net/app-layer/coap/rest-engine.h"
|
||||
#include "net/app-layer/coap/coap-observe.h"
|
||||
|
||||
#define LWM2M_OBJECT_SECURITY_ID 0
|
||||
#define LWM2M_OBJECT_SERVER_ID 1
|
Loading…
Reference in New Issue
Block a user