Exemplo n.º 1
0
    def DataSlog(self):
	while True:
		try:
			data = SpHomeQueue.get(False, 1)
			spltSlog.spltSlog('SpotHome2', data)
		except:
			pass
Exemplo n.º 2
0
	def getSloggingPM(self):
		while True:
			try:
				data2 = PMqueue.get(False,1)
				spltSlog.spltSlog('PowerMeasure',data2)
			except:
				pass
Exemplo n.º 3
0
	def getSloggingRFID(self):
		while True:
			try:
				data = RFIDqueue.get(False,1)
				spltSlog.spltSlog('RFID',data)
			except:
				pass
Exemplo n.º 4
0
 def DataSlog(self):
     while True:
         try:
             data = SpHomeQueue.get(False, 1)
             spltSlog.spltSlog('SpotHome2', data)
         except:
             pass
Exemplo n.º 5
0
    def DataSlog(self):
	while True:
		try:
			data = SqQueue.get(False,1)
			spltSlog.spltSlog('HomeTokens',data)
		except:
			pass
Exemplo n.º 6
0
Arquivo: example.py Projeto: nesl/splt
from Slog import spltSlog
import time;
import sys;


while 1:
  stdinstr = sys.stdin.readline();
  if not stdinstr:
    break;
  print stdinstr;
  
#  timeHere = time.localtime()
#  timestr = str(timeHere[0])+'-'+str(timeHere[1])+'-'+str(timeHere[2])+' '+str(timeHere[3])+':'+str(timeHere[4])+':'+str(timeHere[5])+'\n';
  timeHere = time.time()
  timestr = str(int(timeHere));
  print timestr;

  fields = stdinstr.split(", ");
  W = fields[0];
  V = fields[1];
  A = str(float(fields[2])/100);

  print "Watts = ", W, "\tVolts = ",V, "\tAmps = ",A, "\n";

  Data = (('W',W),('A',A),('V', V), ('AID','Printer'),('TimeStamp',timestr))
  spltSlog.spltSlog('PowerMeasure',Data)