From 3c897de4f08bbe2bb2da8997a66a963ad78ae32e Mon Sep 17 00:00:00 2001 From: gbischof Date: Tue, 4 Nov 2025 14:29:27 -0500 Subject: [PATCH 1/2] Keithley428 migration --- roles/deploy_ioc/vars/keithley428.yml | 5 +++++ roles/device_roles/keithley428/README.md | 3 +++ roles/device_roles/keithley428/example.yml | 8 ++++++++ roles/device_roles/keithley428/schema.yml | 7 +++++++ roles/device_roles/keithley428/tasks/main.yml | 9 +++++++++ roles/device_roles/keithley428/templates/base.cmd.j2 | 4 ++++ roles/install_module/vars/keithley428_0000000.yml | 7 +++++++ 7 files changed, 43 insertions(+) create mode 100644 roles/deploy_ioc/vars/keithley428.yml create mode 100644 roles/device_roles/keithley428/README.md create mode 100644 roles/device_roles/keithley428/example.yml create mode 100644 roles/device_roles/keithley428/schema.yml create mode 100644 roles/device_roles/keithley428/tasks/main.yml create mode 100644 roles/device_roles/keithley428/templates/base.cmd.j2 create mode 100644 roles/install_module/vars/keithley428_0000000.yml diff --git a/roles/deploy_ioc/vars/keithley428.yml b/roles/deploy_ioc/vars/keithley428.yml new file mode 100644 index 00000000..004d27d7 --- /dev/null +++ b/roles/deploy_ioc/vars/keithley428.yml @@ -0,0 +1,5 @@ +--- +# Variables for the keithley428 role +deploy_ioc_template_root_path: "{{ deploy_ioc_required_module_path }}" +deploy_ioc_required_module: keithley428_0000000 +deploy_ioc_device_specific_env: {} diff --git a/roles/device_roles/keithley428/README.md b/roles/device_roles/keithley428/README.md new file mode 100644 index 00000000..5c772c5d --- /dev/null +++ b/roles/device_roles/keithley428/README.md @@ -0,0 +1,3 @@ +# Keithley428 Role + +This role deploys an IOC for the Keithley 428 current amplifier. diff --git a/roles/device_roles/keithley428/example.yml b/roles/device_roles/keithley428/example.yml new file mode 100644 index 00000000..e3fc3c02 --- /dev/null +++ b/roles/device_roles/keithley428/example.yml @@ -0,0 +1,8 @@ +--- + +keithley428-01: + type: keithley428 + + environment: + PREFIX: "XF:31ID1-ES{KEITHLEY428:Dev-1}" + ENGINEER: "C. Engineer" diff --git a/roles/device_roles/keithley428/schema.yml b/roles/device_roles/keithley428/schema.yml new file mode 100644 index 00000000..8801d25d --- /dev/null +++ b/roles/device_roles/keithley428/schema.yml @@ -0,0 +1,7 @@ +--- + +type: enum("keithley428") + +environment: + PREFIX: str() + ENGINEER: str() diff --git a/roles/device_roles/keithley428/tasks/main.yml b/roles/device_roles/keithley428/tasks/main.yml new file mode 100644 index 00000000..d6beba0f --- /dev/null +++ b/roles/device_roles/keithley428/tasks/main.yml @@ -0,0 +1,9 @@ +--- + +- name: Install base startup script + ansible.builtin.template: + src: "base.cmd.j2" + dest: "{{ deploy_ioc_ioc_directory }}/iocBoot/base.cmd" + owner: "{{ host_config.softioc_user }}" + group: "{{ host_config.softioc_group }}" + mode: "0664" diff --git a/roles/device_roles/keithley428/templates/base.cmd.j2 b/roles/device_roles/keithley428/templates/base.cmd.j2 new file mode 100644 index 00000000..63ff1ce2 --- /dev/null +++ b/roles/device_roles/keithley428/templates/base.cmd.j2 @@ -0,0 +1,4 @@ + + +dbLoadDatabase("{{ deploy_ioc_required_module_path }}/dbd/{{ deploy_ioc_executable }}.dbd") +{{ deploy_ioc_executable }}_registerRecordDeviceDriver(pdbbase) diff --git a/roles/install_module/vars/keithley428_0000000.yml b/roles/install_module/vars/keithley428_0000000.yml new file mode 100644 index 00000000..1946369d --- /dev/null +++ b/roles/install_module/vars/keithley428_0000000.yml @@ -0,0 +1,7 @@ +--- +keithley428_0000000: + name: Keithley428 + url: https://github.com/NSLS-II/Keithley428 + # TODO: Replace with actual commit hash when repo is available + version: "0000000" + executable: "Keithley428" From 96d7417cafbdc191f67db92ed0757bc65fe32109 Mon Sep 17 00:00:00 2001 From: Garrett Bischof Date: Tue, 4 Nov 2025 15:28:43 -0500 Subject: [PATCH 2/2] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- roles/install_module/vars/keithley428_0000000.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/install_module/vars/keithley428_0000000.yml b/roles/install_module/vars/keithley428_0000000.yml index 1946369d..b963b968 100644 --- a/roles/install_module/vars/keithley428_0000000.yml +++ b/roles/install_module/vars/keithley428_0000000.yml @@ -3,5 +3,5 @@ keithley428_0000000: name: Keithley428 url: https://github.com/NSLS-II/Keithley428 # TODO: Replace with actual commit hash when repo is available - version: "0000000" + version: "PLACEHOLDER" executable: "Keithley428"