Changes between Version 10 and Version 11 of WARPnet1/BuildClientScripts


Ignore:
Timestamp:
Jun 18, 2010, 3:28:33 PM (14 years ago)
Author:
sgupta
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPnet1/BuildClientScripts

    v10 v11  
    8181As statistics are received by the client, there is good chance that the data would want to be written to a file. There is a built in method to do this. In the top-level script create a `DataLogger` object like the following.
    8282{{{
     83#!python
    8384 dataLog = DataLogger('filename.txt', fileRefreshTime)
    8485}}}
     
    8687When instantiating a struct pass the `dataLog` object to the it as follows:
    8788{{{
     89#!python
    8890 statStruct = StatisticsStruct(dataLog)
    8991}}}
     
    9193In the StatisticsStruct any received data in `updateFromNode` can be written to the this log file using
    9294{{{
     95#!python
    9396 self.logData('Data0=%d, Data1=%d" %(dataTuple[0], dataTuple[1]))
    9497}}}