-
Notifications
You must be signed in to change notification settings - Fork 1
Derived net cams for simultaneous net cams #25
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
base: master
Are you sure you want to change the base?
Conversation
Good idea, but unfortunately we do not have the plugins installed on the server running the net-instance. |
Ok, so indeed having a default or minimum number of derived classes as a build parameter would be necessary. Like this you'll get derived net cams even if you don't have any shared lib camera plugins installed. I'm not sure I follow why you'd like to build the subclasses in runtime ? Currently, the code for the derived classes is built at build time, and the remote camera properties are instantiated at runtime, just like before, but in seperate derived classes. (I just hated the idea of having |
The plugins are usually not installed on the "client" side, so reading libuca*.so does not make sense. |
I'm currently too busy to proceed with a more elegant solution. |
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'm currently too busy for a more elegant solution.
Could you change this, then we can stay with this solution:
- Remove the reading of the installed plugins. The whole point of uca-net is, that I don't have them installed on the client side. Maybe the paramter min_derived_net_cameras should be renamed num_derived_net_cameras or simmilar.
- Add CMake builds
- Write the number of generated netXX classes in a header-file (I have an idea to make it a bit more hidden from the user)
- The net-camera (without a number) is now broken (not linked correctly). Make it also working for compatibility.
- Make the default number of netXX-cameras to 10 (just checked my logs and my record so far was 5 cameras at the same time and I don't want to recompile everything the next time we try something special).
Fixed:
|
My gobject knowledge is a bit rusty, so here is my idea in c++ wording. If you create a pure virtual uca net base class, from which you inherit the netX and the normal net camera it should work. Then you do not have to overwrite the method. I cannot overwrite a method but only add new ones in gobject classes? |
This works now. |
Meson builds as many net cameras as there are shared libs in uca install folder. Networking functions remain in uca net, remote properties are handled in derived classes.
Forgot to add in previous commit
Only meson supports this for now
Fixed: - [x] `min_derived_net_cameras` to `num_derived_net_cameras` - [x] Support for CMake builds - [x] Added `NUM_DERIVED_NET_CAMERAS` to the config file - [x] Set default number of derived cameras to 10. - [ ] Still cannot instantiate the parent class `UcaNetCamera`...
290d151
to
b7d2901
Compare
Can you paste here a simple use case? |
Also why do we just count them and not add the suffix of the actual camera behind net? |
I mean, how am I supposed to know which camera is which? |
Use case (in concert): from concert.devices.camera.uca import Camera
net_dimax = await Camera("net0",params=host:port etc)
net_phantom = await Camera("net1", params=host:port, etc) Then I don't have mixed up properties, since each remote-property is registered to a different class. With ufo-kit/libuca#102 you can just write "net". |
We do not have the remote plugins installed on the client side. |
Right. Perhaps one could somehow get them from the server but I know that's additional work. I left a comment in the sibling PR too. |
I'm not 100% I didn't beak something here. Some unit tests would be pretty nice in this case.
Derived cameras take the names of shared lib cams you have installed in uca. e.g. mock -> netmock.
Maybe should we add some sort of minimum amount of derived net cams in the build settings ?