Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This application was added in REL-1.1.0.

Introduction

This example script subscribes to all notifications and prints them by the category and the type receivedof each notification. 

The script connects to a Manager the VManager using the Python library and does the following:

  • Prompts the user for Vmanager lP the VManager IP address 
  • Subscribes to all notifications
  • Prints out each notification type received

It connects to:

  • The SmartMesh IP VManager

...

  • By double-clicking on its source files at /vmanager_apps/VMgr_AllNotifications.py (may require additional steps on non-windows OSes)


Code Blocknoformat
VMgr_AllNotifications Example (c) Dust Networks
SmartMesh SDK 1.1.0.1

Enter the IP address of the manager (e.g. 10.70.48.69 ): 10.70.7.104

==== Subscribing to all notifications

 Waiting for notifications from mote, Press any key to stop
 Data notification --> Type=dataPacketReceived
 Data notification --> Type=dataPacketReceived
 Data notification --> Type=dataPacketReceived
 Data notification --> Type=dataPacketReceived
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
   HR notification --> Type=discoveryHealthReport
   HR notification --> Type=rawMoteNotification
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
       Event notification --> Type=pathStateChanged
   HR notification --> Type=discoveryHealthReport
   HR notification --> Type=discoveryHealthReport
       Event notification --> Type=pathStateChanged
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
       Event notification --> Type=pathStateChanged
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport
 Data notification --> Type=dataPacketReceived
 Data notification --> Type=dataPacketReceived
   HR notification --> Type=discoveryHealthReport

Script ended normally