code: def translateprotocolheader(protocol):
      
      pcscprotocol = 0
      if None != protocol:
          if CardConnection.T0_protocol == protocol:
              pcscprotocol = SCARD_PCI_T0
          if CardConnection.T1_protocol == protocol:
              pcscprotocol = SCARD_PCI_T1
          if CardConnection.RAW_protocol == protocol:
              pcscprotocol = SCARD_PCI_RAW
      return pcscprotocol
docs: Translate protocol into PCSC protocol header.