]> gitweb.maison.local Git - pyowl.git/commitdiff
removed code related to 'costPerKWH' from CM160data object
authorLionel <lionel@ra.enneade.fdn.org>
Tue, 18 Nov 2014 14:15:42 +0000 (15:15 +0100)
committerLionel <lionel@ra.enneade.fdn.org>
Tue, 18 Nov 2014 14:15:42 +0000 (15:15 +0100)
cm160Server.py

index 01bc63392755041ac788a54ab557d641ceee68c7..8525a51b3152a43320074a1094d740c63fc14023 100755 (executable)
@@ -153,7 +153,6 @@ class CM160Data:
                                   # to 0x49. Not sure why but I'll mask them out
                                   # so that we don't get invalid month errors.
     self.__year       = year
-#    self.__costPerKWH = cost
     self.__amps       = amps
     
     self.__realTime   = False  #Changes to True when realtime data is being read
@@ -178,9 +177,6 @@ class CM160Data:
   def getSecond(self):
     return self.__sec
 
-#  def getCostPerKWH(self):
-#    return self.__costPerKWH
-    
   def getAmps(self):
     return self.__amps
     
@@ -206,8 +202,7 @@ class CM160Data:
         self.__month = CM160Data.LAST_VALID_MONTH
       
   def getCompatDateStr(self):
-    """Get the date as a string in the same format the original C# based
-       OWLServer used"""
+    """Get the date as a string in the same format the original C# based OWLServer used"""
     return "%04d-%02d-%02d %02d:%02d:%02d" % (self.__year, self.__month, self.__day, self.__hour, self.__min, self.__sec)
     
   def getCompatStr(self):
@@ -246,7 +241,6 @@ class CM160Data:
     if len(elems) == 4:
       try:
         self.__amps       = float(elems[2])
-#        self.__costPerKWH = float(elems[3])
         t                 = elems[0]
         d                 = elems[1]
         dateElems         = d.split("/")
@@ -267,8 +261,7 @@ class CM160Data:
     return loaded
     
   def sameMin(self, cm160Data):
-    """Return True if the cm160Data has the same year, day, month, hour and min 
-       as this object"""
+    """Return True if the cm160Data has the same year, day, month, hour and min as this object"""
     if cm160Data == None:
       return False
     if self.__year   == cm160Data.getYear() and\
@@ -280,8 +273,7 @@ class CM160Data:
     return False
     
   def after(self, cm160Data):
-    """Return True if the data held in this (self) object has a later date/time
-       than the data held in the cm160Data object"""
+    """Return True if the data held in this (self) object has a later date/time than the data held in the cm160Data object"""
     #If we don't have a CM160Data object
     if cm160Data == None:
       #We can't say it's after
@@ -298,10 +290,8 @@ class CM160Data:
     return False
 
   def between(self, startTime, stopTime):
-    """Return True if the data held in this (self) object is between 
-       startTime and stopTime. 
-       Also returns true if equal to either startTime and stopTime. 
-    """
+    """Return True if the data held in this (self) object is between startTime and stopTime. 
+       Also returns true if equal to either startTime and stopTime. """
     selfTime = CM160Data.GetTime(self)
     if selfTime == None:
       return False
@@ -312,9 +302,6 @@ class CM160Data:
     return False
 
 
-
-
-
 #*********************** CM160 *************************** 
 
 class CM160:
@@ -323,7 +310,7 @@ class CM160:
      - Reading data from the CM160 unit
      - Saving the data via a DataStore object
      
-     When running the CM160 object has three threads 
+     When running the CM160 object has two threads 
      - The main thread, responsible for reading data from the CM160 serial port 
        and pushing the data received into a queue.
      - The queue reader thread which read packets of data from the above queue