- def filterStdSweep(self, freq, low, high, time = 5):
- msgIDs = []
- self.client.serInit()
- self.client.MCPsetup()
- for i in range(low, high, 6):
- print "sniffing id: %d, %d, %d, %d, %d, %d" % (i,i+1,i+2,i+3,i+4,i+5)
- comment= "sweepFilter: "
- #comment = "sweepFilter_%d_%d_%d_%d_%d_%d" % (i,i+1,i+2,i+3,i+4,i+5)
- description = "Running a sweep filer for all the possible standard IDs. This run filters for: %d, %d, %d, %d, %d, %d" % (i,i+1,i+2,i+3,i+4,i+5)
- count = self.sniff(freq=freq, duration = time, description = description,comment = comment, standardid = [i, i+1, i+2, i+3, i+4, i+5])
- if( count != 0):
- for j in range(i,i+5):
- comment = "sweepFilter: "
- #comment = "sweepFilter: %d" % (j)
- description = "Running a sweep filer for all the possible standard IDs. This run filters for: %d " % j
- count = self.sniff(freq=freq, duration = time, description = description,comment = comment, standardid = [j, j, j, j])
- if( count != 0):
- msgIDs.append(j)
- return msgIDs
-
- 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
+# def filterStdSweep(self, freq, low, high, time = 5):
+# msgIDs = []
+# self.client.serInit()
+# self.client.MCPsetup()
+# for i in range(low, high+1, 6):
+# print "sniffing id: %d, %d, %d, %d, %d, %d" % (i,i+1,i+2,i+3,i+4,i+5)
+# comment= "sweepFilter: "
+# #comment = "sweepFilter_%d_%d_%d_%d_%d_%d" % (i,i+1,i+2,i+3,i+4,i+5)
+# description = "Running a sweep filer for all the possible standard IDs. This run filters for: %d, %d, %d, %d, %d, %d" % (i,i+1,i+2,i+3,i+4,i+5)
+# count = self.sniff(freq=freq, duration = time, description = description,comment = comment, standardid = [i, i+1, i+2, i+3, i+4, i+5])
+# if( count != 0):
+# for j in range(i,i+5):
+# comment = "sweepFilter: "
+# #comment = "sweepFilter: %d" % (j)
+# description = "Running a sweep filer for all the possible standard IDs. This run filters for: %d " % j
+# count = self.sniff(freq=freq, duration = time, description = description,comment = comment, standardid = [j, j, j, j])
+# if( count != 0):
+# msgIDs.append(j)
+# return msgIDs
+
+# def sweepRandom(self, freq, number = 5, time = 200):
+# msgIDs = []
+# ids = []
+# self.client.serInit()
+# self.client.MCPsetup()
+# for i in range(0,number+1,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