def processKeepAliveMessage(self, label, trickleCount, batteryVoltage, capacity):
    n = self.getNode(label)
    if (n != None):
        n.updateTrickleCount(trickleCount)
        n.updateBatteryVoltage(batteryVoltage)
        n.updateBatteryCapacity(capacity)
        n.online = True
    else:
        n = Node(label, trickleCount)
        n.updateBatteryVoltage(batteryVoltage)
        n.updateBatteryCapacity(capacity)
        self.addNode(n)
    if (len(self.__trickleQueue) != 0):
        if self.__trickleCheck():
            self.__expTrickle = ((self.__netMaxTrickle + 1) % MAX_TRICKLE_C_VALUE)
            message = self.__trickleQueue.popleft()
            send_serial_msg(message)
            self.addPrint('[APPLICATION] Trickle message: 0x {0} automatically sent'.format(message.hex()))
    else:
        self.__trickleCheck()
    self.printNetworkStatus()
def processKeepAliveMessage(self, label, trickleCount, batteryVoltage, capacity):
    n = self.getNode(label)
    if (n != None):
        n.updateTrickleCount(trickleCount)
        n.updateBatteryVoltage(batteryVoltage)
        n.updateBatteryCapacity(capacity)
        n.online = True
    else:
        n = Node(label, trickleCount)
        n.updateBatteryVoltage(batteryVoltage)
        n.updateBatteryCapacity(capacity)
        self.addNode(n)
    if (len(self.__trickleQueue) != 0):
        if self.__trickleCheck():
            self.__expTrickle = ((self.__netMaxTrickle + 1) % MAX_TRICKLE_C_VALUE)
            message = self.__trickleQueue.popleft()
            send_serial_msg(message)
            self.addPrint('[APPLICATION] Trickle message: 0x {0} automatically sent'.format(message.hex()))
    else:
        self.__trickleCheck()
    self.printNetworkStatus()