OpenScanDeviceLib
OpenScan Device Programming Interface
|
OScDev_Acquisition_NotifyStart()
and OScDev_Acquisition_NotifyStop()
. The start notification will be purely informational, used e.g. so that the GUI can show "waiting for
start trigger" vs "acquisition running". The stop trigger will indicate that all action has finished and the device is ready to be disarmed. (Disarm()
should be a mandatory function distinct from Stop()
, which should behave as a software trigger for cancellation.) There should also be a way for a device to declare that it is not capable of issuing a start notification (in which case arrival of data can be used as a proxy for display purposes). Stop()
, unlike Disarm()
, need not be called when OpenScanLib has already received a stop notification. SoftwareTriggerStart()
? This function should be split into two separate functions, SoftwareTriggerStop()
and Disarm()
, with very different roles. The former should merely be an asynchronous signal that the device should ignore any subsequent start triggers and stop as soon as possible. Actual completion of stopping should be notified via a callback (see Todo at Arm). The latter (Disarm()
) should mainly handle cleanup, and should be guaranteed to be called exactly once per armed acquisition, after all processes have stopped.
SoftwareTriggerStop()
can be optional to implement; we should additionally provide bool OScDev_Acquisition_SoftwareStopTriggered()
which can be called any time between Arm()
and Disarm()
; this will supersede the bool
return value of OScDev_Acquisition_CallFrameCalback()
.