Changes between Version 10 and Version 11 of WARPnet1/BuildClientScripts
- Timestamp:
- Jun 18, 2010, 3:28:33 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WARPnet1/BuildClientScripts
v10 v11 81 81 As 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. 82 82 {{{ 83 #!python 83 84 dataLog = DataLogger('filename.txt', fileRefreshTime) 84 85 }}} … … 86 87 When instantiating a struct pass the `dataLog` object to the it as follows: 87 88 {{{ 89 #!python 88 90 statStruct = StatisticsStruct(dataLog) 89 91 }}} … … 91 93 In the StatisticsStruct any received data in `updateFromNode` can be written to the this log file using 92 94 {{{ 95 #!python 93 96 self.logData('Data0=%d, Data1=%d" %(dataTuple[0], dataTuple[1])) 94 97 }}}