Exemple #1
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr) + " | destAddr = " + helpers.addressToString(
             self.destAddr) + " | destPanID = " + hex(
                 self.destPanID) + " | counter = " + str(
                     self.counter) + " | unknown = " + str(
                         self.unknown) + " | data = " + self.data.hex() + (
                             " ('" + self.data.decode('utf-8').replace(
                                 "\r\n", "\\r\\n") + "')" if
                             utils.isPrintable(self.data) else "") + " >>"
Exemple #2
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr) + " | srcPanID = " + hex(
             self.srcPanID) + " | destAddr = " + helpers.addressToString(
                 self.destAddr) + " | destPanID = " + hex(
                     self.destPanID) + " | reason = " + (
                         hex(self.reason) if self.reason >= len(
                             ZigbeeDisassociationNotification.reasonMessage)
                         else ZigbeeDisassociationNotification.
                         reasonMessage[self.reason]) + " >>"
Exemple #3
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr) + " | destAddr = " + helpers.addressToString(
             self.destAddr) + " | destPanID = " + hex(
                 self.destPanID) + " | assignedAddr = " + (
                     hex(self.assignedAddr) if self.assignedAddr != 0xFFFF
                     else "none") + " | status = " + (
                         hex(self.status) if self.status >= len(
                             ZigbeeAssociationResponse.statusMessage) else
                         ZigbeeAssociationResponse.statusMessage[
                             self.status]) + " >>"
Exemple #4
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr) + " | destAddr = " + helpers.addressToString(
             self.destAddr) + " | srcPanID = " + hex(
                 self.srcPanID
             ) + " | destPanID = " + hex(self.destPanID) + (
                 " | allocateAddress = " +
                 ("yes" if self.allocateAddress else "no") +
                 " | securityCapability = " +
                 ("yes" if self.securityCapability else "no") +
                 " | receiverOnWhenIdle = " +
                 ("yes" if self.receiverOnWhenIdle else "no") +
                 " | powerSource = " +
                 ("yes" if self.powerSource else "no") +
                 " | deviceType = " + ("yes" if self.deviceType else "no") +
                 " | alternatePanCoordinator = " +
                 ("yes" if self.alternatePanCoordinator else "no")) + " >>"
Exemple #5
0
	def toString(self):
		return "<< "+self.name +" | srcAddr = "+helpers.addressToString(self.srcAddr)+" | destAddr = "+helpers.addressToString(self.destAddr)+" | destPanID = "+hex(self.destPanID)+" | data = "+self.data.hex()+(
		" | frameCounter = "+str(self.frameCounter) +
		" | keyType = "+(ZigbeeApplicationEncryptedData.keyTypes[self.keyType] if self.keyType is not None and self.keyType < len(ZigbeeApplicationEncryptedData.keyTypes) else str(self.keyType)+"(unknown)") +
		" | securityLevel = "+(ZigbeeApplicationEncryptedData.securityLevels[self.securityLevel] if self.securityLevel is not None and self.securityLevel < len(ZigbeeApplicationEncryptedData.securityLevels) else str(self.securityLevel)+"(unknown)") +
		(" | source = "+self.source if self.source is not None else "") +
		(" | keySequenceNumber = "+str(self.keySequenceNumber) if self.keySequenceNumber is not None else "") +
		(" | mic = "+self.mic.hex() if self.mic != b"" else "")
		)+" >>"
Exemple #6
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr
     ) + " | srcPanID = " + hex(self.srcPanID) + " | assocPermit = " + (
         "yes" if self.assocPermit else "no") + " | coordinator = " + (
             "yes" if self.coordinator else "no") + (
                 "" if not self.payload else " | routerCapacity = " +
                 ("yes" if self.routerCapacity else "no") +
                 " | endDeviceCapacity = " +
                 ("yes" if self.endDeviceCapacity else "no") +
                 " | extendedPanID = " + hex(self.extendedPanID)) + " >>"
Exemple #7
0
 def toString(self):
     return "<< " + self.name + " | srcAddr = " + helpers.addressToString(
         self.srcAddr) + " | destAddr = " + helpers.addressToString(
             self.destAddr) + " | destPanID = " + hex(
                 self.destPanID) + " | data = " + self.data.hex() + " >>"