-
Notifications
You must be signed in to change notification settings - Fork 58
Re-design publish/subscribe interface, prepare for multiple SSR instances #127
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
Conversation
7ddd1f1 to
0a5d7ca
Compare
Do you mean subnet by that or network of SSRs?
Would this also translate to the Qt GUI? That could be interesting (eventually).
Is this thought of as "OSC bundles"? The OSC interface I designed doesn't support this either though ;-)
I would probably opt for |
| @@ -0,0 +1,3 @@ | |||
| [submodule "gml"] | |||
| path = gml | |||
| url = https://github.com/ilmola/gml.git | |||
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.
Would be great to be able to use this from a system package as well.
Currently there's no release of this header-only library though.
Regarding submodules: Please keep in mind, that if you do a git tag, github will not include submodules in your tarball!
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.
Currently there's no release of this header-only library
Yes, it's not very well known. But I liked it because it is very small. Most other libraries I found had a million other features that I don't need.
If you know a better option, just let me know, we can easily switch. I deliberately didn't use GML types in any API functions.
github will not include submodules in your tarball!
I know. But Github's tarball is quite useless anyway, because it doesn't have the ./configure in it. We ship our separate tarballs anyway.
|
Will have a look at the API more closely after work (hopefully). It looks thoroughly documented and more clear than the previous Publisher/Subscriber implementation though! Congrats :) |
|
Thanks for the review!
Oh, sorry, I didn't see the ambiguity ... I meant "the network of interconnected SSR instances". It doesn't matter if there are multiple "leaders" available on the physical (or virtual) network, but they cannot connect to each other.
I'm not sure if I understand. Each SSR instance can have it's own (optional) Qt GUI. Or do you mean a stand-alone Qt GUI without renderer? This was our plan many years ago, but this should be obsolete once we have a usable browser-based GUI.
That's where I took the name from.
That's not a problem, it's completely optional. The WebSocket interface I'm currently working on (in the It would also be quite natural for the XML-based interface to put multiple events into one network message. But this wasn't done before and I didn't want to change it. So it ignores the bundle events.
OK, cool, I'm currently using |
0a5d7ca to
6ea5520
Compare
6ea5520 to
6a67d65
Compare
This PR is supposed to keep the previous functionality mostly unchanged. For now, the only visible new feature is the introduction of the
--followflag which should facilitate the future feature that one SSR instance can connect to another SSR instance. Since the current network interface doesn't support that, it doesn't really do anything (except making it impossible to load a scene).I extended the internal APIs to allow network clients to subscribe to specific groups of messages (but the existing network client doesn't support that and most likely never will) and to allow 3D source/reference positions and rotations (but the existing renderers and the GUI are still 2D).
The new API is defined in
src/api.h. I recommend to build the Doxygen documentation withmake docand read the pages about thessr::apinamespace.This is just one step towards multiple network interfaces and 3D support, there will be more PRs coming!
Ideas (some of which are implemented in this PR):
--no-followoption (which is the default). Alternatively, it can also immediately start to "follow" another SSR instance (to be implemented). Finally, it can use--followand simply wait for the "leader" to connect (to be implemented).Some collateral changes in this PR:
Reason: The "reference offset" is a property of the renderer, not the scene.
Some Questions:
const std::string&orstd::stringorstd::string_vieworconst char*or ...?Future Work (not part of this PR):