Scope
|
A core component of Scope is the scope::ScopeValue class and its derivatives scope::ScopeNumber and scope::ScopeString. They provide thread-safe access to a data member. More importantly you can connect functions to these objects that are called when the data member is changed or when the read/read-write property of the object is changed. ScopeNumbers also provide range checking.
Several classes derived from WTL classes encapsulating dialog controls. They can easily be connected to ScopeValues. Then the scope::ScopeValue is displayed in the control, edits to the control lead to changes of the scope::ScopeValue and vice versa. Also setting the read/read-write mode of the scope::ScopeValue disables/enables the control.
The controller ScopeController has a static public data member scope::ScopeController::GuiParameters that contains a lot of scope::ScopeValues that describe all parameters of the current Scope configuration. By connecting ScopeControls to ScopeValues in scope::ScopeController::GuiParameters, this contains the values that are displayed/can be edited in the GUI.
A set of classes derived from scope::BaseController, which holds a thread object and several member functions to start/stop this thread (using an scope::AbortCondition member). All these classes use the pimpl idiom to hide the implementation and shorten compile times. Each object has its own parameters data member. Derived classes like scope::DaqController mostly overwrite the Run method (which is run in the objects thread upon invoking the Start method).
SynchronizedQueue's provide data flow between the controllers (from scope::DaqController to scope::PipelineController to scope::StorageController and scope::DisplayController). They send ScopeMessage that contain different data types as cargo member (scope::DaqChunkPtr or scope::ScopeMultiImagePtr after the scope::PipelineController).
These classes encapsulate the communication with the data acquisition hardware. scope::InputsDAQmx and scope::OutputsDAQmx utilize the National Instruments DAQmx C-API (through a thin C++ wrapper in the DAQmx namespace). scope::InputsFPGA uses the National Instuments FPGA C-API.