*test.py startet den CANFilter, der die Daten vom CAN-BUS in die Datenbank schreibt. (CAN-msgid = 0x3A4, 2&3 Byte, Multiplikator 0.01) *API.py startet die API *Diese kann man unter localhost:5000 erreichen *der CAN Wert läuft auf "localhost:5000/dc_labor/device/battery/voltage" auf
27 lines
No EOL
460 B
Python
27 lines
No EOL
460 B
Python
'''
|
|
Created on 21.11.2013
|
|
|
|
@author: rauchp
|
|
'''
|
|
import CANFilter
|
|
# import ems
|
|
# import time
|
|
# from config import Config
|
|
#
|
|
# c = Config()
|
|
# conf = c.readConf()
|
|
|
|
# buffer={}
|
|
# if conf['config_debug']:
|
|
# print 'starte CAN'
|
|
can = CANFilter.CANFilter()
|
|
can.start()
|
|
# if conf['config_debug']:
|
|
# print 'starte EMS'
|
|
# th = ems.ems(buffer)
|
|
# th.start()
|
|
# if conf['config_debug']:
|
|
# print 'alles gestartet'
|
|
# while True:
|
|
# print buffer
|
|
# time.sleep(1) |