IEBSubscriber/iebsubscriber/agent.py
def on_match_device_status_update_rtu(self, topic, headers, message, match):
        '''Handle message and send to browser.'''
        print os.path.basename(__file__)+"@on_match_device_status_update"
        print "message:"+str(message)
        device_info = topic.split('/')
        device_id = device_info[6]
        device_type = device_info[5]
        page_load_helper.page_load(device_id, device_type, message[0])
        _log.debug("Topic: {topic}, Headers: {headers}, "
                         "Message: {message}".format(
                         topic=topic, headers=headers, message=message))
        topic = topic.split('/')
        topic_to_tcp = '/ui/web/'+topic[5]+'/'+topic[4]+'/'+topic[6]+'/'+topic[7]+'/'+topic[8]
        print topic_to_tcp
        self.publish(str(topic_to_tcp), headers, str(message))
Handle message and send to browser.
Handle message and send to browser.
Handle message and send to browser .
def on_match_device_status_update_rtu(self, topic, headers, message, match):
        print os.path.basename(__file__)+"@on_match_device_status_update"
        print "message:"+str(message)
        device_info = topic.split('/')
        device_id = device_info[6]
        device_type = device_info[5]
        page_load_helper.page_load(device_id, device_type, message[0])
        _log.debug("Topic: {topic}, Headers: {headers}, "
                         "Message: {message}".format(
                         topic=topic, headers=headers, message=message))
        topic = topic.split('/')
        topic_to_tcp = '/ui/web/'+topic[5]+'/'+topic[4]+'/'+topic[6]+'/'+topic[7]+'/'+topic[8]
        print topic_to_tcp
        self.publish(str(topic_to_tcp), headers, str(message))
def on_match_device_status_update_rtu ( self , topic , headers , message , match ) : print os . path . basename ( __file__ ) + "@on_match_device_status_update" print "message:" + str ( message ) device_info = topic . split ( '/' ) device_id = device_info [ 6 ] device_type = device_info [ 5 ] page_load_helper . page_load ( device_id , device_type , message [ 0 ] ) _log . debug ( "Topic: {topic}, Headers: {headers}, " "Message: {message}" . format ( topic = topic , headers = headers , message = message ) ) topic = topic . split ( '/' ) topic_to_tcp = '/ui/web/' + topic [ 5 ] + '/' + topic [ 4 ] + '/' + topic [ 6 ] + '/' + topic [ 7 ] + '/' + topic [ 8 ] print topic_to_tcp self . publish ( str ( topic_to_tcp ) , headers , str ( message ) )
Handle message and send to browser.
Handle message and send to browser .
'''Handle message and send to browser.'''
self
topic
headers
message
match