summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/mainController.py
blob: be929f09272d2135f40ce047d7c3791d5d7f263d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import ClientClass 
import DBC
from time import sleep

#MAIN PART
user = 'root'
passw = 'mysqlpassword'
host = 'localhost'
dbname = 'gsmselftesting'
 
database = DBC.DBMySQLConnection(user, passw, host, dbname)
x = ClientClass.Connection('localhost',50008)


print x.connect()
x.sendData('HELLO HANDLER')
print x.receiveData()
x.sendData('CALLER|NUMBER')
print x.receiveData()

sleep(4)
print 'sta sam dobio'
x.sendData('RECEIV|READY')
print x.receiveData()
x.sendData('TERMINATE')
print x.receiveData()

x.closeConnection()