mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Moved all rime channel definitions to the shell-rime.h file
This commit is contained in:
parent
d0f8770263
commit
cab149cad0
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-netfile.c,v 1.4 2008/07/03 21:14:29 adamdunkels Exp $
|
* $Id: shell-netfile.c,v 1.5 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -167,6 +167,7 @@ shell_netfile_init(void)
|
|||||||
shell_register_command(&netfile_command);
|
shell_register_command(&netfile_command);
|
||||||
shell_register_command(&recvnetfile_command);
|
shell_register_command(&recvnetfile_command);
|
||||||
|
|
||||||
rudolph0_open(&rudolph0_conn, 26, &rudolph0_callbacks);
|
rudolph0_open(&rudolph0_conn, SHELL_RIME_CHANNEL_NETFILE,
|
||||||
|
&rudolph0_callbacks);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-rime-debug.c,v 1.1 2008/07/04 08:23:00 adamdunkels Exp $
|
* $Id: shell-rime-debug.c,v 1.2 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,8 +212,10 @@ static const struct unicast_callbacks unicast_callbacks = {recv_uc};
|
|||||||
void
|
void
|
||||||
shell_rime_debug_init(void)
|
shell_rime_debug_init(void)
|
||||||
{
|
{
|
||||||
unicast_open(&uc, 14, &unicast_callbacks);
|
unicast_open(&uc, SHELL_RIME_CHANNEL_UNICAST,
|
||||||
broadcast_open(&broadcast, 15, &broadcast_callbacks);
|
&unicast_callbacks);
|
||||||
|
broadcast_open(&broadcast, SHELL_RIME_CHANNEL_BROADCAST,
|
||||||
|
&broadcast_callbacks);
|
||||||
shell_register_command(&broadcast_command);
|
shell_register_command(&broadcast_command);
|
||||||
shell_register_command(&unicast_command);
|
shell_register_command(&unicast_command);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-rime-netcmd.c,v 1.3 2008/07/07 23:22:38 adamdunkels Exp $
|
* $Id: shell-rime-netcmd.c,v 1.4 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,7 +160,8 @@ const static struct trickle_callbacks trickle_callbacks = { recv_trickle };
|
|||||||
void
|
void
|
||||||
shell_rime_netcmd_init(void)
|
shell_rime_netcmd_init(void)
|
||||||
{
|
{
|
||||||
trickle_open(&trickle, CLOCK_SECOND * 4, 28, &trickle_callbacks);
|
trickle_open(&trickle, CLOCK_SECOND * 4, SHELL_RIME_CHANNEL_NETCMD,
|
||||||
|
&trickle_callbacks);
|
||||||
shell_register_command(&netcmd_command);
|
shell_register_command(&netcmd_command);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-rime-ping.c,v 1.3 2008/07/02 15:02:33 matsutsuka Exp $
|
* $Id: shell-rime-ping.c,v 1.4 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -158,7 +158,7 @@ CC_CONST_FUNCTION static struct mesh_callbacks mesh_callbacks = { recv_mesh,
|
|||||||
void
|
void
|
||||||
shell_rime_ping_init(void)
|
shell_rime_ping_init(void)
|
||||||
{
|
{
|
||||||
mesh_open(&mesh, 19, &mesh_callbacks);
|
mesh_open(&mesh, SHELL_RIME_CHANNEL_PING, &mesh_callbacks);
|
||||||
|
|
||||||
shell_register_command(&ping_command);
|
shell_register_command(&ping_command);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-rime.h,v 1.1 2008/02/04 23:42:17 adamdunkels Exp $
|
* $Id: shell-rime.h,v 1.2 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,4 +45,28 @@
|
|||||||
|
|
||||||
void shell_rime_init(void);
|
void shell_rime_init(void);
|
||||||
|
|
||||||
|
/* Rime channel used by the 'unicast' debug command, which uses 1 channel */
|
||||||
|
#define SHELL_RIME_CHANNEL_UNICAST 20
|
||||||
|
|
||||||
|
/* Rime channel used by the 'broadcast' debug command, which uses 1 channel */
|
||||||
|
#define SHELL_RIME_CHANNEL_BROADCAST SHELL_RIME_CHANNEL_UNICAST + 1
|
||||||
|
|
||||||
|
/* Rime channel used by the 'nodes' command, which uses 1 channel */
|
||||||
|
#define SHELL_RIME_CHANNEL_NODES SHELL_RIME_CHANNEL_BROADCAST + 1
|
||||||
|
|
||||||
|
/* Rime channel used by the 'collect' command, which uses 2 channels */
|
||||||
|
#define SHELL_RIME_CHANNEL_COLLECT SHELL_RIME_CHANNEL_NODES + 1
|
||||||
|
|
||||||
|
/* Rime channel used by the 'ping' command, which uses 3 channels */
|
||||||
|
#define SHELL_RIME_CHANNEL_PING SHELL_RIME_CHANNEL_COLLECT + 2
|
||||||
|
|
||||||
|
/* Rime channel used by the 'netcmd' command, which uses 1 channels */
|
||||||
|
#define SHELL_RIME_CHANNEL_NETCMD SHELL_RIME_CHANNEL_PING + 3
|
||||||
|
|
||||||
|
/* Rime channel used by the 'netfile' command, which uses 2 channels */
|
||||||
|
#define SHELL_RIME_CHANNEL_NETFILE SHELL_RIME_CHANNEL_NETCMD + 1
|
||||||
|
|
||||||
|
/* Rime channel used by the 'sendtest' command, which uses 1 channels */
|
||||||
|
#define SHELL_RIME_CHANNEL_SENDTEST SHELL_RIME_CHANNEL_NETFILE + 2
|
||||||
|
|
||||||
#endif /* __SHELL_RIME_H__ */
|
#endif /* __SHELL_RIME_H__ */
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell-sendtest.c,v 1.2 2008/03/03 16:10:09 adamdunkels Exp $
|
* $Id: shell-sendtest.c,v 1.3 2008/08/15 18:58:42 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,7 +170,7 @@ PROCESS_THREAD(shell_sendtest_process, ev, data)
|
|||||||
void
|
void
|
||||||
shell_sendtest_init(void)
|
shell_sendtest_init(void)
|
||||||
{
|
{
|
||||||
rucb_open(&rucb, 22, &rucb_callbacks);
|
rucb_open(&rucb, SHELL_RIME_CHANNEL_SENDTEST, &rucb_callbacks);
|
||||||
shell_register_command(&sendtest_command);
|
shell_register_command(&sendtest_command);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
Loading…
Reference in New Issue
Block a user