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
5 changes: 3 additions & 2 deletions roles/deploy_ioc/vars/adphantom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

deploy_ioc_use_common: true
deploy_ioc_use_ad_common: true
deploy_ioc_required_module: adphantom_fdff818
deploy_ioc_executable: 'miroApp'
deploy_ioc_required_module: adphantom_329598e
deploy_ioc_template_root_path:
"{{ deploy_ioc_required_module_path }}/iocs/phantomIOC"
2 changes: 2 additions & 0 deletions roles/device_roles/adphantom/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ADPhantom:
environment:
PREFIX: "XF:31ID1-ES{VEO:Cam-1}"
ENGINEER: "K. Barry"
MAC_ADDR: "1423f21fdeb0"
INTF: "eno5"
CAMERA_IP: "100.100.214.107"
NUM_CINES: 16
2 changes: 2 additions & 0 deletions roles/device_roles/adphantom/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ environment:
PREFIX: str()
CAMERA_IP: str()
NUM_CINES: int()
MAC_ADDR: str()
INTF: str()
17 changes: 8 additions & 9 deletions roles/device_roles/adphantom/templates/base.cmd.j2
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
dbLoadDatabase("{{ _ioc_template_root_path }}/dbd/miroApp.dbd")
miroApp_registerRecordDeviceDriver(pdbbase)
dbLoadDatabase("{{ deploy_ioc_template_root_path }}/dbd/{{ deploy_ioc_executable }}.dbd")
{{ deploy_ioc_executable }}_registerRecordDeviceDriver(pdbbase)

set_requestfile_path("$(ADCORE)/db:$(ADPHANTOM)/db")

# Configure control and data TCP/IP socket connections. Default ports should be 7115 and 7116 respectively.
drvAsynIPPortConfigure("CTRL", "$(CAMERA_IP):$(CTRL_PORT)", 100, 0, 0)
drvAsynIPPortConfigure("DATA", "$(CAMERA_IP):$(DATA_PORT)", 100, 0, 0)

# Configure the camera
miroCameraConfig("$(PORT)", "CTRL", "DATA", 0, 0, 0, 0)
ADPhantomConfig("$(PORT)", "CTRL", "DATA", "$(MAC_ADDR)", "$(INTF)", 0, 0, 0, 0)

# Enable debugging for certain functions
#miroCameraDebug("$(PORT)", "readoutDataStream", 1);
#ADPhantomDebug("$(PORT)", "readoutDataStream", 1);

asynSetTraceIOMask($(PORT), 0, 2)
#asynSetTraceMask($(PORT), 0, 0xff)

# Load base camera records
dbLoadRecords("$(ADPHANTOM)/db/miroCamera.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
dbLoadRecords("$(ADPHANTOM)/db/phantomCamera.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")

{% for i in range(0, ioc.environment.NUM_CINES)%}
dbLoadRecords("$(ADPHANTOM)/db/miroCine.template", "P=$(PREFIX),R=cam1:, CINE={{ i + 1 }}, PORT=$(PORT),ADDR=0,TIMEOUT=1")
dbLoadRecords("$(ADPHANTOM)/db/phantomCine.template", "P=$(PREFIX),R=cam1:, CINE={{ i + 1 }}, PORT=$(PORT),ADDR=0,TIMEOUT=1")
{% endfor %}

#
Expand All @@ -27,6 +29,3 @@ dbLoadRecords("$(ADPHANTOM)/db/miroCine.template", "P=$(PREFIX),R=cam1:, CINE={{
# int priority, int stackSize, int maxThreads)
NDStdArraysConfigure("Image1", 3, 0, "$(PORT)", 0)
dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,NDARRAY_PORT=$(PORT),TIMEOUT=1,TYPE=Int16,FTVL=SHORT,NELEMENTS=6000000")


set_requestfile_path("$(ADPHANTOM)/db")
11 changes: 11 additions & 0 deletions roles/install_module/vars/adphantom_329598e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
adphantom_329598e:
name: ADPhantom
executable: phantomApp
version: 329598e
url: https://github.com/jwlodek/ADPhantom
include_base_ad_config: true
module_deps:
- adcore_60080dc
pkg_deps:
- libpcap-devel
7 changes: 0 additions & 7 deletions roles/install_module/vars/adphantom_fdff818.yml

This file was deleted.