funktionsfähige Testimplementierung
*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
This commit is contained in:
parent
59340b5fee
commit
cda58b0f2e
7 changed files with 132 additions and 80 deletions
27
scr/test.py
Normal file
27
scr/test.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'''
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue