umstrukturierung

This commit is contained in:
Philipp Rauch 2014-01-30 18:42:36 +01:00
parent 25e406ed8c
commit 98451284d7
14 changed files with 138 additions and 139 deletions

0
API/__init__.py Normal file
View file

View file

@ -5,7 +5,7 @@ Created on 29.01.2014
''' '''
from sys import stderr from sys import stderr
from socket import gethostname from socket import gethostname
from config import Config from Config.config import Config
from datetime import datetime from datetime import datetime
from flask import abort from flask import abort

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -8,7 +8,7 @@ Created on 24.10.2013
from datetime import datetime from datetime import datetime
from flask import Flask, jsonify, make_response, request from flask import Flask, jsonify, make_response, request
from socket import gethostname from socket import gethostname
from config import Config from Config.config import Config
from ems import ems from ems import ems
from buffer import Buffer from buffer import Buffer
@ -29,14 +29,14 @@ class Request(object):
self.id = req_id self.id = req_id
def API_start(): def REST_start():
api = API() api = REST()
print 'API-Thread:\t%s\n' % api print 'REST-Thread:\t%s\n' % api
api.app.run(host = conf['flask_server'], api.app.run(host = conf['flask_server'],
port = int(conf['flask_port'])) port = int(conf['flask_port']))
#debug = conf['flask_debug'] #debug = conf['flask_debug']
class API(object): class REST(object):
def __init__(self): def __init__(self):
self.app = Flask(__name__) self.app = Flask(__name__)

0
Config/__init__.py Normal file
View file

0
Swich/__init__.py Normal file
View file

View file

@ -7,7 +7,7 @@ Created on 15.11.2013
from threading import Thread from threading import Thread
from Queue import Queue from Queue import Queue
from time import sleep from time import sleep
from config import Config from Config.config import Config
#import Module #import Module
import database import database

View file

@ -5,10 +5,9 @@ Created on 15.11.2013
@version: 0.02 @version: 0.02
''' '''
from threading import Thread from threading import Thread
from switch import Switch, MYSQL from Swich.switch import Switch, MYSQL
from config import Config from Config.config import Config
from time import sleep #from API.service import Request
#from API import Request
### LOAD CONFIG ### ### LOAD CONFIG ###
c = Config() c = Config()

View file

@ -3,13 +3,13 @@ Created on 29.01.2014
@author: Philipp Rauch @author: Philipp Rauch
''' '''
from config import Config from Config.config import Config
from API import API_start from API.service import REST_start
from CANFilter import CAN_start from CAN.Filter import CAN_start
### LOAD CONFIG ### ### LOAD CONFIG ###
c = Config() c = Config()
conf = c.readConf() conf = c.readConf()
CAN_start(conf) CAN_start(conf)
API_start() REST_start()

View file

@ -5,7 +5,7 @@ Created on 21.11.2013
''' '''
# import CANFilter # import CANFilter
# import Sym2Lib # import Sym2Lib
from config import Config from Config.config import Config
### LOAD CONFIG ### ### LOAD CONFIG ###
c = Config() c = Config()