Notification listener for IpMgrConnectorMux object.
More...
Notification listener for IpMgrConnectorMux object.
def SmartMeshSDK.IpMgrConnectorMux.IpMgrSubscribe.IpMgrSubscribe.__init__ |
( |
|
self, |
|
|
|
ipMgrConnector |
|
) |
| |
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
-
notifTypes | Type(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 |
fun | The 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. |
isRlbl | define 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 |
EVENTCOMMANDFINISHED | Tuple_eventCommandFinished |
EVENTMOTEJOIN | Tuple_eventMoteJoin |
EVENTMOTEOPERATIONAL | Tuple_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
-
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 |