1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/rpl_udp/rpl_udp.h
Lucas Jenss 426170b064 Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00

109 lines
2.2 KiB
C

/*
* Copyright (C) 2014 Oliver Hahm <oliver.hahm@inria.fr>
*
* 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
* directory for more details.
*/
#ifndef RPL_UDP_H
#define RPL_UDP_H
#ifdef __cplusplus
extern "C" {
#endif
#define APP_VERSION "1.2"
#define RADIO_CHANNEL (10)
#define MONITOR_STACK_SIZE (THREAD_STACKSIZE_MAIN)
#define RCV_BUFFER_SIZE (32)
/* RPL shell command handlers */
/**
* @brief Shell command to initializes RPL and UDP
*
* @details Usage: init <r|n>
* `init r` will initialize the node as a RPL root node,
* `init n` as a RPL node.
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int rpl_udp_init(int argc, char **argv);
/**
* @brief Shell command to set node's ID
*
* @details Usage: set <ID>
* Set the node address
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int rpl_udp_set_id(int argc, char **argv);
/**
* @brief Shows the dodag
*
* @details No parameters required
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int rpl_udp_dodag(int argc, char **argv);
/**
* @brief Command handler to start a UDP server
*
* @details No parameters required
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int udp_server(int argc, char **argv);
/**
* @brief Sends a UDP datagram
*
* @details Usage: send <ID> <TEXT>
* Sends TEXT to the node with IP address:
* fe80::ff:fe00:<ID>
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int udp_send(int argc, char **argv);
/**
* @brief Ignore a certain node
*
* @details Usage: ignore <ID>
* Ignore the node with IP address:
* fe80::ff:fe00:<ID>
*
* @param[in] argc Argument count
* @param[in] argv Arguments
*/
int rpl_udp_ignore(int argc, char **argv);
/**
* @brief monitoring thread start function
*
* @param arg Unused
*/
void *rpl_udp_monitor(void *arg);
/** @brief The nodes radio address */
extern radio_address_t id;
/** @brief Char array for IP address printing */
extern char addr_str[IPV6_MAX_ADDR_STR_LEN];
#ifdef __cplusplus
}
#endif
#endif /* RPL_UDP_H */