Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
5668100d
Commit
5668100d
authored
6 years ago
by
Hauke Petersen
Browse files
Options
Downloads
Patches
Plain Diff
examples/rdcli_simple: rename to cord_epsim
parent
226b9fa3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/cord_epsim/Makefile
+4
-4
4 additions, 4 deletions
examples/cord_epsim/Makefile
examples/cord_epsim/README.md
+7
-7
7 additions, 7 deletions
examples/cord_epsim/README.md
examples/cord_epsim/main.c
+4
-4
4 additions, 4 deletions
examples/cord_epsim/main.c
with
15 additions
and
15 deletions
examples/
rdcli_simple
/Makefile
→
examples/
cord_epsim
/Makefile
+
4
−
4
View file @
5668100d
# name of your application
# name of your application
APPLICATION
=
rdcli_simple
APPLICATION
=
cord_epsim
# If no BOARD is found in the environment, use this default:
# If no BOARD is found in the environment, use this default:
BOARD
?=
native
BOARD
?=
native
...
@@ -40,8 +40,8 @@ RD_LT ?= 60
...
@@ -40,8 +40,8 @@ RD_LT ?= 60
RD_ADDR
?=
\"
ff02::1
\"
RD_ADDR
?=
\"
ff02::1
\"
RD_PORT
?=
5683
RD_PORT
?=
5683
CFLAGS
+=
-DRD
CLI
_LT
=
$(
RD_LT
)
CFLAGS
+=
-D
CO
RD_LT
=
$(
RD_LT
)
CFLAGS
+=
-DRD
CLI
_SERVER_ADDR
=
$(
RD_ADDR
)
CFLAGS
+=
-D
CO
RD_SERVER_ADDR
=
$(
RD_ADDR
)
CFLAGS
+=
-DRD
CLI
_SERVER_PORT
=
$(
RD_PORT
)
CFLAGS
+=
-D
CO
RD_SERVER_PORT
=
$(
RD_PORT
)
include
$(RIOTBASE)/Makefile.include
include
$(RIOTBASE)/Makefile.include
This diff is collapsed.
Click to expand it.
examples/
rdcli_simple
/README.md
→
examples/
cord_epsim
/README.md
+
7
−
7
View file @
5668100d
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
This example shows how a node can register with a CoRE resource directory using
the simple registration proce
ss
as described in
the simple registration proce
dure
as described in
draft-ietf-core-resource-directory-1
1
, section 5.3.
2
.
draft-ietf-core-resource-directory-1
5
, section 5.3.
1
.
The registration process needs an endpoint name as well as a lifetime for the
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
registry entry.
These are statically defined during compile time and you can
`RDCLI
_LT`
:
edit these values by overriding
`CORD_EP`
and
`CORD
_LT`
:
```
```
CFLAGS="-DRD
CLI
_LT=\"7200\" -DRD
CLI
_EP=\"MyNode\"" make all
CFLAGS="-D
CO
RD_LT=\"7200\" -D
CO
RD_EP=\"MyNode\"" make all
```
```
Per default, the node is looking for the CoRE RD at the all nodes link-local
Per default, the node is looking for the CoRE RD at the all nodes link-local
...
...
This diff is collapsed.
Click to expand it.
examples/
rdcli_simple
/main.c
→
examples/
cord_epsim
/main.c
+
4
−
4
View file @
5668100d
...
@@ -68,17 +68,17 @@ int main(void)
...
@@ -68,17 +68,17 @@ int main(void)
/* fill riot info */
/* fill riot info */
sprintf
(
riot_info
,
"{
\"
ep
\"
:
\"
%s
\"
,
\"
lt
\"
:%u}"
,
sprintf
(
riot_info
,
"{
\"
ep
\"
:
\"
%s
\"
,
\"
lt
\"
:%u}"
,
cord_common_get_ep
(),
RD
CLI
_LT
);
cord_common_get_ep
(),
CO
RD_LT
);
/* register resource handlers with gcoap */
/* register resource handlers with gcoap */
gcoap_register_listener
(
&
listener
);
gcoap_register_listener
(
&
listener
);
/* print RD client information */
/* print RD client information */
puts
(
"RD client information:"
);
puts
(
"RD client information:"
);
printf
(
" RD addr: %s
\n
"
,
RD
CLI
_SERVER_ADDR
);
printf
(
" RD addr: %s
\n
"
,
CO
RD_SERVER_ADDR
);
printf
(
" RD port: %u
\n
"
,
(
unsigned
)
RD
CLI
_SERVER_PORT
);
printf
(
" RD port: %u
\n
"
,
(
unsigned
)
CO
RD_SERVER_PORT
);
printf
(
" ep: %s
\n
"
,
cord_common_get_ep
());
printf
(
" ep: %s
\n
"
,
cord_common_get_ep
());
printf
(
" lt: %is
\n
"
,
(
int
)
RD
CLI
_LT
);
printf
(
" lt: %is
\n
"
,
(
int
)
CO
RD_LT
);
/* run the shell */
/* run the shell */
char
line_buf
[
SHELL_DEFAULT_BUFSIZE
];
char
line_buf
[
SHELL_DEFAULT_BUFSIZE
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment