From 5668100dc3b29973c19c0ee31d0e0c82b2e34606 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 15 Oct 2018 10:53:41 +0200 Subject: [PATCH] examples/rdcli_simple: rename to cord_epsim --- examples/{rdcli_simple => cord_epsim}/Makefile | 8 ++++---- examples/{rdcli_simple => cord_epsim}/README.md | 14 +++++++------- examples/{rdcli_simple => cord_epsim}/main.c | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) rename examples/{rdcli_simple => cord_epsim}/Makefile (91%) rename examples/{rdcli_simple => cord_epsim}/README.md (54%) rename examples/{rdcli_simple => cord_epsim}/main.c (91%) diff --git a/examples/rdcli_simple/Makefile b/examples/cord_epsim/Makefile similarity index 91% rename from examples/rdcli_simple/Makefile rename to examples/cord_epsim/Makefile index cf10e75118..f40884bdeb 100644 --- a/examples/rdcli_simple/Makefile +++ b/examples/cord_epsim/Makefile @@ -1,5 +1,5 @@ # name of your application -APPLICATION = rdcli_simple +APPLICATION = cord_epsim # If no BOARD is found in the environment, use this default: BOARD ?= native @@ -40,8 +40,8 @@ RD_LT ?= 60 RD_ADDR ?= \"ff02::1\" RD_PORT ?= 5683 -CFLAGS += -DRDCLI_LT=$(RD_LT) -CFLAGS += -DRDCLI_SERVER_ADDR=$(RD_ADDR) -CFLAGS += -DRDCLI_SERVER_PORT=$(RD_PORT) +CFLAGS += -DCORD_LT=$(RD_LT) +CFLAGS += -DCORD_SERVER_ADDR=$(RD_ADDR) +CFLAGS += -DCORD_SERVER_PORT=$(RD_PORT) include $(RIOTBASE)/Makefile.include diff --git a/examples/rdcli_simple/README.md b/examples/cord_epsim/README.md similarity index 54% rename from examples/rdcli_simple/README.md rename to examples/cord_epsim/README.md index 3fb6139133..811e7591d2 100644 --- a/examples/rdcli_simple/README.md +++ b/examples/cord_epsim/README.md @@ -1,15 +1,15 @@ -CoRE Resource Directory: Simple Registration Example -==================================================== +CoRE Resource Directory: Simple Endpoint Example +================================================ This example shows how a node can register with a CoRE resource directory using -the simple registration process as described in -draft-ietf-core-resource-directory-11, section 5.3.2. +the simple registration procedure as described in +draft-ietf-core-resource-directory-15, section 5.3.1. The registration process needs an endpoint name as well as a lifetime for the -registry entry. You can edit these values by overriding `RDCLI_EP` and -`RDCLI_LT`: +registry entry. These are statically defined during compile time and you can +edit these values by overriding `CORD_EP` and `CORD_LT`: ``` -CFLAGS="-DRDCLI_LT=\"7200\" -DRDCLI_EP=\"MyNode\"" make all +CFLAGS="-DCORD_LT=\"7200\" -DCORD_EP=\"MyNode\"" make all ``` Per default, the node is looking for the CoRE RD at the all nodes link-local diff --git a/examples/rdcli_simple/main.c b/examples/cord_epsim/main.c similarity index 91% rename from examples/rdcli_simple/main.c rename to examples/cord_epsim/main.c index 24726dcd21..99a4dd446f 100644 --- a/examples/rdcli_simple/main.c +++ b/examples/cord_epsim/main.c @@ -68,17 +68,17 @@ int main(void) /* fill riot info */ sprintf(riot_info, "{\"ep\":\"%s\",\"lt\":%u}", - cord_common_get_ep(), RDCLI_LT); + cord_common_get_ep(), CORD_LT); /* register resource handlers with gcoap */ gcoap_register_listener(&listener); /* print RD client information */ puts("RD client information:"); - printf(" RD addr: %s\n", RDCLI_SERVER_ADDR); - printf(" RD port: %u\n", (unsigned)RDCLI_SERVER_PORT); + printf(" RD addr: %s\n", CORD_SERVER_ADDR); + printf(" RD port: %u\n", (unsigned)CORD_SERVER_PORT); printf(" ep: %s\n", cord_common_get_ep()); - printf(" lt: %is\n", (int)RDCLI_LT); + printf(" lt: %is\n", (int)CORD_LT); /* run the shell */ char line_buf[SHELL_DEFAULT_BUFSIZE];