Skip to content

Commit

Permalink
Refactor assemblies into blocks and includes
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Nov 1, 2016
1 parent 63b3fa1 commit a19643d
Show file tree
Hide file tree
Showing 47 changed files with 533 additions and 412 deletions.
44 changes: 0 additions & 44 deletions malcolm/assemblies/ADCore/DetectorManager.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions malcolm/assemblies/pmac/PMACManager.yaml

This file was deleted.

73 changes: 0 additions & 73 deletions malcolm/assemblies/xspress3/Xspress3DetectorDriver.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Block

- parameters.string:
name: prefix
description: The root PV for the all records

- parts.ca.CAStringPart:
name: inp
description: Array inport name
pv: $(prefix):NDArrayPort
rbvSuff: _RBV
widget: textinput
inportType: NDArray
- controllers.DefaultController:
mri: $(mri)

- parts.ca.CABooleanPart:
name: enableCallbacks
description: Enable plugin to run when we get a new frame
pv: $(prefix):EnableCallbacks
rbvSuff: _RBV
widget: checkbox
# This includes the input port
- includes.ADCore.ndpluginbase_parts:
prefix: $(prefix)

- parts.ca.CAChoicePart:
name: fileWriteMode
Expand Down Expand Up @@ -258,19 +254,6 @@
rbv: $(prefix):Capture_RBV
widget: led

- parts.ca.CALongPart:
name: arrayCounter
description: Current unique id number for frame
pv: $(prefix):ArrayCounter
rbvSuff: _RBV
widget: textupdate

- parts.ca.CALongPart:
name: uniqueId
description: Current unique id number for frame
rbv: $(prefix):UniqueId_RBV
widget: textupdate

- parts.ca.CACharArrayPart:
name: writeMessage
description: Error message if in error
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Block

- parameters.string:
name: prefix
description: The root PV for the all records

- parts.asyn.AsynOutportPart:
name: out
description: Array outport name
rbv: $(prefix):PortName_RBV
outportType: NDArray
- controllers.DefaultController:
mri: $(mri)

- parts.ca.CAStringPart:
name: inp
description: Array inport name
pv: $(prefix):NDArrayPort
rbvSuff: _RBV
widget: textinput
inportType: NDArray
# This includes the output port
- includes.ADCore.ndarray_parts:
prefix: $(prefix)

- parts.ca.CABooleanPart:
name: enableCallbacks
description: Enable plugin to run when we get a new frame
pv: $(prefix):EnableCallbacks
rbvSuff: _RBV
widget: checkbox
# This includes the input port
- includes.ADCore.ndpluginbase_parts:
prefix: $(prefix)

- parts.ca.CAActionPart:
name: delete
Expand Down
13 changes: 13 additions & 0 deletions malcolm/blocks/ADCore/SimDetectorDriver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Block

- parameters.string:
name: prefix
description: The root PV for the all records

- controllers.DefaultController:
mri: $(mri)

- includes.ADCore.adbase_parts:
prefix: $(prefix)
22 changes: 22 additions & 0 deletions malcolm/blocks/ADCore/SimDetectorManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- parameters.string:
name: mriPrefix
description: Malcolm resource id of the Block and prefix for children

- parameters.string:
name: pvPrefix
description: PV prefix for driver and all plugins

- controllers.RunnableController:
mri: $(mriPrefix)

- blocks.ADCore.SimDetectorDriver:
mri: $(mriPrefix)-DRV
prefix: $(pvPrefix):DET

- parts.ADCore.DetectorDriverPart:
name: DRV
mri: $(mriPrefix)-DRV

- includes.ADCore.filewriting_collection:
pvPrefix: $(pvPrefix)
mriPrefix: $(mriPrefix)
25 changes: 25 additions & 0 deletions malcolm/blocks/ADCore/StatsPlugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Block

- parameters.string:
name: prefix
description: The root PV for the all records

- controllers.DefaultController:
mri: $(mri)

# This includes the output port
- includes.ADCore.ndarray_parts:
prefix: $(prefix)

# This includes the input port
- includes.ADCore.ndpluginbase_parts:
prefix: $(prefix)

- parts.ca.CABooleanPart:
name: computeStatistics
description: Compute min, max, mean, tot, sigma, net
pv: $(prefix):ComputeStatistics
rbvSuff: _RBV
widget: checkbox
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Counter Block
description: Malcolm resource id of the Block

- controllers.DefaultController:
mri: $(mri)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- parameters.string:
name: mri
description: Malcolm resource id of the Hello Block
description: Malcolm resource id of the Block

- controllers.DefaultController:
mri: $(mri)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
- parameters.string:
name: mri
description: MRI for created block

- parameters.string:
name: mic
description: MRI for microscope DetectorManager object

- parameters.string:
name: brick
description: MRI for brick DetectorManager object
description: MRI for brick PMACManager object

- controllers.RunnableController:
mri: $(mri)
axesToMove: [stagex, stagey]

- parts.ADCore.DatasetTablePart:
name: DSET

- parts.builtin.RunnableChildPart:
name: MIC
child: $(mic)
mri: $(mic)

- parts.builtin.RunnableChildPart:
name: BRICK
child: $(brick)
mri: $(brick)
24 changes: 24 additions & 0 deletions malcolm/blocks/demo/TestRigPMACManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- controllers.RunnableController:
mri: P45-BRICK01

- includes.pmac.rawmotor_collection:
mri: P45-STAGE-X
motorPrefix: LAB-MO-MAP-01:STAGE:X
prefix: LAB-MO-MAP-01:STAGEGB1:M1
scannable: stagex

- includes.pmac.rawmotor_collection:
name: P45-STAGE-Y
motorPrefix: LAB-MO-MAP-01:STAGE:Y
prefix: LAB-MO-MAP-01:STAGEGB1:M2
scannable: stagey

- includes.pmac.rawmotor_collection:
name: P45-STAGE-Z
motorPrefix: LAB-MO-MAP-01:STAGE:Z
prefix: LAB-MO-MAP-01:STAGEGB1:M3
scannable: stagez

- includes.pmac.trajectory_collection:
name: P45-BRICK01-TRAJ
prefix: LAB-MO-MAP-01:STAGEGB1
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def PandABox(process, params):
malcolm_name = "%s:%s" % (params.name, bn)
ret.append(poller.make_panda_block(malcolm_name, bn, block_data))
part_params = ChildPart.MethodMeta.prepare_input_map(
dict(name=bn, child=malcolm_name))
dict(name=bn, mri=malcolm_name))
parts[bn] = ChildPart(process, part_params)

# Make a controller
Expand Down

0 comments on commit a19643d

Please sign in to comment.