Hi,
We have multiple PointGrey BlkFly cameras of the same model on our beamline. We only take image data from one camera at any time.
We could launch multiple ADAravis IOCs with one for each camera and switching PV names in GUI/OPI. But is it possible to launch just one IOC and switch to different cameras as needed?
I added stringout device support to ADAravis and created a record to change the camera name. So far, It seems like I can get the IOC connect to a different camera with pvput. But a lots of errors message will popup when I try to use the
camera.
Here is what I did when the camera name stringout record is being processed.
I added a member function ChangeCamera to ADAravis as
void ADAravis::ChangeCamera(const char *cameraName)
{
delete this->cameraName;
this->cameraName = epicsStrDup(cameraName);
// printf("%s\n",this->cameraName);
connectToCamera();
}
When the CameraName record is processed, it will call this CahngeCamera function.
From the printout of IOC shell as response to the ChangeCamera call,
CameraName 192.168.2.98
ADAravis: Looking for camera '192.168.2.98'...
2021/09/27 09:13:01.493 13ARV1:cam1:ARConnectCamera devAsynInt32::processCallbackOutput process write error
ADAravis: Your tick frequency is 125000000
So your timestamp resolution is 8.000000 ns
It looks like that the camera was successfully switched in aravis, but asyn driver seems to have some troubles.
When I tried to use the camera, lots of error or warning like the following pops up which seems that the other part of the IOC is still using the old camera instance which is no longer exist.
(process:2490): GLib-GObject-WARNING **: 09:20:01.768: invalid uninstantiatable type '<invalid>' in cast to 'ArvGcFeatureNode'
** (process:2490): CRITICAL **: 09:20:01.769: arv_gc_feature_node_is_available: assertion 'ARV_IS_GC_FEATURE_NODE (gc_feature_node)' failed
(process:2490): GLib-GObject-WARNING **: 09:20:01.769: invalid unclassed pointer in cast to 'ArvGcFeatureNode'
** (process:2490): CRITICAL **: 09:20:01.769: arv_gc_feature_node_is_available: assertion 'ARV_IS_GC_FEATURE_NODE (gc_feature_node)' failed
(process:2490): GLib-GObject-WARNING **: 09:20:01.769: invalid unclassed pointer in cast to 'ArvGcFeatureNode'
** (process:2490): CRITICAL **: 09:20:01.769: arv_gc_feature_node_is_available: assertion 'ARV_IS_GC_FEATURE_NODE (gc_feature_node)' failed
(process:2490): GLib-GObject-WARNING **: 09:20:01.769: invalid unclassed pointer in cast to 'ArvGcFeatureNode'
So it will take more than just ADAravis::ConnectToCamera() to make the switching work. But I don’t know what to add to ChangeCamera yet.
Any comments and suggestions will be greatly appreciated.
Thanks,
Wanming Liu
L120B, Bldg 360
HEP,ANL