+ def sweepRandom(self, freq, number = 5, time = 200):
+ msgIDs = []
+ ids = []
+ self.client.serInit()
+ self.client.MCPsetup()
+ for i in range(0,number,6):
+ idsTemp = []
+ comment = "sweepFilter: "
+ for j in range(0,6,1):
+ id = randrange(2047)
+ #comment += "_%d" % id
+ idsTemp.append(id)
+ ids.append(id)
+ print comment
+ description = "Running a sweep filer for all the possible standard IDs. This runs the following : " + comment
+ count = self.sniff(freq=freq, duration=time, description=description, comment = comment, standardid = idsTemp)
+ if( count != 0):
+ for element in idsTemp:
+ #comment = "sweepFilter: %d" % (element)
+ comment="sweepFilter: "
+ description = "Running a sweep filer for all the possible standard IDs. This run filters for: %d " % element
+ count = self.sniff(freq=freq, duration = time, description = description,comment = comment, standardid = [element, element, element])
+ if( count != 0):
+ msgIDs.append(j)
+ return msgIDs, ids
+