1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Is it possible to switch to different camera for ADAravis without launching multiple IOC or restart the same IOC with different script? |
From: | "Liu, Wanming via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Mon, 27 Sep 2021 14:54:30 +0000 |
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 |