original_docstring:  Send ACK if packet is valid 
docstring: Send ACK if packet is valid
docstring_tokens: Send ACK if packet is valid
code: def pmSendAck(self, type_of_ack = False):
          """ Send ACK if packet is valid """
          lastType = self.pmLastPDU[1]
          #normalMode = (lastType >= 0x80) or ((lastType < 0x10) and (self.pmLastPDU[len(self.pmLastPDU) - 2] == 0x43))
  
          log.debug("[sending ack] Sending an ack back to Alarm powerlink = {0}{1}".format(self.pmPowerlinkMode, type_of_ack))
          # There are 2 types of acknowledge that we can send to the panel
          #    Normal    : For a normal message
          #    Powerlink : For when we are in powerlink mode
          if self.pmPowerlinkMode or type_of_ack:   # type_of_ack is True when panel has sent us an AB message
              #self.transport.write(bytearray.fromhex('0D 02 43 BA 0A'))
              message = pmSendMsg["MSG_ACKLONG"]
              assert(message is not None)
              e = VisonicListEntry(command = message, options = None)
              self.pmSendPdu(e)
          else:
              #self.transport.write(bytearray.fromhex('0D 02 FD 0A'))
              message = pmSendMsg["MSG_ACK"]
              assert(message is not None)
              e = VisonicListEntry(command = message, options = None)
              self.pmSendPdu(e)
          #yield from asyncio.sleep(0.25)
          sleep(0.1)
code_tokens: def pmSendAck ( self , type_of_ack = False ) : lastType = self . pmLastPDU [ 1 ] log . debug ( "[sending ack] Sending an ack back to Alarm powerlink = {0}{1}" . format ( self . pmPowerlinkMode , type_of_ack ) ) if self . pmPowerlinkMode or type_of_ack : message = pmSendMsg [ "MSG_ACKLONG" ] assert ( message is not None ) e = VisonicListEntry ( command = message , options = None ) self . pmSendPdu ( e ) else : message = pmSendMsg [ "MSG_ACK" ] assert ( message is not None ) e = VisonicListEntry ( command = message , options = None ) self . pmSendPdu ( e ) sleep ( 0.1 )
short_docstring: Send ACK if packet is valid
short_docstring_tokens: Send ACK if packet is valid
comment: """ Send ACK if packet is valid """$SEP$#normalMode = (lastType >= 0x80) or ((lastType < 0x10) and (self.pmLastPDU[len(self.pmLastPDU) - 2] == 0x43))$SEP$# There are 2 types of acknowledge that we can send to the panel$SEP$#    Normal    : For a normal message$SEP$#    Powerlink : For when we are in powerlink mode$SEP$# type_of_ack is True when panel has sent us an AB message$SEP$#self.transport.write(bytearray.fromhex('0D 02 43 BA 0A'))$SEP$#self.transport.write(bytearray.fromhex('0D 02 FD 0A'))$SEP$#yield from asyncio.sleep(0.25)