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..b963b968 --- /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: "PLACEHOLDER" + executable: "Keithley428"