code: def get_next_invoke_id(self, addr):
          
          if _debug: StateMachineAccessPoint._debug("get_next_invoke_id")
  
          initialID = self.nextInvokeID
          while 1:
              invokeID = self.nextInvokeID
              self.nextInvokeID = (self.nextInvokeID + 1) % 256
  
              # see if we've checked for them all
              if initialID == self.nextInvokeID:
                  raise RuntimeError("no available invoke ID")
  
              for tr in self.clientTransactions:
                  if (invokeID == tr.invokeID) and (addr == tr.pdu_address):
                      break
              else:
                  break
  
          return invokeID
docs: Called by clients to get an unused invoke ID.