Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Aug 1, 2024
1 parent 2bd50f6 commit 6a7c8f7
Show file tree
Hide file tree
Showing 152 changed files with 53,516 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 3.5.0
_src_path: ioc-template
description: An example instantiation of the ioc-template copier template
_commit: 3.5.0-6-g22dff70
_src_path: gh:epics-containers/ioc-template
description: A test instantiation of the ioc-template copier template
git_platform: github.com
github_org: epics-containers
name: ioc-template-example
Expand Down
Empty file added .nojekyll
Empty file.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ WORKDIR ${SOURCE_FOLDER}/ibek-support
# copy the global ibek files
COPY ibek-support/_global/ _global

COPY ibek-support/pvxs/ pvxs/
RUN pvxs/install.sh 1.3.1

COPY ibek-support/iocStats/ iocStats
RUN iocStats/install.sh 3.2.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generic IOC Template Repository ioc-template-example

## Description
An example instantiation of the ioc-template copier template
A test instantiation of the ioc-template copier template

## Template Info
This repository was generated by
Expand Down
1 change: 0 additions & 1 deletion ibek-support
Submodule ibek-support deleted from 06a0ec
11 changes: 11 additions & 0 deletions ibek-support/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
98 changes: 98 additions & 0 deletions ibek-support/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Check that ibek-support support modules will build in a container

on:
push:
pull_request:

jobs:
check-generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Run schema/ioc instance generation tests
run: |
pip install -r requirements.txt
bash tests/test_generate.sh
check-docker-build:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
max-parallel: 10
matrix:
repo: [ioc-adaravis, ioc-pmac, ioc-lakeshore340, ioc-tetramm, ioc-opcua, ioc-motorSim, ioc-adsimdetector]
include:
# rtems is cross compiled on ubuntu-latest
# linux is natively compiled on ubuntu-latest and macos-latest

# enable below for RTEMS
# - architecture: rtems
# os: ubuntu-latest
# platform: linux/amd64

- os: ubuntu-latest
epics-target: linux-x86_64
extension: ""
platform: linux/amd64

# enable below for MACOS native build on M1 macs
# M1 Macs are coming!: https://github.com/github/roadmap/issues/528
# - architecture: linux
# os: macos-latest-x1
# platform: linux/arm64

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
uses: docker-practice/actions-setup-docker@fd7ecdac7caf8e2c541a48c9bcc280aae59a8461

- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Setup
# before building the container set up to use this version of ibek-support
# and its associated version of ibek
env:
REPO: ${{ matrix.repo }}
run: |
git clone https://github.com/epics-containers/${REPO} /tmp/generic_ioc
cp -r . /tmp/generic_ioc/ibek-support
cp ./requirements.txt /tmp/generic_ioc
- name: Build image
uses: docker/build-push-action@v5
with:
context: /tmp/generic_ioc
platforms: ${{ matrix.platform }}
target: runtime
build-args: |
IMAGE_EXT=${{ matrix.extension }}
cache-from: type=gha,scope=${{ matrix.epics-target }}
cache-to: type=gha,mode=max,scope=${{ matrix.epics-target }}
tags: ci_test
load: true

- name: Test image
# can't test non native without some hardware to run on
if: ${{ matrix.epics-target == 'linux-x86_64' }}
run: /tmp/generic_ioc/tests/run-tests.sh ci_test
3 changes: 3 additions & 0 deletions ibek-support/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.coverage
# generate schemas for tests but don't commit them
schemas/
9 changes: 9 additions & 0 deletions ibek-support/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "tests/beamlines/bl47p"]
path = tests/ioc_repos/bl47p
url = https://github.com/epics-containers/bl47p.git
[submodule "tests/beamlines/bl45p"]
path = tests/ioc_repos/bl45p
url = https://github.com/epics-containers/bl45p.git
[submodule "tests/ioc_repos/bl01t"]
path = tests/ioc_repos/bl01t
url = https://github.com/epics-containers/bl01t.git
154 changes: 154 additions & 0 deletions ibek-support/ADAravis/ADAravis.ibek.support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# yaml-language-server: $schema=../schemas/ibek.support.schema.json

module: ADAravis

entity_models:
- name: aravisCamera
description: |-
Creates an aravisCamera camera areaDetector driver
parameters:
ID:
type: str
description: |-
Cam ip address, hostname, MAC address, or ID <manufacturer>-<serial>, (e.g. Prosilica-02-2166A-06844)
P:
type: str
description: |-
PV Prefix
R:
type: str
description: |-
PV Suffix
PORT:
type: id
description: |-
Port name for the camera
BUFFERS:
type: int
description: |-
Maximum number of NDArray buffers to be created for plugin callbacks
default: 50

MEMORY:
type: int
description: |-
Max memory to allocate, should be maxw*maxh*nbuffer for driver and all attached plugins
default: -1

TIMEOUT:
type: int
description: |-
Timeout, default 1
default: 1

ADDR:
type: int
description: |-
Asyn Port address, default 0
default: 0

CLASS:
type: enum
description: |-
Camera class for custom commands
values:
Basler-a2A2600-20gmBAS:
Basler-scA1400-30gm:
Basler-scA1300-32gm:
Basler-scA640-70gm:
Basler-acA640-90gm:
Basler-acA640-300gm:
Basler-acA1300-30gm:
Basler-acA1300-60gm:
Basler-acA1300-75gm:
Basler_piA640_210gm:
AVT_Manta_G319B:
AVT_Mako_G040B:
AVT_Manta_G2460C:
AVT_Mako_G125B:
AVT_Mako_G125C:
AVT_Prosilica_GC1280M:
AVT_Mako_1_52:
AVT_Manta_G507B:
AVT_Manta_G145B:
AVT_Mako_G507B:
AVT_Mako_G507C:
AVT_Prosilica_GT5120:
AVT_Mako_G319C:
AVT_Manta_G419C:
AVT_Prosilica_GC1020C:
AVT_Prosilica_GC655C:
XIMEA_MC124CG-SY:
JAI_CM140_v2-2:
Prosilica_GC:
AVT_Manta_G125B:
AVT_Manta_G125C:
AVT_Manta_G040B:
AVT_Manta_G895B:
AVT_Mako_G158B:
AVT_Mako_G158C:
AVT_Manta_G235B:
AVT_Manta_G235C:
AVT_Manta_1_44:
AVT_Mako_G234C:
AVT_Mako_G234B:
AVT_Manta_G609B:
JAI_CM140:
AutoADGenICam:
# The AutoADGenICam value causes the start.sh to contact the camera and auto
# generate the DB file. The pvi.device file is always autogenerated

pre_init:
- value: |
# aravisConfig(const char *portName, const char *cameraName, size_t maxMemory, int priority, int stackSize)
aravisConfig("{{PORT}}", "{{ID}}", {{MEMORY}}, 0, 1)
databases:
- file: $(ADARAVIS)/db/aravisCamera.template
args: { P, R, PORT, TIMEOUT, ADDR }

pvi:
yaml_path: ADAravis.pvi.device.yaml
ui_macros:
P:
R:
pv: true
pv_prefix: $(P)$(R)

- name: aravisSettings

description: |
Create detailed settings screens for an Aravis camera from one of
the predefined database files in ADGenICam or from the auto generated
database file for a specific camera.
Specify which one using the CLASS parameter or leave CLASS as the
default value to auto generate database file. In this case start.sh
will contact the camera and generate the database file from its XML
description of all its configuration parameters.
parameters:
camera:
type: object
description: the aravisCamera object to create settings for

pvi:
yaml_path: "{{ '-'.join([camera.ID,camera.CLASS]) if camera.CLASS=='AutoADGenICam' else camera.CLASS }}.pvi.device.yaml"
ui_macros:
P: "{{ camera.P }}"
R: "{{ camera.R }}"
pv: true
pv_prefix: "{{ camera.P }}{{ camera.R }}"

databases:
- file: "{{ '-'.join([camera.ID,camera.CLASS]) if camera.CLASS=='AutoADGenICam' else camera.CLASS }}.template"
args:
P: "{{ camera.P }}"
R: "{{ camera.R }}"
PORT: "{{ camera.PORT }}"
TIMEOUT: "{{ camera.TIMEOUT }}"
ADDR: "{{ camera.ADDR }}"
Loading

0 comments on commit 6a7c8f7

Please sign in to comment.