1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

demo: rename functions to avoid collisions

This commit is contained in:
Christian Mehlis 2014-01-18 01:14:23 +01:00
parent b6734ce2cb
commit dfc87026d7
4 changed files with 24 additions and 24 deletions

View File

@ -16,47 +16,47 @@
*
* @param[in] str Shell input
*/
void init(char *str);
void rpl_udp_init(char *str);
/**
* @brief Shell command to set node's ID
*
* @param[in] str Shell input
*/
void set_id(char *id);
void rpl_udp_set_id(char *id);
/**
* @brief Loops through the routing table
*
* @param[in] unused Guess what
*/
void loop(char *unused);
void rpl_udp_loop(char *unused);
/**
* @brief Shows the routing table
*
* @param[in] unused Guess what
*/
void table(char *unused);
void rpl_udp_table(char *unused);
/**
* @brief Shows the dodag
*
* @param[in] unused Guess what
*/
void dodag(char *unused);
void rpl_udp_dodag(char *unused);
/* UDP shell command handlers */
void udp_server(char *unused);
void udp_send(char *str);
/* helper command handlers */
void ip(char *unused);
void rpl_udp_ip(char *unused);
void ignore(char *addr);
void rpl_udp_ignore(char *addr);
/* monitoring thread */
void monitor(void);
void rpl_udp_monitor(void);
extern radio_address_t id;
extern ipv6_addr_t std_addr;

View File

@ -20,13 +20,13 @@ extern uint8_t ipv6_ext_hdr_len;
msg_t msg_q[RCV_BUFFER_SIZE];
/* prints current IPv6 adresses */
void ip(char *unused)
void rpl_udp_ip(char *unused)
{
(void) unused;
ipv6_iface_print_addrs();
}
void set_id(char *id_str)
void rpl_udp_set_id(char *id_str)
{
int res = sscanf(id_str, "set %hu", &id);
@ -40,7 +40,7 @@ void set_id(char *id_str)
printf("Set node ID to %u\n", id);
}
void monitor(void)
void rpl_udp_monitor(void)
{
msg_t m;
radio_packet_t *p;
@ -95,7 +95,7 @@ void monitor(void)
transceiver_command_t tcmd;
void ignore(char *addr) {
void rpl_udp_ignore(char *addr) {
uint16_t a;
if (transceiver_pid < 0) {
puts("Transceiver not runnning.");

View File

@ -10,15 +10,15 @@
#include "demo.h"
const shell_command_t shell_commands[] = {
{"init", "Initialize network", init},
{"set", "Set ID", set_id},
{"table", "", table},
{"dodag", "", dodag},
{"loop", "", loop},
{"init", "Initialize network", rpl_udp_init},
{"set", "Set ID", rpl_udp_set_id},
{"table", "Shows the routing table", rpl_udp_table},
{"dodag", "Shows the dodag", rpl_udp_dodag},
{"loop", "", rpl_udp_loop},
{"server", "Starts a UDP server", udp_server},
{"send", "Send a UDP datagram", udp_send},
{"ip", "Print all assigned IP addresses", ip},
{"ign", "ignore node", ignore},
{"ip", "Print all assigned IP addresses", rpl_udp_ip},
{"ign", "ignore node", rpl_udp_ignore},
{NULL, NULL, NULL}
};

View File

@ -20,7 +20,7 @@ ipv6_addr_t std_addr;
uint8_t is_root = 0;
void init(char *str)
void rpl_udp_init(char *str)
{
transceiver_command_t tcmd;
msg_t m;
@ -61,7 +61,7 @@ void init(char *str)
else {
ipv6_iface_set_routing_provider(rpl_get_next_hop);
}
int monitor_pid = thread_create(monitor_stack_buffer, MONITOR_STACK_SIZE, PRIORITY_MAIN-2, CREATE_STACKTEST, monitor, "monitor");
int monitor_pid = thread_create(monitor_stack_buffer, MONITOR_STACK_SIZE, PRIORITY_MAIN-2, CREATE_STACKTEST, rpl_udp_monitor, "monitor");
transceiver_register(TRANSCEIVER, monitor_pid);
ipv6_register_packet_handler(monitor_pid);
//sixlowpan_lowpan_register(monitor_pid);
@ -95,7 +95,7 @@ void init(char *str)
/* start transceiver watchdog */
}
void loop(char *unused)
void rpl_udp_loop(char *unused)
{
(void) unused;
@ -136,7 +136,7 @@ void loop(char *unused)
printf("########################\n");
}
void table(char *unused)
void rpl_udp_table(char *unused)
{
(void) unused;
@ -162,7 +162,7 @@ void table(char *unused)
printf("$\n");
}
void dodag(char *unused)
void rpl_udp_dodag(char *unused)
{
(void) unused;