Skip to content
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

Merged
merged 2 commits into from
Aug 13, 2018

Conversation

tribal-tec
Copy link
Contributor

No description provided.

{
const RpcParameterDescription desc{
METHOD_GET_MODEL_PROPERTIES,
"Get the properties of the given model", "ids",
Copy link
Contributor

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'}

Copy link
Contributor Author

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.

Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@tribal-tec tribal-tec force-pushed the model_props branch 2 times, most recently from 7db80d5 to f403a4d Compare August 13, 2018 14:17
@tribal-tec tribal-tec merged commit 2dbd2f7 into BlueBrain:master Aug 13, 2018
@tribal-tec tribal-tec deleted the model_props branch August 13, 2018 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants