Skip to content

Commit

Permalink
adding an example IOC
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 24, 2023
1 parent c79621a commit fbd89dd
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ ARG REGISTRY=ghcr.io/epics-containers

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer

# Get latest ibek while in development. Will come from epics-base when stable
COPY requirements.txt requirements.txt
RUN pip install --upgrade -r requirements.txt

# The devcontainer mounts the project root to /epics/ioc-adsimdetector. Using
# the same location here makes devcontainer/runtime differences transparent.
WORKDIR /epics/ioc-adsimdetector/ibek-support
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ IOC Builder for EPICS and Kubernetes (ibek).
The Generic IOC built by CI is published to
[Github Packages](https://github.com/orgs/epics-containers/packages?repo_name=ioc-adsimdetector).

## How to test this container.

1. git clone [email protected]:epics-containers/ioc-adsimdetector.git
1. open the folder in vscode
1. open project in container
1. open a terminal and perform the following inside the container

- (TODO it would be nice to have a single ibek wrapper command for these
or maybe add them in as part of the 'ioc build' wrapper)
- ibek ioc build
- ibek dev instance /epics/ioc-adsimdetector/ioc_examples/bl01t-ea-ioc-02
- ibek support generate-links ADCore
- ibek support generate-links ADSimDetector
- cd /epics/ioc
- ./start


## Related projects

Expand Down
59 changes: 59 additions & 0 deletions ioc_examples/bl01t-ea-ioc-02/config/ioc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.11.2/ibek.ioc.schema.json

ioc_name: bl01t-ea-ioc-02
description: Example simulated camera for BL01T

entities:
- type: ADSimDetector.simDetector
PORT: det.cam
P: BL01T-EA-TST-02
R: ":CAM:"

- type: ADCore.NDPvaPlugin
PORT: det.pva
PVNAME: BL01T-EA-TST-02:PVA:OUTPUT
P: BL01T-EA-TST-02
R: ":PVA:"
NDARRAY_PORT: det.cam

- type: ADCore.NDROI
NDARRAY_PORT: det.cam
P: BL01T-EA-TST-02
PORT: det.roi
R: ":ROI:"

- type: ADCore.NDStdArrays
FTVL: UCHAR
NDARRAY_PORT: det.roi
NELEMENTS: 1200000
P: BL01T-EA-TST-02
PORT: det.arr
R: ":ARR:"
TYPE: Int8

- type: ADCore.NDStats
HIST_SIZE: 256
NDARRAY_PORT: det.cam
P: BL01T-EA-TST-02
PORT: det.stat
R: ":STAT:"
XSIZE: 1292
YSIZE: 964

- type: ADCore.NDProcess
NDARRAY_PORT: det.cam
P: BL01T-EA-TST-02
PORT: det.proc
R: ":PROC:"

- type: ADCore.NDFileTIFF
NDARRAY_PORT: det.cam
P: BL01T-EA-TST-02
PORT: det.tiff
R: ":TIFF:"

- type: ADCore.NDFileHDF5
NDARRAY_PORT: det.cam
P: BL01T-EA-TST-02
PORT: det.hdf
R: ":HDF5:"
1 change: 1 addition & 0 deletions ioc_examples/bl01t-ea-ioc-02/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
image: ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2023.10.7
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ibek==1.5.2
# to install direct from github during development in the dev branch:
#git+https://github.com/epics-containers/ibek.git@dev

0 comments on commit fbd89dd

Please sign in to comment.