54 lines
1.1 KiB
Python
Executable File
54 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python2.7
|
|
#-*- coding: utf-8 -*-
|
|
|
|
__author__ = "Michael Rest"
|
|
__date__ = "1 August 2010"
|
|
__email__ = "michi@rosstein.de"
|
|
__version__ = "$Revision: 1.0 $"[11:-2]
|
|
|
|
|
|
from SOAPpy import SOAPProxy, SOAPServer
|
|
from time import sleep
|
|
|
|
def recvValueBlk (id):
|
|
ioserv = SOAPProxy ('http://localhost:8089/')
|
|
try:
|
|
#values = ioserv.recvValueBlk ('Demo')._asdict ()
|
|
values = ioserv.recvValueBlk (id)._aslist ()
|
|
except:
|
|
print "FixMe"
|
|
return values
|
|
|
|
def setQuit (nr):
|
|
ioserv = SOAPProxy ('http://localhost:8089/')
|
|
try:
|
|
ioserv.setQuit ('ABP-Buero' , int (nr))
|
|
except:
|
|
print "FixMe"
|
|
|
|
def setMaint (nr):
|
|
ioserv = SOAPProxy ('http://localhost:8089/')
|
|
try:
|
|
ioserv.setMaintenance ('ABP-Buero' , int (nr))
|
|
except:
|
|
print "FixMe"
|
|
|
|
def setDone (nr):
|
|
ioserv = SOAPProxy ('http://localhost:8089/')
|
|
try:
|
|
ioserv.setDone ('ABP-Buero' , int (nr))
|
|
except:
|
|
print "FixMe"
|
|
|
|
def setCtrl (conn, nr):
|
|
ioserv = SOAPProxy ('http://localhost:8089/')
|
|
conns = {0 : 'ABP-Buero',
|
|
1 : 'HALLEA',
|
|
2 : 'HALLEB'
|
|
}
|
|
try:
|
|
ioserv.setCtrl (conns[conn] , int (nr))
|
|
except:
|
|
print "FixMe"
|
|
|