Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ delete:

role:
@if [ -z "${TARGET}" ]; then \
./scripts/manage_collection.py add role; \
pixi run make-role; \
else \
./scripts/manage_collection.py $(TARGET) role; \
pixi run $(TARGET)-role; \
fi
git status

module:
@if [ -z "${TARGET}" ]; then \
./scripts/manage_collection.py add module; \
pixi run make-module; \
else \
./scripts/manage_collection.py $(TARGET) module; \
pixi run $(TARGET)-module; \
fi
git status

report:
./scripts/manage_collection.py report
pixi run report
12 changes: 6 additions & 6 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ version = "1.2.0"
default = { solve-group = "default" }

[tasks]
make-role = "make role"
make-module = "make module"
update-module = "make update module"
delete-role = "make delete role"
delete-module = "make delete module"
report = "make report"
make-role = "scripts/manage_collection.py add role"
make-module = "scripts/manage_collection.py add module"
update-module = "scripts/manage_collection.py update module"
delete-role = "scripts/manage_collection.py delete role"
delete-module = "scripts/manage_collection.py delete module"
report = "scripts/manage_collection.py report"
lint-changes = "pre-commit"
lint = "pre-commit run --all-files"
ruff-fix = "ruff check --fix"
Expand Down
16 changes: 16 additions & 0 deletions roles/deploy_ioc/vars/adxspd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

deploy_ioc_use_ad_common: true
deploy_ioc_required_module: adxspd_986de77
deploy_ioc_template_root_path:
"{{ deploy_ioc_required_module_path }}/iocs/xspdIOC"
deploy_ioc_req_file_list:
- name: auto_settings.req
macros: "P=$(PREFIX)"
deploy_ioc_device_specific_env:
PORT: "XSPD1"
QSIZE: 20
NCHANS: 2048
CBUFFS: 500
MAX_THREADS: 8
EPICS_DB_INCLUDE_PATH: "$(ADCORE)/db"
3 changes: 3 additions & 0 deletions roles/device_roles/adxspd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# adxspd

Ansible role for deploying ADXSPD IOC instances.
13 changes: 13 additions & 0 deletions roles/device_roles/adxspd/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

adxspd-01:
type: adxspd
environment:
ENGINEER: C. Engineer
PREFIX: XF:31ID1-ES{XSPD-Det:1}
XSIZE: 1576
YSIZE: 1200
NUM_MODULES: 1
IP: "192.168.1.1"
PORT_NUM: 8008
DEVICE_ID: "lambda01"
15 changes: 15 additions & 0 deletions roles/device_roles/adxspd/schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

type: enum("adxspd")
environment:
ENGINEER: str()
PREFIX: str()
XSIZE: int()
YSIZE: int()
NUM_MODULES: int()
IP: any(hostname(), ip())
PORT_NUM: int()

# Optional device identifier.
# If not specified, first device discovered will be used.
DEVICE_ID: str(required=False)
18 changes: 18 additions & 0 deletions roles/device_roles/adxspd/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# Tasks for adxspd role

- name: Install base.cmd
ansible.builtin.template:
src: templates/base.cmd.j2
dest: "{{ deploy_ioc_ioc_directory }}/iocBoot/base.cmd"
mode: "0664"
owner: "{{ host_config.softioc_user }}"
group: "{{ host_config.softioc_group }}"

- name: Install auto_settings.req
ansible.builtin.template:
src: templates/auto_settings.req.j2
dest: "{{ deploy_ioc_as_directory }}/req/auto_settings.req"
mode: "0664"
owner: "{{ host_config.softioc_user }}"
group: "{{ host_config.softioc_group }}"
8 changes: 8 additions & 0 deletions roles/device_roles/adxspd/templates/auto_settings.req.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file "ADXSPD_settings.req", P=$(P), R=cam1:
file "commonPlugin_settings.req", P=$(P)
{% if deploy_ioc_merged_env.FFMPEGSERVER is defined and ioc.environment.FFMSTREAM_PORT is defined%}
file "ffmpegServer_settings.req", P=$(P), R=ffmstream1:
{% endif %}
{% if deploy_ioc_merged_env.ADCOMPVISION is defined %}
file "NDCV_settings.req", P=$(P), R=CV1:
{% endif %}
17 changes: 17 additions & 0 deletions roles/device_roles/adxspd/templates/base.cmd.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

dbLoadDatabase("{{ deploy_ioc_template_root_path }}/dbd/{{ deploy_ioc_executable }}.dbd")
{{ deploy_ioc_executable }}_registerRecordDeviceDriver(pdbbase)

# adxspd specific commands
{% if ioc.environment.DEVICE_ID is defined %}
ADXSPDConfig("$(PORT)", "$(IP):$(PORT_NUM)", "$(DEVICE_ID)")
{% else %}
ADXSPDConfig("$(PORT)", "$(IP):$(PORT_NUM)")
{% endif %}

dbLoadRecords("$(ADXSPD)/db/ADXSPD.template","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
{% for module_index in range(1, ioc.environment.NUM_MODULES + 1) %}
dbLoadRecords("$(ADXSPD)/db/ADXSPDModule.template", "P=$(PREFIX), R=mod{{ module_index }}:,PORT=$(PORT)_MOD{{ module_index }},ADDR=0,TIMEOUT=1")
{% endfor %}

set_requestfile_path("$(ADXSPD)/xspdApp/Db")
13 changes: 13 additions & 0 deletions roles/install_module/vars/adxspd_986de77.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

adxspd_986de77:
name: ADXSPD
version: 986de77
url: https://github.com/NSLS2/ADXSPD
include_base_ad_config: True
executable: xspdApp
pkg_deps:
- curl-devel
module_deps:
- adcompvision_9750d13
- adcore_60080dc
Loading