At this point, you might have a pretty good grasp on how to use C++ Plugin. But C++ Plugin is just one of many ways of extending Dewesoft to suit your needs, and it might be slightly confusing to try and figure out if it actually is the best solution for your task. So in this section, we briefly compare different approaches and list a couple of pros and cons which can hopefully help you pick the right tool.
Just a quick reminder: Dewesoft is a big software. It is always worth trying to figure out if Dewesoft can already do whatever you need out of the box, because if it can, you will waste very little of your time, and will have full support from Dewesoft team if anything doesn't work as expected.
If you want to manipulate channels in a simple way, the Formula module is usually the best one to start experimenting with. Because of its ease of use it can serve as a great starting point for quick prototyping, and it is usually good enough for most typical problems (signal generation, simple manipulation of data in channels, etc.).
+ the most intuitive of all the approaches, very simple to use
+ integrated fully into Dewesoft meaning no set up required to get running
- input channels are fixed in the formula, making reusability a lot of work
- while it supports combining arbitrarily many input channels, it always produces just one output channel
- poor support for non-scalar channels
During its development, we mainly envisioned C++ Script as a tool to create custom math modules which you could export and use just like standard Dewesoft modules. C++ Script is probably a good second step after your approach with Formula modules gets too complicated, too cluttered, or, in the worst case, you cannot figure out how to solve the problem with them.
+ Dewesoft setups look much nicer as you (usually) only need one C++ Script to solve a problem that would require a bunch of Formula modules
+ reusability and generality of your module: you can hide the code from end user and only expose the Published setup tab
+ can work with arbitrary amount of input and output channels
- requires familiarity with at least basics of programming in C++
- difficult to test and debug
If you want to develop anything other than math modules, or if you tried creating a module with C++ Script and it proved to not be fast or powerful enough, or if you want to create a completely custom GUI for your module, Plugins are the right way to go. With Dewesoft Plugins you get access to entire Dewesoft from your code, including direct access to buffers behind channels, making Plugins incredibly fast compared to C++ Scipt.
+ much easier to write nice code with proper unit tests
+ full control over creation of GUI, access to Dewesoft internals, and blazing fast
+ can be used to create custom export formats, custom visual controls, add support for additional acquisition devices, ...
+ made to work with Visual Studio, giving you access to a great debugger, code completion, and other static analysis tools
- requires Visual Studio
- much harder to learn to use than C++ Script
Sequencer and DCOM are slightly different than the other 3 approaches mentioned in this section. Regardless, they serve a very useful purpose and deserve to be mentioned here: they are used to automate a person clicking on different parts of the Dewesoft UI. The difference among them is that with Sequencer you can create sequences by dragging and dropping graphical blocks (requiring little to no experience with programming) while with DCOM you need to use a programming language. Sequencer is easier to use, but you get much more control with DCOM.
+ can be used to create an automated sequence of events in Dewesoft
+ creator of the sequence can hide the details from the end user, exposing only a simple user interface to control Dewesoft