Info |
---|
This section refers to the following sample application(s):
|
...
Info |
---|
This application is new to OCSDK 1.2.0 |
Your application can register callback functions to handle a number of notifications generated by the OCSDK stack. The 01-events sample demonstrates handling event notifications - the application will attempt to join and print event notifications as they come in. There are additional samples that demonstrate handling of other types of notifications:
...
The 01-event
sample application uses the Helper Modules to initialize the CLI Module and for interaction with the local interface. Because the application installs an event handler, the local module does not receive the boot event, and so the application must handle all local module tasks (, such as joining, on its own. Note that this prevents the local module from printing the stack version banner.
...
app_vars
global variables struct, and prints the event notification. In a more complex design, it might copy the event notification, and post a semaphore for action by another task - e.g. storing persistent configuration when a disconnect event is received. Note that as Info |
---|
As with other APIs, the event notification fields are sent in network order |
and therefore must be swapped for use in your application (e.g. for printing or testing). |