-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add model properties to allow updates on model data from plugins #506
Conversation
{ | ||
const RpcParameterDescription desc{ | ||
METHOD_GET_MODEL_PROPERTIES, | ||
"Get the properties of the given model", "ids", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that get model properties is for a single model:
RPC get-model-properties {id: 'some model id'}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. Have to fix this description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
inline void init(brayns::ModelProperties* s, ObjectHandler* h) | ||
{ | ||
h->add_property("id", &s->modelID); | ||
h->add_property("properties", &s->properties); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the params for set model props:
{
id: 1,
properties: {
ping: true
}
}
or:
{
id: 1,
ping: true
}
?
Second would make more sense, unless that's difficult to implement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's first option for now. Ideally, the RPC would have 2 arguments, but that's not supported right now in Rockets iirc. The second option is quite unnatural, as the 'id' is not a property of the model properties, it's only needed to find the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Does this apply for broadcast and get or is it only the set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set- and broadcast. get- is just the properties, the ID is the input for the get- request.
7db80d5
to
f403a4d
Compare
f403a4d
to
4507034
Compare
No description provided.