original_docstring:  Send a request to the panel to Arm/Disarm 
docstring: Send a request to the panel to Arm/Disarm
docstring_tokens: Send a request to the panel to Arm / Disarm
code: def RequestArm(self, state, pin = ""):
          """ Send a request to the panel to Arm/Disarm """
          isValidPL, bpin = self.pmGetPin(pin)
          armCode = None
          armCodeA = bytearray()
          if state in pmArmMode_t:
              armCode = pmArmMode_t[state]
              armCodeA.append(armCode)
  
          log.info("RequestArmMode " + (state or "N/A") + "  using pin " + self.toString(bpin))
          if armCode is not None:
              if isValidPL:
                  if (state == "Disarmed" and self.pmRemoteDisArm) or (state != "Disarmed" and self.pmRemoteArm):
                      self.SendCommand("MSG_ARM", options = [3, armCodeA, 4, bpin])    #
                  else:
                      log.info("Panel Access Not allowed, user setting prevent access")
              else:
                  log.info("Panel Access Not allowed without pin")
          else:
              log.info("RequestArmMode invalid state requested " + (state or "N/A"))
code_tokens: def RequestArm ( self , state , pin = "" ) : isValidPL , bpin = self . pmGetPin ( pin ) armCode = None armCodeA = bytearray ( ) if state in pmArmMode_t : armCode = pmArmMode_t [ state ] armCodeA . append ( armCode ) log . info ( "RequestArmMode " + ( state or "N/A" ) + "  using pin " + self . toString ( bpin ) ) if armCode is not None : if isValidPL : if ( state == "Disarmed" and self . pmRemoteDisArm ) or ( state != "Disarmed" and self . pmRemoteArm ) : self . SendCommand ( "MSG_ARM" , options = [ 3 , armCodeA , 4 , bpin ] ) else : log . info ( "Panel Access Not allowed, user setting prevent access" ) else : log . info ( "Panel Access Not allowed without pin" ) else : log . info ( "RequestArmMode invalid state requested " + ( state or "N/A" ) )
short_docstring: Send a request to the panel to Arm/Disarm
short_docstring_tokens: Send a request to the panel to Arm / Disarm
comment: """ Send a request to the panel to Arm/Disarm """$SEP$#