Ejemplo n.º 1
0
 def fillMeasurementPoint(self, cursor, uid, pointTime, name, value, context=None):
     curveProvider = MongoTimeCurve(mdbpool.get_db(),
             'generationkwh.production.measurement')
     curveProvider.fillPoint(
         datetime=toLocal(asUtc(naiveisodatetime(pointTime))),
         name=name,
         ae=value)
Ejemplo n.º 2
0
    def setupPointsByDay(self, points):

        for meter, start, end, values in points:
            daterange = datespan(
                localisodate(start),
                localisodate(end)+datetime.timedelta(days=1)
                )
            for date, value in zip(daterange, values):
                self.helper.fillMeasurementPoint(str(asUtc(date))[:-6],meter,value)
Ejemplo n.º 3
0
 def setupPointsByHour(self, points):
     for meter, date, value in points:
         self.helper.fillMeasurementPoint(str(asUtc(localTime(date)))[:-6],meter,value)