Skip to content

Commit

Permalink
update genicam template names and cope with missing camera with auto-…
Browse files Browse the repository at this point in the history
…gen (#45)

* update genicam template names and cope with missing camera with auto-gen

* Add failure message

---------

Co-authored-by: Marcell Nagy <[email protected]>
  • Loading branch information
gilesknap and marcelldls authored Nov 14, 2024
1 parent d416080 commit f73bfe7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions ioc/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,17 @@ elif [ -f ${ibek_src} ]; then
instance_id=$(yq .entities[${count}].ID ${ibek_src})

if [[ $instance_class == "AutoADGenICam" ]]; then
instance_class=${instance_id}-${instance_class}
instance_class=auto-${instance_id}
# Auto generate GenICam database from camera parameters XML
arv-tool-0.8 -a ${instance_id} genicam > /tmp/${instance_id}-genicam.xml
python /epics/support/ADGenICam/scripts/makeDb.py /tmp/${instance_id}-genicam.xml /epics/support/ADGenICam/db/${instance_class}.template
if [[ ! -s /tmp/${instance_id}-genicam.xml ]]; then
# can't contact the camera - make an empty template
echo "Can't connect to camera ${instance_id}"
touch /epics/support/ADGenICam/db/${instance_class}.template
else
# make a db file from the GenICam XML
python /epics/support/ADGenICam/scripts/makeDb.py /tmp/${instance_id}-genicam.xml /epics/support/ADGenICam/db/${instance_class}.template
fi
fi
# Generate pvi device from the GenICam DB
template=/epics/support/ADGenICam/db/$instance_class.template
Expand Down

0 comments on commit f73bfe7

Please sign in to comment.