Skip to content

Commit

Permalink
switch to pydantic generated schema
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Jul 14, 2023
1 parent 508d36c commit 8772cc3
Show file tree
Hide file tree
Showing 3 changed files with 690 additions and 365 deletions.
181 changes: 181 additions & 0 deletions ADCore/ADCore.ibek.support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# yaml-language-server: $schema=../_global/ibek.defs.schema.json

module: ADCore

defs:
- name: NDRoi
description: Defines a ROI Plugin for an AreaDetector instance
args:
- type: id
name: PORT
description: Port for this plugin

- type: object
name: NDARRAY_PORT
description: Port Name for input NDArray plugin

- type: str
name: P
description: The PV prefix

- type: str
name: R
description: The PV suffix

- type: int
name: TIMEOUT
description: Timeout for ASYN communications
default: 1

- type: int
name: ADDR
description: ASYN Address this plugin
default: 0

- type: int
name: NDARRAY_ADDR
description: ASYN Address for input NDArray plugin
default: 0

- type: bool
name: ENABLED
description: Enable/Disable this plugin at startup
default: true

- type: str
name: SCANRATE
description: Epics record scan rate
default: I/O Intr

- type: int
name: QUEUE
description: Number of NDArray buffers to be created for plugin callbacks
default: 2

- type: bool
name: BLOCK
description: blocking callbacks?
default: false

- type: int
name: MAX_THREADS
description: Maximum number of threads to use
default: 1

pre_init:
- type: function
name: NDROIConfigure
args:
AsynPortName: "{{ PORT }}"
QueueSize: "{{ QUEUE }}"
BlockingCallbacks: "{{ BLOCK | int }}"
NDArrayPort: "{{ NDARRAY_PORT }}"
NDArrayAddr: "{{ NDARRAY_ADDR }}"
MaxBuffers: 0
MaxMemory: 0
Priority: 0
StackSize: 0
MaxThreads: "{{ MAX_THREADS }}"

databases:
- file: NDROI.template
args:
{
P,
R: "{{ R }}:{{ REPEAT }}",
PORT,
TIMEOUT,
ADDR,
NDARRAY_PORT,
NDARRAY_ADDR,
ENABLED: "{{ ENABLED | int }}",
SCANRATE,
}

- name: NDStats
description: Defines a Stats Plugin for an AreaDetector instance
args:
- type: id
name: PORT
description: Port for this plugin

- type: str
name: NDARRAY_PORT
description: Port Name for input NDArray plugin

- type: str
name: P
description: The PV prefix

- type: str
name: R
description: The PV suffix

- type: int
name: TIMEOUT
description: Timeout for ASYN communications
default: 1

- type: int
name: ADDR
description: ASYN Address this plugin
default: 0

- type: int
name: NDARRAY_ADDR
description: ASYN Address for input NDArray plugin
default: 0

- type: bool
name: ENABLED
description: Enable/Disable this plugin at startup
default: true

- type: str
name: SCANRATE
description: Epics record scan rate
default: I/O Intr

- type: int
name: QUEUE
description: Number of NDArray buffers to be created for plugin callbacks
default: 2

- type: bool
name: BLOCK
description: blocking callbacks?
default: false

- type: int
name: MAX_THREADS
description: Maximum number of threads to use
default: 1

pre_init:
- type: function
name: NDStatsConfigure
args:
{
A,
B,
C: "{{ xxx }}",
D,
E: "{{ yyy }}",
G: "{{ yyy }}",
F: "{{ zzz }}",
}

databases:
- file: NDStats.template
args:
{
P,
R,
PORT,
TIMEOUT,
ADDR,
NDARRAY_PORT,
NDARRAY_ADDR,
ENABLED: "{{ ENABLED | int }}",
SCANRATE,
}
Loading

0 comments on commit 8772cc3

Please sign in to comment.