Commit e3b890d7 authored by Philipp Gast's avatar Philipp Gast
Browse files

added a plot routine to the client side - now something can be seen :-)

parent e29e7c0a
Pipeline #399 failed with stage
in 1 minute and 35 seconds
......@@ -195,9 +195,6 @@ class MplClient2():
print('instead if answer a error was received')
datas = (None,)
else :
status = self.send(Signal(True,'Answer received'))
if status :
rt = self.waitForSignal()
# set the figure data to answerSig.value
datas = formatedData.content
return datas
......@@ -118,19 +118,7 @@ class MplHandler(SocketServer.StreamRequestHandler):
# datas.append(ax.packFormattedData(ax.data))
datas = datas + (ax.data,)
answer = Answer(datas)
# Send the packed Formatted data
status = self.send(answer)
# If failed
if not status:
print('sending answer to request SYNCFIGFORMATRAWDATA failed')
# Wait for the client receipt
status = self.waitForReceipt(conn)
return Status(True,'round trip complet')
return Answer(datas)
def send(self,sig):
# pickel the signal
......
......@@ -80,3 +80,19 @@ class AxTest(MyAxes):
print(DBUG + 'I formatted the raw data!')
return(True)
def plotting(self):
xRange = self.keywords.get('xRange')
yRange = self.keywords.get('yRange')
try:
self.plot(self.data['xdata'], self.data['ydata'])
except KeyError:
print(SEVR + 'The formatting of the data was apparently wrong. --> EXIT')
return(False)
if (xRange): self.set_xlim(xRange)
if (yRange): self.set_ylim(yRange)
return(True)
import threading
from time import sleep
from serverside.myIOs import readStupidData
from serverside.figTest import FigTest as FigTests
......@@ -26,3 +27,4 @@ client.connect(('', 50803))
client.readData('readStupidData', 'data1')
fig = client.newSyncFigure(FigTestc, ('data1',))
win=mpl_client.MyWin(fig)
sleep(10)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment