Skip to content

reformat Bonsai network response#1

Merged
BerndDoser merged 1 commit intoBerndDoser:masterfrom
vga101:response-format
Sep 29, 2016
Merged

reformat Bonsai network response#1
BerndDoser merged 1 commit intoBerndDoser:masterfrom
vga101:response-format

Conversation

@vga101
Copy link

@vga101 vga101 commented Sep 29, 2016

Hi Bernd,
I've changed the Bonsai network response format to reflect our current expectations: responses should always have the same format, just reflect the type of original request in their "response" field. Check whether you feel happy about the implementation. :-)


Update network json response updated to new specification:
for any requests, responses should be formatted as
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "release"}
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "remove"}
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "report"}
The "response" field reflects the request name that triggered the response.

Update network json response updated to new specification:
for any requests, responses should be formatted as
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "release"}
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "remove"}
{"user_particles": [0, 0, 0, 0], "simulation_time": 89.4, "response": "report"}
The "response" field reflects the request name that triggered the response.
@BerndDoser
Copy link
Owner

Looks good, especially the user_particles as array is much better. Instead of the hard coded 4 we can use WOGManager::number_of_users. I change it after the merge.

@BerndDoser BerndDoser closed this Sep 29, 2016
@BerndDoser BerndDoser reopened this Sep 29, 2016
@BerndDoser BerndDoser merged commit d5e64e7 into BerndDoser:master Sep 29, 2016
@vga101 vga101 deleted the response-format branch September 29, 2016 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants