Hi Eric and Leandro,
Great work, congrats on the effort, I'm sure it will be very useful for others too :)
I'm not really familiar with the Ximea SDK, so I have just a few questions that generally come up whenever interfacing with camera drivers and some style comments:
1. I see you exposed several camera properties in the node. Is the Ximea SDK targeting only a specific camera, or several camera models? While it is convenient to have properties configured directly in the node, I've seen several times in SDKs that support multiple models that some properties will be available for some cameras but not others. This will then make the package and source actually tied specifically to certain models and might even crash in others (e.g. the AlliedVision package currently suffers from this). The other issue is that often firmware / software updates might change or expose new properties.
For this reason I've mostly chosen to be extremely minimalist when integrating vendor interfaces with Bonsai and expose no properties except those having to do with selecting cameras and/or certain readout specific properties such as color conversion / debayering, etc which are not set at the camera level. To support project specific camera configurations I then use the vendor specific configuration files, often in XML or similar format, which are exported from their configuration app, and try to figure out a way to load them into Bonsai. That way I guarantee that complete functionality of each camera is supported and also I don't have to recreate their configuration GUI.
2. Does the Ximea SDK support specifying a camera serial number? While this is not yet supported in all Bonsai camera interfaces, I've started giving preference to specifying the camera using the unique serial number, if available. The reason is it will help setups be more reliable for reconnecting USB ports, changing computers (as long as cameras are the same), etc. To do this I use two properties, one for serial number, the other with an optional index, and use the following preference: serial number? > index? > index0 , so basically if there is a serial number use serial number, otherwise check if there is an index, and finally if there isn't just try to pick the first available camera.
3. Is there any image metadata associated with Ximea SDK frames? Sometimes for industrial cameras I tend to expose this extra information using a class which has both the image and metadata. This can be useful in some cases where embedded information like GPIO inputs can be sampled simultaneously with sensor exposures.
4. In general I like to avoid printing debug info to the console, since it quickly becomes messy when using multiple cameras or multiple sources which print messages. Might be more future-proof to use logs and identify each message with the camera index or ID. Although my main preference is simplifying the interface as mentioned above. Then you can just open a connection to the camera and throw an error if it fails.
5. I noticed you are prefixing each property with a letter of the alphabet (A, B, C, D, etc). Is this to impose a certain order of the properties in the property grid? If that is the case, there are other ways to do it that do not require changing the property name,
e.g. using a type converter.
6. Finally a few minor style points:
- I wouldn't use underscores as word separators in C#. To keep the code idiomatic it would be better to keep to pascal casing for all public properties
- Constants should be pascal-cased
Hope this helps, I'll keep an eye out for repository updates.