X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fexperiments.py;h=0cffedbb80a9c6161e3b16dcde3d356f192546c9;hp=cfe8f1b81d6b59da84601581e2739e0d50a0720a;hb=4fb8c2681589e061df26c889e5e5888c255e0fcb;hpb=5c0f1afebd37290c1379cbb40a57718bd4b2e2b5 diff --git a/client/experiments.py b/client/experiments.py index cfe8f1b..0cffedb 100644 --- a/client/experiments.py +++ b/client/experiments.py @@ -22,11 +22,11 @@ class experiments(GoodFETMCPCANCommunication): """ - def __init__(self, data_location): + def __init__(self, data_location = "../../contrib/ThayerData/"): """ Constructor - @type datalocation: string - @param datalocation: path to the folder where data will be stored + @type data_location: string + @param data_location: path to the folder where data will be stored """ GoodFETMCPCANCommunication.__init__(self, data_location) #super(experiments,self).__init(self) @@ -38,8 +38,8 @@ class experiments(GoodFETMCPCANCommunication): This method will sweep through the range of standard ids given from low to high. This will actively filter for 6 ids at a time and sniff for the given amount of time in seconds. If at least one message is read in then it will go individually - through the 6 ids and sniff only for that id for the given amount of time. All the - data gathered will be saved. This does not save any sniffed packets. + through the 6 ids and sniff only for that id for the given amount of time. + This does not save any sniffed packets. @type freq: number @param freq: The frequency at which the bus is communicating @@ -310,7 +310,7 @@ class experiments(GoodFETMCPCANCommunication): packet[i+5] = value print packet #put a rough time stamp on the data and get all the data bytes - row = [time.tT(), id_new,8] # could make this 8 a variable + row = [tT.time(), id_new,8] # could make this 8 a variable msg = "Injecting: " for i in range(5,13): row.append(packet[i]) @@ -384,7 +384,7 @@ class experiments(GoodFETMCPCANCommunication): value = random.randint(0, 255) #generate pseudo-random integer value packet[i+5] = value - print packet + #print packet #put a rough time stamp on the data and get all the data bytes row = [time.time(), id_new,8] """@todo: allow for varied packet lengths"""