Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-camera-slsdetector
Commits
007422d5
Commit
007422d5
authored
Jan 05, 2021
by
Alejandro Homs Puron
Committed by
operator for beamline
Jan 05, 2021
Browse files
Support multi-line responses in Camera::getCmd
parent
10bede9e
Pipeline
#39830
failed with stages
in 6 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/SlsDetectorCamera.cpp
View file @
007422d5
...
...
@@ -525,11 +525,14 @@ string Camera::getCmd(const string& s, int idx)
string
::
size_type
p
=
s
.
find
(
':'
);
string
raw_s
=
s
.
substr
((
p
==
string
::
npos
)
?
0
:
(
p
+
1
));
DEB_TRACE
()
<<
DEB_VAR2
(
s
,
raw_s
);
if
(
r
.
find
(
raw_s
+
' '
)
!=
0
)
THROW_HW_ERROR
(
Error
)
<<
"Invalid response: "
<<
r
;
string
::
size_type
e
=
raw_s
.
size
()
+
1
;
p
=
r
.
find
(
'\n'
,
e
);
r
=
r
.
substr
(
e
,
(
p
==
string
::
npos
)
?
p
:
(
p
-
e
));
bool
multi_line
=
((
s
==
"list"
)
||
(
s
==
"versions"
));
if
(
!
multi_line
)
{
if
(
r
.
find
(
raw_s
+
' '
)
!=
0
)
THROW_HW_ERROR
(
Error
)
<<
"Invalid response: "
<<
r
;
string
::
size_type
e
=
raw_s
.
size
()
+
1
;
p
=
r
.
find
(
'\n'
,
e
);
r
=
r
.
substr
(
e
,
(
p
==
string
::
npos
)
?
p
:
(
p
-
e
));
}
DEB_RETURN
()
<<
DEB_VAR1
(
r
);
return
r
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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