Commit 0037ffb2 authored by Yori Fournier's avatar Yori Fournier
Browse files

Server-side now accepting signal of type syncFigFormatRawData

tested now win = MyWin(fig) works
parent 19fad86f
......@@ -120,6 +120,36 @@ class Server():
# answer = ('newSyncFigure', None, 'could not create the Figure')
# return(answer)
elif header in ('syncFigFormatRawData'):
try:
(figID,) = eval(str(content))
except:
print(WARN+"The content of syncFigFormatRawData could not be extracted")
print(SPCE+'Received: '+str(content))
print(SPCE+"I expect '(figID,)'")
answer = ('syncFigFormatRawData', None, 'could not extract content')
return(answer)
try:
fig = G_FIGURES[figID]
except:
print(WARN+"Figure ID does not exists.")
print(SPCE+str(figID))
answer = ('syncFigFormatRawData', None, 'Figure ID does not exists.')
try:
fig.formatRawData()
except:
print(WARN+'Could not format the rawdata of the figure.')
answer = ('syncFigFormatRawData', None, 'Could not format the rawdata of the figure.')
datas = []
for ax in fig.get_axes():
datas.append(ax.data)
answer = ('syncFigFormatRawData', datas, '')
else:
print(WARN+"I don't know ths signal, sorry")
answer = ('readData', None, 'signal unknown')
......
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