-
-
Notifications
You must be signed in to change notification settings - Fork 342
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 a GenTL consumer interface #831
Conversation
It was accidiently added to git.
this will abort the blocking EventGetData call in the thread loop
One more thing to note is arv-viewer crashes when loading Pylon 7.4 ProducerU3V.cti or ProducerGEV.cti
arv-tool and ADVimba do not have this problem.
A speculation is that, many pylon libraries have STL (std::string, std::thread ...) symbols builtin, but the GenTL producer libraries use dynamic linking. Maybe there are conflicts somewhere. |
PATH_MAX is posix only.
Hi @xiaoqiangwang , Thanks a lot. I just ran a quick test that worked fine using Basler U3VProvider. Nice work !
Question about that: is the execution of the Genicam feature AcquisitionStart supposed to start the acquisition on all the device datastream ? If so, we can keep a track off all created streams, and call stream_start_acquisition internally. You may use g_object_weak_ref from the ArvDevice to keep this list. Also, it would be nice to add a arv_stream_create_and_push_buffers that will create the buffers knowing the datastream instance, and possibly help to avoid the memory copy. We will also need a arv_buffer_new_with_user_data for that purpose. |
I have not see the document says otherwise, but I assume it is true, because there is no knowing of datastreams in GenICam interface.
If I create two news ArvDevice methods, device_start/stop_acquisition, these two relay camera_start/stop_acquisition calls to underlying stream_start/stop_acquisition. Would that be Ok?
I understand this need but have no confidence in designing this API. |
Yes, seems fine. |
No problem. Once your work is merged, we can iterate and fix these sort of issues. |
So that in user API level, no change is required.
The change to start/stop_acquisition has been made. Since the relay is internalised, user API is unaffected. arvviewer.c and arvtest.c are unmodified and the tests pass. Thanks for the suggestion. I have briefly tested the idea of adding buffers directly to GenTL producers, /~https://github.com/xiaoqiangwang/aravis/tree/gentl_buffer. But it turns out that Basler GenTL producers do not support adding buffers during acquisition. And GenTL standard does not make it mandatory. For applications with a static set of buffers, that may work. But in this case, it constantly passes on filled buffers and created and queue new ones. |
Do you still have pending work on this pull request ? Any known crash or bug ? |
I am testing the event notification. The reading of event data is there. For the user API, I imagine a signal "device-event" on the device level. We can also make the event notification another PR. |
I have pushed the event notification part. arv-test has a new Event option for testing. One problem with the event data nodes is that they stopped reading after the first event update. Is there a way to invalidate the node or force a new read? |
@EmmanuelP just to be clear that this PR is ready for review. It passes the arv-test program and runs stable with ADAravis. |
Ok. I will try to merge your work next week. Thanks again. |
I have commited most of your changes in main. Events are disabled for now (the code is in, but commented out), I have still to think about the API. The changes in arv-test are not commited, the addition of the event testing in the transfer test code makes thing a bit too complicated to my taste. Thanks again, nice piece of work ! |
It makes aravis a GenTL consumer and work with GenICam cameras with non USB/Ethernet interfaces .
One breaking change is that GenTL requires its own start/stop acquisition calls, which have to be synched with ArvCamera object, i.e.
I have tested the implementation with a Basler acA1300-200uc USB3 camera with Pylon SDK 7.3 on a Debian 12 x86_64 system. Both arv-tool and arv-viewer work normally. /~https://github.com/areaDetector/ADAravis can also work with this new implementation.