This section refers to the following sample application(s):
|
The 00-hello
sample application contains a task dedicated at driving the local interface module by continuously calling the dnm_loc_processNotifications() function. To simplify the code of all sample applications, this task, together with the other required initialization code listed in A First Application, is put in the following helper modules:
common/loc_task.c
handles the common code for interfacing with the local interface module.common/cli_task.c
handles the common code for interfacing with the CLI module.These helper modules are included in all sample applications.
cli_task
helper module
This helper module deals with the CLI, and avoids duplicated code across sample applications. |
NULL
to not register additional CLI commands. This module:
loc_task
helper moduleThis helper module deals with joining a network and requesting a service, and avoids duplicated code across sample applications. |
To use this module, your application needs to call the loc_task_init() function. It takes the following parameters:
JOIN_NO
to not join.NETID_NONE
if you don't want to overwrite the one already present in the mote.UDPPORT_NONE
if you do not want to create a socket.loc_task
helper module is done joining the network. Pass NULL
if you don't need this functionality.loc_task
helper module to request after it has joined. Pass BANDWIDTH_NONE
if you don't require additional bandwidth.loc_task
helper module has been granted that additional bandwidth. Pass NULL
if you don't need this functionality.loc_task
helper module allows the sample applications to perform these routine actions by calling a single function.
You cannot use the |
00-hello_common
Sample Application00-hello
sample application, but relies on the cli_task
and loc_task
to initialize the CLI and 00-hello_common
sample application, a first banner prints the name of the application and the version. A second banner prints the version of the
> hello_common app, ver 1.0.0.1 SmartMeshIP stack, ver 1.2.1.3 > > help help <command> Commands: mtrace mset mget minfo mlog mfs mseti mgeti mshow mxtal mhwlog > |