Templates simplify the re-use of configuration elements. A template may contain simple defaults, such that all float signals shall be painted red, but they can also contain a rich set of elements containing multiple scripts and folders.
Templates can be used in two ways:
All templates with the flag Show in add/insert menu checked are offered in the
context menu. If a group is entered, it will appear in '<group> Templates'. If you
add or insert a template, the system will just make a 100% copy of the content without changing
anything. Any required signals need to be added manually.
Another option is to use the template table in the plot configuration. Select a template and press Take to overwrite all plot settings with the template ones.
All templates with the flag Use pattern for automatic instantiation checked can be used if you are dragging and dropping signals into the view tree. To let the system detect the correct template, you need to define a pattern (see below). If the pattern of a template matches (depending on the order), a copy of the content will be added/inserted at the drop position. Additionally, the following changes are made:
There are two steps required to add a template. First define the template itself and its pattern. Then add the content that shall be added when using the pattern.
Templates are located at Preferences->Impulse->Templates. After adding a new template you will find these fields:
After defining the pattern, you can add configuration content. You may use the context menu/buttons
to add new elements, or you may copy existing elements from your configuration and paste them into
the content area.
Another option to create a template is using the template table in the plot configuration. If you have a plot configuration that you would like to add as templates, open the plot dialogue and press the Add button right-hand of the template table. A new template will be create with the current plot configuration as content.
Create a new template, enter the name, select the Float type, check Use pattern for automatic instantiation and check Enable. Add a new samples configuration, enter the dialogue and set the intended settings for float signals.
Create a new template, enter the name, select the Logic type, check Use pattern for automatic instantiation and check Enable. The next step depends on how you identify a bus signal. Let's assume that the buses have got a signal descriptor default<bits=32>, so enter this in the field Signal descriptor and un-check Regular. Add a new samples configuration, enter the dialogue and set the intended settings for the bus.
Create a new template, enter the name and group, select the Signal Type, check Show in add/insert menu and check Enable. Add a new samples configuration, enter the dialogue, change to script production and enter the script code.