Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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/{{ deplot_ioc_executable }}.dbd")
{{ deplot_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")
Loading