This section refers to the following sample application(s):

  • 00-hello
  • 00-hello_common

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:

These helper modules are included in all sample applications.

The cli_task helper module

 

This helper module deals with the CLI, and avoids duplicated code across sample applications.

 

To use this module, your application needs to call the cli_task_init() function. It takes the following parameters:

This module:

The loc_task helper module

This 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:

This module will then:
The loc_task helper module allows the sample applications to perform these routine actions by calling a single function.

 

You cannot use the loc_task module in combination with the autojoin CLI settings. If you set autojoin to 1, the loc_task helper module will not be able to join a network.

 

The 00-hello_common Sample Application

This sample application is similar to the 00-hello sample application, but relies on the cli_task and loc_task to initialize the CLI and .
When running the 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
>