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
cfe4370a
Commit
cfe4370a
authored
6 years ago
by
Hauke Petersen
Browse files
Options
Downloads
Patches
Plain Diff
sys/shell/rdcli: rename to sc_cord_ep.c
parent
18cc7ee3
No related branches found
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
sys/shell/commands/Makefile
+2
-2
2 additions, 2 deletions
sys/shell/commands/Makefile
sys/shell/commands/sc_cord_ep.c
+16
-16
16 additions, 16 deletions
sys/shell/commands/sc_cord_ep.c
sys/shell/commands/shell_commands.c
+4
-4
4 additions, 4 deletions
sys/shell/commands/shell_commands.c
with
22 additions
and
22 deletions
sys/shell/commands/Makefile
+
2
−
2
View file @
cfe4370a
...
@@ -66,8 +66,8 @@ endif
...
@@ -66,8 +66,8 @@ endif
ifneq
(,$(filter conn_can,$(USEMODULE)))
ifneq
(,$(filter conn_can,$(USEMODULE)))
SRC
+=
sc_can.c
SRC
+=
sc_can.c
endif
endif
ifneq
(,$(filter
rdcli
,$(USEMODULE)))
ifneq
(,$(filter
cord_ep
,$(USEMODULE)))
SRC
+=
sc_
rdcli
.c
SRC
+=
sc_
cord_ep
.c
endif
endif
ifneq
(,$(filter periph_rtc,$(FEATURES_PROVIDED)))
ifneq
(,$(filter periph_rtc,$(FEATURES_PROVIDED)))
...
...
This diff is collapsed.
Click to expand it.
sys/shell/commands/sc_
rdcli
.c
→
sys/shell/commands/sc_
cord_ep
.c
+
16
−
16
View file @
cfe4370a
/*
/*
* Copyright (C) 2017 Freie Universität Berlin
* Copyright (C) 2017
-2018
Freie Universität Berlin
*
*
* This file is subject to the terms and conditions of the GNU Lesser
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* General Public License v2.1. See the file LICENSE in the top level
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* @{
* @{
*
*
* @file
* @file
* @brief Shell commands for the
rdcli
module
* @brief Shell commands for the
cord_ep
module
*
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
*
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
#include
"net/
rdcli
.h"
#include
"net/
cord/ep
.h"
#include
"net/nanocoap.h"
#include
"net/nanocoap.h"
#include
"net/sock/util.h"
#include
"net/sock/util.h"
#include
"net/cord/config.h"
#include
"net/cord/config.h"
...
@@ -40,7 +40,7 @@ static int make_sock_ep(sock_udp_ep_t *ep, const char *addr)
...
@@ -40,7 +40,7 @@ static int make_sock_ep(sock_udp_ep_t *ep, const char *addr)
return
0
;
return
0
;
}
}
int
_
rdcli
_handler
(
int
argc
,
char
**
argv
)
int
_
cord_ep
_handler
(
int
argc
,
char
**
argv
)
{
{
int
res
;
int
res
;
...
@@ -60,12 +60,12 @@ int _rdcli_handler(int argc, char **argv)
...
@@ -60,12 +60,12 @@ int _rdcli_handler(int argc, char **argv)
regif
=
argv
[
3
];
regif
=
argv
[
3
];
}
}
puts
(
"Registering with RD now, this may take a short while..."
);
puts
(
"Registering with RD now, this may take a short while..."
);
if
(
rdcli
_register
(
&
remote
,
regif
)
!=
RDCLI
_OK
)
{
if
(
cord_ep
_register
(
&
remote
,
regif
)
!=
CORD_EP
_OK
)
{
puts
(
"error: registration failed"
);
puts
(
"error: registration failed"
);
}
}
else
{
else
{
puts
(
"registration successful
\n
"
);
puts
(
"registration successful
\n
"
);
rdcli
_dump_status
();
cord_ep
_dump_status
();
}
}
}
}
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"discover"
)
==
0
))
{
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"discover"
)
==
0
))
{
...
@@ -79,7 +79,7 @@ int _rdcli_handler(int argc, char **argv)
...
@@ -79,7 +79,7 @@ int _rdcli_handler(int argc, char **argv)
printf
(
"error: unable to parse address
\n
"
);
printf
(
"error: unable to parse address
\n
"
);
return
1
;
return
1
;
}
}
if
(
rdcli
_discover_regif
(
&
remote
,
regif
,
sizeof
(
regif
))
==
RDCLI
_OK
)
{
if
(
cord_ep
_discover_regif
(
&
remote
,
regif
,
sizeof
(
regif
))
==
CORD_EP
_OK
)
{
printf
(
"the registration interface is '%s'
\n
"
,
regif
);
printf
(
"the registration interface is '%s'
\n
"
,
regif
);
}
}
else
{
else
{
...
@@ -87,14 +87,14 @@ int _rdcli_handler(int argc, char **argv)
...
@@ -87,14 +87,14 @@ int _rdcli_handler(int argc, char **argv)
}
}
}
}
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"update"
)
==
0
))
{
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"update"
)
==
0
))
{
res
=
rdcli
_update
();
res
=
cord_ep
_update
();
if
(
res
==
RDCLI
_OK
)
{
if
(
res
==
CORD_EP
_OK
)
{
puts
(
"RD update successful"
);
puts
(
"RD update successful"
);
}
}
else
if
(
res
==
RDCLI
_NORD
)
{
else
if
(
res
==
CORD_EP
_NORD
)
{
puts
(
"error: not associated with any RD"
);
puts
(
"error: not associated with any RD"
);
}
}
else
if
(
res
==
RDCLI
_TIMEOUT
)
{
else
if
(
res
==
CORD_EP
_TIMEOUT
)
{
puts
(
"error: unable to reach RD - dropped association"
);
puts
(
"error: unable to reach RD - dropped association"
);
}
}
else
{
else
{
...
@@ -102,14 +102,14 @@ int _rdcli_handler(int argc, char **argv)
...
@@ -102,14 +102,14 @@ int _rdcli_handler(int argc, char **argv)
}
}
}
}
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"remove"
)
==
0
))
{
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"remove"
)
==
0
))
{
res
=
rdcli
_remove
();
res
=
cord_ep
_remove
();
if
(
res
==
RDCLI
_OK
)
{
if
(
res
==
CORD_EP
_OK
)
{
puts
(
"node successfully removed from RD"
);
puts
(
"node successfully removed from RD"
);
}
}
else
if
(
res
==
RDCLI
_NORD
)
{
else
if
(
res
==
CORD_EP
_NORD
)
{
puts
(
"error: not associated with any RD"
);
puts
(
"error: not associated with any RD"
);
}
}
else
if
(
res
==
RDCLI
_TIMEOUT
)
{
else
if
(
res
==
CORD_EP
_TIMEOUT
)
{
puts
(
"error: unable to reach RD - remove association only locally"
);
puts
(
"error: unable to reach RD - remove association only locally"
);
}
}
else
{
else
{
...
@@ -117,7 +117,7 @@ int _rdcli_handler(int argc, char **argv)
...
@@ -117,7 +117,7 @@ int _rdcli_handler(int argc, char **argv)
}
}
}
}
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"info"
)
==
0
))
{
else
if
((
argc
>
1
)
&&
(
strcmp
(
argv
[
1
],
"info"
)
==
0
))
{
rdcli
_dump_status
();
cord_ep
_dump_status
();
}
}
else
{
else
{
printf
(
"usage: %s <register|discover|update|remove|info>
\n
"
,
printf
(
"usage: %s <register|discover|update|remove|info>
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
sys/shell/commands/shell_commands.c
+
4
−
4
View file @
cfe4370a
...
@@ -142,8 +142,8 @@ extern int _ls_handler(int argc, char **argv);
...
@@ -142,8 +142,8 @@ extern int _ls_handler(int argc, char **argv);
extern
int
_can_handler
(
int
argc
,
char
**
argv
);
extern
int
_can_handler
(
int
argc
,
char
**
argv
);
#endif
#endif
#ifdef MODULE_
RDCLI
#ifdef MODULE_
CORD_EP
extern
int
_
rdcli
_handler
(
int
argc
,
char
**
argv
);
extern
int
_
cord_ep
_handler
(
int
argc
,
char
**
argv
);
#endif
#endif
const
shell_command_t
_shell_command_list
[]
=
{
const
shell_command_t
_shell_command_list
[]
=
{
...
@@ -237,8 +237,8 @@ const shell_command_t _shell_command_list[] = {
...
@@ -237,8 +237,8 @@ const shell_command_t _shell_command_list[] = {
#ifdef MODULE_CONN_CAN
#ifdef MODULE_CONN_CAN
{
"can"
,
"CAN commands"
,
_can_handler
},
{
"can"
,
"CAN commands"
,
_can_handler
},
#endif
#endif
#ifdef MODULE_
RDCLI
#ifdef MODULE_
CORD_EP
{
"
rdcli"
,
"CoAP RD clie
nt commands"
,
_
rdcli
_handler
},
{
"
cord_ep"
,
"Resource directory endpoi
nt commands"
,
_
cord_ep
_handler
},
#endif
#endif
{
NULL
,
NULL
,
NULL
}
{
NULL
,
NULL
,
NULL
}
};
};
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