Ejemplo n.º 1
0
def newDhcpTable(message):

    logger.debugf("newDhcpTable BEGIN")

    jstr = message.payload.decode()

    logger.debugf("Msg=%s=", jstr)

    ConfigListOfDict.fromJsonStr(jstr)  #start using the new DHCP table

    ConfigListOfDict.getInstance().updateMyCfgDict(hostName, activeNIF,
                                                   mySysType)

    debugWriteConfigFileUpd(Constants.CFG_FILE_NAME_DEBUG_SLAVE)

    # subscribe to all messages directed to me at my MAc address
    mmacAddr = activeNIF.getMacAddrAsHexStr()

    mqtt.message_callback_add(mmacAddr, on_topic_MacAddressCallback)

    mqtt.subscribe(mmacAddr)

    # subscribe to all messages directed to me at my Title
    # my Title should be the same as my GPS address
    gps = ConfigListOfDict.getInstance().getTitle(mmacAddr, mySysType)

    globalGps.setGps(gps)

    mqtt.message_callback_add(globalGps.getGps(), on_topic_GpsAddressCallback)

    mqtt.subscribe(gps)

    logger.debugf("newDhcpTable END")

    return
def newDhcpTable(message):

    logger.debugf("newDhcpTable BEGIN")

    jstr = message.payload.decode()

    logger.debugf("Msg=%s=", jstr)

    ConfigListOfDict.fromJsonStr(jstr)  #start using the new DHCP table

    ConfigListOfDict.getInstance().updateMyCfgDict(
        hostName, activeNIF, Constants.CFG_VALUE_SYS_TYPE_MONITOR)

    debugWriteConfigFileUpd(Constants.CFG_FILE_NAME_DEBUG_MONITOR)

    logger.debugf("newDhcpTable END")

    return
Ejemplo n.º 3
0
def newDhcpTable(message):

    logger.debugf("newDhcpTable BEGIN")

    jstr = message.payload.decode()

    logger.debugf("Msg=%s=", jstr)

    dhclofd = ConfigListOfDict.fromJsonStr(jstr) #start using the new DHCP table

    dhclofd.updateMyCfgDict(hostName, activeNIF, mySysType)

    setDhcpConfigLofD(dhclofd)


                    # subscribe to all messages directed to me at my MAc address
    macAddr = activeNIF.getMacAddrAsHexStr()

    mqtt.message_callback_add(macAddr, on_topic_MacAddressCallback)

    mqtt.subscribe(macAddr)


                    # subscribe to all messages directed to me at my GPS address
    #gps = dhclofd.getGps(macAddr, mySysType)
    
                    # subscribe to all messages directed to me at my Title
                    # my Title should be the same as my GPS address
    gps = dhclofd.getTitle(macAddr, mySysType)

    globalGps.setGps(gps)

    mqtt.message_callback_add(globalGps.getGps(), on_topic_GpsAddressCallback)

    mqtt.subscribe(gps)


    #sendSignonMessageRsp()   fle::send signon rsp to master?????

    logger.debugf("newDhcpTable END")

    return
Ejemplo n.º 4
0
def newDhcpTable(message):

    logger.debugf("newDhcpTable BEGIN")

    jstr = message.payload.decode()

    logger.debugf("Msg=%s=" % jstr)

    dclofd = ConfigListOfDict.fromJsonStr(
        jstr)  #start using the new DHCP table

    dclofd.updateMyCfgDict(hostName, activeNIF, mySysType)

    debugWriteConfigFileUpd(Constants.CFG_FILE_NAME_DEBUG_MASTER)

    sendSignOnToSlaves()

    logger.debugf("newDhcpTable END")

    return