swich Modul und ems Modul hinzugefügt

This commit is contained in:
Philipp Rauch 2013-11-15 16:08:41 +01:00
parent 5df7ae564a
commit 9a99cf1e7a
2 changed files with 57 additions and 0 deletions

12
scr/ems.py Normal file
View file

@ -0,0 +1,12 @@
'''
Created on 15.11.2013
@author: Philipp Rauch
@version: 0.01
'''
import threading
import Queue
import swich
from API import Buffer as buf
foo = swich.Swich(swich.MYSQL)

45
scr/swich.py Normal file
View file

@ -0,0 +1,45 @@
'''
Created on 15.11.2013
@author: Philipp Rauch
@version: 0.01
'''
import MySQLdb
import threading
import Queue
MYSQL = 0
CSV = 1
XML = 2
JSON = 3
class Swich(object):
def __init__(self, source):
self.source = source
def start(self):
if self.source == MYSQL:
# @TODO CANFilter starten
self.connection = MySQLdb.connect("url", "user", "passwort", "datenbankname")
self.cursor = self.connection.cursor()
self.queue = self.__createQueue__()
return self.queue
elif self.source ==CSV:
pass
elif self.source == XML:
pass
elif self.source == JSON:
pass
else:
return
def __createQueue__(self):
return
def setQueue(self):
pass
def getQueue(self):
pass