SmartMeshSDK
 All Classes Namespaces Functions Variables Groups
SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe Class Reference

Notification listener for IpMgrConnectorMux object. More...

+ Inheritance diagram for SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe:

Classes

class  SubscribeError
 

Public Member Functions

def __init__
 
def start
 Start the subscriber _thread. More...
 
def subscribe
 Subscribe to notification(s). More...
 

Static Public Attributes

string FINISH = "finish"
 
string NOTIFEVENT = "notifEvent"
 
string NOTIFLOG = "notifLog"
 
string NOTIFDATA = "notifData"
 
string NOTIFIPDATA = "notifIpData"
 
string NOTIFHEALTHREPORT = "notifHealthReport"
 
list ALLNOTIF = [NOTIFEVENT, NOTIFLOG, NOTIFDATA, NOTIFIPDATA, NOTIFHEALTHREPORT]
 
string EVENTMOTERESET = "eventMoteReset"
 
string EVENTNETWORKRESET = "eventNetworkReset"
 
string EVENTCOMMANDFINISHED = "eventCommandFinished"
 
string EVENTMOTEJOIN = "eventMoteJoin"
 
string EVENTMOTEOPERATIONAL = "eventMoteOperational"
 
string EVENTMOTELOST = "eventMoteLost"
 
string EVENTNETWORKTIME = "eventNetworkTime"
 
string EVENTPINGRESPONSE = "eventPingResponse"
 
string EVENTPATHCREATE = "eventPathCreate"
 
string EVENTPATHDELETE = "eventPathDelete"
 
string EVENTPACKETSENT = "eventPacketSent"
 
string EVENTMOTECREATE = "eventMoteCreate"
 
string EVENTMOTEDELETE = "eventMoteDelete"
 

Detailed Description

Notification listener for IpMgrConnectorMux object.

Constructor & Destructor Documentation

def SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.__init__ (   self,
  ipMgrConnector 
)

Member Function Documentation

def SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.start (   self)

Start the subscriber _thread.

def SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.subscribe (   self,
  notifTypes,
  fun,
  isRlbl 
)

Subscribe to notification(s).

Calling this function multiple times will not cancel the effects of the previous calls.

Precondition
Call start() before calling this function.
Parameters
notifTypesType(s) of notification(s) to subscribe to. This can be a single string (when subscribing to a single notification), or a list of strings (when subscribing to multiple notifications). The list of possible types is: ERROR, FINISH, NOTIFEVENT, NOTIFLOG, NOTIFDATA, NOTIFIPDATA, NOTIFHEALTHREPORT, ALLNOTIF
funThe function to call when any of the notification types specified in the notifTypes parameter occurs. If you wish to assign a different _callback function to different notification types, call this function multiple times. The signature of the function needs to be fun(<notification name>, <notification parameter>), as described below.
isRlbldefine type of transport using for delivery notification: reliable (True) or best effort (False) The _callback function is called with a notification name and a notification parameter. Depending on the type of notification, the parameter will be of a different format, according to the table below.
Notification Name Parameter
ERROR Exception
FINISH ''
NOTIFLOG Tuple_notifLog
NOTIFDATA Tuple_notifData
NOTIFIPDATA Tuple_notifIpData
NOTIFHEALTHREPORT Tuple_notifHealthReport
EVENTMOTERESET Tuple_eventMoteReset
EVENTNETWORKRESET Tuple_eventNetworkReset
EVENTCOMMANDFINISHEDTuple_eventCommandFinished
EVENTMOTEJOIN Tuple_eventMoteJoin
EVENTMOTEOPERATIONALTuple_eventMoteOperational
EVENTMOTELOST Tuple_eventMoteLost
EVENTNETWORKTIME Tuple_eventNetworkTime
EVENTPINGRESPONSE Tuple_eventPingResponse
EVENTPATHCREATE Tuple_eventPathCreate
EVENTPATHDELETE Tuple_eventPathDelete
EVENTPACKETSENT Tuple_eventPacketSent
EVENTMOTECREATE Tuple_eventMoteCreate
EVENTMOTEDELETE Tuple_eventMoteDelete
Exceptions
IpMgrSubscribe.SubscribeErrorThe subscriber hasn't been started, or the notification type(s) specified is (are) not valid.

Member Data Documentation

list SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.ALLNOTIF = [NOTIFEVENT, NOTIFLOG, NOTIFDATA, NOTIFIPDATA, NOTIFHEALTHREPORT]
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTCOMMANDFINISHED = "eventCommandFinished"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTECREATE = "eventMoteCreate"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTEDELETE = "eventMoteDelete"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTEJOIN = "eventMoteJoin"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTELOST = "eventMoteLost"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTEOPERATIONAL = "eventMoteOperational"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTMOTERESET = "eventMoteReset"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTNETWORKRESET = "eventNetworkReset"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTNETWORKTIME = "eventNetworkTime"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTPACKETSENT = "eventPacketSent"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTPATHCREATE = "eventPathCreate"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTPATHDELETE = "eventPathDelete"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.EVENTPINGRESPONSE = "eventPingResponse"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.FINISH = "finish"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.NOTIFDATA = "notifData"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.NOTIFEVENT = "notifEvent"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.NOTIFHEALTHREPORT = "notifHealthReport"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.NOTIFIPDATA = "notifIpData"
static
string SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.NOTIFLOG = "notifLog"
static