Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Common Library
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rutherford Experiment Lab Course Online
Common Library
Compare revisions
b44f321626af8d2873d00640028054bf30e23de1 to 66467e4c18747baec949d3cec595b0c985f7a00c
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
fp311online/libfp311online
Select target project
No results found
66467e4c18747baec949d3cec595b0c985f7a00c
Select Git revision
Branches
master
Tags
0.0
Swap
Target
fp311online/libfp311online
Select target project
fp311online/libfp311online
1 result
b44f321626af8d2873d00640028054bf30e23de1
Select Git revision
Branches
master
Tags
0.0
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Parse updateHistogram Command
· 66467e4c
Tobias Triffterer
authored
4 years ago
This adds the code necessary to process this new command.
Verified
66467e4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/command.cpp
+15
-1
15 additions, 1 deletion
src/command.cpp
src/command.h
+1
-0
1 addition, 0 deletions
src/command.h
with
16 additions
and
1 deletion
src/command.cpp
View file @
66467e4c
...
...
@@ -98,7 +98,7 @@ Command Command::fromString(const QString& source)
// Not yet implemented:
case
Action
::
queryServerInformation
:
case
Action
::
updateHistogram
:
return
Command
(
);
return
parseUpdateHistogram
(
rootobj
);
default:
return
Command
();
}
...
...
@@ -250,6 +250,20 @@ Protocol::Command Protocol::Command::parseFillHistogram(const QJsonObject& input
);
}
Protocol
::
Command
Protocol
::
Command
::
parseUpdateHistogram
(
const
QJsonObject
&
input
)
{
if
(
!
input
.
keys
().
contains
(
QStringLiteral
(
"bincontents"
))
||
!
input
.
value
(
QStringLiteral
(
"bincontents"
)).
isString
())
{
logError
(
QStringLiteral
(
"updateHistogram command does not contain bincontents."
));
return
Command
();
}
return
Command
(
Action
::
updateHistogram
,
Arguments
{
std
::
make_pair
(
QStringLiteral
(
"bincontents"
),
input
.
value
(
QStringLiteral
(
"bincontents"
)).
toString
())},
input
.
value
(
QStringLiteral
(
"token"
)).
toString
()
);
}
QString
Command
::
toString
()
const
{
if
(
action
==
Action
::
invalid
)
...
...
This diff is collapsed.
Click to expand it.
src/command.h
View file @
66467e4c
...
...
@@ -75,6 +75,7 @@ private:
static
Command
parseUpdateExperimentState
(
const
QJsonObject
&
input
);
static
Command
parseSetTargetState
(
const
QJsonObject
&
input
);
static
Command
parseFillHistogram
(
const
QJsonObject
&
input
);
static
Command
parseUpdateHistogram
(
const
QJsonObject
&
input
);
static
QString
getActionString
(
const
Action
action
);
};
...
...
This diff is collapsed.
Click to expand it.