Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yori Fournier
myplotlib
Commits
9fd45a9f
Commit
9fd45a9f
authored
Sep 20, 2017
by
Yori Fournier
Browse files
formatRawData works now server side
tested with mfdv2, not yet clean and too many verbose
parent
3050ddf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
mplServer.py
View file @
9fd45a9f
...
...
@@ -207,7 +207,7 @@ class MplServer():
G_RAWDATA
[
dataName
]
=
fct
(
*
args
,
**
kwargs
)
if
(
DEBUG
):
print
(
INFO
+
"SERVER: I read the data following instructions"
)
print
(
str
(
G_RAWDATA
[
dataName
].
data
))
# SHOULD BE SUPPRESS LATER
#
print(str(G_RAWDATA[dataName].data)) # SHOULD BE SUPPRESS LATER
except
:
if
(
DEBUG
):
print
(
WARN
+
"SERVER: The instructions of readData could not be executed."
)
...
...
@@ -461,8 +461,10 @@ class MplServer():
packedData
=
self
.
packFormattedData
(
datas
)
answer
=
(
'syncFigFormatRawData'
,
packedData
,
'The figure could format the rawData.'
)
print
(
answer
)
dataSize
=
len
(
str
(
answer
))
+
2
# print(answer)
dataSize
=
len
(
str
(
answer
).
encode
(
'utf-8'
))
+
2
print
(
'The calculated dataSize is: '
+
str
(
dataSize
))
# Send the size of the data
self
.
sendAnswer
(
conn
,
(
'syncFigFormatRawData'
,
dataSize
,
'The figure could format the rawData.'
))
...
...
@@ -483,6 +485,9 @@ class MplServer():
def
sendAnswer
(
self
,
conn
,
answer
):
'''Send an answer to all clients.'''
answer
=
self
.
packAnswer
(
answer
)
print
(
'The length of the packed answer is: '
+
str
(
len
(
answer
.
encode
(
'utf-8'
))))
conn
.
sendall
(
answer
)
return
(
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment