Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver should be generalized to NDDriverStdArrays #1

Open
MarkRivers opened this issue Oct 31, 2016 · 0 comments
Open

Driver should be generalized to NDDriverStdArrays #1

MarkRivers opened this issue Oct 31, 2016 · 0 comments

Comments

@MarkRivers
Copy link

Here are some comments/suggestions. I would like to see the driver generalized and simplified.

  • I would like to see the driver renamed to NDDriverStdArrays. That is more descriptive than softDetector, which would also apply to simDetector and other drivers that don't talk to hardware. It makes it clear that this driver is the logical inverse of NDPluginStdArrays. By using the prefix ND it makes it clear that this is a general driver for NDArrays, not a driver that is specialized for 2-D area detector (AD) arrays.

  • It should handle input waveform records of any datatype, i.e. it should implement writeInt8Array, writeInt16Array, writeInt32rray, writeFloat32Array, writeFloat64Array. These will just call a template writeXXXArray function that creates the NDArray.

  • There is no need to have the StartTask method. The writeXXXArray method should just do the work, no need for an extra thread and epicsEvent.

  • It should simply handle input arrays of any dimensions (up to 10). NDArrayDriver.template currently has NDDimensions_RBV and Dimensions_RBV records. I need to a NDDimensions (longout) and Dimensions (asynInt32ArrayOut) so these can be written by a client. The driver should use these PVs to understand the dimensions of the waveform data record. I don't think there is any need for it to know about the color mode and handle the color modes internally. It just needs to know if the array is 1, 2, 3, 4, ... dimensions. It will use the ColorMode PV to set that attribute of the NDArray based on what the client set in that PV, but it does not need to take any special action based on ColorMode.

  • I don't see any reason to call the shutter methods. This is not a hardware driver that needs to control a shutter.

  • There is actually no need for the writeInt32 method. The only action it is taking is to signal the event, but once you eliminate the StartTask method that will not be needed. The writeXXXArray method will just get the current values of ADAcquire, ADNumImages, etc. and decide if it should process the input waveform. If it is in Single or Multiple mode and it has processed the requested number of images it will set ADAcquire to 0. Look at ADCore/ADApp/pvaDriverSrc/pvaDriver::monitorEvent() for an example of how to do this.

  • I think that in append mode it should always append at the end of current data, not user selectable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant