parameters: (self, line)
docstring: Filter notifications to some packet_ids: filter_notifications <packet ids>*
docstring_summary: Filter notifications to some packet_ids: filter_notifications <packet ids>*
docstring_tokens: Filter notifications to some packet_ids : filter_notifications <packet ids > *
function: def do_filter_notifications(self, line):
          "Filter notifications to some packet_ids: filter_notifications <packet ids>*"
          args = line.split()
          pids = []
          for pid in args:
              if "." in pid:
                  packet_id, copy_id = self.packet_id_from_str(args[0])
              else:
                  try:
                      packet_id = int(pid)
                      copy_id = 0xffffffffffffffff
                  except:
                      raise UIn_Error("Bad format for packet id")
              pids.append( (packet_id, copy_id) )
  
          s = ""
          for packet_id, copy_id in pids:
              s += struct.pack("QQ", packet_id, copy_id)
  
          req = Msg_FilterNotifications(
              switch_id = 0, req_id = self.get_req_id(),
              nb = len(pids), ids = s
          )
          self.sok.send(req.generate())
          msg = self.wait_for_msg()
          self.check_msg_CLS(msg, Msg_Status)
          assert(msg.status == 0)
function_tokens: def do_filter_notifications ( self , line ) : args = line . split ( ) pids = [ ] for pid in args : if "." in pid : packet_id , copy_id = self . packet_id_from_str ( args [ 0 ] ) else : try : packet_id = int ( pid ) copy_id = 0xffffffffffffffff except : raise UIn_Error ( "Bad format for packet id" ) pids . append ( ( packet_id , copy_id ) ) s = "" for packet_id , copy_id in pids : s += struct . pack ( "QQ" , packet_id , copy_id ) req = Msg_FilterNotifications ( switch_id = 0 , req_id = self . get_req_id ( ) , nb = len ( pids ) , ids = s ) self . sok . send ( req . generate ( ) ) msg = self . wait_for_msg ( ) self . check_msg_CLS ( msg , Msg_Status ) assert ( msg . status == 0 )