Configuration Desk Automating Tool Handling
Configuration Desk Automating Tool Handling
If possible, always provide the serial number of the hardware, the relevant dSPACE License
ID, or the serial number of the CmContainer in your support request.
Important Notice
This publication contains proprietary information that is protected by copyright. All rights
are reserved. The publication may be printed for personal or internal use provided all the
proprietary markings are retained on all printed copies. In all other cases, the publication
must not be copied, photocopied, reproduced, translated, or reduced to any electronic
medium or machine-readable form, in whole or in part, without the prior written consent
of dSPACE GmbH.
This publication and the contents hereof are subject to change without notice.
Contents
Automating ConfigurationDesk 33
Basics on the Object Model in ConfigurationDesk................................................... 34
The Main Types of the Object Model............................................................. 34
The Hierarchy of the Object Model................................................................ 36
3
May 2024 ConfigurationDesk Automating Tool Handling
Contents
4
ConfigurationDesk Automating Tool Handling May 2024
Contents
5
May 2024 ConfigurationDesk Automating Tool Handling
Contents
Framework...................................................................................................... 212
ControlbarTabsLayout <<Enumeration>>.................................................... 213
ICaApplicationMain <<Interface>>.............................................................. 214
ICaMainWindow <<Interface>>.................................................................. 218
ICaMessageDispatcher <<Interface>>......................................................... 219
ICaPath <<Interface>>................................................................................ 220
ICaPathProvider <<Interface>>.................................................................... 221
ICaPaths <<Collection>>............................................................................. 223
ICaProperties <<Collection>>...................................................................... 224
ICaProperty <<Interface>>.......................................................................... 226
ICaUserFunction <<Interface>>................................................................... 227
ICaUserFunctions <<Collection>>..................................................... .......... 228
MainWindowState <<Enumeration>>......................................................... 229
WorkbookTabPosition <<Enumeration>>.................................................... 230
6
ConfigurationDesk Automating Tool Handling May 2024
Contents
Events.............................................................................................................. 266
ICaApplicationEvents <<EventInterface>>................................................... 266
ICaProjectEvents <<EventInterface>>.......................................................... 267
ICaAutomationEventArgs <<Collection>>................................................... 270
7
May 2024 ConfigurationDesk Automating Tool Handling
Contents
Appendix 289
Limitations........................................................................................................... 290
Limitations for Automating ConfigurationDesk............................................ 290
Index 323
8
ConfigurationDesk Automating Tool Handling May 2024
About This Document
Note
Required knowledge You should be familiar with performing the tasks to be automated in
ConfigurationDesk without automation.
Symbol Description
Indicates a hazardous situation that, if not avoided,
V DANGER
will result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V WARNING could result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V CAUTION could result in minor or moderate injury.
Indicates a hazard that, if not avoided, could result in
NOTICE
property damage.
Indicates important information that you should take
Note
into account to avoid malfunctions.
Indicates tips that can make your work easier.
Tip
9
May 2024 ConfigurationDesk Automating Tool Handling
About This Document
Symbol Description
Indicates a link that refers to a definition in the
glossary, which you can find at the end of the
document unless stated otherwise.
Follows the document title in a link that refers to
another document.
Naming conventions dSPACE user documentation uses the following naming conventions:
Special Windows folders Windows‑based software products use the following special folders:
Accessing dSPACE Help and After you install and decrypt Windows‑based dSPACE software, the
PDF files documentation for the installed products is available in dSPACE Help and as PDF
files.
dSPACE Help (local) You can open your local installation of dSPACE Help:
§ On its home page via Windows Start Menu
§ On specific content using context-sensitive help via F1
PDF files You can access PDF files via the icon in dSPACE Help. The PDF
opens on the first page.
10
ConfigurationDesk Automating Tool Handling May 2024
New Features of the Automation Interface and Migration Steps
New Features and Changes to the Automation Interface for Release 2024-A
11
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
and the active XIL framework label ID template of the Bus Manager, and
configure the active template, respectively.
For more information, refer to ICaComponent <<Collection>> on page 171.
Changes that might lead to The following changes can lead to code malfunctions.
code malfunctions
Improved hardware name for MicroAutoBox III The data object type for
the MicroAutoBox III in the hardware topology is changed from Box to the
more easily understood name MicroAutoBox III. Refer to ICaDataObjectType
<<Interface>> on page 186.
2023-B to 2024-A For the migration from the last ConfigurationDesk 2023-B version to the current
ConfigurationDesk 2024-A version, refer to New Features and Changes to the
Automation Interface for Release 2024-A on page 11.
2023-A to 2023-B Switch to Python 3.11 ConfigurationDesk 2023-B uses Python 3.11. For
information on migrating Python scripts, refer to Migrating Python Scripts from
Python 3.9 to Python 3.11 on page 294.
Switch to .Net 6.0 ConfigurationDesk 2023-B uses the .Net 6.0 runtime
environment.
The following changes affect the use of the COM API:
§ None is no more possible as a default for arrays in interface methods.
Use an empty array [] instead.
§ Implementation types of return values changed.
Do not check on implementation types of return values.
§ Handling vectors as property values has been changed.
In Python, a list conversion is required if the value is edited directly. In C#, an
object array should be used instead of an ArrayList. In MATLAB, a cell array
simplifies handling. Previous invoke commands no longer work.
For examples, refer to Best Practices for Data Structures and Parameters on
page 113.
§ The System.Array type can no longer be used for the COM
interface. Therefore, some interface methods using the System.Object or
System.Object[] type. The following table lists the affected methods.
Interface/ Method
Collection
ICaApplicationMain
object[] GetCustomInformation(string [] Infos)
object[] SetCustomInformation(string [] Infos, object Params)
ICaAutomationEventArgs
12
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
Interface/ Method
Collection
void SetValue(string Name, object Values)
ICaAlgorithms
void CreateSuitableModelPortBlock(object FunctionBlocks)
void TransferData(object Ports, TransferType TransferType)
void AssignHardwareAutomatically(object FunctionBlocks)
void GenerateModelInterfaces(object ModelPortBlocks)
void CreatePreConfiguredApplicationProcessAutomatically(object Models,
ICaDataObject Parent)
ICaLinks ConnectIOFunctionBlocksToModelPortBlocks(object Items)
ICaLinks ConnectModelPortBlocksToModelPortBlocks(object Items)
void AssignDefaultValuesAutomatically(object Items)
ICaObjects GetConnectedElements(object Items)
void PropagateToConfigurationDeskModelInterface(object Entities)
void PropagateToSimulink(object Entities, string ModelName)
void DeleteCompletely(object Entities)
void OptimizeConfiguration(object Entities)
object[] GetAllWorkingViewsContainingElements(object Entities, boolean
ExcludeGlobal)
void AutoAssignChannelSet(object IOFunctionItems)
ICaDataObjects CreateInverseBlocks(object ModelPortBlocks)
void ChangeToTimerEventType(object SyncTimerEvents)
void ChangeToSynchronizedTimerEventType(object TimerEvents)
ICaComponent
object Configure(string operation, object Params)
ICaRelation
void SetElements(object DataObject, object Elements)
void AddElements(object ParentObject, object Elements, object Follower)
void RemoveElements(object ParentObject, object Elements)
ICaActiveApplication
void DeleteLinks(object Links)
void AddToSelection(object Objects, bool EmptyBefore, string
SelectionType)
void RemoveFromSelection(object Objects, string SelectionType)
13
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
Support of alias names for search paths The search path provider supports
alias names. The method to add a search path requires an additional parameter
for the alias name:
ICaPathProvider::AddPath(string alias, string path, boolean isRecursive,
PathPriority pathPriority, boolean isPersistent)
The RemovePath method requires the alias name or the ICaPath object of the
search path to be removed. A string with the full search path to be removed is
no more supported.
For more information, refer to Basics on Search Paths and User Location Files
(ConfigurationDesk I/O Function Implementation Guide ).
14
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
22.1 to 2022-B (22.2) Changes to graphical user interface (GUI) handling The modernized style
of the ConfigurationDesk GUI does not support the following properties of the
ICaMainWindow interface:
§ AnimateAutoHiding
§ ControlBarTabsLayout
§ ShortcutKeysVisible
§ LargeToolbarIconsEnabled
§ WorkbookModeEnabled
§ WorkbookTabPosition
6.8 to 22.1 (dSPACE Changes to custom function folders As of dSPACE Release 22-A,
Release 2022-A) ConfigurationDesk does not automatically add the project-specific custom
function folder <ProjectLocation>\<ProjectFolder>\CustomFunctions
to a new project. The lack of the project-specific custom function folder might
affect the execution of automation scripts that copy custom functions to that
folder.
For new projects, it is recommended to use search paths to add custom
functions. Search paths let you use repositories and version control software,
for example. For more information, refer to Basics on Search Paths and
User Location Files (ConfigurationDesk Custom I/O Function Implementation
Guide ).
However, ConfigurationDesk still supports project-specific custom function
folders.
15
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
6.7 to 6.8 (dSPACE ICaAlgorithms, ICaRelation, and ICaProperty The ICaAlgorithms and
Release 2021-B) ICaRelation interfaces are changed to get a more meaningful feedback
when calling methods. Now, exceptions are thrown if the types required
for the call do not match the parameters. These changes also affect
ICaProperty::TrySetValue.
16
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
6.6 to 6.7 (dSPACE Python 3.9 Due to the end of life of Python 3.6 until end of December 2021,
Release 2021-A) dSPACE decided to switch to Python 3.9 with dSPACE Release 2021‑A. For more
information, refer to Migrating Python Scripts from Python 3.9 to Python 3.11 on
page 294.
For information on how the switch to Python 3.9 affects the Message Reader
API, refer to Reading dSPACE Log Messages via the Message Reader API on
page 274.
Note
The following changes affect the data model and can cause code from
previous Releases to malfunction.
17
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
The new Word separation property lets you select the method to separate
consecutive data words within an SPI cycle. Until Release 2020-A, you select the
method by setting the Time between words property to 0 s (chip select inactive
between words) or to a value greater than 0 s (transmission pause between
words).
6.5 to 6.6 (dSPACE Changes to SENT In / SENT Out properties The following changes were
Release 2020-B) applied to properties of the SENT In and SENT Out function blocks:
§ The CRCCalculation property from the Serial Message function
port group was moved to the function block level and renamed
SerialMessageCRCCalculation.
§ The CRCCalculation property from the Protocol function port group was
moved to the function block level and renamed ProtocolCRCCalculation.
6.4 to 6.5 (dSPACE The automation names of the following function block properties were changed:
Release 2020-A)
Function Block Display Previous Automation New
Type Name Name Automation
Name
Current In Trigger source MeasurementMode TriggerSource
Voltage In Trigger source MeasurementMode TriggerSource
PWM/PFM In Function MeasurementMode FunctionMode
mode
Note
You must adjust the automation names of these properties in existing scripts
for them to work correctly.
18
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
6.1 to 6.2 (dSPACE Discontinuation of Python 2.7 support The support of Python 2.7 is
Release 2018-B) discontinued with dSPACE Release 2018‑B. Python 3.6 is supported.
Note
The following changes affect the data model and can cause code from
previous Releases to malfunction.
19
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
§ BusPduRxStatusInspection
§ BusISignalValueInspection
§ BusSuspendFrameTransmissionManipulation
§ BusISignalOffsetValueManipulation
§ BusISignalOverwriteValueManipulation
20
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
ICaProperty/ICaProperties
§ Due to changes to property categories it is possible that the order of properties
of an ICaDataObject that you get is different from previous releases.
§ The property MeasurementMode was shifted from the electrical interface
(internal name: signal conditioning) level of a function block to the function
block level.
§ Changing the property IsFailureSimulationEnabled from true to false
(regarding an electrical interface) does not reset the failure simulation settings
(e.g., IsShortToGndAllowed) of the corresponding signal port to false if
that property previously was set to true.
21
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
22
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
5.5 to 5.6 (dSPACE The platform management automation API version 1.0 was supported for the
Release 2016-B) last time with ConfigurationDesk 5.5 of dSPACE Release 2016‑A.
Note
23
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
5.3 to 5.4 (dSPACE Several enumeration values were altered due to changes in the data model.
Release 2015-B)
Note
ChannelType
Note
Note
§ HighSideSwitch: 4
§ PushPull: 8
24
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation
5.2 to 5.3 (dSPACE The return value of a build process started by the automation includes a flag
Release 2015-A) DownloadResult to indicate if a download of the real-time application after the
build process was successful or not.
5.1 to 5.2 (dSPACE No support of migration from release 2012-B or earlier Migration of
Release 2014-B) projects and applications which are older than Release 2012-B is no longer
supported. HTF, MTF and DTF files are no longer recognized as valid files. Use a
ConfigurationDesk version up to 5.1 to migrate these items if necessary.
5.0 to 5.1 (dSPACE Due to the support of multi-processing-unit systems, changes have been made
Release 2014-A) to several areas:
HardwareTopology.Configure("Create", CreateArguments)
HardwareTopology.Configure("Create", CreateArguments)
4.4 to 5.0 (dSPACE For dSPACE Release 2013-B, some major changes have been applied to the
Release 2013-B) automation interface. This may lead to scripts from earlier releases to not work
correctly with ConfigurationDesk 5.0.
25
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps
Previously Now
From win32com.client import Enums From dspace.com import Enums
Previously Now
# get the executable ExeApp = Relation. ExeApp = Relation.
application GetTopNodes().Item(0) GetTopNodes().Item(0)
Previously Now
Arguments = [] Arguments = []
Arguments.append(r"c:\MyTopologies\ Arguments.append(r"c:\MyTopologies\
MyExportedDeviceTopology.xls") MyExportedDeviceTopology.xlsx")
Arguments.append("xls") Arguments.append("xlsx")
DeviceTopology.Configure("Export", Arguments) DeviceTopology.Configure("Export", Arguments)
26
ConfigurationDesk Automating Tool Handling May 2024
Introduction to Automating ConfigurationDesk
27
May 2024 ConfigurationDesk Automating Tool Handling
Introduction to Automating ConfigurationDesk
For more information on the elements and structure of the object model refer to
Basics on the Object Model in ConfigurationDesk on page 34.
Accessing ConfigurationDesk's The illustration below displays different ways of accessing the COM API provided
automation interface by ConfigurationDesk.
ConfigurationDesk
Run
Interactive Interpreter *.py
Access Run
Programs written
in C, C#, ...
Access Access
MATLAB COM API External interpreter
M scripts, ...
Note
28
ConfigurationDesk Automating Tool Handling May 2024
Scripting Environments and Languages for Tool Automation
Examples
Supported automation You can automate ConfigurationDesk, for example, by using the following
languages scripting environments:
§ Python scripts running in an interpreter, for example, Python.exe.
§ M scripts running in MATLAB.
There are limitations and recommendations when automating processes that
affect ConfigurationDesk and MATLAB. Refer to Automating processes that
affect ConfigurationDesk and MATLAB on page 290.
§ VBA scripts running in Microsoft Office.
Tip
Scripting environments The ConfigurationDesk installation provides scripting environments that offer
provided with different ways to write, edit, and run Python scripts:
the ConfigurationDesk § You can write Python scripts and run them via ConfigurationDesk's internal
installation Interpreter .
For more information, refer to Using the Internal Interpreter on page 138.
§ You can write Python scripts and execute them via an external interpreter.
For more information, refer to Using an External Interpreter on page 147.
29
May 2024 ConfigurationDesk Automating Tool Handling
Introduction to Automating ConfigurationDesk
§ You can write and edit Python scripts in the Source Code Editor .
For more information, refer to Using the Source Code Editor on page 148.
Examples Most examples are written in Python, but you can use any other supported
language to automate ConfigurationDesk.
Tip
Demo files ConfigurationDesk comes with a number of Python demo scripts, which you can
find at
%USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python
after ConfigurationDesk was started for the first time. You can run these scripts
in ConfigurationDesk's Internal Interpreter or an external interpreter, such as
Python.exe.
Tutorial Tutorial that guides you through projects to learn the basic steps in automating
ConfigurationDesk using Python. Refer to ConfigurationDesk Tutorials on
Automating Tool Handling .
30
ConfigurationDesk Automating Tool Handling May 2024
Legend for Object Model Diagrams
Object model diagrams ConfigurationDesk's object model contains a large number of elements. The
elements in the object model are aggregated hierarchically. The diagrams show
you the hierarchical relationship between the elements.
Legend for object model The ConfigurationDesk object model diagrams use a simplified graphical
diagrams notation to show element dependencies. Below is the legend for reading object
model diagrams:
31
May 2024 ConfigurationDesk Automating Tool Handling
Introduction to Automating ConfigurationDesk
«collection»
ICaFiles
«interface»
ICaFile
«enumeration»
FileType
You can read the following information from the above example:
§ ICaFile is the central element (thick border) and it is an interface element
(name and color).
§ The ICaFiles collection aggregates ICaFile interfaces.
§ The FileType enumeration specifies ICaFile interfaces.
32
ConfigurationDesk Automating Tool Handling May 2024
Automating ConfigurationDesk
Automating ConfigurationDesk
33
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Collection elements Collection elements provide access to a list of elements of the same type.
Example You can use the Projects collection to iterate through all the
projects which are located under a project location . Collection names are
plural.
The following listing shows how you can iterate through a Projects collection,
printing all the names of the projects in the collection. This example works in
ConfigurationDesk’s Internal Interpreter.
34
ConfigurationDesk Automating Tool Handling May 2024
Basics on the Object Model in ConfigurationDesk
Interfaces Interface elements provide access to the properties and methods of an object.
Thus, a collection also implements an interface with methods and properties.
The following listing shows how you can set a description for the active
application. This example works in ConfigurationDesk's Internal Interpreter. It
assumes that a project with an application is already open.
# Get the active application from the application object of
# ConfigurationDesk and sets the description
ActiveApplication = Application.ActiveApplication
ActiveApplication.Description = "Throttle control test app."
Event interfaces Event interfaces let you link the execution of a script to the occurrence of a
specific event in ConfigurationDesk. The main events in ConfigurationDesk are
related to the build process of generating executable code. To automate event
management, the script must contain a class definition for each required event
source. The class definition must contain definitions for all the event handlers of
the event source. For an example of using build events in automation, refer to
Working with ConfigurationDesk Events on page 59.
Enumerations Enumeration elements provide access to a set of named constants. Each constant
can be accessed via its value or via its name. Enumerations are not a genuine
element type in the Python language. When you use Python for automation, you
have to import a special ConfigurationDesk Python module for access to these
elements.
Example You can use the ICaMainWindow interface to set the window state
of the main window of ConfigurationDesk.
35
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
The following listing shows how you can set the window state of
ConfigurationDesk's main window.
Introduction In ConfigurationDesk, the object model has a hierarchy consisting of three main
parts:
§ Project and application handling to create, organize, and manipulate
projects and applications .
§ Component handling to create and configure components like the device
topology , model topology , or hardware topology .
§ Data object handling to create or configure data objects or to connect data
objects (ports) by creating links between them.
The following charts visualize only the main aspects of the object model and
are not intended to show a complete design of ConfigurationDesk’s automation
library.
36
ConfigurationDesk Automating Tool Handling May 2024
Basics on the Object Model in ConfigurationDesk
<<interface>>
ICaApplicationMain
<<interface>>
ICaProjectRoots
<<interface>>
ICaProjects
<<interface>>
ICaApplications
<<interface>>
ICaApplicationMain
<<interface>>
ICaActiveProject
<<interface>>
ICaActiveApplication
37
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
<<interface>>
ICaActiveApplication
<<interface>>
ICaComponents
<<interface>> <<interface>>
ICaComponent ICaDataObject
<<interface>>
ICaDataObjectTypes
Data object handling The ICaDataObject itself provides access to other data objects contained in it.
It can also be used to create child objects, and you can query the creatable types.
<<interface>> <<interface>>
ICaDataObjectTypes ICaDataObject
<<interface>> <<interface>>
ICaProperties ICaLinks
<<interface>> <<interface>>
ICaProperty ICaLink
Once the ICaDataObject is created, you can use its properties to configure it.
The ICaProperty interface provides access to a single property, which itself has
properties (such as name, value, and read-only status) that you can query. Links
between data objects are accessible via the data object's ICaLinks collection.
38
ConfigurationDesk Automating Tool Handling May 2024
Basics on the Object Model in ConfigurationDesk
<<interface>>
ICaActiveApplication
<<interface>>
ICaRelationAccessors
ChannelSets
HardwareRequirements
ApplicableChannels
AssignedChannels
...
...
Getting the elements of a relation The GetElements method retrieves a
list of child elements that are related to the specified parent element. If there are
no child elements for the specified parent element, an empty list is returned.
Algorithms The ICaAlgorithms interface provides easy access to tasks which can be
executed for one or more ICaDataObject by one call.
<<interface>>
ICaActiveApplication
39
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Opening a COM connection To automate ConfigurationDesk and use its API, you have to open a
COM connection to ConfigurationDesk.
Python The following listing shows how you can open a COM connection to
ConfigurationDesk with Python's Dispatch command.
# Import required modules.
from win32com.client import Dispatch
# Open a COM connection to ConfigurationDesk.
self.ConfigurationDeskApplication = Dispatch("ConfigurationDesk.Application")
M-Code The following listing shows how you can open a COM connection to
ConfigurationDesk using M-code.
ConfigurationDeskApplication = actxserver('ConfigurationDesk.Application')
Visual Basic The following listing shows how you can open a COM
connection to ConfigurationDesk using Visual Basic.
' The application.
Private ConfigurationDeskApplication As ICaApplicationMain
' Creates the connection to the ConfigurationDesk application.
Set ConfigurationDeskApplication = CreateObject("ConfigurationDesk.Application")
Automating The following instructions show how you can instantiate ConfigurationDesk to
ConfigurationDesk using use its API functions.
Microsoft Visual Studio
To automate ConfigurationDesk using Microsoft Visual Studio and C#:
and C#
1. Open Visual Studio and select File – New Project from the menu.
2. Specify the project and select Visual C# as the language and an application
type template (the demos use Windows Forms).
3. In Visual Studio’s Solution Explorer, right-click References and
browse for the DLLs in the <ConfigurationDesk installation
folder>\ConfigurationDesk\bin\AutomationAssemblies folder. Add
all assemblies to your project.
4. Add the following listing to your project’s program code:
// Start ConfigurationDesk.
Type serverType =
Type.GetTypeFromProgID("ConfigurationDesk.Application");
this.ConfigurationDeskApplication =
Activator.CreateInstance(serverType) as ICaApplicationMain;
40
ConfigurationDesk Automating Tool Handling May 2024
Getting Basic Access to ConfigurationDesk
Examples
41
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Runnable demo script For a runnable script, refer to the ProjectHandling.py demo script. It is
located at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Handling project locations Project locations are designated folders in your file system where
ConfigurationDesk stores project and application folders. Only one project
42
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
location can be active at a time, but several projects can use the same project
location.
The following illustration shows the context of the interface elements used to
handle project locations.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the paths to the project locations.
# Output the paths of the the project locations.
for ProjectLocation in Application.ProjectRoots:
print(ProjectLocation.PathName)
Handling projects A project is a container for ConfigurationDesk applications. A project can also be
backed up in an archive file, refer to Backing up projects on page 45.
43
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
The following illustration shows the context of the interface elements used to
handle projects.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the projects in a project location.
# Output the project names of a project location.
for Project in ProjectLocation.Projects:
print(Project.Name)
Opening a project
Project = ProjectLocation.Projects.Item(<display name of the project>).Open(True)
Closing a project.
Application.ActiveProject.Close(True)
Description: The Boolean parameter lets you specify to save the changes (True) or not (False).
Creating a project.
ProjectLocation = Application.ActiveProjectRoot
Project = ProjectLocation.Projects.Add(<project name>)
Result: Adds a new project to the active project location and returns the new and active project object.
Removing a project
Project = Application.Projects.Item(<project name>)
Project.Remove()
44
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
The following illustration shows the context of the interface elements used to
handle applications.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the applications of a project.
# Output the names of the project's applications
for App in Project.Applications:
print(App.Name)
Activating an application
App = Project.Applications.Item(<application name>)
App.Activate(True)
Creating an application.
App = Project.Applications.Add(<application name>,True)
Result: Adds a new application to the project, activates the new application, and returns the new application
object.
Deleting an application
App = Project.Applications.Item(<application name>)
App.Remove(True)
Note: Activated applications cannot be removed/deleted. The Boolean parameter of the remove method is for
downward compatibility and has no effect.
Backing up projects A backup consists of a ZIP file containing a project folder with the project name.
This project folder contains the project file and possible application folders with
application files. A ZIP file containing an additional folder as a parent folder for
the project folder is not supported.
45
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
The following illustration shows the context of the interface elements used to
back up a project. To open a backup, refer to Handling projects on page 43.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Backing up a project.
Application.ActiveProject.Backup(<archive path>)
Note: Include the file ending ZIP in the archive path, such as C:\Backups\Project.zip.
Runnable demo script For a runnable script, refer to the SignalChainHandling.py demo script. It is
located at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Configuring the signal chain The signal chain describes the logical path of a signal between an external
device and the behavior model .
46
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
The following illustration shows the context of the interface elements used to
configure the signal chain.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Adding a function block type from the function library to the signal chain.
FunctionLib = Application.ActiveApplication.Components.IOFunctionLib
FunctionLibRootObject = FunctionLib.Item(0)
# Add a Voltage In function block type to the signal chain, as an example.
VoltageIn = FunctionLibRootObject.Item('Voltage In')
VoltageIn.CreateChild(VoltageIn.DataObjectTypes.Item(0))
VoltageInInstance = VoltageIn.Item(<index or instance name (function block name)>)
47
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Task Syntax
Assigning feature provider.
In the example, a UDP Receive function block references the first available Ethernet Setup function block.
ProviderRequestsRelation = Application.ActiveApplication.Relations.Item('ProviderRequests')
AssignableProvidersRelation = Application.ActiveApplication.Relations.Item('AssignableProviders')
AssignedProvidersRelation = Application.ActiveApplication.Relations.Item('AssignedProviders')
UDP = FunctionLibRootObject.Item('UDP Receive')
UDPInstance = UDP.Item(0)
ProviderRequest = ProviderRequestsRelation.GetElements(UDPInstance).Item(0)
AssignableProviders = AssignableProvidersRelation.GetElements(ProviderRequest)
Provider = AssignableProviders.Item(0)
Args = [Provider]
AssignedProvidersRelation.SetElements(ProviderRequest, Args)
For more information on the AssignedProviders relation, refer to Details on the AssignedProviders relation
on page 48.
As an alternative, you can set the reference property of the function block to the function block name of the
feature provider. In the following example, a UDP Receive function block references the 'Ethernet Setup (1)'
function block.
ReferenceProperty = UDPTransmitInstance.Properties.Item('UDP on Ethernet')
ReferenceProperty.Value = 'Ethernet Setup (1)'
ModelTopology.Configure('AddModel',Args)
48
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
Runnable demo script For a runnable script, refer to the HardwareAssignment.py demo script. It is
located at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Steps to automate hardware Perform the following steps to assign a hardware resource (channel) to a
resource assignments function block :
§ Assign a channel set to the electrical interface of the function block .
§ Get the hardware requirements from the electrical interface.
§ Get the assignable channels which are provided for each hardware
requirement.
§ Assign a channel to the hardware requirement.
You can use algorithms to perform all or specific steps to assign suitable
hardware resources.
Basics on automating You automate the hardware resource assignment via relations.
the hardware resource
Relations provide functions to get and set the elements of a relation for a
assignment
specified parent element. The support of methods for getting and setting and
the exact behavior of these methods depends on the relation used. Some
relations support both (getting and setting) while others support either getting
49
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
or setting. For more information, refer to The Hierarchy of the Object Model on
page 36.
Assigning hardware resources The following illustration shows the context of the interface elements used to
via algorithms assign suitable hardware resources via algorithms.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Assigning channels to a function block in one step
FuncBlocks = [<function block instance>]
Application.ActiveApplication.Algorithms.AssignHardwareAutomatically(FuncBlocks)
Assigning hardware resources The following illustration shows the context of the interface elements used to
via relations assign specific hardware resources.
50
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting suitable channel sets
ChannelSetRelation = Application.ActiveApplication.Relations.Item('ChannelSets')
# The electrical interface of the function block provides the available channels sets.
ElecInterface = FunctionInstance.Item('Electrical Interface')
AvailableChannelSets = ChannelSetRelation.GetElements(ElecInterface)
# Output the name of a channel set.
AvailableChannelSets.Item(<index>).Name
For more information on the ChannelSets relation, refer to Details on the ChannelSets relation on page 52.
Assigning channel sets
ChSet = AvailableChannelSets.Item(0)
ChannelSetRelation = Application.ActiveApplication.Relations.Item('ChannelSets')
ChannelSetRelation.SetElements(ElecInterface, [ChSet])
For more information on the ChannelSets relation, refer to Details on the ChannelSets relation on page 52.
Getting assigned channel sets
for Item in ElecInterface:
if Item.IsOfRole('IOChannelSet') is True:
ChannelSet = Item
Note: The items of the electrical interface provides the logical signals and the channel sets.
Getting hardware requirements
Precondition: A channel set must be assigned to the function instance.
ActiveApp = Application.ActiveApplication
HardwareRequirementRelation = ActiveApp.Relations.Item('HardwareRequirements')
ElecInterface = FunctionInstance.Item('Electrical Interface')
HwRequirements = HardwareRequirementRelation.GetElements(ElecInterface)
# Outputs the number of requested channels.
HwRequirements.Count
Information on hardware requirements (channel requests) is needed to assign the channels, for example, to
get the number of requested channels.
Getting assignable channels
ActiveApp = Application.ActiveApplication
ApplicableChannelsRelation = ActiveApp.Relations.Item('ApplicableChannels')
AssignableChannels = ApplicableChannelsRelation.GetElements(HwRequirements.Item(<index>))
The ApplicableChannels relation get a list of applicable non-conflicting channels for the given hardware
requirement object (channel request ) by using the GetElements method of the relation.
Parameter: ICaDataObject – Hardware requirement
Assign a channel to the function block
AssignedChannelsRelation = Application.ActiveApplication.Relations.Item('AssignedChannels')
Channel = AssignableChannels.Item(<index>)
AssignedChannelsRelation.SetElements(HwRequirements.Item(<index>), [Channel])
For more information on the AssignedChannels relation, refer to Details on the AssignedChannels relation
on page 52.
51
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Tip
52
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
Runnable demo script For a runnable script, refer to the ApplicationTaskModeling.py demo script.
It is located at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Basics on automating the You automate the modeling of application processes and tasks via relations.
modeling of application
Relations provide functions to get and set the elements of a relation for a
processes and tasks
specified parent element. The support of methods for getting and setting and
the exact behavior of these methods depends on the relation used. Some
relations support both (getting and setting) while others support either getting
or setting. For more information, refer to The Hierarchy of the Object Model on
page 36.
Modeling application The following illustration shows the context of the interface elements used to
processes and tasks model application processes and tasks.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
53
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the elements to model application processes and tasks.
ATMRelation = Application.ActiveApplication.Relations.Item('ApplicationConfiguration')
# Get the executable application as the root object of the application configuration.
ExecApplication = ATMRelation.GetTopNodes().Item(0)
# Get the processing unit application.
PUApplication = ATMRelation.GetElements(ExecApplication).Item('PUApplication')
Creating a task
Task = ApplicationProcess.CreateChild(ApplicationProcess.DataObjectTypes.Item('Task'))
Task.Name = 'MyTask'
54
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
Runnable demo script For a runnable script, refer to the BuildHandling.py demo script. It is located
at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Configuring the build options The build options are set via relations.
Relations provide functions to get and set the elements of a relation for a
specified parent element. The support of methods for getting and setting and
the exact behavior of these methods depends on the relation used. Some
relations support both (getting and setting) while others support either getting
or setting. For more information, refer to The Hierarchy of the Object Model on
page 36.
The following illustration shows the context of the interface elements used to
configure the build options.
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the elements to configure the build options.
# Get the build configuration relation.
BuildConfigRelation = Application.ActiveApplication.Relations.Item('BuildConfiguration')
# Get the executable application as the root object of the build configuration.
ExecApplication = BuildConfigRelation.GetTopNodes().Item(0)
55
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Task Syntax
BuildConfigElements = BuildConfigRelation.GetElements(ExecApplication)
for Element in BuildConfigElements:
print('Element name: ' + Element.Name)
print('Properties:')
Properties = Element.Properties
for Property in Properties:
print('Name: ' + Property.Name)
print('Value: ' + str(Property.Value))
print('IsReadOnly: ' + str(Property.IsReadOnly))
print('\n')
Output:
Element name: Global Build Settings
Properties:
Name: Name
Value: Global Build Settings
IsReadOnly: True
Name: TimeScaledPeriod
Value: 0.0
IsReadOnly: False
Name: TargetArchitecture
Value: 0
IsReadOnly: False
(...)
Configuring and executing The following illustration shows the context of the interface elements used to
the build and download configure and execute the build and download process.
process
The following table shows you the syntax to perform basic tasks with the
internal interpreter as an example. For a complete overview of the objects and
methods to automate ConfigurationDesk, refer to API Interfaces on page 158.
For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.
Task Syntax
Getting the build management from the active application .
BuildManagement = Application.ActiveApplication.BuildManagement
56
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
Task Syntax
BuildProperties = BuildManagement.Properties
# Set the values of the properties.
Download = BuildProperties.Item('DownloadAfterBuild')
Download.Value = False
Unload = BuildProperties.Item('UnloadLoadedApplication')
Unload.Value = False
StartApp = BuildProperties.Item('StartAfterDownload')
StartApp.Value = False
# Property to check if the build process was canceled before being started.
BuildResult.Canceled
# Property to check if the build process was successful.
BuildResult.Success
# Property to get the path to the build results folder.
BuildResult.ResultFolderFullPath
# Property to get the path to the built real-time application.
BuildResult.RtaFullPath
# Property to check if a download of the real-time application was successfully performed.
BuildResult.Downloaded
Note
57
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Runnable demo script For a runnable script, refer to the PlatformHandling.py demo script. It is
located at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Managing platforms The following table shows you the syntax to perform basic tasks to manage
platforms with the internal interpreter as an example. For information on the
internal interpreter, refer to Using the Internal Interpreter on page 138.
Task Syntax
Getting the elements to register hardware.
from dspace.com import Enums
e = Enums(Application)
PlatformManagement = Application.PlatformManagement
PlatformManagement.PlatformAutomationAPIVersion = 2
Scanning registered hardware When starting ConfigurationDesk, the software scans the connected network to
after program start find registered dSPACE real-time hardware. If you start ConfigurationDesk via
tool automation, the scan process is omitted because it might take too long and
cause a timeout. This would abort the execution of a script.
To search for the connected platforms after startup via tool automation, call the
RefreshPlatformConfiguration method.
Application.PlatformManagement.RefreshPlatformConfiguration()
References
58
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk
Introduction You can use events for tool automation that are triggered during the execution
of ConfigurationDesk.
Note
Runnable demo script For a runnable script, refer to the EventHandling.py demo script. It is located
at %USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python.
Connecting to the events The following listings show how to connect to the different event types of
ConfigurationDesk.
The project events are accessible through the ICaProjectEvents interface. The
event provider is the ICaProjectManagement interface. In the following listing,
the ProjectEvents class implements all event callbacks.
class MainDemoController(object):
(...)
def ConnectToEvents(self):
(...)
ProjectManagement = self.ConfigurationDeskApplication.ProjectManagement
self.ProjectEvents = client.DispatchWithEvents(ProjectManagement, ProjectEvents)
Implementing the reaction on You must provide classes for the used ICaApplicationEvents and
events ICaProjectEvents interfaces that provide implementations for the used events
defined in the interfaces.
59
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
class ProjectEvents(object):
def OnProjectRootUpdating(self, args):
PrintMessage("OnProjectRootUpdating")
(...)
def PrintMessage(Message):
print(Message)
60
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Introduction You can automate Bus Manager features via various interfaces, and easily access
elements of the Bus Manager .
Automating Bus Manager You can automate Bus Manager features via the same interfaces that are
features used to automate ConfigurationDesk's signal chain configuration. Additionally,
the ICaRelations <<Collection>> and ICaComponent <<Collection>> interfaces
provide Bus Manager-specific relations and operations.
The Bus Manager-specific relations and operations let you, for example:
§ Add bus configurations and communication matrices to a
ConfigurationDesk application .
61
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Accessing Bus Manager ConfigurationDesk's automation interface lets you access elements of bus
elements configurations and communication matrices. You can access the communication
matrix elements sorted by ECUs or clusters . To access Bus Manager
elements, you can navigate through the respective hierarchy tree or directly
access specific elements via XPath expressions. The XPath expressions must
comply with XPath 1.0. Other XPath versions are not supported.
Best practices for accessing When you access Bus Manager elements via XPath, it is recommended to not
Bus Manager elements via access the elements by their absolute position in a communication matrix or a
XPath bus configuration. The absolute position of elements in communication matrices
and bus configurations might change between dSPACE Releases. If it does and
you access elements by their absolute position, you must adapt the relevant
automation scripts. To avoid this, access elements by other criteria, for example,
by their name or by their relative position to higher-level or lower-level elements.
62
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Adding bus configuration One way to configure bus configurations is to add bus configuration features to
features to bus configurations elements of bus configurations (e.g., the ISignal Value feature to an ISignal or
the PDU Trigger feature to a PDU).
You can add a bus configuration feature to a bus configuration element only
if the feature is available for the specific element. The availability of bus
configuration features depends on various factors, e.g., on the element type of a
bus configuration element or the bus configuration part the element is assigned
to.
To add a bus configuration feature, you must know the feature's role name.
Via the ICaComponent <<Collection>> interface, you can get a list of the
role names of bus configuration features that are available for a specific bus
configuration element, and add features to the element.
Tip
Relation for accessing You can use the CommunicationMatricesByClusters relation of the
communication matrix ICaRelations <<Collection>> on page 195 interface to access communication
elements sorted by clusters matrix elements sorted by clusters.
63
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
XPath expressions The following table provides an overview of the XPath expressions for accessing
communication matrix elements sorted by clusters. The slash (/) is part of the
XPath expression.
For more information on the individual elements, refer to Elements and Symbols
of Bus Configurations and Communication Matrices (ConfigurationDesk User
Interface Reference ).
64
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Bus Secured IPDU /BusSecuredIPdu § (TX) § Bus CAN Physical Channel § Bus Container IPDU
§ Bus Container IPDU § Bus Multiplexed IPDU
§ (RX) § Bus ISignal IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus User-Defined IPDU
Bus ISignal IPDU /BusISignalIPdu § (TX) § Bus CAN Physical Channel § Bus ISignal Group
§ Bus LIN Physical Channel § Bus ISignal
§ (RX) § Bus Container IPDU
§ Bus Multiplexed IPDU
§ Bus Secured IPDU
Bus Extended /BusExtendedMultiplexedIPdu § (TX) Bus CAN Physical Channel Bus ISignal
Multiplexed IPDU
§ (RX)
Bus General-Purpose /BusGeneralPurposeIPdu § (TX) § Bus CAN Physical Channel -
IPDU § Bus LIN Physical Channel
§ (RX) § Bus Container IPDU
§ Bus Secured IPDU
Bus General-Purpose /BusGeneralPurposePdu § (TX) § Bus CAN Physical Channel Bus Global Time Domain
PDU § Bus LIN Physical Channel
§ (RX)
Bus DCM IPDU /BusDcmIPdu § (TX) § Bus CAN Physical Channel -
§ Bus LIN Physical Channel
§ (RX) § Bus Container IPDU
§ Bus Secured IPDU
Bus NMPDU /BusNmPdu § (TX) § Bus CAN Physical Channel § Bus ISignal Group
§ Bus LIN Physical Channel § Bus ISignal
§ (RX)
Bus NPDU /BusNPdu § (TX) § Bus CAN Physical Channel -
§ Bus LIN Physical Channel
§ (RX)
Bus User-Defined /BusUserDefinedIPdu § (TX) § Bus CAN Physical Channel -
IPDU § Bus LIN Physical Channel
§ (RX) § Bus Container IPDU
§ Bus Secured IPDU
Bus User-Defined /BusUserDefinedPdu § (TX) § Bus CAN Physical Channel -
PDU § Bus LIN Physical Channel
§ (RX)
Bus ISignal Group /BusISignalGroup § Bus ISignal IPDU Bus ISignal
§ (TX)
§ Bus NMPDU
§ (RX)
65
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
You can also access the properties of communication matrix elements via XPath
expressions. For an overview of the valid expressions, refer to Accessing Element
Properties via XPath on page 91.
Examples The following listing provides short examples for accessing specific elements of a
communication matrix sorted by clusters.
1 # Accessing all BusCanCommunicationClusters in all CAN BusSystems in all BusCommunicationMatrices
2 '/BusCommunicationMatrix/BusSystemCan/BusCanCommunicationCluster'
3
4 # Accessing all BusCanPhysicalChannels in all BusNetworkNodes whose name contains 'door' in all
5 # BusCanCommunicationClusters in all CAN BusSystems in all BusCommunicationMatrices
6 '/BusCommunicationMatrix/BusSystemCan/BusCanCommunicationCluster/BusNetworkNode[contains(@Name,
"door")]/BusCanPhysicalChannel'
7
8 # Accessing all CAN BusSystems below all root elements
9 '/*/BusSystemCan'
10
11 # Accessing all LIN BusSystems
12 '//BusSystemLin'
13
14 # Accessing all elements that are two levels below all LIN BusSystems
15 '//BusSystemLin/*/*'
16
17 # Accessing all elements with the 'RX' direction and that are two levels below all BusNetworkNodes
18 # with the name 'Node3'
19 '//BusNetworkNode[@Name = "Node3"]/*/*[@Direction = "RX"]'
20
21 # Accessing all BusISignals whose name contains '_2' below all BusISignalIPdus with the 'RX' direction
22 '//BusISignalIPdu[@Direction = "RX"]/BusISignal[contains(@Name, "_2")]'
Relation for accessing You can use the CommunicationMatricesByEcus relation of the ICaRelations
communication matrix <<Collection>> on page 195 interface to access communication matrix elements
elements sorted by ECUs sorted by ECUs.
66
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
XPath expressions The following table provides an overview of the XPath expressions for accessing
communication matrix elements sorted by ECUs. The slash (/) is part of the
XPath expression.
For more information on the individual elements, refer to Elements and Symbols
of Bus Configurations and Communication Matrices (ConfigurationDesk User
Interface Reference ).
Bus Secured IPDU /BusSecuredIPdu § (TX) § Bus ECU § Bus Container IPDU
§ Bus Container IPDU § Bus Multiplexed IPDU
§ (RX) § Bus ISignal IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus User-Defined IPDU
Bus ISignal IPDU /BusISignalIPdu § (TX) § Bus ECU § Bus ISignal Group
§ Bus Container IPDU § Bus ISignal
§ (RX) § Bus Multiplexed IPDU
§ Bus Secured IPDU
Bus Extended /BusExtendedMultiplexedIPdu § (TX) Bus ECU Bus ISignal
Multiplexed IPDU
§ (RX)
Bus General-Purpose /BusGeneralPurposeIPdu § (TX) § Bus ECU -
IPDU § Bus Container IPDU
§ (RX) § Bus Secured IPDU
67
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
§ (RX)
Bus User-Defined IPDU /BusUserDefinedIPdu § (TX) § Bus ECU -
§ Bus Container IPDU
§ (RX) § Bus Secured IPDU
§ (RX)
Bus ISignal Group /BusISignalGroup § Bus ISignal IPDU Bus ISignal
§ (TX)
§ Bus NMPDU
§ (RX)
Bus ISignal /BusISignal § (TX) § Bus ISignal IPDU -
§ Bus Extended
§ (RX) Multiplexed IPDU
§ Bus NMPDU
§ Bus ISignal Group
Bus Global Time /BusGlobalTimeDomain § (TX) Bus General-Purpose PDU -
Domain
§ (RX)
You can also access the properties of communication matrix elements via XPath
expressions. For an overview of the valid expressions, refer to Accessing Element
Properties via XPath on page 91.
Examples The following listing provides short examples for accessing specific elements of a
communication matrix sorted by ECUs.
1 # Accessing the BusCommunicationMatrix with the name 'autosar_321_CanLinFlexRay_01'
2 '/BusCommunicationMatrix[@Name = "autosar_321_CanLinFlexRay_01"]'
3
4 # Accessing all elements one level below the BusCommunicationMatrix
5 '//BusCommunicationMatrix/*'
6
7 # Accessing all BusEcus whose name contains 'door'
8 '//BusEcu[contains(@Name, "door")]'
9
10 # Accessing all elements with the 'RX' direction below all BusEcus with the name 'Node3'
11 '//BusEcu[@Name = "Node3"]/*[@Direction = "RX"]'
12
13 # Accessing all BusISignals whose name contains '_2' in all BusISignalIPdus with length <= 16 and the 'TX' direction
14 '//BusISignalIPdu[@length <= 16 and @Direction = "TX"]/BusISignal[contains(@Name, "_2")]'
68
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Relation for accessing bus You can use the BusConfigurations relation of the ICaRelations
configuration elements <<Collection>> on page 195 interface to access bus configuration elements.
XPath expressions The following tables provide overviews of the XPath expressions for accessing
bus configuration elements. The slash (/) is part of the XPath expression.
You can also access the properties of bus configuration elements via XPath
expressions. For an overview of the valid expressions, refer to Accessing Element
Properties via XPath on page 91.
For more information on the individual elements, refer to Elements and Symbols
of Bus Configurations and Communication Matrices (ConfigurationDesk User
Interface Reference ).
Accessing the Bus Access Requests bus configuration part The following
table provides an overview of the XPath expressions for accessing a bus
configuration and the elements that can be available for its Bus Access
Requests part.
69
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Accessing the Simulated ECUs bus configuration part The following table
provides an overview of the XPath expressions for accessing a bus configuration
and the elements that can be available for its Simulated ECUs part.
70
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
71
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
72
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
73
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
74
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
75
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
76
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
77
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
78
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
79
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
80
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
81
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
82
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
83
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
84
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
85
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
86
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
87
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
88
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Accessing a bus configuration and its Gateways part The following table
provides an overview of the XPath expressions for accessing a bus configuration
and its Gateways part.
89
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Examples The following listing provides short examples for accessing specific elements of a
bus configuration.
1 # Accessing all BusConfigurations
2 '/BusConfiguration'
3
4 # Accessing all BusCommunicationMatrices in all BusConfigurations
5 '/BusConfiguration//BusCommunicationMatrix'
6
7 # Accessing all BusMultiplexedIPdus in all BusEcus whose name contains 'door' in all BusCommunicationMatrices in
8 # all BusConfigurationPartSimulatedEcus in all BusConfigurations
9 '/BusConfiguration/BusConfigurationPartSimulatedEcus/BusCommunicationMatrix/BusEcu[contains(@Name,
"door")]/BusMultiplexedIPdu'
10
11 # Accessing all BusContainerIPdus in all BusEcus in all BusCommunicationMatrices in
12 # all BusConfigurationPartSimulatedEcus in all BusConfigurations
13 '/BusConfiguration/BusConfigurationPartSimulatedEcus/BusCommunicationMatrix/BusEcu/BusContainerIPdu'
14
15 # Accessing all FunctionPorts with IsMappable = 'False' of all BusPduRawDataAccess features
16 # in 'Bus Configuration (1)'
17 '/BusConfiguration[@Name = "Bus Configuration (1)"]//BusPduRawDataAccess/FunctionPort[@IsMappable = "False"]'
18
19 # Accessing all FunctionPorts with IsTestAutomationSupportEnabled = 'True' of the BusISignalValueAccess Feature in
20 # the BusConfigurationPartInspection of 'Bus Configuration (1)'
21 '/BusConfiguration[@Name = "Bus Configuration
(1)"]/BusConfigurationPartInspection//BusISignalValueAccess/FunctionPort[@IsTestAutomationSupportEnabled = "True"]'
90
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Relations for accessing Many elements of communication matrices and bus configurations provide
element properties via XPath properties which you can access via XPath expressions. To access the properties
via XPath, you must use one of the following relations:
§ CommunicationMatricesByClustersWithProperties
§ CommunicationMatricesByEcusWithProperties
§ BusConfigurationsWithProperties
Note
If you have to access a high number of element properties (e.g., all the properties
of all the PDUs of a communication matrix) use the PropertyDataObjects
relation in combination with the CommunicationMatricesByClusters,
CommunicationMatricesByEcus, or BusConfigurations relations. In this
case, you cannot access the properties via XPath expressions.
To access the element properties, you can use the XPath expressions that are
listed in the following table. Use these expressions as lower-level elements of the
elements whose properties you want to access. For examples on the syntax, refer
to Examples on page 94. The slash (/) is part of the XPath expression.
91
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
92
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
93
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Examples The following listing provides short examples for accessing properties of
communication matrix elements sorted by clusters.
1 # CommunicationMatricesByClustersWithProperties
2
3 # Accessing the names of all BusCanCommunicationConnectors in all BusNetworkNodes whose name contains 'door' in
4 # all BusCanCommunicationClusters in all CAN BusSystems in all BusCommunicationMatrices
5 '/BusCommunicationMatrix/BusSystemCan/BusCanCommunicationCluster/BusNetworkNode[contains(@Name,
"door")]/BusCanCommunicationConnector/@Name'
6
7 # Accessing all BusSelectorFields whose name contains 'MuxPDU' in all BusMultiplexedIPdus in
8 # all BusCanPhysicalChannels
9 '//BusCanPhysicalChannel/BusMultiplexedIPdu/BusSelectorField[contains(@Name, "MuxPDU")]'
10
11 # Accessing the 'Time Period' BusTimeRange node of BusCyclicTiming of all 'ISignalIPdu01' BusISignalIPdus
12 '//BusISignalIPdu [@Name = "ISignalIPdu01"]/BusCyclicTiming/BusTimeRange [@Name = "Time Period"]'
The following listing provides short examples for accessing properties of bus
configurations elements.
1 # BusConfigurationsWithProperties
2
3 # Accessing the BusCodedType of all BusISignals with the 'TX' direction and regardless of whether they are
4 # included in a BusISignalGroup. The BusISignals are accessed in any PDU type of all BusEcus in
5 # any BusCommunicationMatrix that are assigned to the Simulated ECUs part of any BusConfiguration
6 '/BusConfiguration/BusConfigurationPartSimulatedEcus/BusCommunicationMatrix/BusEcu/*/descendant-or-
self::BusISignal[@Direction="TX"]/BusCodedType'
94
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Configuring a bus The following listing shows a basic workflow for configuring a bus
configuration and generating configuration :
bus configuration structures 1. Import a communication matrix .
2. Add a bus configuration to the active ConfigurationDesk application .
3. Assign communication matrix elements to different parts of the bus
configuration.
4. Add bus configuration features to elements of the bus configuration.
5. Enable model access for function ports .
6. Generate the model interface to be used in a MATLAB®/Simulink®
behavior model and in ConfigurationDesk.
The listing is only a short example and does not show all the possible tasks of
working with bus configurations. It is assumed that a project and an application
are still opened in ConfigurationDesk.
Tip
95
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
29
30 # Access the Inspection part of the bus configuration, select the 'IGNITION_1' IPDU in
31 # the communication matrix, and assign the IPDU to the Inspection part.
32 Inspection = BusConfigurationsRelation.GetElements(BusConfiguration).Item('Inspection')
33 IPDUIgnition1ComMatrix = CommunicationMatricesByEcusRelation.GetElements(EcuIgnition).Item('IGNITION_1')
34 BusManager.Configure('AssignElements', [[IPDUIgnition1ComMatrix], Inspection])
35
36 # Add the ISignal Value feature to all ISignals of the 'IGNITION_1' IPDU that are assigned to the Inspection part.
37 ISignalsIgnition1BusCfgPartInspection = BusConfigurationsRelation.FindByXPath('/BusConfiguration[@Name = "New
Bus Configuration"]/BusConfigurationPartInspection//BusISignalIPdu[contains(@Name, "IGNITION_1") and @Direction =
"RX"]/BusISignal')
38 for ISignal in ISignalsIgnition1BusCfgPartInspection:
39 BusManager.Configure('AddFeature', ['BusISignalValueInspection', ISignal])
40
41 # Enable 'Model access' for all function ports.
42 for FunctionPortModelAccess in BusConfigurationsRelation.FindByXPath('/BusConfiguration[@Name = "New Bus
Configuration"]//FunctionPort/@IsMappable'):
43 FunctionPortModelAccess.TrySetValue(True)
44
45 # Generate the model interface for the bus configuration function ports with enabled model access in
46 # ConfigurationDesk and a new Simulink model.
47 CurrentApplication.Algorithms.PropagateToSimulink([BusConfiguration])
The listing provides only a short example and does not show all the possible
aspects of modifying and accessing communication matrix elements. It is
assumed that a project and an application are still open in ConfigurationDesk
and a communication matrix with at least one physical CAN channel is available
in the ConfigurationDesk application.
Tip
96
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
13 NewBusISignalIPdu = CommunicationMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix[@Name =
"BusManagerBasicsDemo"]//BusCanPhysicalChannel[@Name = "CanBodyPhysicalChannel"]/BusISignalIPdu[@Name =
"User_defined_IPDU_1"]')[0]
14 for i in range(2):
15 BusManager.Configure('AddElementToCommunicationMatrix', ['BusISignal', NewBusISignalIPdu])
16
17 # Assign the user-defined IPDU to 'Bus Configuration (1)'.
18 BusConfiguration1 = BusConfigurationsRelation.FindByXPath('/BusConfiguration[@Name = "Bus Configuration (1)"]')
19 if len(BusConfiguration1) == 0:
20 BusConfiguration1 = BusConfigurationsRelation.CreateDataObject(BusConfigurationType)
21 else:
22 BusConfiguration1 = BusConfiguration1[0]
23 BusManager.Configure('AssignElements', [[NewBusISignalIPdu], BusConfiguration1])
24
25 # Change the length of the user-defined IPDU.
26 Result = NewBusISignalIPdu.Properties['Length'].TrySetValue(24)
27 print('Changed length of user-defined IPDU from "{0!s}" to "24" -> {1!s}\n'.format(NewBusISignalIPdu.Name, Result))
28
29 # Change the length of 'User_defined_ISignal_1'.
30 NewISignal = BusConfigurationsRelation.FindByXPath('//BusISignal[@Name = "User_defined_ISignal_1"]')[0]
31 Result = NewISignal.Properties['Length'].TrySetValue(16)
32 print('Changed length of user-defined ISignal from "{0!s}" to "16" -> {1!s}\n'.format(NewISignal.Name, Result))
33
34 # Change the coded and physical base data types of 'User_defined_ISignal_1' to UINT16.
35 ISignalCodedType = BusConfigurationsWithPropertiesRelation.FindByXPath('//BusISignal[@Name =
"User_defined_ISignal_1"]/BusCodedType')[0]
36 ISignalPhysicalType = BusConfigurationsWithPropertiesRelation.FindByXPath('//BusISignal[@Name =
"User_defined_ISignal_1"]/BusPhysicalType')[0]
37 # Base data types:
38 # '1': 'INT8'
39 # '2': 'UINT8'
40 # '3': 'INT16'
41 # '4': 'UINT16'
42 # '5': 'INT32'
43 # '6': 'UINT32'
44 # '7': 'INT64'
45 # '8': 'UINT64'
46 # '9': 'FLOAT32'
47 # '10': 'FLOAT64'
48 # '17': 'BOOLEAN'
49 ElementName = ISignalCodedType.Name
50 Result = ISignalCodedType.Properties['Base data type'].TrySetValue('4')
51 print('Changed base data type of "{0!s}" to "UINT16" -> {1!s}\n'.format(ElementName, Result))
52 ElementName = ISignalPhysicalType.Name
53 Result = ISignalPhysicalType.Properties['Base data type'].TrySetValue('4')
54 print('Changed base data type of "{0!s}" to "UINT16" -> {1!s}\n'.format(ElementName, Result))
55
56 # Select the modified communication matrix elements that are assigned to 'Bus Configuration (1)'.
57 ModifiedElements = BusConfigurationsWithPropertiesRelation.FindByXPath('/BusConfiguration[@Name = "Bus Configuration
(1)"]//*[@Changes_to_communication_matrix = "True"]')
58
59 # Continue only if 'ModifiedElements' is not empty.
60 if len(ModifiedElements) == 0:
61 print('No modified communication matrix element found.')
62 else:
63 # Print a list of the modified elements to ConfigurationDesk's Interpreter.
64 print('\nModified communication matrix elements:\n')
65 for ModifiedElement in ModifiedElements:
66 for Property in ModifiedElement.Properties:
67 print('{0!s}: {1!s}'.format(Property.Name, Property.Value))
68 print('\n')
97
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Examples of automating The following table provides the syntax and/or examples of automating
frequently performed tasks tasks that are frequently performed when configuring bus communication
by using the Bus Manager. For most of the tasks, you use the
Configure(ICaComponent) method with specific operations. For details on
the method and its operations, refer to ICaComponent <<Collection>> on
page 171.
Tip
For all examples in the table, the following basic variables are assumed:
1 BusManager = Application.ActiveApplication.Components.Item('BusManager')
2 BusConfigurationsRelation = Application.ActiveApplication.Relations.Item('BusConfigurations')
3 BusConfigurationsWithPropertiesRelation =
Application.ActiveApplication.Relations.Item('BusConfigurationsWithProperties')
4 ComMatricesByClustersRelation = Application.ActiveApplication.Relations.Item('CommunicationMatricesByClusters')
5 ComMatricesByClustersWithPropertiesRelation =
Application.ActiveApplication.Relations.Item('CommunicationMatricesByClustersWithProperties')
6 ComMatricesByEcusRelation = Application.ActiveApplication.Relations.Item('CommunicationMatricesByEcus')
7 ComMatricesByEcusWithPropertiesRelation =
Application.ActiveApplication.Relations.Item('CommunicationMatricesByEcusWithProperties')
1 # Remove the BusManagerBasicsDemo.arxml communication matrix via the 'Communication Matrices by ECUs' view
of the Buses Browser but not the elements that are assigned to bus configurations. These elements are marked
as unresolved after the communication matrix is deleted.
2 BusManager.Configure('RemoveCommunicationMatrix',
[ComMatricesByEcusRelation.GetTopNodes().Item('BusManagerBasicsDemo'), 'False'])
1 # Browse the 'Communication Matrices by Clusters' view of the Buses Browser and get the names of all
available ECUs.
2 ComMatrices = ComMatricesByClustersRelation.GetTopNodes()
3 for ComMatrix in ComMatrices:
4 for BusSystem in ComMatricesByClustersRelation.GetElements(ComMatrix):
98
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
1 # Browse the 'Communication Matrices by Clusters' view of the Buses Browser and get the names of all
available ECUs via XPath.
2 ECUs = ComMatricesByClustersRelation.FindByXPath('//BusNetworkNode')
3 for ECU in ECUs:
4 print (ECU.Name)
1 # Get the names of all PDUs that are transmitted and received by CentralGatewayEcu on all CAN communication
clusters.
2 ECUs = ComMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix [@Name =
"BusManagerBasicsDemo"]//BusNetworkNode [@Name = "CentralGatewayEcu"]/BusCanPhysicalChannel')
3 for ECU in ECUs:
4 for PDU in ComMatricesByClustersRelation.GetElements(ECU):
5 print (PDU.Name)
1 # Get the properties and values of DoorLeftStatusCanIPdu via the 'Communication Matrices by ECUs' view of
the Buses Browser.
2 SelectedPdu = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu [@Name = "DoorLeftStatusCanIPdu"]')
[0]
3 for Property in SelectedPdu.Properties:
4 print (Property.Name, Property.Value)
1 # Get the properties and values of any element that is selected in the user interface, including the
properties of its child elements, down to the third level of child elements. Precondition: Select an
element in the user interface.
2 SelectedObject = Application.ActiveApplication.GetSelectedObjects()[0]
3 Objects = [SelectedObject]
4 RelatedObjects = Application.ActiveApplication.Relations['PropertyDataObjects'].GetElements(SelectedObject)
5 Objects.extend(RelatedObjects)
6 for obj in RelatedObjects:
7 RelatedObjects2 = Application.ActiveApplication.Relations['PropertyDataObjects'].GetElements(obj)
8 Objects.extend(RelatedObjects2)
9 for obj in RelatedObjects2:
10 RelatedObjects3 = Application.ActiveApplication.Relations['PropertyDataObjects'].GetElements(obj)
11 Objects.extend(RelatedObjects3)
12 for obj in Objects:
13 print('##################')
14 for Role in obj.Roles:
15 print (Role)
16 print ('~~~~~~~~~~~~~~~~~~')
17 for Property in obj.Properties:
18 print (Property.Name + ': ' + str(Property.Value))
19 print ('##################')
99
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Note
Using automation, you can only enable and disable a user-defined bus configuration behavior. The user-defined bus
configuration behavior itself can be specified only in the user interface of the Bus Manager.
Examples:
1 # Assign CentralGatewayEcu of the BusManagerBasicsDemo communication matrix in the context of the
'Communication Matrices by ECUs' view of the Buses Browser to the Simulated ECUs part of Bus
Configuration (1).
2 CommunicationMatrix = ComMatricesByEcusRelation.GetTopNodes().Item('BusManagerBasicsDemo')
3 CentralGatewayEcu = ComMatricesByEcusRelation.GetElements(CommunicationMatrix).Item('CentralGatewayEcu')
4 BusConfiguration = BusConfigurationsRelation.GetTopNodes().Item('Bus Configuration (1)')
5 BusManager.Configure('AssignElements', [[CentralGatewayEcu], BusConfiguration])
1 # Assign all RX PDUs of BodyControlEcu in the context of the 'Communication Matrices by ECUs' view of the
Buses Browser to the Manipulation part of Bus Configuration (1).
2 BodyControlRxPdus = ComMatricesByEcusRelation.FindByXPath('//BusEcu [@Name =
"BodyControlEcu"]/BusISignalIPdu [@Direction = "RX"]')
3 BusConfiguration = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartManipulation')[0]
4 BusManager.Configure('AssignElements', [BodyControlRxPdus, BusConfiguration])
Examples:
1 # Create a restbus configuration for CentralGatewayEcu of the BusManagerBasicsDemo communication matrix by
using a new bus configuration.
2 AvailableECU = ComMatricesByEcusRelation.FindByXPath('/BusCommunicationMatrix [@Name =
"BusManagerBasicsDemo"]/BusEcu [@Name = "CentralGatewayEcu"]')
3 BusManager.Configure('CreateRestbusConfiguration', [AvailableECU, None, ''])
100
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Copy or cut selected bus configurations or bus configuration elements and paste them to a bus configuration
Syntax:
1 # Syntax for copying bus configurations or bus configuration elements, with ElementsToCopy = DataObject
list. If you copy a bus configuration, only one DataObject element is allowed in the DataObject list.
2 BusManager.Configure('CopyBusElements', [ElementsToCopy])
1 # Syntax for cutting bus configuration elements, with ElementsToCt = DataObject list.
2 BusManager.Configure('CutBusElements', [ElementsToCut])
1 # Syntax for pasting copied or cut elements to a selected bus configuration, with SelectedBusConfiguration =
DataObject list. However, only one DataObject element is allowed in the DataObject list.
2 BusManager.Configure('PasteBusElements', [SelectedBusConfiguration])
Examples:
1 # Copy the entire Bus Configuration (1) to the Clipboard.
2 CopyBusConfig = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration (1)"]')
3 BusManager.Configure('CopyBusElements', [CopyBusConfig])
4 # Paste all elements that are copied to the Clipboard to Bus Configuration (2).
5 BusConfigForPasting = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(2)"]')
6 BusManager.Configure('PasteBusElements', [BusConfigForPasting])
1 # Copy ContainerIPdu01 of Bus Configuration (1) to the Clipboard. Tip: All subelements of ContainerIPdu01
and related higher-level elements are also copied. However, related contained IPDUs that are assigned to Bus
Configuration (1) are not copied.
2 CopyContainerIPdu = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusContainerIPdu [@Name = "ContainerIPdu01"]')
3 BusManager.Configure('CopyBusElements', [CopyContainerIPdu])
4 # Paste all elements that are copied to the Clipboard to Bus Configuration (2).
5 BusConfigForPasting = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(2)"]')
6 BusManager.Configure('PasteBusElements', [BusConfigForPasting])
1 # Cut all RX ISignals of the Simulated ECUs part of Bus Configuration (1) to the Clipboard. Tip: All
subelements and related higher-level elements of the RX ISignals are also copied.
2 CutRxISignals = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartSimulatedEcus//BusISignal [@Direction = "RX"]')
3 BusManager.Configure('CutBusElements', [CutRxISignals])
4 # Paste all elements that are copied to the Clipboard to Bus Configuration (2). Tip: The elements are
automatically pasted to the Simulated ECUs part of Bus Configuration (2).
5 BusConfigForPasting = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(2)"]')
6 BusManager.Configure('PasteBusElements', [BusConfigForPasting])
101
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
1 # Remove the multiplexed IPDU and its dynamic-part and static-part IPDUs whose names contain 'DISPLAY' from
Bus Configuration (1).
2 AllMuxDisplayPdus = BusConfigurationsWithPropertiesRelation.FindByXPath('/BusConfiguration [@Name = "Bus
Configuration (1)"]//BusMultiplexedIPdu [contains(@Name, "DISPLAY")]|/BusConfiguration [@Name = "Bus
Configuration (1)"]//BusDynamicPartIPdu [contains(@Name, "DISPLAY")]|/BusConfiguration [@Name = "Bus
Configuration (1)"]//BusStaticPartIPdu [contains(@Name, "DISPLAY")]')
3 BusManager.Configure('RemoveElements', AllMuxDisplayPdus)
1 # Remove the ISignal Value feature from all CurrentGearISignal instances that are assigned to the Simulated
ECUs part of Bus Configuration (1).
2 ISignalValueAccessAllCurrentGearISignals = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name =
"Bus Configuration (1)"]//BusISignal [@Name = "CurrentGearISignal"]/BusISignalValueAccess')
3 BusManager.Configure('RemoveElements', ISignalValueAccessAllCurrentGearISignals)
Add user‑defined gateway source PDUs (RX) to a gateway target PDU (TX)
Syntax:
1 # Syntax, with GatewaySourcePdus = DataObject list, GatewayTargetPdu = DataObject
2 BusManager.Configure('AddUserDefinedGatewaySourcePdu', [GatewaySourcePdus], GatewayTargetPdu)
Example:
1 # Select the DoorRightStatusIPdu and DoorLeftStatusIPdu RX PDUs in the Buses Browser to use them as source
PDUs. Select the GeneralInfoIPdu TX PDU in Bus Configuration (1) to use it as target PDU.
2 GatewaySourcePdu1 = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu [@Direction = "RX" and @Name
= "DoorRightStatusIPdu"]')[0]
3 GatewaySourcePdu2 = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu [@Direction = "RX" and @Name
= "DoorLeftStatusIPdu"]')[0]
4 GatewayTargetPdu = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignalIPdu [@Direction = "TX" and @Name = "GeneralInfoIPdu"]')[0]
5
6 # Add the selected RX PDUs as user-defined source PDUs to the selected TX PDU (target PDU).
7 BusManager.Configure('AddUserDefinedGatewaySourcePdu', [[GatewaySourcePdu1, GatewaySourcePdu2],
GatewayTargetPdu])
Remove user‑defined gateway source PDUs (RX) from a gateway target PDU (TX)
Syntax:
1 # Syntax, with GatewaySourcePdus = DataObject list, GatewayTargetPdu = DataObject
2 BusManager.Configure('RemoveUserDefinedGatewaySourcePdu', [GatewaySourcePdus], GatewayTargetPdu)
Example:
1 # Select the DoorRightStatusIPdu and DoorLeftStatusIPdu RX PDUs, which are used as user-defined source PDUs,
in the Buses Browser. Select the GeneralInfoIPdu TX PDU, which is used as target PDU, in Bus Configuration
(1).
2 GatewaySourcePdu1 = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu [@Direction = "RX" and @Name
= "DoorRightStatusIPdu"]')[0]
3 GatewaySourcePdu2 = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu [@Direction = "RX" and @Name
= "DoorLeftStatusIPdu"]')[0]
4 GatewayTargetPdu = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignalIPdu [@Direction = "TX" and @Name = "GeneralInfoIPdu"]')[0]
102
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Tip
The name of the communication matrix node in the bus configuration remains unchanged when you replace an
assigned communication matrix.
1 # Replace the communication matrix that is assigned to Bus Configuration (1) and whose node name in the bus
configuration is BusManagerComMatrix with the BusManagerBasicsDemo.arxml communication matrix.
2 ComMatrixToReplace = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusCommunicationMatrix [@Name = "BusManagerComMatrix"]')[0]
3 NewComMatrix = ComMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix [@Name =
"BusManagerBasicsDemo"]')[0]
4 BusManager.Configure('ReplaceCommunicationMatrixAssignment', [ComMatrixToReplace, NewComMatrix])
Examples:
1 # Get a list of the role names of all bus configuration features that are available for bus configuration
elements that are selected in the user interface. Precondition: Select one or more bus configuration
elements in the user interface.
2 SelectedElements = Application.ActiveApplication.GetSelectedObjects()
3 AvailableFeatures = BusManager.Configure('GetAvailableFeatures', [SelectedElements])
4 list(AvailableFeatures)
1 # Get the role names of all bus configuration features that are available for DoorLeftStatusCanIPdu and
DoorLeftClosedISignal that are assigned to the Simulated ECUs part of Bus Configuration (1).
2 SelectedElements = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartSimulatedEcus//BusISignalIPdu [@Name = "DoorLeftStatusCanIPdu"]|/BusConfiguration
[@Name = "Bus Configuration (1)"]/BusConfigurationPartSimulatedEcus//BusISignal [@Name =
"DoorLeftClosedISignal"]')
3 AvailableFeatures = BusManager.Configure('GetAvailableFeatures', SelectedElements)
4 for AvailableFeature in AvailableFeatures:
5 print (AvailableFeature)
Examples:
1 # Add the PDU Length simulation feature to all DoorLeftStatusCanIPdu PDUs of Bus Configuration (1).
2 PDUs = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignalIPdu [@Name = "DoorLeftStatusCanIPdu"]')
3 BusManager.Configure('AddFeature', ['BusPduLengthAccess', PDUs])
1 # Add the PDU Raw Data simulation feature to all RX ISignal IPDUs that are assigned to Bus Configuration (1).
2 RxPDUs = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignalIPdu [@Direction = "RX"]')
3 BusManager.Configure('AddFeature', ['BusPduRawDataAccess', RxPDUs])
103
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
1 # Set the access mode of the PDU Raw Data feature to 'Write' for TX GeneralInfoIPdu of Bus Configuration (1).
2 RawDataAccessModes = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignalIPdu [@Name = "GeneralInfoIPdu" and @Direction = "TX"]/BusPduRawDataAccess/@Access_mode')
3 for RawDataAccessMode in RawDataAccessModes:
4 RawDataAccessMode.TrySetValue(2)
Get the parent elements of elements that are available in the Buses Browser or the bus configuration tables
1 # Initialize the BusParentElementRelation variable to access the BusParentElement relation.
2 BusParentElementRelation = Application.ActiveApplication.Relations.BusParentElement
1 # Access Kl_15ISignal of BusManagerBasicsDemo.arxml in the Buses Browser and get the names of all PDUs in
which the ISignal is included.
2 ISignals = ComMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix [@Name =
"BusManagerBasicsDemo"]//BusISignal [@Name = "Kl_15ISignal"]')
3 for ISignal in ISignals:
4 ParentElement = ISignal.Parent
5 print (ParentElement.Name)
1 # Access GearboxInfoIPdu in Bus Configuration (1) and get the names of all the parent elements in whose
context the PDU is assigned to the bus configuration. Tip: For the Simulated ECUs part, the parent elements
are the related ECUs. For the Inspection and Manipulation parts, the parent elements are the bus channels.
2 Pdus = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name =
"Bus Configuration (1)"]//BusISignalIPdu [@Name = "GearboxInfoIPdu"]')
3 for Pdu in Pdus:
4 ParentElement = Pdu.Parent
5 print (ParentElement.Name)
Examples:
1 # Add a TX PDU and an RX PDU to the CanBodyPhysicalChannel channel of the BusManagerBasicsDemo communication
matrix.
2 CanChannel = ComMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix[@Name =
"BusManagerBasicsDemo"]//BusCanPhysicalChannel[@Name = "CanBodyPhysicalChannel"]')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusISignalIPdu', CanChannel,
'BusDirectedElementTX'])
4 BusManager.Configure('AddElementToCommunicationMatrix', ['BusISignalIPdu', CanChannel,
'BusDirectedElementRX'])
104
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
1 # Add a cyclic and event-controlled timing element to the NoTimingPdu ISignal IPDU.
2 NoTimingPdu = ComMatricesByClustersWithPropertiesRelation.FindByXPath('//BusISignalIPdu[@Name =
"NoTimingPdu"]')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusCyclicTiming', NoTimingPdu])
4 BusManager.Configure('AddElementToCommunicationMatrix', ['BusEventControlledTiming', NoTimingPdu])
1 # Add a time period and time offset element to the cyclic timing that is specified for the True transmission
mode of the MissingTimingElements ISignal IPDU.
2 CyclicPduTiming = ComMatricesByClustersWithPropertiesRelation.FindByXPath('//BusISignalIPdu[@Name =
"MissingTimingElements"]/BusCyclicTiming[@Is_in_transmission_mode = "True"]')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusTimePeriod', CyclicPduTiming])
4 BusManager.Configure('AddElementToCommunicationMatrix', ['BusTimeOffset', CyclicPduTiming])
1 # Add a minimum delay element to all timing elements of the MissingTimingElements ISignal IPDU. To add the
minimum delay element, you have to select a cyclic or event-controlled timing element of the IPDU.
2 CyclicPduTiming = ComMatricesByClustersWithPropertiesRelation.FindByXPath('//BusISignalIPdu[@Name =
"MissingTimingElements"]/BusCyclicTiming')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusMinimumDelay', CyclicPduTiming])
1 # Add a repetition period element to the event-controlled timing of the MissingTimingElements ISignal IPDU.
2 EventControlledPduTiming = ComMatricesByClustersWithPropertiesRelation.FindByXPath('//BusISignalIPdu[@Name =
"MissingTimingElements"]/BusEventControlledTiming')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusRepetitionPeriod', EventControlledPduTiming])
Note
You can only rename user-defined IPDUs and ISignals that were added to the communication matrix by using the
AddElementToCommunicationMatrix operation.
Note
Modifying properties of a communication matrix element applies to all TX and RX instances of the element in the
communication matrix and in all bus configurations.
1 # Set the start bit position of DoorLeftClosedISignal of the BusManagerBasicsDemo communication matrix on
all CAN clusters to the 8th bit.
2 ModifiedStartBits = ComMatricesByClustersWithPropertiesRelation.FindByXPath('/BusCommunicationMatrix
[@Name = "BusManagerBasicsDemo"]/BusSystemCan//BusISignal [@Name =
"DoorLeftClosedISignal"]/BusISignalToIPduMapping')
3 for ModifiedStartBit in ModifiedStartBits:
4 ModifiedStartBit.Properties['Start bit position'].TrySetValue('8')
1 # Set the unused bit pattern of all ISignal IPDUs that are assigned to the Manipulation part of Bus
Configuration (1) to 255.
2 ManipulatedPdus = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartManipulation//BusISignalIPdu')
105
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Examples:
1 # Undo the modification only of the name and the length of the user-defined MyTxISignal ISignal, keep all
other modifications of the ISignal.
2 ModifiedSignal = ComMatricesByClustersRelation.FindByXPath('//BusISignal[@Name = "MyTxISignal"]')[0]
3 BusManager.Configure('UndoChangesToCommunicationMatrix', [ModifiedSignal, ['Name','Length']])
Examples:
1 # Add three frame captures to the Inspection part of Bus Configuration (1).
2 SelectedBusConfig = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartInspection')
3 for i in range(3):
4 BusManager.Configure('AddFrameCapture', SelectedBusConfig)
1 # Add three frame captures to all bus configurations whose names contain 'Bus'.
2 SelectedBusConfigs = BusConfigurationsRelation.FindByXPath('/BusConfiguration [contains(@Name,
"Bus")]/BusConfigurationPartInspection')
3 for SelectedBusConfig in SelectedBusConfigs:
4 for i in range(3):
5 BusManager.Configure('AddFrameCapture', [SelectedBusConfig])
Examples:
1 # Add a frame gateway to the Gateways part of Bus Configuration (1).
2 SelectedBusConfig = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartGateways')[0]
3 BusManager.Configure('AddGateway', ['BusFrameGateway', SelectedBusConfig])
1 # Add a frame gateway to all bus configurations whose names contain 'Bus'.
2 SelectedBusConfigs = BusConfigurationsRelation.FindByXPath('/BusConfiguration [contains(@Name,
"Bus")]/BusConfigurationPartGateways')
3 for SelectedBusConfig in SelectedBusConfigs:
4 BusManager.Configure('AddGateway', ['BusFrameGateway', SelectedBusConfig])
106
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Examples:
1 # Add two filter rules to the frame capture filter of Frame Capture (1) in Bus Configuration (1).
2 SelectedFilter = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusFrameCapture [@Name = "Frame Capture (1)"]/BusFrameCaptureFilter')
3 for i in range(2):
4 BusManager.Configure('AddFilterRule', SelectedFilter)
1 # Add a filter rule to all frame gateway filters of Bus Configuration (1).
2 SelectedFilters = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusFrameGatewayFilter')
3 for SelectedFilter in SelectedFilters:
4 BusManager.Configure('AddFilterRule', [SelectedFilter])
Replace the timer event of a Bus Configuration task with a synchronized timer event
1 # Access the timer event that is available for the 'Bus Configuration' task of 'Bus Configuration (1)'. 'Bus
Configuration (1)' must already be assigned to an application process.
2 RelApplConfig = Application.ActiveApplication.Relations.ApplicationConfiguration
3 ExecApplication = RelApplConfig.GetTopNodes()[0]
4 PUApplication = RelApplConfig.GetElements(ExecApplication)[0]
5 AppProcess = RelApplConfig.GetElements(PUApplication)[0]
6 BusConfig = RelApplConfig.GetElements(AppProcess)['Bus Configuration (1)']
7 TimerEvent = RelApplConfig.GetElements(BusConfig)['Timer Event']
8 # Replace the timer event with a synchronized timer event.
9 Application.ActiveApplication.Algorithms.ChangeToSynchronizedTimerEventType([TimerEvent])
Add a synchronized timer event to a Bus Configuration task and delete the original timer event
1 # Access the 'Bus Configuration' task of 'Bus Configuration (1)'. 'Bus Configuration (1)' must already be
assigned to an application process.
2 RelApplConfig = Application.ActiveApplication.Relations.ApplicationConfiguration
3 ExecApplication = RelApplConfig.GetTopNodes()[0]
4 PUApplication = RelApplConfig.GetElements(ExecApplication)[0]
5 AppProcess = RelApplConfig.GetElements(PUApplication)[0]
6 BusConfig = RelApplConfig.GetElements(AppProcess)['Bus Configuration (1)']
7 BusConfigTask = RelApplConfig.GetElements(BusConfig)['Bus Configuration']
8 # Add a new synchronized timer event to the 'Bus Configuration' task.
9 BusConfigTask.CreateChild(BusConfigTask.DataObjectTypes['SyncTimerEvent'])
10 # Access the timer event of the 'Bus Configuration' task and delete the event from the task.
11 TimerEvent = RelApplConfig.GetElements(BusConfig)['Timer Event']
12 RelApplConfig.RemoveElements(BusConfigTask, [TimerEvent])
107
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
1 # Get the names of all bus access requests of Bus Configuration (1) via XPath.
2 BusAccessRequestNames = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]/BusConfigurationPartBusAccessRequests/*/*/*/*')
3 for BusAccessRequestName in BusAccessRequestNames:
4 print (BusAccessRequestName.Name)
Example:
1 # Generate a new Simulink model interface for the function ports with enabled model access of Bus
Configuration (1).
2 BusConfiguration = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]')
3 Application.ActiveApplication.Algorithms.PropagateToSimulink(BusConfiguration)
108
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features
Example:
1 # Propagate the changes of Bus Configuration (1) to the GeneratedModel Simulink model, which is available in
the Model Browser.
2 BusConfiguration = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]')
3 Application.ActiveApplication.Algorithms.PropagateToSimulink(BusConfiguration, 'GeneratedModel')
Get the default template for generating XIL framework label IDs
1 # Get the default template that is used by the Bus Manager to generate XIL framework label IDs.
2 BusManager.Configure('GetBmXilFrameworkLabelIdTemplate',['Default'])
Get the active template for generating XIL framework label IDs
1 # Get the active template that is used to generate XIL framework label IDs.
2 # This can be the default template of the Bus Manager or a template that is configured by the user.
3 BusManager.Configure('GetBmXilFrameworkLabelIdTemplate',[''])
Example:
1 # Configure the template for generating XIL framework label IDs.
2 BusManager.Configure('ConfigureBmXilFrameworkLabelIdTemplate', ['MyLabelIds_{%BMBusConfiguration%}
{_%BMBusConfigurationPart%}{_%BMCommunicationMatrixName%}{_%BMPDU%}{_%BMFeature%}{_%BMFunctionPortName%}
{_%VariableName%}'])
Examples
109
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Running scripts in PythonWin Running scripts in PythonWin might take considerably longer than in other
external interpreters, such as Python.exe. Use PythonWin only to use its
debugging features.
Avoid to iterate collections Iterating collections is time-consuming, especially with process boundaries. You
should therefore try to avoid iterating a collection more often than necessary.
For example, there are different ways to set a subset of property values of a
collection:
110
ConfigurationDesk Automating Tool Handling May 2024
Best Practices for Automating ConfigurationDesk
This implementation iterates through the collection only once, therefore saving
time.
Use automation transactions Transactions are useful to encapsulate and separate functionality. With the
automation interface, you can create autonomous read or write transactions that
are closed after performing their automation task.
111
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
WriteTransaction = None
try:
WriteTransaction =
activeApp.TransactionCreator.CreateWriteTransaction("TAAutomation")
FuncTypes = FuncLib.Item(0)
for FuncType in FuncTypes:
for Func in FuncType:
SetTestAutomationActive(Func)
except:
print("Exception")
finally:
WriteTransaction.Close()
Note
Use ICaAlgorithms The ICaAlgorithms interface provides some methods to perform a configuration
task for one or more ICaDataObjects. For example, it is possible to create a
suitable model port block for every instantiated function block . If you need
to perform recurrent tasks, consider using ICaAlgorithms.
112
ConfigurationDesk Automating Tool Handling May 2024
Best Practices for Automating ConfigurationDesk
Non-typed return values in C# In some cases the return value of a ConfigurationDesk automation API method is
a collection of non-typed objects. In C# it may be necessary to check the type of
the object to access it correctly.
With the following example script, you can get a group of different objects
(working views , blocks, links) that you have selected in ConfigurationDesk.
ICaObjects obs = ActiveApplication.GetSelectedObjects("", "");
Notes on using default The automation interface has some methods that use default parameters. The
parameters different programming languages affect these methods in different ways.
113
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Notes on untyped arrays as In some cases, for example, in the ICaAlgorithms interface, the
parameters ConfigurationDesk automation API uses methods with untyped array
parameters:
void CreateSuitableModelPortBlock(object FunctionBlocks)
There are different approaches for this in C#, Python and MATLAB:
MATLAB If you need an array, you must use a MATLAB-specific cell array
which is stated in braces:
ActiveApplication.Algorithms.CreateSuitableModelPortBlock({MyFunctionBlock});
Notes on string arrays as In some cases, for example, in the ICaAlgorithms interface, the
parameters ConfigurationDesk automation API uses methods with string arrays as
parameters:
void ExportTableViewToXML(String FullPath, String TableName,
String[] Infos,
[DefaultParameterValue("")] String ColumnsSet);
While this signature causes no trouble in C# or Python, you will get problems in
MATLAB if you want to provide an empty string array.
MATLAB The problem is to convert an empty safe array from BSTR to a string
array, which can be successfully done only with one single value. For this reason,
a special feature should be activated in MATLAB before calling the automation
method:
feature('COM_SafeArraySingleDim', 1)
Algorithms.ExportTableViewToXML('c:\MyTest.xml', 'Function Electrical
Interface', {''},'');
Notes on vectors as property Some properties expect vectors to set their value and return a vector
values representing this value. For example, an Injection/Ignition Current In function
block provides access to a property Number of expected pulses (automation
name: NumberOfExpectedPulses) that is of type vector and whose length
depends on the Number of event windows property (automation name:
NumberOfEventWindows). This example is approached as follows in C#, Python
and MATLAB:
114
ConfigurationDesk Automating Tool Handling May 2024
Best Practices for Automating ConfigurationDesk
C# Use an object array to get the vector of the property value and to access
an item of it:
object[] arr = NumbPulsProp.Value as object[];
int val = (int) arr[0];
Setting the value means setting a complete vector, for example:
arr[0] = 3;
NumbPulsProp.Value = arr;
Python Use the value property of the automation object to get this item in
Python:
Vals = NumbPulsProp.Value
Val = Vals[0]
Changing and setting the value requires a conversion to a list:
Vals = list(Vals)
Vals[0] = 3
NumbPulsProp.Value = Vals
Creating types Creating types via the ICaDataObject method CreateChild needs an
ICaDataObjectType which can be queried from the parent object. Always use
the correct ICaDataObject to query the type and then create the child object.
Not recommended:
deviceporttype = MyDevice.DataObjectTypes.Item("DevicePort")
MyOtherDevice.CreateChild(deviceporttype)
Instead, use:
deviceporttype = MyOtherDevice.DataObjectTypes.Item("DevicePort")
MyOtherDevice.CreateChild(deviceporttype)
Using lists for sets of values If you need a set of values for a property, use a list to set them properly.
115
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk
Enable operations
Enable reception
Enable transmission
Com state
Using the DisplayName As of dSPACE Release 2015-B, the ICaProperty interface contains the
property DisplayName property. You can use it to find the automation name of a
property displayed in the Properties Browser . For example, a Voltage In
function block has a Capture angle position property, whose name is
different from its automation name: IsAnglePositionEnabled. The reason is
that a display name can change in the future while an automation name must
not. Therefore, avoid using display names in an automation script.
Setting a property value You can set a property value either directly by assigning it
to the ICaProperty.Value property or indirectly by using the
ICaProperty.TrySetValue(<Object>) method, which returns true or false
indicating if the assignment was successful. For notes on specific data structures
and parameters, see Best Practices for Data Structures and Parameters on
page 113.
116
ConfigurationDesk Automating Tool Handling May 2024
Code Examples in Different Programming Languages
117
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
Location of the demo scripts You can find Python demo scripts in the following subfolders of your <RCP and
HIL installation folder>:
§ .\Demos\Python\Tutorial
§ .\Demos\Python\ProgrammingMultithreadedApplications
118
ConfigurationDesk Automating Tool Handling May 2024
Examples of Python Scripts
119
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
Creation................................................................................................ 121
Short examples of creation show the main differences between different
programming languages.
Destruction............................................................................................ 122
Short examples of destruction show the main differences between
different programming languages.
Collections............................................................................................ 123
Short examples of collections show the main differences between
different programming languages.
Constants.............................................................................................. 123
Short examples of constants show the main differences between
different programming languages.
Control Structures
120
ConfigurationDesk Automating Tool Handling May 2024
Code Sequence Examples
C# if ( item.EnumProperty == EnumClass.ENUM_VALUE
&& item.StringProperty.Equals("String")
{
...
}
Line Continuation
Python CallMethodWithParameter(\
Parameter ...
C# CallMethodWithParameter (
Parameter);
Creation
121
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
Destruction
C# Marshal.ReleaseComObject(server);
this.server = null;
C# With parentheses:
Server.CallMethod ();
122
ConfigurationDesk Automating Tool Handling May 2024
Code Sequence Examples
Collections
Note
By default, MATLAB uses the double data type when you call a method
with a parameter, for example, like this:
Item(0)
However, since parameters of the double data type cannot be handled by
the automation interface of ConfigurationDesk, you have to cast the data
type of such a parameter to Int32 in your M-code.
C# Server.Collection[0]
foreach (string Item in Server.Collection)
{
...
}
Constants
Visual Basic Access via type information, add reference library to your VB project:
ServerLib.ENUM_VALUE
123
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
C# EnumClass.ENUM_VALUE
Array Handling
124
ConfigurationDesk Automating Tool Handling May 2024
Code Examples Showing Programming Constructs
Note
The code examples just show the ways the programming constructs should
be translated. They do not work on real servers.
Example The following example shows how to create an object, access properties and
methods, and select items from a collection.
Note
The code examples just show the ways the programming constructs should
be translated. They do not work on real servers.
125
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
Tip
Example The following example shows how to create an object, access properties and
methods, and select items from a collection.
Note
126
ConfigurationDesk Automating Tool Handling May 2024
Code Examples Showing Programming Constructs
...
Dim ArrayValue As Variant
Set Server = CreateObject("Server.Object.1")
StringValue = Server.StringProperty
Debug.Print StringValue
Set Item = Server.Collection(0)
Set Collection = Server.Collection
For Each Item In Collection:
If Item.EnumProperty = ServerLib.ENUM_VALUE Then
If Item.StringProperty = "String" Then
Item.CallMethod
Item.IntegerProperty = 42
End If
End If
Next
ArrayValue = Server.ArrayProperty
For Each ArrayItem In ArrayValue
Debug.Print ArrayItem
Next
Set StringValue = Nothing
Set ArrayValue = Nothing
Set Item = Nothing
Set Collection = Nothing
Server.Quit
Set Server = Nothing
...
Code Example in M
Example The following example shows how to create an object, access properties and
methods, and select items from a collection.
Note
127
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
ENUM_VALUE = 1;
Server = actxserver('Server.Object.1');
StringValue = Server.StringProperty;
disp(sprintf('%s', StringValue));
Item = Server.Collection.Item(int32(0));
Collection = Server.Collection;
for Index = 0:(Collection.Count - 1)
Item = Collection.Item(int32(Index));
if Item.EnumProperty == ENUM_VALUE
if strcmp(Item.StringProperty, 'String')
Item.CallMethod();
Item.IntegerProperty = 42;
End;
end;
end;
ArrayValue = Server.ArrayProperty;
CellArray = cell2mat(ArrayValue);
for Index = 1:(length(CellArray))
disp(sprintf('%d', CellArray(Index)));
end;
clear StringValue;
clear CellArray;
clear ArrayValue;
clear Item;
clear Collection;
Server.Quit();
clear Server;
Code Example in C#
Example The following example shows how to create an object, access properties and
methods, and select items from a collection.
Note
128
ConfigurationDesk Automating Tool Handling May 2024
Code Examples Showing Programming Constructs
using Company.Program.Interfaces;
...
Type serverType = Type.GetTypeFromProgID("Server.Object.1");
IServerInterface server = Activator.CreateInstance(
serverType) as IServerInterface;
string stringValue = server.StringProperty;
Console.WriteLine(stringValue);
IItemInterface item = server.Collection[0];
ICollectionInterface collection = server.Collection;
foreach (item in collection)
{
if ( item.EnumProperty == EnumClass.ENUM_VALUE
&& item.StringProperty.Equals("String"))
{
item.CallMethod();
item.IntegerProperty = 42;
}
}
object[] arrayValue = (object[])server.ArrayProperty;
for (object arrayItem in arrayValue)
{
Console.Write(String.Format("{0:d} ", (int)arrayItem));
}
...
129
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages
130
ConfigurationDesk Automating Tool Handling May 2024
Using ConfigurationDesk to Edit and Execute Scripts
131
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Basics on Python
Where to go from here Information in this section
To get an idea of the Python programming language, you need to know its main
characteristics.
Variable type definition No explicit variable type definition is necessary. For example, you do not have to
declare a variable as an integer or float variable before assigning the values, just
assign the values:
a = 25
b = 1.23
Scopes and indentation Control structures – for example loops, if constructs, functions, class definitions –
do not use an end command. The scopes are declared by indentation, for
example:
132
ConfigurationDesk Automating Tool Handling May 2024
Basics on Python
if a > 10:
print('outer if')
if b > 50:
print ('inner if')
else:
print ('inner else')
else:
print ('outer else')
For an example, see lesson 4 (refer to Python Demo Scripts on page 118).
Comments Comments begin with a “#” and extend to the end of the line.
Print function Any variable can be displayed using the print command. It has formatting
parameters similar to the C language printf function.
String representation If you need a string representation of any variable or expression, use the built-in
function str: see lesson 1 (refer to Python Demo Scripts on page 118).
Module import The scope of any variable can be controlled by different methods. There are
local and global symbols. Symbols from other modules can be imported using
different methods:
§ Qualification by dot notation:
# access the os module and
# use the method splitext of the os.path module
import os
(File, Extension) = os.path.splitext('MyFile.txt')
§ Qualified import of individual symbols of another module:
# global import and
# direct use of method splitext
from os.path import splitext
(FileName, Extension) = splitext('MyFile.txt')
The most suitable method depends on the specific situation. A symbol taken
from a qualified or global import can then no longer be used by dot notation. It
overwrites an existing symbol with the same name regardless of its type.
Data structures Python has a rich set of predefined data structures, such as lists, tuples,
dictionaries and corresponding operators and methods. Refer to lesson 2 (refer
to Python Demo Scripts on page 118) and lesson 6 (refer to Python Demo Scripts
on page 118).
Functions Functions can be defined at any location in a script. There are several ways to call
functions and define default values for function parameters. Parameter passing
can be performed by position or by name. Refer to lesson 7 (refer to Python
Demo Scripts on page 118).
133
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
File operations File operations provide read/write access to files managed by the Windows
operating system. Basic operations are opening and closing a file with different
access modes and positioning the file pointer. Refer to lesson 9 (refer to Python
Demo Scripts on page 118).
Objects Python offers object-oriented description features, such as class definitions and
multiple inheritance: see lesson 10 (refer to Python Demo Scripts on page 118).
Error handling Python uses exception handling as error handling. Both user-defined and
standard exceptions can be used: see lesson 8 (refer to Python Demo Scripts
on page 118).
PYC files Reusable script modules can be compiled into an internal byte representation for
improved performance. These files have the PYC file name extension.
Tip
Introduction If you use Python to automate ConfigurationDesk, there are some points to note
on structuring Python scripts that apply to all ConfigurationDesk interfaces.
Basic structure The following script structure is useful for scripts that automate
ConfigurationDesk:
1. Import the required modules, such as os or win32com.
2. Define functions using ConfigurationDesk's features.
3. Call the required functions in a Main() routine.
134
ConfigurationDesk Automating Tool Handling May 2024
Basics on Python
Tip
Multithreaded Scripting
Introduction To execute automation scripts in parallel, you can run each script in a separate
thread.
Main thread If you execute a script in the main thread, all other ConfigurationDesk activities
are blocked. You cannot execute another script or any other action in parallel.
Separate thread If you run an automation script in a separate thread, more than one script can be
(multithreading) executed in parallel. Typical reasons for multithreaded script execution are:
§ The program's screen has to be updated during script execution.
§ You want to change parameters in the executing program.
§ The script has to wait for a certain amount of time or an event without
blocking the program during script execution.
Note
Tip
135
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Note
You can also stop a thread by another thread by checking and changing a
variable which is accessible in both threads. This could be a global variable, a
variable in a common module, etc. From time to time, the other thread has to
check this variable for the break condition. If a break has been set, the thread
can finish normally and clean up the objects.
For an example, see lesson 11 (refer to Python Demo Scripts on page 118).
Multithreading rules For multithreading, you have to observe the following rules:
§ If you use Python objects which represent COM objects, for example, created
by win32com.client.Dispatch:
§ Always add a call to CoInitialize and CoUninitialize when using
threads, for example:
def ThreadFunction():
import pythoncom
try:
pythoncom.CoInitialize()
ComObject = win32.client.Dispatch(...)
finally:
ComObject = None
pythoncom.CoUninitialize()
136
ConfigurationDesk Automating Tool Handling May 2024
Basics on Python
Tip
To stop the execution of a separate thread, you can use the MessageBox
provided by the win32api Python module.
137
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
138
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
Introduction The Interpreter lets you edit and execute Python commands and run Python
scripts.
Interpreter user interface You can access ConfigurationDesk's automation interface by entering commands
interactively or running scripts in the Interpreter.
Limitations There are limitations and recommendations when automating processes that
affect ConfigurationDesk and MATLAB. Refer to Limitations for Automating
ConfigurationDesk on page 290.
Editing features You can use the Interpreter to edit and run Python commands.
ConfigurationDesk provides a set of features that makes editing easier and more
efficient.
Shortcut keys The Interpreter supports the use of shortcut keys for
Interpreter commands. For a list of the supported shortcut keys, refer to
Interpreter (ConfigurationDesk User Interface Reference ).
139
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Drag & Drop You can move or copy selected text easily via drag & drop in
the Interpreter.
The Interpreter provides two kinds of drag & drop methods according to the
position of the text:
§ Input area
Text in the input area is the text in the current input lines. You can select text
in the input area and move or copy it via drag & drop. You can also copy text
from other applications to the input area via drag & drop.
§ History area
Text in the history area is the text before the current input lines. You can select
text from the history area and copy it to your current input line by pressing the
Ctrl key and using drag & drop at the same time.
The following illustration shows an output example:
The lowest line is the current input line. The lines above are history lines. The
following symbols are used:
Symbol Description
Input line.
The lowermost input line is the current input line. The input lines
above are history input lines.
Input line continuation.
If you enter, for example, a control loop such as for and finish the
line with a colon, the Interpreter automatically adds a new indented
line.
To add further lines enter code and then press Enter.
To execute the multi line command leave the line empty and press
Enter.
Output line.
140
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
Application object The ConfigurationDesk API provides the Application interface. This interface
gives you direct access to the running ConfigurationDesk application.
Tip
Running scripts You can run Python scripts directly in the Interpreter. For instructions, refer to
How to Run Scripts on page 144.
Importing scripts You can use external variables and methods in your commands and Python
scripts by importing scripts. The variables and methods defined in the scripts
are loaded into the Interpreter's namespace. For instructions, refer to How to
Import a Python Module to the Interpreter Namespace on page 143.
Specifying the Python path When you import a Python module, the Interpreter searches for it in the folders
of the Python path. You can list the folders and specify the Python path. For
instructions, refer to How to Specify the Python Path on page 145.
141
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
3 Click OK.
HowTos
Objective To edit commands in the Interpreter easily and more efficiently, you can use the
auto completion feature in ConfigurationDesk.
142
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
Tip
You can also use the Tab key to select the entry and press Return or
you can double-click the entry.
Result You have completed the Python variable, method, or object automatically.
HowTos
Objective You can import a Python module to use its variables and methods in the current
command and script.
Basics You can use external variables and methods directly in your current commands
and Python scripts. To do so, you have to import Python modules defining
variables and methods.
Note
143
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
3 Click OK.
144
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
2 In the Run Script dialog, search the file system or use the drop-down lists to
select an item that was recently used.
Tip
The Python path includes the current directory automatically. You can
use the drop-down list to select a directory that was recently used.
5 If you want to display the source code in the Source Code Editor, activate
Open file in editor.
6 Click OK to run script execution.
Result The script is executed. Standard and error outputs are displayed in the
Interpreter.
Objective You have to specify the Python path to tell ConfigurationDesk's Interpreter
where to find the imported scripts.
145
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Basics The Python path is the list of directories Python goes through to search for
modules and files.
When you import a Python module using the import <module name>
command, the Interpreter searches the folders of the Python path for Python
files of the same name with the extension PY, PYC, or PYD.
If you have developed reusable modules as libraries, you do not have to keep
them in your local working folder. You can create a subfolder for them and add it
to the Python path so that you can use the functions in your main script.
Note
3 From the Python Interpreter options, click Add to add a folder. The
folders, such as C:\TEMP or C:\OwnPythonDir, are added to the User
Python paths list.
4 To change the search order of the paths, select it and click the up or down
arrow to move the entry to the required position.
5 To remove a path, click an entry and click Remove.
6 Click OK to apply the changes.
Result The specified path is appended to the list of directories which the Interpreter
searches for Python modules.
146
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
Introduction You can debug and run Python scripts in external interpreters.
Access to ConfigurationDesk In addition to using ConfigurationDesk's Interpreter, you can also access
via external interpreters ConfigurationDesk via external interpreters such as PythonWin or Eclipse (with
the PyDev Plugin).
External interpreters installed During installation of the Interpreter, the following external interpreters are also
with ConfigurationDesk installed. The table below shows the default installation folder, provided that
C:\Program Files\ is the program files folder:
Python.exe Python.exe is a quick-to-start console. You can input single commands or run
Python scripts without using command line parameters.
Pythonw.exe Pythonw.exe is an interpreter without a user interface. You can run Python
scripts without displaying a command window.
147
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Note
How to Work with Selected Text in the Source Code Editor................... 153
You can edit text in line and column mode, for example, drag it to
another position.
Introduction Python script files that you open from or create in a ConfigurationDesk
project are displayed in a Source Code Editor window in the working area.
There you can edit a script file and check its syntax.
148
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
Note
You cannot run a Python script in a Source Code Editor window. To run a
Python script you can use the Run Script command in the Interpreter or
on the Automation ribbon or the Run context menu command in the
Project Manager .
Objective You can configure the Source Code Editor as required. For example, you can
specify the number of spaces used for indentation.
149
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Result You have configured the settings of the Source Code Editor.
Objective You can insert a new Python script into a ConfigurationDesk project .
150
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
2 Select a file name and folder for the new Python script.
Tip
3 Click Save.
The file is opened in the Source Code Editor .
151
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
Objective To work with Python scripts in the Project Manager, for example, to open them
in the Source Code Editor.
Precondition A project is open and the project folder contains *.py files.
152
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk
References
Objective To edit text in line and column mode, for example, drag it to another position.
Tip
2 To increase the indent of the selected text, press Tab. The selected text
moves to the right.
3 To decrease the indent of the selected text, press Shift+Tab. The selected
text moves to the left.
4 To move the selected text to another position in the document, you can drag
& drop it.
5 To replace the selected text, type the new text.
Result You have changed the indentation level, the position, and the content of
selected text in the Source Code Editor.
Note
The bookmarks you set in the Source Code Editor are cleared when you
close the file.
153
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts
3 To jump to the next bookmark, go to the Automation ribbon and click Edit
Script ‑ Advanced ‑ Next Bookmark, or press F2.
4 To jump to the previous bookmark, go to the Automation ribbon and click
Edit Script ‑ Advanced ‑ Previous Bookmark, or press Shift+F2.
5 To clear a bookmark, click the line containing the bookmark and go to the
Automation ribbon and click Edit Script ‑ Advanced ‑ Toggle Bookmark,
or press Ctrl+F2.
6 To clear all bookmarks in the script, go to the Automation ribbon and click
Edit Script ‑ Advanced ‑ Clear Bookmarks.
154
ConfigurationDesk Automating Tool Handling May 2024
ConfigurationDesk API Reference
155
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Main Parts The API of ConfigurationDesk automation is subdivided into three main parts:
§ Project and application handling to create, organize, and manipulate
projects and applications
§ Component handling to create and configure components like the device
topology , model topology , or hardware topology
§ Data object handling to create or configure data objects or to connect data
objects (ports) by creating links between them
Interface names The interface name consists of a prefix, such as ICa, and the object name
you know from the Python object in the Python interpreter (for example,
ConfigurationDesk's Internal Interpreter ).
Most useful interfaces When you start automating ConfigurationDesk, the most useful interfaces
to work with are ICaApplicationMain and ICaActiveApplication.
ICaApplicationMain is the entry point for all automation work in
ConfigurationDesk. It gives you access to project locations , projects, and
applications. After you create or open a project and a corresponding
application, the starting point for actually configuring the signal chain is
ICaActiveApplication. From this interface it is possible to get components like
the IOFunctionLib, which itself serves as a repository of data objects.
156
ConfigurationDesk Automating Tool Handling May 2024
Introduction to ConfigurationDesk's Automation API
Overview illustration The following chart provides an overview of the automation interface. However,
it is not a complete list of all interfaces available in ConfigurationDesk’s
automation library.
<<interface>>
ICaApplication
<<interface>>
ICaApplications
<<interface>>
ICaProject
<<interface>>
ICaProjects
<<interface>>
ICaProjectRoot
<<interface>>
ICaProjectRoots
<<interface>>
ICaApplicationMain
<<interface>>
ICaActiveProject
<<interface>> <<interface>>
ICaActiveApplication ICaBuildManagement
<<interface>>
ICaComponents <<interface>>
ICaWorkingViews
<<interface>>
ICaComponent
<<interface>>
ICaAlgorithms
<<interface>>
ICaDataObjectTypes
<<interface>>
ICaRelationAccessors
<<interface>>
ICaDataObjectType
<<interface>>
ICaDataObject
Automating ConfigurationDesk................................................................................................ 33
157
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
API Interfaces
Where to go from here Information in this section
Framework............................................................................................ 212
Events................................................................................................... 266
Build Management
Where to go from here Information in this section
ICaBuildManagement <<Interface>>
158
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaBuildManagement
«collection»
ICaProperties
«interface»
ICaBuildResult
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaBuildResult <<Interface>>
Description Use this interface to access the results of a build and to download a real-time
application.
159
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaBuildManagement
«interface»
ICaBuildResult
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
Component Handling
Where to go from here Information in this section
160
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ApplicationProcessToModel <<Enumeration>>
Description This enumeration indicates the relation between models to add and possible new
application processes when using the AddModels operation.
161
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ConfigurationReplaceMode <<Enumeration>>
Description The mode how to replace a configuration. This enumeration is only for
backwards compatibility. A configuration component is no more supported.
DeviceTopologyCreateMode <<Enumeration>>
162
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ExternalWiringCreateMode <<Enumeration>>
Description The mode how to create an external wiring. The file format changed for
ConfigurationDesk 4.3 to *.echx.
HardwareTopologyCreateMode <<Enumeration>>
HtfxFileFormat <<Enumeration>>
163
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaAlgorithms <<Interface>>
Description Executes algorithms for a defined set of objects in an active application. Any
access through this interface after closing an application can cause unpredictable
results.
164
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
165
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
166
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
167
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
168
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
169
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaAlgorithms
«collection»
ICaLinks
«interface»
ICaDataObject
«collection»
ICaObjects
«collection»
ICaDataObjects
«collection»
ICaDataObjectTypes
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
170
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaComponent <<Collection>>
Description Use this interface to access and configure a specific component. It provides
methods to create instances of certain ICaDataObject (refer to ICaDataObject
<<Interface>> on page 182)s. It is not necessary to create a component explicit.
There is always an empty component present after creating an application. With
a component and within this interface you can configure (including creating) the
component and create one or more root objects for it. The supported types of
root objects can be examined by the DataObjectTypes(ICaComponent) property.
To check whether an operation is supported by a component, you can call
the GetSupportedOperations(ICaComponent) method. For a brief description of
the components and their supported operations see below. - The implementing
automation object for this interface is only valid in its active application. Any
access after closing the application is undefined and can cause unpredictable
results.
ModelTopology Description
Creating a ModelTopology Creating a model topology is done by calling the Configure(ICaComponent) method with
the appropriate parameters. A model topology can be created by importing either a
Simulink (*.mdl, *.slx) file, a model topology (*.mtfx) file or a multi model configuration
(*.mcd) file. In all cases the call of the configure method requires first the name of the
operation ("Create") and second an array with the specific information. Additionally it
is possible to create an empty model topology. In some cases it may be useful to create
a new model topology with models which should be assigned automatically to a new
application process. Therefore it is possible to indicate that models imported by creating
an new model topology should be assigned to new application processes. Because an
application process is associated to a processing unit application the possibility to create
a new application process depends on how many processing unit applications are present
in the active application. Is no processing unit application present, a new one will be
created to which the new application processes will be assigned. If only one processing
unit application is present the new application processes are assigned to it. If more than
one processing unit application is present the create operation will fail.
To create a model topology by importing a Simulink (*.mdl) file, you need to specify a
flag for the import (use "1" or use the FileImportMdl(ModelTopologyCreateMode) (refer
to ModelTopologyCreateMode <<Enumeration>> on page 212) type), the name of the
model topology, the full path to the file to import, a Boolean flag specifying if model
should be analyzed immediately and the model analyze command (empty string if not
necessary or not wanted). It is possible to indicate that a new application process should
be created for the imported model if no or only one processing unit application is present
in the active application. Use an optional Boolean flag "true". Analyze immediately must
be set to true to support this.
To create a model topology by importing a model topology file
(*.mtfx), you need to specify a flag for the import (use "2" or use
the FileImportMtf(ModelTopologyCreateMode) (refer to ModelTopologyCreateMode
<<Enumeration>> on page 212) type), the name of the model topology, the full path to
the file to import and a Boolean flag specifying if model should be analyzed immediately.
It is possible to indicate that new application processes should be created for the
imported models if no or only one processing unit application is present in the active
application. Use an optional Boolean flag "true". Analyze immediately must be set to
true to support this.
To create a model topology by importing a multi model configuration file
(*.mcd), you need to specify a flag for the import (use "3" or use
the FileImportMcd(ModelTopologyCreateMode) (refer to ModelTopologyCreateMode
171
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ModelTopology Description
<<Enumeration>> on page 212) type), the name of the model topology, the full path to
the file to import, a Boolean flag specifying if all models contained in the topology should
be analyzed immediately and the model analyze command (empty string if not necessary
or not wanted). It is possible to indicate that new application processes should be created
for the imported models if no or only one processing unit application is present in the
active application. Use an optional Boolean flag "true". Analyze immediately must be set
to true to support this. If the user wants to create an application process for every model
the optional parameter CreateMultipleApplicationProcesses can be used (default is True).
Analyze immediately must be set to true to support this.
To create an empty model topology, you need to specify a flag (use "4" or use
the EmptyTopology(ModelTopologyCreateMode) (refer to ModelTopologyCreateMode
<<Enumeration>> on page 212) type) and the name of the model topology.
To create a model topology by importing a Simulink (*.Slx) file, you need to specify a
flag for the import (use "5" or use the FileImportSlx(ModelTopologyCreateMode) (refer
to ModelTopologyCreateMode <<Enumeration>> on page 212) type), the name of the
model topology, the full path to the file to import, a Boolean flag specifying if model
should be analyzed immediately and the model analyze command (empty string if not
necessary or not wanted). It is possible to indicate that a new application process should
be created for the imported model if no or only one processing unit application is present
in the active application. Use an optional Boolean flag "true". Analyze immediately must
be set to true to support this.
To create a model topology by importing an other file type, you need to specify a flag
for the import (use "6" or use the FileImportOther(ModelTopologyCreateMode) (refer
to ModelTopologyCreateMode <<Enumeration>> on page 212) type), the name of the
model topology and the full path to the file to import. It is possible to indicate that
new application processes should be created for the imported models if no or only one
processing unit application is present in the active application. Use an optional Boolean
flag "true".
Replacing a Model Topology Replacing a model topology is done in the same way as creating one, other than
you have to change the first parameter of the Configure(ICaComponent) method to
"Replace".
Removing a Model Topology Removing a model topology is done by calling the Configure(ICaComponent) method
with the "Remove" operation and an empty array. The component then will be cleared
but will be still valid and empty.
Renaming a Model Topology Renaming a model topology is no more supported.
Save as for a Model Topology You can save a model topology as an *.mtfx file by calling the Configure(ICaComponent)
method with the "SaveAs" operation. The array should contain only the full path to the
*.mtfx file to save.
Analyzing a Model Call the "Analyze" operation with the Configure(ICaComponent) method and an empty
array or call the "AnalyzeComplete" operation to analyze model interfaces with task
configuration data (and initialization).
Set MATLAB initialize Command Set the initialize command by calling the "SetCommand" operation with the
Configure(ICaComponent) method and an array that contains the initialization command
as a string.
Add a model Add a model to the model topology by calling the "AddModel" operation with the
Configure(ICaComponent) method. The parameter array should contain 1. full path
to the model file 2. true or false for the option to analyze immediately 3. matlab
initialization command or empty string 4. true or false for the option to create a
preconfigured application process. An optional parameter (5.) contains the name or the
automation ICaDataObject representing the desired application process to assign the
model to. If parameter 5 is given the parameter 4 must be set to false. If parameter 4 is
set to true or an application process with the given name cannot be determined or the
172
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ModelTopology Description
given ICaDataObject does not represent an valid application process an exception will be
thrown.
Remove a model Remove a model from the model topology by calling the "RemoveModel" operation
with the Configure(ICaComponent) method. The parameter array should contain only
the name of the model to remove.
Replace a model Replace a model from the model topology by calling the "ReplaceModel" operation with
the Configure(ICaComponent) method. The parameter array should contain the path to
the new model, the flag if model should be analyzed completely, a string for the model
initialization command (possible empty) and the name of the model to replace. If the
operation succeeds the new model will be returned as content in the result array.
Add multiple models To add more than one model at once the "AddModels" operation can be used
with the Configure(ICaComponent) method. To indicate if and how to create
application processes for the models you have to use the ApplicationProcessToModel
(refer to ApplicationProcessToModel <<Enumeration>> on page 161) enumeration.
To provide different information for the different models you have to
create an ICaModelDescription (refer to ICaModelDescription <<Interface>> on
page 191) object with the "CreateModelDescription" operation for every model
to add. Call the operation with: Configure("AddModels", [ApplicationProcessToModel-
EnumerationValue, ModelDescription1, ModelDescription2, ...])
CreateModelDescription The CreateModelDescription operation must be used to create an object which allows
to provide information about a model to add to the application with the "AddModels
operation. Call the operation with Configure("CreateModelDescription", [])
Reload an mcd file Reload an mcd file by calling the "ReloadMCD" operation with the
Configure(ICaComponent) method. The parameter array should be empty.
Clear an mcd file Clear an mcd file by calling the "ClearMCD" operation with the
Configure(ICaComponent) method. The parameter array should be empty.
Update the model implementation Update the model implementation by calling the "UpdateModelImplementation"
operation with the Configure(ICaComponent) method. Use an empty parameter array for
all model implementations which can be updated or use the parameter array to specify
the model implementation by their names or by their automation object.
Skip model code generation Skip the generation of model code by calling the "SkipModelBuild" operation with the
Configure(ICaComponent) method. The parameter array should contain true or false to
skip the generation or not. If no model name is given in the parameter array the model
code generation will be skipped for all models.
Generate model code Generate model code by calling the "GenerateModelCode" operation with the
Configure(ICaComponent) method. The parameter array should contain the name of
the models to generate model code for. If the parameter is empty model code will be
generated for all possible models.
HardwareTopology Description
Creating a Hardware Topology Creating a hardware topology is done by calling the Configure(ICaComponent) method
with the appropriate parameters. There are three ways to create a hardware topology:
by scanning a registered hardware system, by importing an *.htfx file or by creating an
empty topology. In all three cases, the call of the configure method requires the name of
the operation ("Create") and an array with the specific information.
To create a hardware topology by scanning a registered hardware system for
the arguments array, you have to specify the flag for the creation mode (use
"0" or use the ScanRegisteredHardware(HardwareTopologyCreateMode) (refer to
HardwareTopologyCreateMode <<Enumeration>> on page 163) type) first. Add the
display name for the topology (for backwards compatibility only) and the name of the
system. If the system is not a multi Processing Unit system it is possible to search by an
173
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
HardwareTopology Description
IPAddress number (string value) or a MAC address (colon separated string) instead by the
name.
To create a hardware topology by importing a hardware topology file
(*.htfx), you need to specify a flag for the import (use "1" or use the
FileImportHtf(HardwareTopologyCreateMode) (refer to HardwareTopologyCreateMode
<<Enumeration>> on page 163) type), Add the display name of the topology and the full
path to the file to import.
To create an empty hardware topology, specify the flag for empty (use "2" or use the
FileImportHtf(HardwareTopologyCreateMode) (refer to HardwareTopologyCreateMode
<<Enumeration>> on page 163) type), and the display name which is needed for the
arguments array.
Replacing a Hardware Topology Replacing a hardware topology is done in the same way as creating one, other than
you have to change the first parameter of the Configure(ICaComponent) method to
"Replace".
Removing a HardwareTopology Removing a hardware topology is done by calling the Configure(ICaComponent) method
with the "Remove" operation and an empty array. The component then will be cleared
but will be still valid and empty.
Renaming a HardwareTopology Renaming a hardware topology is no more supported.
Save as for a HardwareTopology You can save a hardware topology as an *.htfx file by calling the
Configure(ICaComponent) method with the "SaveAs" operation. The array should
contain only the full path to the *.htfx file to save.
DeviceTopology Description
Creating a Device Topology Creating a device topology is done by calling the Configure(ICaComponent) method
with the appropriate parameters. There are three ways to create a DeviceTopology: by
importing a *.dtfx file, by importing an *.xlsx file or by creating an empty topology.
In all three cases, the call of the configure method requires the name of the operation
("Create") and an array with the specific information.
To create a device topology by importing a *.dtfx file, you have to specify the flag for the
creation mode (use "2" or use the FileImportDtf(DeviceTopologyCreateMode) (refer to
DeviceTopologyCreateMode <<Enumeration>> on page 162) type) first. Add the display
name for the topology and the full path to file to import.
To create a device topology by importing an Excel (*.xlsx) file, you need to specify a
flag for this import (use "3" or use the FileImportXls(DeviceTopologyCreateMode) (refer
to DeviceTopologyCreateMode <<Enumeration>> on page 162) type), Add the display
name of the topology and the full path to the file to import. Note: it is only possible to
create a device topology by importing an Excel file if Excel is installed on the system.
To create an empty device topology, only the flag for empty (use "1" or use
the EmptyTopology(DeviceTopologyCreateMode) (refer to DeviceTopologyCreateMode
<<Enumeration>> on page 162) type) and the display name is needed for the arguments
array.
Replacing a Device Topology Replacing a device topology is done in the same way as creating one, other than
you have to change the first parameter of the Configure(ICaComponent) method to
"Replace". It is not possible to replace a device topology by importing an Excel file.
Removing a Device Topology Removing a device topology is done by calling the Configure(ICaComponent) method
with the "Remove" operation and an empty array. The component then will be cleared
but will be still valid and empty.
Renaming a Device Topology Renaming a device topology is no more supported.
Save as for a Device Topology You can save a device topology as a *.dtfx file by calling the Configure(ICaComponent)
method with the "SaveAs" operation. The array should contain only the full path to the
*.dtfx file to save.
174
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
DeviceTopology Description
Adding a Device Topology You can add a device topology in the same way as creating a new one by calling
the Configure(ICaComponent) method with exactly the same arguments array and the
"Add" operation.
Exporting a Device Topology You can export a device topology as an *.xlsx file by calling the
Configure(ICaComponent) method with the "Export" operation. The parameter array
must contain the full path to the *.xlsx file to save. Note: For this operation Excel must be
installed on the system.
ExternalWiring Description
Creating an External Wiring Creating an external wiring is done by calling the Configure(ICaComponent) method
with the appropriate parameters. There are two ways to create an ExternalWiring: by
importing an *.echx file or by calculating it.
To create an external wiring by importing an *.echx file, you have to specify the flag for
the creation mode (use "2" or use the FileImportEch(ExternalWiringCreateMode) (refer to
ExternalWiringCreateMode <<Enumeration>> on page 163) type) first. Add the display
name for the topology and the full path to the file to import.
To create an external wiring by calculating it, you have to to specify a flag for
the calculation (use "1" or use the Calculate(ExternalWiringCreateMode) (refer to
ExternalWiringCreateMode <<Enumeration>> on page 163) type), Then add the display
name of the topology.
Replacing an External Wiring Replacing an external wiring is done in the same way as creating one, other
than you have to change the first parameter (the operation string) of the
Configure(ICaComponent) method to "Replace".
Removing an External Wiring Removing an external wiring is done by calling the Configure(ICaComponent) method
with the "Remove" operation and an empty array. The component then will be cleared
but will be still valid and empty.
Renaming an ExternalWiring Renaming an external wiring is no more supported.
Save as for an External Wiring You can save an external wiring as an *.echx file by calling the Configure(ICaComponent)
method with the "SaveAs" operation. The array should contain only the full path to the
*.echx file to save.
Calculating an External Wiring You can calculate an external wiring by calling the Configure(ICaComponent) method
with "Fill" as the operation string and an empty array. The method does not check if an
external wiring is present in the application.
Exporting an External Wiring You can save an external wiring as an *.xlsx file by calling the Configure(ICaComponent)
method with the "Export" operation. The parameter array must contain the full path to
the *.xlsx file to save Note: For this operation Excel must be installed on the system.
IOFunctionLib Description
Configuring the IOFunctionLib It is not possible to configure the IOFunctionLib component even it is not necessary to
create or remove it. Therefore the call of the GetSupportedOperations(ICaComponent)
method always returns an empty collection of strings.
175
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
176
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
177
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
178
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
179
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaComponents
«collection»
ICaComponent
«collection»
ICaDataObjectTypes
«collection»
ICaStrings
«interface»
ICaDataObject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaComponents <<Interface>>
180
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
181
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaComponents
«collection»
ICaComponent
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaDataObject <<Interface>>
182
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
IsInApplication Description
Device Topology All elements of the device topology support this property. it is possible to set the property
to True or False. It is also possible to get the value. By setting the IsInApplication property
to True, a whole device on its own can be added to or removed from the application. If a
subelement is contained in the application, the corresponding parent objects return True
for this property too.
Model Topology All elements of the model topology support this property. It is possible to set the property
to True or False. It is also possible to get the value. By setting the IsInApplication property
to True, a whole model on its own can be added to or removed from the application. If a
subelement is contained in the application, the corresponding parent objects return True
for this property too.
IOFunctionLib This property is not supported by all elements of the IOFunctionLib and not in the
same way. Only function types can be added (instantiated) to the application by setting
this property to True. This can be done in a loop to instantiate a function type more
than once. Elements of a higher level always return False for this property. Setting their
property to True results in an exception. Setting this property to False on instantiated
functions deletes the instance. Setting this property on function ports has no effect.
Access to the automation object after deleting the corresponding element in the
ConfigurationDesk application is undefined and can result in an exception.
Hardware Topology On elements of the hardware topology, the property IsInApplication is the same as
the assigned or unassigned state. Because it is not possible to assign one specific
element with an automation task, an assignment is forbidden. (For assignment use
the AssignHardwareAutomatically(ICaAlgorithms) (refer to ICaAlgorithms <<Interface>>
on page 164) method.) Setting this property to True therefore results in an exception.
Only the removal of an assignment (setting the property to False) and the getting of
the property are allowed. If a subelement is assigned, the corresponding parent objects
return True for this property too.
External Wiring There are currently no elements that support this property.
IsInRepository Description
Device Topology Getting the value of the property and setting it to False is supported. If a subelement is
unresolved, the corresponding parent objects return False for this property too.
Model Topology Only getting the value of the property is supported. Setting the IsInApplication property
to False for an unresolved (IsInRepository=false) element invalidates this element and all
its subelements.
IOFunctionLib Only getting the value of the property is supported. For non-instances (function
types) the return value is always True. Instances from plug-ins that were not found
during startup of ConfigurationDesk have the state unresolved. They return True for
IsInApplication and False for IsInRepository. Subblocks and ports from these unresolved
functions are not always unresolved. The behavior of such objects is undefined.
Hardware Topology Getting the value from this property is supported. Data objects like System, Rack or
Board can be removed from the repository by setting the property to False. It is not
possible to remove single channels from the repository. If one channel is unresolved, the
whole corresponding board is unresolved too.
External Wiring There are currently no elements that support this property.
183
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
184
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
185
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Examples
ICaDataObjectType <<Interface>>
Element context The illustration below shows the context of the element.
«interface»
ICaDataObject
«collection»
ICaDataObjectTypes
«interface»
ICaDataObjectType
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
186
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaDataObjectTypes <<Collection>>
Description Provides access to creatable data object types that can be used for signal chain
or topology configuration. Access to the implementing object after closing the
application or removing the corresponding data object can cause unpredictable
results.
Element context The illustration below shows the context of the element.
«interface»
ICaAlgorithms
«collection»
ICaComponent
«interface»
ICaDataObject
«interface»
ICaRelation
«collection»
ICaDataObjectTypes
«interface»
ICaDataObjectType
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
187
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaDataObjects <<Collection>>
188
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaAlgorithms
«interface»
ICaDataObject
«collection»
ICaDataObjects
«interface»
ICaDataObject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaLink <<Interface>>
Description Provides access to the application global link data of a connection. Access to the
implementing object after changing or removing the link or the corresponding
data objects is undefined and can cause unpredictable results.
189
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«collection»
ICaLinks
«interface»
ICaActiveApplication
«interface»
ICaLink
«interface»
ICaDataObject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaLinks <<Collection>>
Description Provides access to links. The implemented collection of links is not updated after
changes. Access to links in the collection after changing the links is undefined.
190
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaAlgorithms
«interface»
ICaDataObject
«collection»
ICaLinks
«interface»
ICaLink
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaModelDescription <<Interface>>
191
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaObjects <<Collection>>
Description Provides access to a collection of arbitrary objects (for example, currently selected
objects like ICaDataObject, ICaWorkingView and ICaLink). The collection does
not reflect changes made by adding or deleting objects after getting this
automation object. Therefore any access after such changes is undefined and
can cause unpredictable results.
Element context The illustration below shows the context of the element.
«interface»
ICaAlgorithms
«interface»
ICaRelation
«interface»
ICaActiveApplication
«collection»
ICaObjects
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
192
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaRelation <<Interface>>
Description This interface provides access to elements with a specific relation by using
a RelationAccessor. A RelationAccessor represents a specific relation between
elements of the application. Given an element "a" you can access all the
elements with this specific relation related to "a". Not all methods described
in this interface are supported by all RelationAccessors.The RelationAccessor itself
can be queried from the ICaRelations (refer to ICaRelations <<Collection>> on
page 195).
193
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
194
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«collection»
ICaRelations
«interface»
ICaRelation
«collection»
ICaObjects
«collection»
ICaDataObjectTypes
«interface»
ICaDataObject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaRelations <<Collection>>
195
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
196
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
197
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
198
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
199
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«collection»
ICaRelations
«interface»
ICaRelation
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
200
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaStrings <<Collection>>
Description Provides access to strings that provide information like component types,
working paths, and so on.
Element context The illustration below shows the context of the element.
«collection»
ICaComponent
«interface»
ICaDataObject
«collection»
ICaWorkingViews
«interface»
ICaActiveApplication
«collection»
ICaStrings
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
201
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaTransaction <<Interface>>
202
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaTransactionCreator
«interface»
ICaTransaction
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaTransactionCreator <<Interface>>
203
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaTransactionCreator
«interface»
ICaTransaction
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaWorkingView <<Collection>>
Description Provides access to the working view of an application. A working view contains
a number of ports that can be added and removed by adding and removing
ICaDataObjects. ICaDataObjects represent not only, single ports, but also blocks
and subblocks (for example, Devices, IOFunctions), which themselves are a set
of ports. Adding ICaDataObjects that represent blocks means adding only these
ports. Iterating through the collection of ICaDataObjects of a working view
means iterating through the collection of ports, not a collection of blocks or
subblocks. An object which implements this interface is valid in the context of
the current active application. If the corresponding working view is deleted, each
access to the object can cause an exception. If the current application is closed,
the object is no longer valid. Access is then undefined and can result in an
exception.
204
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
205
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«collection»
ICaWorkingViews
«collection»
ICaWorkingView
«interface»
ICaDataObject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaWorkingViewGroup <<Interface>>
206
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«collection»
ICaWorkingViews
«interface»
ICaWorkingViewGroup
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaWorkingViews <<Collection>>
Description This interface is to access the working views and working view groups of
an application. The working view elements are located under a working path
which is called a working view group. There are always two permanent views:
Global and Temporary. These views can never be removed. These are located
in the root working view group (""). A working view is accessible via the
ICaWorkingView interface and a working view group is represented by a
string. A working view group itself can contain other working view groups
that then represent a hierarchy (for example "View_Group_001\View_001"
or "View_Group_002\ViewGroup_003\View_005"). An object that implements
207
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
208
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
209
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
210
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«collection»
ICaWorkingViews
«collection»
ICaWorkingView
«collection»
ICaStrings
«interface»
ICaWorkingViewGroup
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
MatchingPlatformConnectionState <<Enumeration>>
211
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«enumeration»
MatchingPlatformConnectionState
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ModelTopologyCreateMode <<Enumeration>>
Framework
Where to go from here Information in this section
212
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ControlbarTabsLayout <<Enumeration>>
Element context The illustration below shows the context of the element.
«interface»
ICaMainWindow
«enumeration»
ControlbarTabsLayout
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
213
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaApplicationMain <<Interface>>
Description Provides access to the ConfigurationDesk application object. This is the main
object to access, open or create projects and applications.
214
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
215
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Details on
GetCustomInformation
216
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Details on
SetCustomInformation
217
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaMainWindow <<Interface>>
218
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaApplicationMain
«interface»
ICaMainWindow
«enumeration»
MainWindowState
«enumeration»
WorkbookTabPosition
«enumeration»
ControlbarTabsLayout
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaMessageDispatcher <<Interface>>
Description Provides access to the message dispatcher to send messages to the Message
Viewer or dSPACE Log.
219
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaApplicationMain
«interface»
ICaMessageDispatcher
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaPath <<Interface>>
220
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaPathProvider
«collection»
ICaPaths
«interface»
ICaPath
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
Basics on Search Paths and User Location Files (ConfigurationDesk Custom I/O
Function Implementation Guide )
ICaPathProvider <<Interface>>
221
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
222
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaApplicationMain
«interface»
ICaPathProvider
«collection»
ICaPaths
«interface»
ICaPath
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
Basics on Search Paths and User Location Files (ConfigurationDesk Custom I/O
Function Implementation Guide )
ICaPaths <<Collection>>
223
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaPathProvider
«collection»
ICaPaths
«interface»
ICaPath
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
Basics on Search Paths and User Location Files (ConfigurationDesk Custom I/O
Function Implementation Guide )
HowTos
How to Import FPGA Custom Function Block Types Provided by an FPGAC File
(ConfigurationDesk I/O Function Implementation Guide )
ICaProperties <<Collection>>
224
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaBuildManagement
«interface»
ICaDataObject
«collection»
ICaProperties
«interface»
ICaProperty
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
225
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaProperty <<Interface>>
Description Provides methods to get or set a property value for a certain object.
Element context The illustration below shows the context of the element.
«collection»
ICaProperties
«interface»
ICaProperty
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
226
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Examples
ICaUserFunction <<Interface>>
227
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«collection»
ICaUserFunctions
«interface»
ICaUserFunction
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaUserFunctions <<Collection>>
Description Provides access to the collection with user-defined functions of the application.
228
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaApplicationMain
«collection»
ICaUserFunctions
«interface»
ICaUserFunction
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
MainWindowState <<Enumeration>>
Element context The illustration below shows the context of the element.
«interface»
ICaMainWindow
«enumeration»
MainWindowState
229
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
WorkbookTabPosition <<Enumeration>>
Element context The illustration below shows the context of the element.
«interface»
ICaMainWindow
«enumeration»
WorkbookTabPosition
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
230
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
FileType <<Enumeration>>
Element context The illustration below shows the context of the element.
«interface»
ICaFile
«enumeration»
FileType
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
231
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaActiveApplication <<Interface>>
Description Provides access to the currently active application and is the basis for carrying
out tasks in ConfigurationDesk. The active application interface provides access
to certain components that can be used to configure a logical signal chain and/or
to configure a hardware system. It provides functionality to build and download
a real-time application. An active application automation object is only valid until
closing it. Using this object after closing the application can cause unpredictable
behavior
232
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
233
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
234
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaActiveProject <<Interface>>
Description Provides access to the currently active project. If the active project is closed, the
corresponding automation object is no longer valid. Access to it can result in an
exception.
235
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
236
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaProject
«collection»
ICaProjects
«interface»
ICaApplicationMain
«interface»
ICaActiveProject
«collection»
ICaApplications
«interface»
ICaActiveApplication
«collection»
ICaFiles
«interface»
ICaActiveProject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaApplication <<Interface>>
Description Provides access to an application that is not necessarily active. After removing
the application, the object implementing this interface is no longer valid and any
access can result in an exception.
237
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«collection»
ICaApplications
«interface»
ICaApplication
«interface»
ICaActiveApplication
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
238
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaApplications <<Collection>>
Description Provides access to the applications of a project. After removing the project that
the applications belong to, the collection is no longer valid and any access results
in an exception.
239
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaActiveProject
«interface»
ICaProject
«collection»
ICaApplications
«interface»
ICaApplication
«interface»
ICaActiveApplication
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaFile <<Interface>>
240
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«collection»
ICaFiles
«interface»
ICaFile
«enumeration»
FileType
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
241
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaFiles <<Collection>>
Description Provides access to the files of a project or application. This interface is intended
for future use and is currently not supported. Currently, no files are retrieved
from the active application, and the collection is always empty.
Element context The illustration below shows the context of the element.
«interface»
ICaActiveApplication
«interface»
ICaActiveProject
«collection»
ICaFiles
«interface»
ICaFile
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
242
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaProject <<Interface>>
Description Provides access to a project that is not necessarily active. After removing the
project, the object is no longer valid, and the behavior is undefined. Any access
then can result in an exception.
243
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«collection»
ICaProjects
«interface»
ICaProject
«collection»
ICaApplications
«interface»
ICaActiveProject
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaProjectManagement <<Interface>>
244
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaApplicationMain
«interface»
ICaProjectManagement
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaProjectRoot <<Interface>>
Description The new project handling introduced with release 2021-B substitutes the project
roots with a new project location concept. To support backwards compatibility
the COM interface structure remains unchanged. Nearly all functionality will
be provided further. A project location (former project root, interface name
unchanged ICaProjectRoot) provides access to a project location folder and the
projects located below it. Each ConfigurationDesk project is related to a project
location folder, below which the projects and applications are stored. If a project
location folder is removed, the corresponding automation object is no longer
valid, and access to it can result in an exception. Attention: A projects folder
(with its Data.CfgDeskProject file) should always reside directly in the project
location folder and not in sub folders of a second or deeper level.
245
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«collection»
ICaProjectRoots
«collection»
ICaProjects
«interface»
ICaApplicationMain
«interface»
ICaProjectRoot
«collection»
ICaProjects
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
246
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaProjectRoots <<Collection>>
Description The new project handling introduced with release 2021-B substitutes the project
roots with a new project location concept.To support backwards compatibility
the COM interface structure remains unchanged. Nearly all functionality will be
provided further. The project locations (former Project Roots, interface name
unchanged ICaProjectRoots) provide access to the project location folders of
the ConfigurationDesk application. The collection of project location folders is a
collection of ICaProjectRoot objects. Each ConfigurationDesk project is related to
a project location folder below which the projects and applications are stored.
247
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Element context The illustration below shows the context of the element.
«interface»
ICaApplicationMain
«collection»
ICaProjectRoots
«interface»
ICaProjectRoot
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
ICaProjects <<Collection>>
Description Provides access to the projects contained in a project location folder. After
removing the project location, the projects collection is no longer valid, and the
behavior is undefined. Access can then result in an exception.
248
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
Element context The illustration below shows the context of the element.
«interface»
ICaProjectRoot
«interface»
ICaApplicationMain
«collection»
ICaProjects
«interface»
ICaProjectRoot
«interface»
ICaActiveProject
«interface»
ICaProject
249
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
For the legend of the above illustration, refer to Legend for Object Model
Diagrams on page 31.
Enumeration Properties
Where to go from here Information in this section
250
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
AveragingLevel <<Enumeration>>
251
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
BitOrder <<Enumeration>>
BlockColor <<Enumeration>>
ChannelType <<Enumeration>>
252
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
CylinderStates <<Enumeration>>
253
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
DigitalOutputMode <<Enumeration>>
Direction <<Enumeration>>
EdgeType <<Enumeration>>
254
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
EncoderType <<Enumeration>>
EventTriggerCondition <<Enumeration>>
255
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ExecutionMode <<Enumeration>>
FunctionMode <<Enumeration>>
HighSideReference <<Enumeration>>
256
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
IdleValue <<Enumeration>>
ImportToWorkingViewMode <<Enumeration>>
InitializationMode <<Enumeration>>
257
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
JitterAndLatencyOptimization <<Enumeration>>
Description Lets you specify the jitter and latency run-time behavior of the task. To configure
a task as 'NoJitterLowLatency', it must be the only task in the application process
and triggered by a timer event. When you use custom code (e.g., custom
I/O functions) and select 'NoJitterLowLatency', there might be functionality
issues: - The background task of the real-time application is not executed. -
Tasks with ‘No jitter, low latency’ cannot be used with third-party I/O in the
same application process. It is not recommended to use system calls within a
‘NoJitterLowLatency’ task, because they re-introduce jitter.
LoadManualChecking <<Enumeration>>
258
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
MappingType <<Enumeration>>
MeasurementMode <<Enumeration>>
MeasurementMode2 <<Enumeration>>
259
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
MeasurementPoint <<Enumeration>>
OvercurrentProtection <<Enumeration>>
PathPriority <<Enumeration>>
260
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
PhaseUpdateMode <<Enumeration>>
Polarity <<Enumeration>>
Potential <<Enumeration>>
261
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ReadMode <<Enumeration>>
Role <<Enumeration>>
SensorMode <<Enumeration>>
262
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
SignalMode <<Enumeration>>
StandstillBehavior <<Enumeration>>
Storage <<Enumeration>>
263
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Termination <<Enumeration>>
TransceiverType <<Enumeration>>
TransferType <<Enumeration>>
264
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
TriggerEdgeType <<Enumeration>>
UpdateMode <<Enumeration>>
VoltagePolarity <<Enumeration>>
265
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
Events
Where to go from here Information in this section
ICaApplicationEvents <<EventInterface>>
266
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
ICaProjectEvents <<EventInterface>>
267
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
268
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
269
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
ICaAutomationEventArgs <<Collection>>
270
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces
271
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference
272
ConfigurationDesk Automating Tool Handling May 2024
Message Reader API
273
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
Reading dSPACE Log Messages via the Message Reader API.................. 274
You can read log messages of the dSPACE Log via the Message Reader
API.
Introduction You can read log messages of the dSPACE Log via the Message Reader API.
dSPACE Log The dSPACE Log is a collection of errors, warnings, information, questions, and
advice issued by all dSPACE products and connected systems over more than one
session.
The dSPACE Log is saved as a collection of binary message log files. These
files are created when a dSPACE product is running. A single run of a dSPACE
product is called a log session.
Note
If the maximum file size for the binary message log file is reached, messages
at the beginning of the dSPACE Log might get deleted. Contact dSPACE
Support to solve this.
Message Reader API You can use the Message Reader API to access all binary message log files of
the dSPACE Log. You can combine multiple filters to display only log messages
according to your specifications. For example, you can configure the Message
Reader API to display only log messages from a specific dSPACE product.
274
ConfigurationDesk Automating Tool Handling May 2024
Introduction to the Message Reader API
Supported dSPACE Releases The Message Reader API lets you access log messages written by dSPACE
products since dSPACE Release 2016‑B.
Message Reader API change There is a migration issue specific to the Message Reader API. The issue occurs
in dSPACE Release 2021‑A if you use the API with Python. The issue was caused by the migration to
Python 3.9/pythonnet 2.5.3 with dSPACE Release 2021‑A.
There is no migration issue to consider if you use the API with C#.
Message Reader API change There is a migration issue when you use the Message Reader API with Python.
in dSPACE Release 2023‑B The issue is caused by the migration to Python 3.11/pythonnet 3.0.1 with
dSPACE Release 2023‑B.
There is no migration issue to consider if you use the API with C#.
275
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
The following table shows how to specify a Severity enumeration value before
and after migration:
Examples
References
Supported dSPACE products You can use the Message Reader API to access messages from the following
and components dSPACE products and components:
§ AutomationDesk
§ Bus Manager (stand-alone)
§ cmdloader
§ ConfigurationDesk
§ ControlDesk
§ dSPACE AUTOSAR Compare
§ dSPACE XIL API .NET Implementation
§ Firmware Manager
§ ModelDesk
§ Real-Time Testing
§ RTI Bypass Blockset
§ SYNECT client
§ SystemDesk
§ TargetLink Property Manager
§ VEOS
276
ConfigurationDesk Automating Tool Handling May 2024
Introduction to the Message Reader API
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Introduction You can read the log messages via Python by using the clr module. You
can combine multiple filters to display only messages according to your
specifications.
The following code references and imports the message reader assembly.
# Insert path of message log file access assembly:
import sys
AssemblyPath = r'C:\Program Files\Common Files\dSPACE\InstallationManager\bin'
if not sys.path.count(AssemblyPath):
sys.path.insert(1, AssemblyPath)
Reading all messages The following example reads all existing message log files and prints all messages
via Python. It is assumed that the message reader assembly is referenced and
imported. Refer to Referencing a message reader assembly on page 277.
# Create message reader and print text of each message:
Reader = MessageReader(None)
for Message in Reader.ReadMessages():
print(Message.MessageText)
Reader.Dispose()
Filtering messages by severity, The following example reads and prints messages with a severity of Error,
product, and session SevereError, or SystemError. Also, only messages of the last sessions of
ControlDesk and AutomationDesk are read and printed. It is assumed that the
message reader assembly is referenced and imported. Refer to Referencing a
message reader assembly on page 277.
277
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
Note
Filtering messages by time Times are given by .NET DateTime objects. Times are given as UTC times
(Coordinated Universal Time). You can obtain the current UTC time by
System.DateTime.UtcNow.
The following example reads all messages after a certain start time. It is
assumed that the message reader assembly is referenced and imported. Refer
to Referencing a message reader assembly on page 277.
import System
Settings = MessageReaderSettings()
Settings.MessageTimeAfter = System.DateTime.UtcNow # Read messages after now
# Create message reader and print time and text of each message:
Reader = MessageReader(Settings)
for Message in Reader.ReadMessages():
print('%s: %s' % (Message.UtcTimeStamp, Message.MessageText))
Reader.Dispose()
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Supported dSPACE Products and Components........................................................................ 276
References
278
ConfigurationDesk Automating Tool Handling May 2024
Introduction to the Message Reader API
Introduction You can read the log messages via C#. You can combine multiple filters to
display only messages according to your specifications.
Reading all messages The following example reads all existing message log files and prints the
messages:
using dSPACE.Common.MessageHandler.Logging;
...
Filtering messages by severity, The following example reads and prints messages with a severity of Error,
product, and session SevereError, or SystemError. Also, only messages of the last sessions of
ControlDesk and AutomationDesk are read and printed.
using dSPACE.Common.MessageHandler.Logging;
...
279
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
Note
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Supported dSPACE Products and Components........................................................................ 276
References
280
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference
dSPACE.Common.MessageHandler.Logging Reference
Where to go from here Information in this section
ILogMessage Interface
Namespace dSPACE.Common.MessageHandler.Logging
281
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Examples
References
ILogSession Interface
Namespace dSPACE.Common.MessageHandler.Logging
282
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Examples
283
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
MessageReader Class
Note
The ReadMessages
method returns an
enumerator which must
either read all messages
or must be disposed
when no longer used. It
is not possible to use two
enumerators interleaved,
only one enumerator may
read messages at a time.
284
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Examples
References
MessageReaderSettings Class
285
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Examples
Severity Enumeration
286
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference
Reading dSPACE Log Messages via the Message Reader API................................................... 274
Examples
287
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API
288
ConfigurationDesk Automating Tool Handling May 2024
Appendix
Appendix
Limitations............................................................................................. 290
289
May 2024 ConfigurationDesk Automating Tool Handling
Appendix
Limitations
Automating processes that There are limitations and recommendations when automating processes that
affect ConfigurationDesk and affect ConfigurationDesk and MATLAB.
MATLAB
Automating ConfigurationDesk from MATLAB When you automate
ConfigurationDesk from MATLAB, commands that cause ConfigurationDesk
to callback into MATLAB can cause a blocking situation. For example, the
AddModels, ReplaceModel (ICaComponent), GenerateModelInterfaces,
PropagateToSimulink (ICaAlgorithms) commands cause blocking situations.
Automating ConfigurationDesk from MATLAB is only recommended for the
following items:
§ Simple processes supported by API commands of the Model Interface Package
for Simulink .
§ Processes that do not cause ConfigurationDesk to callback into MATLAB.
When you automate ConfigurationDesk from MATLAB, note the following:
§ You must use the dsmips_configurationdesk() API command provided
by the Model Interface Package for Simulink instead the COM API for the
following commands:
§ Start a build process with the active ConfigurationDesk application .
§ Save the active project in ConfigurationDesk.
§ Analyze a model in ConfigurationDesk (including task information).
§ Analyze a model in ConfigurationDesk (model topology only).
§ Add a model to the model topology of the active ConfigurationDesk project.
§ Open a ConfigurationDesk project from a project backup archive.
For more information, refer to Remote Access to ConfigurationDesk (Model
Interface Package for Simulink - Modeling Guide ).
§ You cannot generate or update the Simulink model interface based
on ConfigurationDesk function blocks or model port blocks, i.e. the
GenerateModelInterfaces and PropagateToSimulink (ICaAlgorithms)
methods cannot be used and there are no alternatives.
290
ConfigurationDesk Automating Tool Handling May 2024
Limitations
Limitations for automating Some limitations affect the automated handling of project and application
project and application management. The limitations shown below are listed in order of the automation
management objects which are affected.
General Limitations
§ Using an automation ICaApplication object from the ICaApplications
collection of an ICaProject and not from an ICaActiveProject may lead
to unpredictable results. To work with applications, activate the project and
use the ICaApplications collection of the ICaActiveProject interface.
The ICaApplicationMain interface provides quick access to an open project
or to an active application via its ICaApplicationMain.ActiveProject and
ICaApplicationMain.ActiveApplication properties.
ICaActiveProject
§ Close: Closing a project with write-protected elements
You get an error message if you close a project with write-protected
project elements via automation and the SaveChanges parameter of the
Close() method is set to TRUE. As a workaround, call the method with
the SaveChanges parameter set to FALSE: ActiveProject.Close(False).
Do not use the Save() method for projects with write-protected project
elements.
§ SaveAs: A project can be saved under a new name only in the project
location of the original project. After modifying a project, you must always
save it with the ActiveProject.Save() method first before you use the
ActiveProject.SaveAs() method.
§ SaveTo: This method is currently not supported.
ICaActiveApplication
§ Files is obsolete, because the project and application management as of
ConfigurationDesk 6.8 considers every file below the application folder as
belonging to the application.
291
May 2024 ConfigurationDesk Automating Tool Handling
Appendix
ICaFiles
§ ICaFiles is obsolete, because the project and application management as
of ConfigurationDesk 6.8 considers every file below the application folder as
belonging to the application.
Limitations for automating Automated window handling is only supported for ConfigurationDesk's main
window handling window. If you start ConfigurationDesk via automation, its user interface is not
displayed immediately. To display it, you should use the Visible property of the
ICaMainWindow interface.
Limitations for automating Some signal chain configuration tasks are not available in automation, so
the signal chain MATLAB configuration cannot be automated via ConfigurationDesk.
The following limitations are listed in order of the automation objects which are
affected.
ICaComponent
§ Configure: An attempt to create or replace a hardware topology from
a hardware system which was registered a short time ago, e.g., in an
automation step directly before, might run into problems because of race
conditions. See the dSPACE demo scripts for appropriate programming steps
to avoid this.
§ Configure: A property of a communication matrix element can be passed to
the UndoChangesToCommunicationMatrix operation only via the property's
automation name but not via its object itself.
ICaWorkingViews
§ As of ConfigurationDesk 4.3, it is possible to create working views and
working view groups with an empty name or the same name on the same root
level. Because the automation interfaces cannot distinguish between working
views and/or working view groups with an empty name or the same name
on the same level, it is strongly recommended not to use the same or empty
names.
§ As of ConfigurationDesk 4.3, it is possible to create working views and
working view groups with slashes and backslashes in their names. However,
you must avoid slashes and backslashes in names because the automation
interfaces needs the names of working views and working view groups as path
information.
ICaDataObject
§ Parent: Not all data objects which are items in the signal chain have a parent,
and even the topology browser shows the items as child nodes.
§ Equals: It is not possible to compare Bus Manager elements of different
relations. For example, you cannot compare Bus Manager elements of the
CommunicationMatricesByEcus relation with Bus Manager elements of the
CommunicationMatricesByClusters or BusConfigurations relation. You
can only compare Bus Manager elements of the same relation.
ICaProperty
§ The automation interface treats some property values of data objects as strings
rather than as other simple types. For example, the Slots property of some
292
ConfigurationDesk Automating Tool Handling May 2024
Limitations
boards should be simple integer values, but if the values are not read-only you
can set them only as strings (e.g.: '2' instead of: 2).
§ Some property values are displayed as strings in the Properties Browser, but
the underlying type is a vector of integers. The value of such a property can be
read as a vector with Property.Value[0]. The value itself is set as a string
(e.g. Property.Value = '2'). (For example, the Injection/Ignition Current
In function block type from the function library provides the Pulse Cut State
function port with vector values.)
ICaTransaction
§ Using a write transaction in ConfigurationDesk's internal interpreter might
lead to a blocking call. Use write transactions only with external calls from
threads other than the UI thread.
§ In each write transaction, you can add only one bus configuration to
a ConfigurationDesk application. To add multiple bus configurations to a
ConfigurationDesk application, you must use a separate write transaction for
each bus configuration.
ICaRelation
§ FindByXPath: Currently only supported for communication matrix relations
and bus configuration relations.
Limitations for automating Assigned master APU provider only assignable via name string For an
function block configuration Engine Simulation Setup block it is not possible to assign a master APU provider
by setting the value to the appropriate object. Use the name string of the object
instead, for example:
ApuProviderProperty.Value = "Angular Clock Setup (1)"
293
May 2024 ConfigurationDesk Automating Tool Handling
Appendix
Reasons for using Python 3.11 The final release of Python 3.11 has been available since October 2022 and the
instead of Python 3.9 end of life of Python 3.9 is scheduled for October 2025. The latest Python release
with its included Python packages provides new features, security updates, and
bugfixes.
Related documents available For a short overview of the main changes in Python 3.11, refer to Technical
on the Python website Changes on page 297. For information on all the changes in the Python
language and environment from Python 3.9 to Python 3.11, refer to
www.python.org.
294
ConfigurationDesk Automating Tool Handling May 2024
Migrating Python Scripts from Python 3.9 to Python 3.11
Introduction With Python 3.11, some aspects of handling Python with dSPACE software have
changed.
Libraries The packages used with Python 3.11 and distributed on dSPACE DVDs have
changed as shown in the following table.
295
May 2024 ConfigurationDesk Automating Tool Handling
Appendix
Introduction If you work with dSPACE software from dSPACE Release 2023‑A or earlier, which
supports Python 3.9, and dSPACE software from dSPACE Release 2023‑B, which
supports Python 3.11, both Python versions are installed on the PC and can be
used in parallel.
Limitations when using You can use both Python versions in parallel. However, you must observe the
Python 3.9 and Python 3.11 in following limitations:
parallel § You can set the file associations for PY and PYW files to only one Python
version. This is usually the latest Python version you installed.
Note
§ Environment variables are used by both Python versions. You must set their
values, for example, for PYTHONHOME, to the Python installation you want to
work with. For an overview of environment variables set by Python, refer to:
https://docs.python.org/3.11/using/windows.html.
296
ConfigurationDesk Automating Tool Handling May 2024
Migrating Python Scripts from Python 3.9 to Python 3.11
Note
Using dSPACE test If a test automation script uses dSPACE Python Modules and you do not want to
automation with both Python migrate the script, you have to work with both Python versions in parallel. The
versions in parallel dSPACE Python Modules for Python 3.9 are available up to and including Release
2023‑A.
Note
Technical Changes
Introduction Migrating from Python 3.9 to Python 3.11 has caused changes in the Python API.
Note
Migration issues The following changes in pythonnet 3.0 from Python 3.11 require manual
migration of your Python scripts.
297
May 2024 ConfigurationDesk Automating Tool Handling
Appendix
298
ConfigurationDesk Automating Tool Handling May 2024
ConfigurationDesk Glossary
ConfigurationDesk Glossary
Introduction The glossary briefly explains the most important expressions and naming
conventions used in the ConfigurationDesk documentation.
A........................................................................................................... 300
B........................................................................................................... 300
C........................................................................................................... 303
D........................................................................................................... 306
E........................................................................................................... 307
F............................................................................................................ 309
G........................................................................................................... 310
H........................................................................................................... 311
I............................................................................................................ 311
L............................................................................................................ 312
M.......................................................................................................... 313
N........................................................................................................... 316
O........................................................................................................... 316
P........................................................................................................... 316
R........................................................................................................... 317
S........................................................................................................... 318
T........................................................................................................... 320
U........................................................................................................... 321
V........................................................................................................... 321
299
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
W.......................................................................................................... 322
X........................................................................................................... 322
Basic PDU A general term used in the documentation to address all the PDUs
the Bus Manager supports, except for container IPDUs , multiplexed IPDUs ,
and secured IPDUs . Basic PDUs are represented by the or symbol in
tables and browsers. Unless stated otherwise, the Bus Manager provides the
same functionalities for all basic PDUs, such as ISignal IPDUs or NMPDUs.
300
ConfigurationDesk Automating Tool Handling May 2024
B
nor access to the hardware. Behavior models can be modeled, for example,
in MATLAB®/Simulink® by using Simulink Blocksets and Toolboxes from the
MathWorks®.
You can add Simulink behavior models to a ConfigurationDesk application.
You can also add code container files containing a behavior model such as
Functional Mock-up Units , or Simulink implementation containers to a
ConfigurationDesk application.
BSC file A bus simulation container file that is generated with the
Bus Manager or the Ethernet Configuration Package. A BSC file that is
generated with the Bus Manager contains the configured bus communication
of one application process . A BSC file that is generated with the Ethernet
Configuration Package contains the configured bus communication of one
project.
Build Configuration table A pane that lets you create build configuration
sets and configure build settings, for example, build options, or the build and
download behavior.
Build Log Viewer A pane that displays messages and warnings during the
build process .
Build results The files that are created during the build process . Build
results are named after the ConfigurationDesk application and the application
process from which they originate. You can access the build results in the
Project Manager .
301
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
Bus access requests are automatically included in BSC files . To build a real-time
application , each bus access request must be assigned to a bus access.
Bus Access Requests table A pane that lets you access bus access
requests of a ConfigurationDesk application and assign them to bus
accesses .
Bus Configuration Ports table A pane that lets you access and configure
function ports and event ports of bus configurations .
Bus Configurations table A pane that lets you access and configure bus
configurations of a ConfigurationDesk application .
Bus Inspection Features table A pane that lets you access and configure
bus configuration features of a ConfigurationDesk application for inspection
purposes.
Bus Manager
§ Bus Manager in ConfigurationDesk
A ConfigurationDesk component that lets you configure bus communication
and implement it in real-time applications or generate bus simulation
containers .
§ Bus Manager (stand-alone)
A dSPACE software product based on ConfigurationDesk that lets you
configure bus communication and generate bus simulation containers.
Bus Manipulation Features table A pane that lets you access and
configure bus configuration features of a ConfigurationDesk application for
manipulation purposes.
302
ConfigurationDesk Automating Tool Handling May 2024
C
Bus simulation container (BSC ) files that are generated with the Bus Manager
contain CAN and/or LIN communication, BSC files generated with the Ethernet
Configuration Package contain Ethernet communication.
Depending on the contained bus communication, BSC files can be used in
VEOS , in ConfigurationDesk, and/or in RTMaps:
§ In VEOS, they let you implement the bus communication in an offline
simulation application to perform SIL simulation on VEOS.
§ In ConfigurationDesk, they let you implement the bus communication in a
real-time application for SCALEXIO, MicroAutoBox III, or MicroLabBox II.
§ In RTMaps, they let you implement the bus communication in an
RTMaps‑based application for the AUTERA AutoBox, for example.
Bus Simulation Features table A pane that lets you access and configure
bus configuration features of a ConfigurationDesk application for simulation
purposes.
Buses Browser A pane that lets you display and manage the communication
matrices of a ConfigurationDesk application . For example, you can access
communication matrix elements and assign them to bus configurations. This
pane is available only if you work with the Bus Manager .
Cable harness A bundle of cables that provides the connection between the
I/O connectors of the real-time hardware and the external devices , such as the
ECUs to be tested. In ConfigurationDesk, it is represented by an external cable
harness component.
303
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
Configuration port A port that lets you create the signal chain for the
bus communication implemented in a Simulink behavior model. The following
configuration ports are available:
§ The configuration port of a Configuration Port block .
§ The Configuration port of a CAN, LIN, or FlexRay function block.
To create the signal chain for bus communication, the configuration port of a
Configuration Port block must be mapped to the Configuration port of a
CAN, LIN, or FlexRay function block.
304
ConfigurationDesk Automating Tool Handling May 2024
C
Conflicts Viewer A pane that displays the configuration conflicts that exist
in the active ConfigurationDesk application . You can resolve most of the
conflicts directly in the Conflicts Viewer.
305
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
Custom code Custom source, header, and library files that must be compiled
and linked to real-time applications . Custom code files can be specified via
the Build Configuration Set options in the Build Configuration table . Do not
confuse custom code with user code , which is a term used in the Bus Manager
context.
Data outport A port that supplies data from behavior model signals to
ConfigurationDesk's function inports.
In a multimodel application, data outports also can be used to supply data to a
data inport associated to another behavior model (model communication ).
DBC file A Data Base Container file that describes CAN or LIN bus systems.
Because the DBC file format was primarily developed to describe CAN networks,
it does not support definitions of LIN masters and schedules.
Delayed event An event that triggers a task when the specified delay time
has expired after the execution of the source task started.
Device connector A structural element that lets you group device pins in a
hierarchy in the External Device Connectors table to represent the structure of
the real connector of your external device .
306
ConfigurationDesk Automating Tool Handling May 2024
E
dSPACE Help The dSPACE online help that contains all the relevant user
documentation for dSPACE products. Via the F1 key or the Help button in the
dSPACE software you get context-sensitive help on the currently active context.
ECHX file An external cable harness file that contains the wiring
information for the external cable harness. The external cable harness is the
connection between the I/O connectors of the real-time hardware and the
devices to be tested, for example, ECUs.
ECU interfacing A generic term for methods and tools to read and/or
write individual ECU functions and variables of an ECU application . In
ECU interfacing scenarios, you can access ECU functions and variables for
307
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
EIC file An ECU interface container file that is generated with the ECU
Interface Manager and describes an ECU application that is configured for
ECU interfacing . You can import EIC files to ConfigurationDesk to perform
ECU interfacing with SCALEXIO systems , MicroAutoBox III, or MicroLabBox II
systems.
Event port An element of a function block . The event port can be mapped
to a runnable function port for modeling an asynchronous task.
308
ConfigurationDesk Automating Tool Handling May 2024
F
multiplexer signal can determine that specific multiplexed signals are included in
the IPDU. However, with extended signal multiplexing, a multiplexed signal itself
can serve as a multiplexer signal.
External Device Browser A pane that lets you display and manage the
device topology of your active ConfigurationDesk application .
External Device Configuration table A pane that lets you access and
configure the most important properties of device topology elements via table.
External Device Connectors table A pane that lets you specify the
representation of the physical connectors of your external device including
the device pin assignment.
FIBEX file An XML file according the ASAM MCD-2 NET standard (also
known as Field Bus Exchange Format) defined by ASAM. The file can describe
more than one bus system (e.g., CAN, LIN, FlexRay). It is used for data exchange
between different tools that work with message-oriented bus communication.
Find Results Viewer A pane that displays the results of searches you
performed via the Find command.
FMU file A Functional Mock-up Unit file that describes and implements the
functionality of a model. It is an archive file with the file name extension FMU.
The FMU file contains:
§ The functionality defined as a set of C functions provided either in source or in
binary form.
§ The model description file (modelDescription.xml) with the description of
the interface data.
§ Additional resources needed for simulation.
You can add an FMU file to the model topology just like adding a Simulink
model based on an SLX file .
309
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
CAN frames and LIN frames can contain only one PDU. To exchange a frame via
bus channels, a frame triggering is needed.
Function inport A function port that inputs the values from the behavior
model to the function block to be processed by the function.
Global working view The default working view that always contains all
signal chain elements.
310
ConfigurationDesk Automating Tool Handling May 2024
H
Hardware Resource Browser A pane that lets you display and manage all
the hardware components of the hardware topology that is contained in your
active ConfigurationDesk application in a hierarchical structure.
HTFX file A file containing the hardware topology after an explicit export.
It provides information on the components of the system and also on the
channel properties, such as board and channel types and slot numbers.
I/O event An asynchronous event triggered by I/O functions. You can use
I/O events to trigger tasks in your application process asynchronously. You can
assign the events to the tasks via drag & drop, via the Properties Browser if you
have selected a task, or via the Assign Event command from the context menu
of the relevant task.
Interface model A temporary Simulink model that contains blocks from the
Model Interface Blockset. ConfigurationDesk initiates the creation of an interface
model in Simulink. You can copy the blocks with their identities from the
interface model and paste them into an existing Simulink behavior model.
Interpreter A pane that lets you run Python scripts and execute line-based
commands.
Inverse model port block A model port block that has the same
configuration (same name, same port groups, and port names) but the inverse
data direction as the original model port block from which it was created.
311
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
LDF file A LIN description file that describes networks of the LIN bus system
according to the LIN standard.
LIN schedule table A table defined for a LIN master that contains the
transmission sequence of frame headers on a LIN bus. For each LIN master,
several LIN schedule tables can be defined.
Logical signal An element of a function block that combines all the signal
ports which belong together to provide the functionality of the signal. Each
logical signal causes one or more channel requests . Channel requests are
available after you have assigned a channel set to the logical signal.
312
ConfigurationDesk Automating Tool Handling May 2024
M
Logical signal chain A term that describes the logical path of a signal
between an external device and the behavior model . The main elements
of the logical signal chain are represented by different graphical blocks (device
blocks , function blocks and model port blocks ). Every block has ports to
provide the mapping to neighboring blocks.
In the documentation, usually the short form 'signal chain' is used instead.
MDL file A Simulink model file that contains the behavior model . You can
add an MDL file to your ConfigurationDesk application .
As of MATLAB® R2012a, the file name extension for the Simulink model file has
been changed from MDL to SLX by The MathWorks®.
Message Viewer A pane that displays a history of all error and warning
messages that occur during work with ConfigurationDesk.
Model analysis A process that analyzes the model to determine the interface
of a behavior model . You can select one of the following commands:
§ Analyze Simulink Model (Model Interface Only)
Analyzes the interface of a behavior model. The model topology of your
active ConfigurationDesk application is updated with the properties of the
analyzed behavior model.
§ Analyze Simulink Model (Including Task Information)
Analyzes the model interface and the elements of the behavior model
that are relevant for the task configuration. The task configuration in
ConfigurationDesk is then updated accordingly.
Model Browser A pane that lets you display and access the model
topology of an active ConfigurationDesk application . The Model Browser
provides access to all the model port blocks available in the behavior
models that are linked to a ConfigurationDesk application. The model
elements are displayed in a hierarchy, starting with the model roots. Below the
model root, all the subsystems containing model port blocks are displayed as well
as the associated model port blocks.
313
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
Model Communication Browser A pane that lets you open and browse
working views like the Signal Chain Browser , but shows only the Data
Outport and Data Inport blocks and the mapping lines between them.
Model port An element of a model port block . Model ports provide the
interface to the function ports and to other model ports (in multimodel
applications ).
These are the types of model ports:
§ Data inport
§ Data outport
§ Runnable function port
§ Configuration port
314
ConfigurationDesk Automating Tool Handling May 2024
M
Model-Function Mapping Browser A pane that lets you create and update
signal chains for Simulink behavior models . It directly connects them to I/O
functionality in ConfigurationDesk.
MTFX file A file containing a model topology when explicitly exported. The
file contains information on the interface to the behavior model , such as the
implemented model port blocks including their subsystems and where they are
used in the model.
315
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
OSA file An offline simulation application file that is built with VEOS to
perform SIL simulation .
Parent port A port that you can use to map multiple function
ports and model ports . All child ports with the same name are mapped.
ConfigurationDesk enforces the mapping rules and allows only mapping
lines that agree with them.
Physical signal chain A term that describes the electrical wiring of external
devices (ECU and loads) to the I/O boards of the real-time hardware. The
physical signal chain includes the external cable harness , the pinouts of the
connectors and the internal cable harness.
316
ConfigurationDesk Automating Tool Handling May 2024
R
Pins and External Wiring table A pane that lets you access the external
wiring information
Processing Resource Assignment table A pane that lets you configure and
inspect the processing resources in an executable application . This table is
useful especially for multi-processing-unit applications .
Properties Browser A pane that lets you access the properties of selected
elements.
317
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
RTA file A real-time application file. An RTA file is an executable object file
for processor boards. It is created during the build process . After the build
process it can be downloaded to the real-time hardware.
318
ConfigurationDesk Automating Tool Handling May 2024
S
Signal chain A term used in the documentation as a short form for logical
signal chain . Do not confuse it with the physical signal chain .
Signal Chain Browser A pane that lets you open and browse working
views such as the Global working view or user-defined working views.
Signal reference port A signal port that represents a connection point for
the reference potential of inports , outports and bidirectional ports . For
example: With differential signals, this is a reference signal, with single-ended
signals, it is the ground signal (GND).
Simulink model interface The part of the model interface that is available
in the connected Simulink behavior model.
SLX file A Simulink model file that contains the behavior model . You can
add an SLX file to your ConfigurationDesk application .
As of MATLAB® R2012a, the file name extension for the Simulink model file has
been changed from MDL to SLX by The MathWorks®.
319
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
triggered on every fourth execution of the base rate task via a software event.
Software events are available in ConfigurationDesk after model analysis .
Source Code Editor A Python editor that lets you open and edit Python
scripts that you open from or create in a ConfigurationDesk project in a window
in the working area . You cannot run a Python script in a Source Code Editor
window. To run a Python script you can use the Run Script command in the
Interpreter or on the Automation ribbon or the Run context menu command
in the Project Manager .
Table A type of pane that offers access to a specific subset of elements and
properties of the active ConfigurationDesk application in rows and columns.
Task Configuration table A pane that lets you configure the tasks of an
executable application .
Temporary working view A working view that can be used for drafting a
signal chain segment, like a notepad.
Timer event A periodic event with a sample rate and an optional offset.
320
ConfigurationDesk Automating Tool Handling May 2024
U
TRC file A variable description file that contains all variables (signals and
parameters) which can be accessed via the experiment software. It is created
during the build process .
User code A term used in the Bus Manager context. User code is C
code or C++ code containing user-specific algorithms. The algorithms provide
additional functionality to the Bus Manager, such as calculating checksum values
or generating authentication information for secured IPDUs . To implement
user code in executable applications , you have to use functions of the
Bus Custom Code interface and add the user code implementation to
ConfigurationDesk. Do not confuse user code with custom code .
VEOS Player A component of VEOS . The VEOS Player is the graphical user
interface for VEOS on Windows. For example, you can use the VEOS Player
to import bus simulation containers to VEOS, integrate the respective bus
communication in an offline simulation application , and load the application
to VEOS.
321
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary
VSET file A file that contains all view sets and their settings from the current
ConfigurationDesk installation. A VSET file can be exported and imported via the
View Sets page of the Customize dialog.
Working View Manager A pane that lets you manage the working
views of the active ConfigurationDesk application . You can use the
Working View Manager for creating, renaming, and deleting working views,
and also to open a working view in the Signal Chain Browser or the Model
Communication Browser .
XLSX file A Microsoft Excel™ file format that is used for the following
purposes:
§ Creating or configuring a device topology outside of ConfigurationDesk.
§ Exporting the wiring information for the external cable harness .
322
ConfigurationDesk Automating Tool Handling May 2024
Index
P
Index
A platform management 57
application processes 53 project handling 42
application tasks 53 PYC file 134
automation Python
accessing ConfigurationDesk's automation basic characteristics 132
interface 28 comments 133
application processes 53 control structures 132
application tasks 53 importing symbols 133
build process 55 module threading 136
enabling auto completion 141 module win32api 136
hardware resource assignment 49 scope of variables 133
importing a Python script 143 try … finally statement 136
overview of the automation interface 27 variable type definition 132
platform management 57 Python Interpreter
project handling 42 main thread 135
running scripts 144 multithreaded execution 136
signal chain configuration 46 multithreading 135
specifying Python paths 145 multithreading rules 136
structuring python scripts 134 running script in separate thread 136
supported automation languages 29 separate thread 135
using auto completion 142 stopping a thread 136
thread stops thread 136
B
R
basics
external interpreters 147 running scripts 144
overview of the automation interface 27
structuring python scripts 134 S
build process 55
scripts
multithreaded scripting 135
C multithreading 135
Common Program Data folder 10, 304 separate thread (Python) 135
ConfigurationDesk signal chain configuration 46
automation features 27 specifying Python paths 145
ConfigurationDesk events 59
T
D thread (Python) 135
Documents folder 10, 307
U
E using auto completion 142
enabling auto completion 141
external interpreters
basics 147
H
hardware resource assignment 49
I
importing a Python script 143
Interpreter 139
L
Local Program Data folder 10, 312
M
main thread (Python) 135
multithreaded scripting (Python) 135
multithreading (Python) 135
323
May 2024 ConfigurationDesk Automating Tool Handling
Index
324
ConfigurationDesk Automating Tool Handling May 2024