Skip to content
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

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

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ioc/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ 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
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
Loading