summaryrefslogtreecommitdiffstats
path: root/Monitoring/MonitoringService/DataProcessing/DataSample.py
diff options
context:
space:
mode:
authorpikusa <pikusa@man.poznan.pl>2013-04-03 13:18:17 (GMT)
committer pikusa <pikusa@man.poznan.pl>2013-04-03 13:18:17 (GMT)
commit2f2a3a129c91de540e66c3bfbe30b0df1942cd4b (patch)
tree2d313cdf0068af368d4de6067d676be16f6a6464 /Monitoring/MonitoringService/DataProcessing/DataSample.py
parentff8aa232b071a9b54dff833714a870fd0aec0b30 (diff)
downloadnovi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.zip
novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.gz
novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.bz2
project commit and dir tree change
Diffstat (limited to 'Monitoring/MonitoringService/DataProcessing/DataSample.py')
-rw-r--r--Monitoring/MonitoringService/DataProcessing/DataSample.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/Monitoring/MonitoringService/DataProcessing/DataSample.py b/Monitoring/MonitoringService/DataProcessing/DataSample.py
new file mode 100644
index 0000000..ee7245d
--- /dev/null
+++ b/Monitoring/MonitoringService/DataProcessing/DataSample.py
@@ -0,0 +1,54 @@
+'''
+Created on Mar 4, 2013
+
+@author: steger
+'''
+from DataProcessing.DataSource import DataSource
+from DataProcessing.DataReader import DataReader
+
+class DataSample(DataSource):
+ pass
+
+ def __init__(self, table):
+ '''
+ Constructor
+ '''
+ DataSource.__init__(self)
+ self._data = table
+
+ def __len__(self):
+ return len(self._data)
+
+ def __getitem__(self, k):
+ return None
+
+ @property
+ def name(self):
+ return "Original(%s)" % self._data.name
+
+ @property
+ def readerClass(self):
+ return DataReader
+
+ def _process(self):
+ status = 0
+ with self._data.readlock:
+ if self._data.evCleared.isSet():
+ self._sourcecleared()
+ self._data.evCleared.clear()
+ status |= self.CLEARED
+ if self._data.evExpanded.isSet():
+ self._sourceexpanded()
+ self._data.evExpanded.clear()
+ status |= self.EXPANDED
+ return status
+
+ @property
+ def writelock(self):
+ return self._data.writelock
+
+
+ @property
+ def um(self):
+ return self._data.um
+