0% found this document useful (0 votes)
247 views324 pages

Configuration Desk Automating Tool Handling

The document provides comprehensive information on the automation interface for ConfigurationDesk 2024-A, including new features, migration steps, and best practices for automating tasks. It also includes contact information for dSPACE support and details on software updates and patches. Additionally, it outlines various programming languages and environments for scripting, along with API references and examples for effective tool handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
247 views324 pages

Configuration Desk Automating Tool Handling

The document provides comprehensive information on the automation interface for ConfigurationDesk 2024-A, including new features, migration steps, and best practices for automating tasks. It also includes contact information for dSPACE support and details on software updates and patches. Additionally, it outlines various programming languages and environments for scripting, along with API references and examples for effective tool handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 324

ConfigurationDesk

Automating Tool Handling


For ConfigurationDesk 2024-A (24.1)

Release 2024-A – May 2024


How to Contact dSPACE
Mail: dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
Tel.: +49 5251 1638-0
E-mail: [email protected]
Web: https://www.dspace.com

How to Contact dSPACE Support


If you encounter a problem when using dSPACE products, contact your local dSPACE
representative:
§ Local dSPACE companies and distributors: https://www.dspace.com/go/locations
§ For countries not listed, contact dSPACE GmbH in Paderborn, Germany.
Tel.: +49 5251 1638-941 or e-mail: [email protected]

You can also use the support request form: https://www.dspace.com/go/supportrequest. If


you are logged on to mydSPACE, you are automatically identified and do not have to add
your contact details manually.

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.

Software Updates and Patches


dSPACE strongly recommends that you download and install the most recent patches
for your current dSPACE installation. Visit https://www.dspace.com/go/patches for the
software updates and patches themselves and for more information, such as how to
receive an automatic notification when an update or a patch is available for your dSPACE
software.

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.

© 2013 - 2024 by:


dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany

This publication and the contents hereof are subject to change without notice.

AURELION, AUTERA, ConfigurationDesk, ControlDesk, MicroAutoBox, MicroLabBox,


SCALEXIO, SIMPHERA, SYNECT, SystemDesk, TargetLink, and VEOS are registered
trademarks of dSPACE GmbH in the United States or other countries, or both. Other
brand names or product names are trademarks or registered trademarks of their respective
companies or organizations.
Contents

Contents

About This Document 9

New Features of the Automation Interface and


Migration Steps 11
New Features and Changes to the Automation Interface for Release
2024-A......................................................................................................... 11
Migrating From Prior Versions of ConfigurationDesk Tool
Automation...................................................................................... ............ 12

Introduction to Automating ConfigurationDesk 27


Basics on the Automation Interface............................................................... 27
Scripting Environments and Languages for Tool Automation.......................... 29
Examples and Demo Files.............................................................................. 30
Legend for Object Model Diagrams............................................................... 31

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

Getting Basic Access to ConfigurationDesk............................................................. 40


Opening a COM Connection to ConfigurationDesk....................................... 40

Automating Basic Tasks in ConfigurationDesk......................................................... 42


Automating Project Handling........................................................................ 42
Automating Signal Chain Configuration........................................................ 46
Automating Hardware Resource Assignment................................................. 49
Automating Modeling of Application Processes and Tasks................. ............ 53
Automating Build Process.............................................................................. 55
Automating Platform Management............................................................... 57
Working with ConfigurationDesk Events....................................................... 59

Automating Bus Manager Features......................................................................... 61


Basics on Automating Bus Manager Features................................................. 61
Accessing Communication Matrix Elements Sorted by Clusters via
XPath............................................................................................................ 63
Accessing Communication Matrix Elements Sorted by ECUs via
XPath............................................................................................................ 66

3
May 2024 ConfigurationDesk Automating Tool Handling
Contents

Accessing Bus Configuration Elements via XPath........................................... 69


Accessing Element Properties via XPath......................................................... 91
Examples of Automating Bus Manager Features............................................ 95

Best Practices for Automating ConfigurationDesk................................................. 110


Best Practices for Using External Interpreters................................................ 110
Best Practices for Script Optimization........................................................... 110
Best Practices for Interfaces......................................................................... 113
Best Practices for Data Structures and Parameters........................................ 113
Best Practices for Property Handling.................................................. .......... 116

Code Examples in Different Programming Languages 117


Examples of Python Scripts................................................................................... 118
Python Demo Scripts................................................................................... 118

Code Sequence Examples..................................................................................... 120


Control Structures....................................................................................... 120
Line Continuation............................................................................. .......... 121
Creation...................................................................................................... 121
Destruction................................................................................................. 122
Calling Methods without Parameters........................................................... 122
Collections.................................................................................................. 123
Constants......................................................................................... .......... 123
Array Handling............................................................................................ 124

Code Examples Showing Programming Constructs............................................... 125


Code Example in Python................................................................... .......... 125
Code Example in Visual Basic............................................................ .......... 126
Code Example in M..................................................................................... 127
Code Example in C#.................................................................................... 128

Using ConfigurationDesk to Edit and Execute Scripts 131


Basics on Python.................................................................................................. 132
Main Characteristics of Python.................................................................... 132
Structuring Python Scripts........................................................................... 134
Multithreaded Scripting............................................................................... 135

Ways to use Python Scripts in ConfigurationDesk................................................. 138

Using the Internal Interpreter........................................................................... 138


Basics on the Interpreter.............................................................................. 139
How to Enable Auto Completion................................................................. 141
How to Use Auto Completion..................................................................... 142
How to Import a Python Module to the Interpreter Namespace................... 143

4
ConfigurationDesk Automating Tool Handling May 2024
Contents

How to Run Scripts........................................................................... .......... 144


How to Specify the Python Path.................................................................. 145

Using an External Interpreter............................................................................ 147


Basics on External Interpreters..................................................................... 147

Using the Source Code Editor.......................................................................... 148


Basics on the Source Code Editor................................................................ 148
How to Configure the Source Code Editor................................................... 149
How to Create a New Python Script.................................................. .......... 150
How to Work with Python Scripts in the Project Manager............................ 152
How to Work with Selected Text in the Source Code Editor......................... 153
How to Use Bookmarks in the Source Code Editor....................................... 153

ConfigurationDesk API Reference 155


Introduction to ConfigurationDesk's Automation API................................. .......... 156
Overview of the API.......................................................................... .......... 156

API Interfaces....................................................................................................... 158

Build Management.......................................................................................... 158


ICaBuildManagement <<Interface>>........................................................... 158
ICaBuildResult <<Interface>>...................................................................... 159

Component Handling...................................................................................... 160


ApplicationProcessToModel <<Enumeration>>............................................ 161
ConfigurationReplaceMode <<Enumeration>>................................. .......... 162
DeviceTopologyCreateMode <<Enumeration>>........................................... 162
ExternalWiringCreateMode <<Enumeration>>............................................ 163
HardwareTopologyCreateMode <<Enumeration>>...................................... 163
HtfxFileFormat <<Enumeration>>..................................................... .......... 163
ICaAlgorithms <<Interface>>...................................................................... 164
ICaComponent <<Collection>>........................................................ .......... 171
ICaComponents <<Interface>>................................................................... 180
ICaDataObject <<Interface>>...................................................................... 182
ICaDataObjectType <<Interface>>............................................................... 186
ICaDataObjectTypes <<Collection>>................................................. .......... 187
ICaDataObjects <<Collection>>.................................................................. 188
ICaLink <<Interface>>................................................................................. 189
ICaLinks <<Collection>>............................................................................. 190
ICaModelDescription <<Interface>>............................................................ 191
ICaObjects <<Collection>>............................................................... .......... 192
ICaRelation <<Interface>>................................................................ .......... 193
ICaRelations <<Collection>>....................................................................... 195
ICaStrings <<Collection>>................................................................ .......... 201
ICaTransaction <<Interface>>...................................................................... 202

5
May 2024 ConfigurationDesk Automating Tool Handling
Contents

ICaTransactionCreator <<Interface>>.......................................................... 203


ICaWorkingView <<Collection>>................................................................ 204
ICaWorkingViewGroup <<Interface>>........................................................ 206
ICaWorkingViews <<Collection>>............................................................... 207
MatchingPlatformConnectionState <<Enumeration>>...................... .......... 211
ModelTopologyCreateMode <<Enumeration>>........................................... 212

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

Project and Application Management.............................................................. 230


FileType <<Enumeration>>.......................................................................... 231
ICaActiveApplication <<Interface>>............................................................ 232
ICaActiveProject <<Interface>>................................................................... 235
ICaApplication <<Interface>>........................................................... .......... 237
ICaApplications <<Collection>>.................................................................. 239
ICaFile <<Interface>>.................................................................................. 240
ICaFiles <<Collection>>.................................................................... .......... 242
ICaProject <<Interface>>............................................................................. 243
ICaProjectManagement <<Interface>>........................................................ 244
ICaProjectRoot <<Interface>>..................................................................... 245
ICaProjectRoots <<Collection>>.................................................................. 247
ICaProjects <<Collection>>......................................................................... 248

Enumeration Properties.................................................................................... 250


AveragingLevel <<Enumeration>>............................................................... 251
BitOrder <<Enumeration>>......................................................................... 252
BlockColor <<Enumeration>>..................................................................... 252
ChannelType <<Enumeration>>.................................................................. 252
CylinderStates <<Enumeration>>................................................................ 253
DigitalOutputMode <<Enumeration>>........................................................ 254
Direction <<Enumeration>>........................................................................ 254
EdgeType <<Enumeration>>....................................................................... 254

6
ConfigurationDesk Automating Tool Handling May 2024
Contents

EncoderType <<Enumeration>>........................................................ .......... 255


EventTriggerCondition <<Enumeration>>.................................................... 255
ExecutionMode <<Enumeration>>.............................................................. 256
FunctionMode <<Enumeration>>..................................................... .......... 256
HighSideReference <<Enumeration>>......................................................... 256
IdleValue <<Enumeration>>........................................................................ 257
ImportToWorkingViewMode <<Enumeration>>.......................................... 257
InitializationMode <<Enumeration>>.......................................................... 257
JitterAndLatencyOptimization <<Enumeration>>.............................. .......... 258
LoadManualChecking <<Enumeration>>.................................................... 258
MappingType <<Enumeration>>................................................................. 259
MeasurementMode <<Enumeration>>........................................................ 259
MeasurementMode2 <<Enumeration>>...................................................... 259
MeasurementPoint <<Enumeration>>......................................................... 260
OvercurrentProtection <<Enumeration>>.................................................... 260
PathPriority <<Enumeration>>.................................................................... 260
PhaseUpdateMode <<Enumeration>>......................................................... 261
Polarity <<Enumeration>>................................................................ .......... 261
Potential <<Enumeration>>........................................................................ 261
ReadMode <<Enumeration>>..................................................................... 262
Role <<Enumeration>>............................................................................... 262
SensorMode <<Enumeration>>........................................................ .......... 262
SignalMode <<Enumeration>>......................................................... .......... 263
StandstillBehavior <<Enumeration>>........................................................... 263
Storage <<Enumeration>>.......................................................................... 263
Termination <<Enumeration>>.................................................................... 264
TransceiverType <<Enumeration>>.............................................................. 264
TransferType <<Enumeration>>................................................................... 264
TriggerEdgeType <<Enumeration>>............................................................. 265
UpdateMode <<Enumeration>>....................................................... .......... 265
VoltagePolarity <<Enumeration>>............................................................... 265

Events.............................................................................................................. 266
ICaApplicationEvents <<EventInterface>>................................................... 266
ICaProjectEvents <<EventInterface>>.......................................................... 267
ICaAutomationEventArgs <<Collection>>................................................... 270

Message Reader API 273


Introduction to the Message Reader API............................................................... 274
Reading dSPACE Log Messages via the Message Reader API........................ 274
Supported dSPACE Products and Components............................................ 276
Example of Reading Messages with Python................................................. 277
Example of Reading Messages with C#............................................. .......... 279

7
May 2024 ConfigurationDesk Automating Tool Handling
Contents

dSPACE.Common.MessageHandler.Logging Reference......................................... 281


ILogMessage Interface................................................................................. 281
ILogSession Interface................................................................................... 282
MessageReader Class.................................................................................. 284
MessageReaderSettings Class...................................................................... 285
Severity Enumeration........................................................................ .......... 286

Appendix 289
Limitations........................................................................................................... 290
Limitations for Automating ConfigurationDesk............................................ 290

Migrating Python Scripts from Python 3.9 to Python 3.11..................................... 294


Main Changes in Python 3.11..................................................................... 294
Main Changes in Handling Python 3.11 with dSPACE Software................... 295
General Information on Using Python Installations....................................... 296
Technical Changes....................................................................................... 297

ConfigurationDesk Glossary 299

Index 323

8
ConfigurationDesk Automating Tool Handling May 2024
About This Document

About This Document

Content This document gives you detailed information on ConfigurationDesk's


automation interface.

Note

The PDF version of this document does not contain graphical


representations of the API elements in the chapter ConfigurationDesk API
Reference on page 155. For graphical representations, refer to dSPACE
Help.

Required knowledge You should be familiar with performing the tasks to be automated in
ConfigurationDesk without automation.

Knowledge in handling the host PC and the Microsoft Windows operating


system is presupposed. You should also be familiar with a programming
language such as Python, C, or C#.

Symbols dSPACE user documentation uses the following symbols:

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:

%name% Names enclosed in percent signs refer to environment variables for


file and path names.

<> Angle brackets contain wildcard characters or placeholders for variable


file and path names, etc.

Special Windows folders Windows‑based software products use the following special folders:

Common Program Data folder A standard folder for application-specific


program data that is used by all users.
%PROGRAMDATA%\dSPACE\<InstallationGUID>\<ProductName>
or
%PROGRAMDATA%\dSPACE\<ProductName>\<VersionNumber>

Documents folder A standard folder for application‑specific files that are


used by the current user.
%USERPROFILE%\Documents\dSPACE\<ProductName>\<VersionNumber>

Local Program Data folder A standard folder for application-specific


program data that is used by the current user.
%USERPROFILE%\AppData\Local\dSPACE\<InstallationGUID>\
<ProductName>

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.

dSPACE Help (Web) Independently of the software installation, you can


access the Web version of dSPACE Help at https://www.dspace.com/go/help.
To access the Web version, you must have a mydSPACE account.
For more information on the mydSPACE registration process, refer to
https://www.dspace.com/faq?097.

10
ConfigurationDesk Automating Tool Handling May 2024
New Features of the Automation Interface and Migration Steps

New Features of the Automation Interface and


Migration Steps

Where to go from here Information in this section

New Features and Changes to the Automation Interface for


Release 2024-A....................................................................................... 11
New features of the current automation interface and
changed/discontinued features.

Migrating From Prior Versions of ConfigurationDesk Tool


Automation............................................................................................. 12
Version-specific migration steps for changed/discontinued features.

Information in other sections

Migrating Python Scripts from Python 3.9 to Python 3.11...................... 294

New Features and Changes to the Automation Interface for Release 2024-A

Enhancements to interfaces ICaComponent interface The Configure method of the ICaComponent


and enumerations interface now provides the following operations:
§ The EnableUserDefinedConfiguration operation, which can be used
with the Bus Manager only. This operation lets you enable and disable a
user‑defined bus configuration behavior. When enabled, you can specify the
user‑defined bus configuration behavior. However, you can do this only in the
user interface of the Bus Manager.
§ The GetBmXilFrameworkLabelIdTemplate and
ConfigureBmXilFrameworkLabelIdTemplate operations, which can be
used with the Bus Manager only. These operations let you access the default

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.

Migrating From Prior Versions of ConfigurationDesk Tool Automation

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)

Changed function block properties In order to support variable-size signals


for Ethernet communication, the values of certain function block properties are
changed. Changed values can lead to configuration errors, especially if strings
are used for configuration. The following table shows the changes.

13
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps

Function Property Changed values


Block
TCP Variable vector size Disabled (0) renamed to Fixed size (0)
(Transmit function)
Variable vector size § Disabled (0) removed
(Receive function) Set the Variable vector size property
to Provided to model (1) and set the
Variable vector size mode property to
All requested (3).
§ Enabled (1) renamed to
Provided to model (1)
UDP Transmit Variable vector size Disabled (0) renamed to Fixed size (0)

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 ).

Changes to the target architecture settings The support of the SCALEXIO


32-bit Linux target platform was removed with ConfigurationDesk 2023-B
(23.2).
The Target architecture property in the Global Build Settings is read‑only.
Depending on the assigned processing unit, one of the following values is used:
§ 64-bit (for SCALEXIO and MicroLabBox II)
§ 32-bit (for MicroAutoBox III)
§ Not applicable (if no processing unit is assigned)
The changeover from 32 bit to 64 bit for SCALEXIO platforms is automatic. If 32
bits are used for a SCALEXIO platform, a warning is issued.

Discontinuation of Excel export of ConfigurationDesk applications The


Export Configuration command for exporting the configuration data of the
active ConfigurationDesk application to a Microsoft® Excel™ file (XLSX file) was
removed with ConfigurationDesk 2023-B (23.2).
The corresponding tool automation API command
ICaAlgorithms:ExportConfiguration will raise a No more supported
exception if used.

2022-B to 2023-A Changes to the ICaApplicationMain interface ConfigurationDesk stores


temporary data of ConfigurationDesk applications such as temporary build
artifacts. The previously introduced project cache has been converted into an
application cache:
§ Using the GetCustomInformation method with the
ProjectCacheRootDirectory string or the ProjectCacheDirectory

14
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation

string is no longer supported. Use the ApplicationCacheRootDirectory


string or ApplicationCacheDirectory string instead.
§ Using the SetCustomInformation method with the
ProjectCacheRootDirectory string is no longer supported. Use the
ApplicationCacheRootDirectory string instead.

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.

Messages on planned discontinuations ConfigurationDesk provides


messages on planned discontinuations for commands you use. The severity of
discontinuation messages is Warning. If you use tool automation scripts that
stop when messages with Warning severity occur, the discontinuation messages
stop script execution.
You can deactivate the output of discontinuation messages until you replace
the automation of the deprecated commands in the script. Choose one of the
following methods for this purpose:
§ Via user interface: Clear the checkbox Show discontinuation messages on
the Configuration page of the ConfigurationDesk options.
§ Via tool automation: Use the ShowDiscontinuationMessages property of
the ICaMessageDispatcher interface, which lets you deactivate the output
of discontinuation messages.
For more information on discontinuations, refer to ConfigurationDesk
Discontinuations (New Features and Migration ).

15
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps

Changes to the Direction enumeration The values of the Direction


enumeration are changed and can lead to code malfunctions. The new values
are Unspecified (0), Reference (1), In (2), Out (3) and BiDirectional (4).

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.

ICaApplicationMain The ICaApplicationMain::SetCustomInformation


precompile operation supports 64-bit Linux. ConfigurationDesk no longer
supports SCALEXIO (QNX), so the operation automatically uses SCALEXIO_LNX
and displays a relevant warning.

Project and application handling Release 2021-B introduces a new


project handling with a stronger focus on the file system. Projects created
with a Release prior to Release 2021-B will automatically be migrated by the new
project handling.
The following table shows the changes you must consider in tool automation.

Automation Object Change


§ ICaProjectRoots The project locations introduced with the new project handling
§ ICaProjectRoot correspond to the unchanged ICaProjectRoots and ICaProjectRoot
interfaces in the automation interface.
The following changes are important with regard to the behavior of the
new project locations compared to the old project roots.
§ A project folder always has to be located at the top level of a project
location and not in a subfolder. To give you time for the transition,
three levels will temporarily be supported.
§ 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.
Project Management
ICaProjectRoot::Remove A project location cannot be removed while it is active.
ProjectRootUpdated event This event is no longer supported.
ProjectRootUpdating event This event is no longer supported.
ICaProjects::Add A new project can be added only to the active project location
(ProjectRoot). Adding a project to a project location that is not active
throws an exception.
ICaProject::FullPath The new project handling always calls the shared project file name.
Therefore, the method always returns Data.CfgDeskProject.
ICaProject::Remove Removes the project from the system. The PurgeProjectDirectory
parameter has no effect.
ICaActiveProject::FileName The method always returns the shared project file name:
Data.CfgDeskProject.

16
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation

Automation Object Change


ICaActiveProject::FullPath The new project handling always calls the shared project file
name. Therefore, the method always returns the full path of the
Data.CfgDeskProject file.
ICaActiveProject::IsModified The file system oriented project handling automatically adds files to the
project and does not consider these files as a modification of the project.
Therefore, the IsModified flag is very limited in meaning.
ICaActiveProject::RefreshFiles This method is no longer required.
ICaActiveProject::SaveTo Not supported at this time.
Application Management
ICaApplications::Import The tool automation supports this command.
ICaApplication::FileName The method always returns the shared application file name:
Application.cfgx.
ICaApplication::FullPath The new project handling always calls the shared application file
name. Therefore, the method always returns the full path of the
Application.cfgx file.
ICaApplication::Remove Removes the application directly from the system. The DeleteFromDisk
parameter has no effect.
ICaActiveApplication::Files Previously not supported and obsolete. The new project and application
management considers every file below the application folder as
belonging to the application.
ICaActiveApplication::IsModified Indicates whether the application has been modified. As with
ICaActiveProject::IsModified, added or removed files are not
considered as modifications.
ICaActiveApplication::Export The tool automation supports this command.
ICaActiveApplication::Rename The tool automation supports this command.
ICaActiveApplication::SaveAs The tool automation supports this command.

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.

SPI communication properties The following changes to SPI communication


properties might lead to existing scripts using the Time between words
property to not work correctly:

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.

ApplicationProcessToModel enumeration To avoid using the reserved


Python keyword None, the ApplicationProcessToModel enumeration value
None was changed to No.

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.

6.3 to 6.4 (dSPACE Note


Release 2019-B)
The following changes affect the data model and can cause code from
previous Releases to malfunction.

ICaProperty The former FeatureActivator property of an Ethernet Setup


function block is substituted by the IsDefaultGatewayEnabled property (display
name: 'Default gateway').

ICa Component: Configure Create-operation You can specify how


preconfigured application processes should be generated if you create a model
topology by importing an MCD file.

18
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation

The support of multiple application processes for MCD files is realized by an


additional parameter with the default value True. This can cause the unwanted
generation of multiple application processes in existing scripts.

6.2 to 6.3 (dSPACE No changes that affect the migration.


Release 2019-A)

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.

ICaRelation/ICaRelations The following changes affect automation scripts,


including the related XPath queries, that automate Bus Manager features and/or
access Bus Manager elements.
As of ConfigurationDesk 6.1p1 and Bus Manager 6.1p1, the following changes
apply to the BusMultiplexedIPdu primary role:
§ The Sequence number property of the Selector Field, Dynamic Part,
and Static Part entities is obsolete and was removed.
§ The Switch Code property of the Dynamic Part entity was renamed to
Selector field code.

6.0 to 6.1 (dSPACE Note


Release 2018-A)
The following changes affect the data model and can cause code from
previous Releases to malfunction.

ICaRelation/ICaRelations The following changes affect automation scripts,


including the related XPath queries, that automate Bus Manager features and/or
access Bus Manager elements.
The primary role BusFeature is divided into the following primary roles:
§ BusConfigurationEnableGlobal
§ BusCommunicationControllerEnableAccess
§ BusCommunicationControllerLinScheduleTableAccess
§ BusCommunicationControllerLinWakeUpAccess
§ BusFrameAccess
§ BusPduCyclicTimingControlAccess
§ BusPduEnableAccess
§ BusPduRawDataAccess
§ BusPduTriggerAccess
§ BusCounterSignalAccess
§ BusISignalValueAccess
§ BusPduRawDataInspection

19
May 2024 ConfigurationDesk Automating Tool Handling
New Features of the Automation Interface and Migration Steps

§ BusPduRxStatusInspection
§ BusISignalValueInspection
§ BusSuspendFrameTransmissionManipulation
§ BusISignalOffsetValueManipulation
§ BusISignalOverwriteValueManipulation

ICaDataObject The following changes affect automation scripts that access


Bus Manager elements.
Name: The naming scheme for function ports of bus configurations has changed
from <name of bus configuration element>_<FunctionPortFunction>
to <name of bus configuration element> <Function Port
Function>. For example, the name of the function port to access a LIN
schedule table of a LIN master named MasterNode has changed from
MasterNode_ScheduleIndex to MasterNode Schedule Index.

5.7 to 6.0 (dSPACE Note


Release 2017-B)
The following changes affect the data model and can cause code from
previous releases to malfunction.

ICaApplicationMain SetCustomInformation / GetCustomInformation:


The possibility to set or to get the ExtendSignalChainOptions has been
removed. Use the properties ModelPortBlockStructure (grouped, ungrouped)
and ModelPortDataType (Float64, Inherited) of the relevant function block type
to set the appropriate values.

ICaComponent The following changes affect automation scripts, including


the related XPath queries, that automate Bus Manager features and/or access
Bus Manager elements.
§ Configure: The operations GenerateStructuredModel and
UpdateConnectedModelPortBlocks are obsolete and no longer supported.
Instead, use the following operations:
§ Generating a new Simulink model:
ICaAlgorithms::PropagateToSimulink with targetModel = <null>
§ Updating connected model port blocks:
ICaAlgorithms::PropagateToSimulink with targetModel =
<connected Simulink model>
§ Configure: The operations AddUserDefinedElement
and UndoUserDefinedChanges were renamed
to AddElementToCommunicationMatrix and
UndoChangesToCommunicationMatrix.

ICaRelation/ICaRelations The following changes affect automation scripts,


including the related XPath queries, that automate Bus Manager features and/or
access Bus Manager elements.
§ The role names of some bus configuration features changed:
§ BusIPduRawDataAccess changed to BusPduRawDataAccess.
§ BusIPduTriggerAccess changed to BusPduTriggerAccess.
§ BusIPduEnableAccess changed to BusPduEnableAccess.

20
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation

§ The role names of some Bus Manager elements changed:


§ BusIPdu changed to BusPdu.
§ BusCfgElement changed to BusConfigurationElement.
§ The primary role BusPhysicalChannel is divided into two new primary roles,
BusCanPhysicalChannel and BusLinPhysicalChannel.
§ The primary role BusCommunicationCluster is divided into
two new primary roles, BusCanCommunicationCluster and
BusLinCommunicactionCluster.
§ The primary role BusISignalIPdu is divided into the following primary roles:
§ BusISignalIPdu
§ BusUserDefinedIPdu
§ BusUserDefinedPdu
§ BusDcmIPdu
§ BusGeneralPurposeIPdu
§ BusGeneralPurposePdu
§ BusNmPdu
§ BusNPdu
§ The Pdu type property of the primary PDU roles is obsolete and was
removed. Instead, the following new properties are available according to the
primary PDU role:
§ Category (new BusPduCategory secondary role)
§ Diagnostic PDU type (new BusDiagnosticPdu secondary role)
§ XCP configuration (new BusXcpConfiguration secondary role)
§ The property Has user-defined changes is renamed to Changes to
communication matrix.

ICaWorkingView ShowSignalChain, ShowModelCommunication: The


parameter NewWindow is no longer supported. It always will be set to false.

ICaProperty EdgeType / TriggerCondition: The property Trigger of an


I/O trigger block provider is renamed from EdgeType to TriggerCondition
(e.g., Multi-Channel PWM Out).

5.6 to 5.7 (dSPACE Note


Release 2017-A)
The following changes affect the data model and can cause code from
previous releases to malfunction.

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

ICaDataObject/ICaActiveApplication If a link is created to a port that is not


part of the application, the port will be automatically added to the application.

ICaRelation/ICaRelations The following changes affect automation scripts,


including the related XPath queries, that automate Bus Manager features and/or
access Bus Manager elements.
§ The capitalization of the relation name CommunicationMatricesByECUS
changed to CommunicationMatricesByEcus.
§ The capitalization of the relation name
CommunicationMatricesByECUSWithProperties changed to
CommunicationMatricesByEcusWithProperties.
§ The primary role BusStaticPartISignalIPdu is divided into two roles,
BusISignalIPdu (new primary role) and BusStaticPartIPdu (secondary
role).
§ The primary role BusDynamicPartISignalIPdu is divided into two roles,
BusISignalIPdu (new primary role) and BusDynamicPartIPdu (secondary
role).
§ The role names and hierarchy of some ISignal properties changed.
§ Changed role names:
§ BusISignalToPduMapping changed to BusISignalToIPduMapping
§ BusCompuMethod changed to BusComputationMethod
§ BusCompuScale changed to BusComputationScale
§ Changed hierarchy (including changed role names):
Old Hierarchy New Hierarchy
BusISignal BusISignal
| BusISignalToPduMapping | BusISignalToIPduMapping
| | BusCodedType | BusCodedType
| | BusPhysicalType | BusPhysicalType
| | BusCompuMethod | BusComputationMethod
| | | BusCompuScale | | BusComputationScale
§ The Sequence number property of the BusISignalToIPduMapping role is
obsolete and was removed.
§ The role names and hierarchy of some IPDU properties changed.
§ Changed role names:
§ BusFrameTriggering changed to BusFrame
§ BusStartingTime changed to BusTimeOffset
§ BusRepeatingTime changed to BusTimePeriod
§ BusMinimalDelay changed to BusMinimumDelay

22
ConfigurationDesk Automating Tool Handling May 2024
Migrating From Prior Versions of ConfigurationDesk Tool Automation

§ Changed hierarchy (including changed role names):


BusPduTriggering was removed from the hierarchy. Additionally, the
hierarchy changed as follows:
Old Hierarchy New Hierarchy
BusIPdu BusIPdu
| BusPduTriggering | BusCyclicTiming
| | BusCyclicTiming | | BusTimeOffset
| | | BusStartingTime | | BusTimePeriod
| | | BusRepeatingTime | BusMinimumDelay
| | | BusMinimalDelay | BusEventControlledTiming
| | | | BusRepetitionPeriod
BusEventControlledTiming | BusCommunicationCluster
| | | BusRepetitionPeriod | | BusPhysicalChannel
| | | | | BusFrame
BusCommunicationCluster
| | | BusPhysicalChannel
| | | |
BusFrameTriggering
§ The following property names changed:
§ Minimal Delay changed to Minimum Delay
§ Maximal frame length changed to Maximum frame length
§ Wakeup over bus supported changed to Wake up over bus
supported
§ Pdu router configuration ID changed to PDU router
configuration ID
§ Pdu description changed to PDU description
§ Pdu type changed to PDU type
§ Max delta counter init(ial) changed to Max delta counter init
§ Max no new or repeated data changed to Maximum no new or
repeated data
§ Sync counter initial changed to Sync counter init
§ Is start bit Lsb changed to Is start bit LSB
§ Rx accept contained IPDU changed to RX accept contained IPDU
§ Allow Not-A-Number changed to Allow not-a-number
§ Maximal bit length changed to Maximum bit length

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.

5.4 to 5.5 (dSPACE ICaApplicationMain: SetCustomInformation and ICaComponent:


Release 2016-A) Configure return a value. In most cases, this value is None (e.g., in Python).

Note

Even if the returned value is not used, MATLAB-script clients should be


aware that a printout follows after calling one of the methods if no
semicolon ends the statement. This can cause unexpected output from
existing scripts.

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

The enumeration changes can cause code from previous releases to


malfunction.

AveragingLevel The DefinedByModel value was added to the AveragingLevel


enumeration. The enumeration has three values:
§ Precise: 1
§ Dynamic: 2
§ DefinedByModel: 3

ChannelType

Note

The ChannelType enumeration is obsolete. Do not use it.

DigitalOutputMode The values of the DigitalOutputMode enumeration


were changed. The values are now:
§ Unspecified: -1
§ Undefined: 0
§ Switch: 1
§ LowSideSwitch: 2
§ TriState: 3

Note

The TriState value is obsolete. Do not use it.

§ HighSideSwitch: 4
§ PushPull: 8

HighSideReference The values of the HighSideReference enumeration were


changed. The values are now:
§ Individual: 1
§ Vbat: 2
§ Unused: 3
§ Shared: 4
§ Shared2: 5

InitializationMode The values of the InitializationMode enumeration were


changed. They are now:
§ First: 1
§ Each: 2

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.

TransferType The enumeration value ExpectedLoadDescription has been


changed to LoadRejection. This means only the load rejection settings should
be transferred.

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:

Platform Management Since dSPACE Release 2014-A, a platform


automation API version supporting multi-processing-unit platforms is available
and enabled by default. For downward compatibility reasons, you can switch
back to the old version. Working with the old interfaces requires platform
automation API Version 1.0, the new interfaces with extended support of multi-
processing-unit systems require Version 2.0. You can also set the API version via
automation interface:
Application.Platformmanagement.PlatformAutomationAPIVersion = 1

Scanning registered hardware Creating a hardware topology by scanning


the registered hardware has been changed:
§ Use the name of the system to read its inventory and then call the Configure
method. For example, if the registered platform has the name SCALEXIO:
CreateArguments = [0, "Dummy topology name", "SCALEXIO"]

HardwareTopology.Configure("Create", CreateArguments)

§ If you want to create a hardware inventory by reading a registered single-


processing-unit system, it is possible to use the MAC address of the processing
unit, for example:
CreateArguments = [0, "Dummy topology name", "11:22:33:44:55:66"]

HardwareTopology.Configure("Create", CreateArguments)

Creating an application process via ICaAlgorithms When an application


process is created via ICaAlgorithms it is possible to indicate the parent
processing unit application. If the parent parameter is null, a new processing
unit application will be generated.
Algorithms.CreatePreconfiguredApplicationProcessAutomatically([MyModel],
MyProcessingUnitAplication)

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

Switch to Python 2.7 The import of the enumerations module changed:

Previously Now
From win32com.client import Enums From dspace.com import Enums

Change of the return type and parameter type of the ICaRelation


interface
§ GetElements and GetTopNodes return a collection of ICaObjects
§ Most of the element methods have parameters of (C#) type Object instead of
ICaDataObject

Additional hierarchy level in the application configuration The


processing unit has been added to the application configuration hierarchy in the
Executable Application table view. This has the following effects, illustrated by
the example of creating an application process:

Previously Now
# get the executable ExeApp = Relation. ExeApp = Relation.
application GetTopNodes().Item(0) GetTopNodes().Item(0)

# get processing unit – ProcUnitApp = Relation.


application GetElements(ExeApp).Item(0)

# create the AppProc = ExeApp.CreateChild AppProc = ProcUnitApp.


application process (ExeApp.DataObjectTypes.Item(0)) CreateChild(ProcUnitApp.
DataObjectTypes.Item(0))

Export of topologies to old XLS file format no longer supported The


export of components like the device topology or the external cable harness to
the XLS file format is no longer possible. Use the XLSX file format instead. Even
though creating or importing the XLS file format is currently still supported, it is
highly recommended to switch to the new format XLSX. The enumeration value
for XLS can be used like before.

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

Introduction to Automating ConfigurationDesk

Where to go from here Information in this section

Basics on the Automation Interface......................................................... 27


ConfigurationDesk's automation interface is COM-based and supports a
number of features and languages.

Scripting Environments and Languages for Tool Automation.................... 29


ConfigurationDesk supports automation by any COM-compatible
application.

Examples and Demo Files......................................................................... 30


Notes on examples and location of demo files.

Legend for Object Model Diagrams......................................................... 31


To help you understand the diagrams of ConfigurationDesk's object
model.

Information in other sections

ConfigurationDesk Tutorials on Automating Tool Handling


Guides you through projects to learn the basic steps in automating
ConfigurationDesk.

Basics on the Automation Interface

Features of ConfigurationDesk lets you automate most of its features:


ConfigurationDesk's § Creating a new project and application
automation interface
§ Adding and configuring a platform /external device
§ Accessing and editing data sets
§ Customizing the user interface

27
May 2024 ConfigurationDesk Automating Tool Handling
Introduction to Automating ConfigurationDesk

§ Configuring model port block data (refer to General Information on the


Model Interface Blockset (Model Interface Package for Simulink - Modeling
Guide ))
§ Setting the model save mode (refer to Handling Model Interface Package
for Simulink Preferences (Model Interface Package for Simulink - Modeling
Guide ))

Interface API type ConfigurationDesk's automation interface is an API which is implemented as a


COM object model. The Microsoft Component Object Model (COM) supports
communication between objects from different applications. It can be used by
any COM-compatible application, regardless of the programming language in
which it was developed.

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, ...

You can access ConfigurationDesk's automation interface:


§ Via ConfigurationDesk's internal Interpreter
§ Via an external interpreter
§ Via applications or further scripting environments

Note

There are limitations and recommendations when automating processes


that affect ConfigurationDesk and MATLAB. Refer to Limitations for
Automating ConfigurationDesk on page 290.

Related topics Basics

Basics on the Object Model in ConfigurationDesk..................................................................... 34

28
ConfigurationDesk Automating Tool Handling May 2024
Scripting Environments and Languages for Tool Automation

Examples

Examples and Demo Files.......................................................................................................... 30

Scripting Environments and Languages for Tool Automation

Introduction ConfigurationDesk supports automation by any COM-compatible application.


The ConfigurationDesk installation itself provides Python scripting environments
for tool automation. However, you can also use other scripting environments or
programming languages to automate ConfigurationDesk tasks.

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.

You can automate ConfigurationDesk by applications developed, for example,


with the following programming languages:
§ C#
§ C++
§ Visual Basic

Tip

If you use a programming environment that supports the Intellisense feature


such as Microsoft Visual Studio, this feature provides information about
ConfigurationDesk's API. Intellisense displays the properties and methods of
each interface together with the description that is also available via the
ConfigurationDesk API Reference on page 155.

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.

Related topics Basics

Limitations for Automating ConfigurationDesk....................................................................... 290


Using ConfigurationDesk to Edit and Execute Scripts.............................................................. 131

Examples and Demo Files

Examples Most examples are written in Python, but you can use any other supported
language to automate ConfigurationDesk.

The following topics provide examples for different use cases:


§ Automating Project Handling on page 42
§ Automating Signal Chain Configuration on page 46
§ Automating Hardware Resource Assignment on page 49
§ Automating Modeling of Application Processes and Tasks on page 53
§ Automating Build Process on page 55
§ Automating Platform Management on page 57
§ Working with ConfigurationDesk Events on page 59
§ Examples of Automating Bus Manager Features on page 95

Tip

§ For help on translating Python examples into C# or VB, refer to Code


Sequence Examples on page 120.
§ If you are not an experienced Python user and require basic information
on using Python scripts, refer to Basics on Python on page 132.

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

Related topics Basics

Best Practices for Automating ConfigurationDesk................................................................... 110


Using ConfigurationDesk to Edit and Execute Scripts.............................................................. 131

Legend for Object Model Diagrams

Introduction To help you understand the diagrams of ConfigurationDesk's object model.

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:

Indicator Title Description


Aggregation Indicates the dependency
between two elements. The
dependency is shown as a line
with a diamond. The diamond
points towards the aggregating
element. On the other side
of the line is the aggregated
element.
Element The thick border indicates that
this is the central element.
However, it can also be located
on the left or right side of
the illustration if the elements
lacks aggregating or aggregated
elements.
Collection The name and color indicate
that this is a collection element.

Interface The name and color indicate


that this is an interface element.

Enumeration The name and color indicate


that this is an enumeration
element.

31
May 2024 ConfigurationDesk Automating Tool Handling
Introduction to Automating ConfigurationDesk

Indicator Title Description


Event The name and color indicate
that this is an event interface
element.

Example The following example illustrates the above legend:

«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

Where to go from here Information in this section

Basics on the Object Model in ConfigurationDesk.................................... 34


ConfigurationDesk's COM-API consists of different kinds of elements
that are organized in a hierarchy.

Getting Basic Access to ConfigurationDesk.............................................. 40


Creating a COM connection to be able to automate ConfigurationDesk.

Automating Basic Tasks in ConfigurationDesk.......................................... 42


Automation examples to automate different tasks with the COM API.

Automating Bus Manager Features.......................................................... 61


The ConfigurationDesk automation interface provides some specific
elements for automating features of the Bus Manager.

Best Practices for Automating ConfigurationDesk.................................. 110


There are some tips and tricks that will make your work with the
ConfigurationDesk automation API easier.

Information in other sections

Model Interface Package for Simulink API Reference


Provides reference information on the API functions of the Model
Interface Package for Simulink.

Limitations for Automating ConfigurationDesk...................................... 290


ConfigurationDesk lets you automate most of its features, but there are a
few limitations for its automation interface.

33
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Basics on the Object Model in ConfigurationDesk


Introduction Any description of ConfigurationDesk automation needs to cover two main
topics:
§ The basic implementation types of the object model
§ The hierarchy of the object model

Where to go from here Information in this section

The Main Types of the Object Model........................................................ 34


The object model in ConfigurationDesk consists of different kinds of
elements such as collections, interfaces, and enumerations.

The Hierarchy of the Object Model.......................................................... 36


The hierarchy and main aspects of the object model.

The Main Types of the Object Model

Introduction The object model in ConfigurationDesk consists of different kinds of elements


such as collections, interfaces, and enumerations.

Collection elements Collection elements provide access to a list of elements of the same type.

ConfigurationDesk's collection elements mostly provide methods such as the


following:
§ Add: Lets you add an element to the collection.
§ Contains: Lets you check whether a specific element is a member of the
collection.
§ Item: Lets you access a specific element of the collection by its index, or for
some collections, by its name.

ConfigurationDesk's collection elements also provide properties such as the


following:
§ Count: Provides the number of elements in the collection.

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

# Get the currently active projects collection from the


# application object of ConfigurationDesk and
# iterates and prints out the project names
Projects = Application.Projects
for Project in Projects:
print(Project.Name)

Interfaces Interface elements provide access to the properties and methods of an object.
Thus, a collection also implements an interface with methods and properties.

ConfigurationDesk's interface elements provide various methods such as the


following:
§ Remove: Lets you remove the element from the collection.
§ Rename: Lets you rename the element.
§ Activate: Lets you activate the element.

ConfigurationDesk's interface elements can provide various properties such as


the following:
§ Name: Lets you get or possibly set the name of the element.
§ Description: Lets you get or possibly set the description text of the element.
§ Type: Lets you get the type of the element.

Example You can use the ICaActiveApplication interface to set the


description of your active application .

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.

Name Description Value


Minimized The main window is minimized. 0
Maximized The main window is maximized. 1
Restored The main window is restored. 2

This example works in ConfigurationDesk’s Internal Interpreter. It assumes


that the dSPACE enums module was imported via Import Script on
ConfigurationDesk's Automation ribbon or via an import statement in the script
file.
# Dispatch the ConfigurationDesk application
from win32com.client import Dispatch
ConfigurationDeskApplication =
Dispatch("ConfigurationDesk.Application")
# Import the enum from the ConfigurationDesk python module
# "ConfigurationDeskEnums.py"
from dspace.com import Enums
# Define Enums object.
CfgDeskDeskEnums = Enums(ConfigurationDeskApplication)
# Get the main window from the application object of
# ConfigurationDesk
MainWindow = ConfigurationDeskApplication.MainWindow
# Maximize the main window
MainWindow.State = CfgDeskDeskEnums.MainWindowState.Maximized
# Restore the main window
MainWindow.State = CfgDeskDeskEnums.MainWindowState.Restored

Related topics Examples

Examples and Demo Files.......................................................................................................... 30

The Hierarchy of the Object Model

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

Application handling For automated application handling, ConfigurationDesk provides different


interfaces for different tasks. Projects and applications are organized in the
appropriate collections, which form a hierarchy from the one-project root
collection down to the individual application collections. Every collection contains
appropriate element types (ICaProjectRoot, ICaProject, ICaApplication).

<<interface>>
ICaApplicationMain

<<interface>>
ICaProjectRoots

<<interface>>
ICaProjects

<<interface>>
ICaApplications

The ICaApplicationMain interface provides some properties for access to


open projects and applications.

<<interface>>
ICaApplicationMain

<<interface>>
ICaActiveProject

<<interface>>
ICaActiveApplication

The active application is accessible directly via the ICaApplicationMain


interface or from the active projects interface.

Component handling Configuring components is an important task in ConfigurationDesk, because it


provides the basic data for the signal chain elements. A component is a single
instance that lets you create appropriate root elements, e.g., if the component
represents the device topology , you can create devices .

37
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

<<interface>>
ICaActiveApplication

<<interface>>
ICaComponents

<<interface>> <<interface>>
ICaComponent ICaDataObject

<<interface>>
ICaDataObjectTypes

The ICaDataObjectTypes collection specifies the creatable types of an


ICaDataObject which serves as a root object in the component.

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.

Relations ConfigurationDesk automation uses the concept of relations to support


configuration tasks which are not covered by the object model. When you
assign hardware resources (channels) to function blocks or models to
application processes , you create specific relations between two or more
objects. The ICaRelationAccessors interface provides access to different
ICaRelationAccessor implementations which are designed for specific
tasks. For example, you can use the ChannelSets, HardwareRequirements,
ApplicableChannels, and AssignedChannels relations to configure the
hardware resource assignment for function blocks.

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.

Setting the elements of a relation The SetElements method sets the


child elements for a specified parent element. It has two parameters: the parent
element and a list of child elements to be set.
To remove all existing children from the relation, use the SetElements function
with an empty list as second parameter.

Algorithms The ICaAlgorithms interface provides easy access to tasks which can be
executed for one or more ICaDataObject by one call.

<<interface>>
ICaActiveApplication

<<interface>> Provides miscellaneous


ICaAlgorithms methods to access data
in ConfigurationDesk,
like creating model port
blocks or exporting
tables to XML

Not only configuration tasks are supported, it is also possible to export


the contents of tables , the Properties Browser , and the Conflicts
Viewer into XML files.

39
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Getting Basic Access to ConfigurationDesk

Opening a COM Connection to 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')

The actxserver('ConfigurationDesk.Application') command opens a


COM connection to ConfigurationDesk.

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;

5. Build and run the solution to instantiate ConfigurationDesk via its


automation interface.

40
ConfigurationDesk Automating Tool Handling May 2024
Getting Basic Access to ConfigurationDesk

Related topics Basics

Basics on the Automation Interface.......................................................................................... 27

Examples

Examples and Demo Files.......................................................................................................... 30

41
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Automating Basic Tasks in ConfigurationDesk


Introduction The program listings in this section shows the syntax to perform single tasks with
the internal interpreter as an example. You can use the examples to edit your
own script to automate ConfigurationDesk.

For information on the internal interpreter, refer to Using the Internal Interpreter
on page 138.

Where to go from here Information in this section

Automating Project Handling................................................................... 42


Automating basic tasks to manage ConfigurationDesk projects.

Automating Signal Chain Configuration.................................................. 46


Automating basic tasks to configure the signal chain.

Automating Hardware Resource Assignment........................................... 49


Automating basic tasks to assign hardware resources to function blocks.

Automating Modeling of Application Processes and Tasks........................ 53


Automating basic tasks to create and assign application processes and
tasks.

Automating Build Process........................................................................ 55


Automating the configuration of build options and executing the build
and download process.

Automating Platform Management......................................................... 57


Automating basic tasks to register platforms.

Working with ConfigurationDesk Events.................................................. 59


Using events triggered during ConfigurationDesk execution.

Automating Project Handling

Introduction Automating basic tasks to manage ConfigurationDesk projects .

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 project handling as of Release 2021‑B introduces the project location


concept and substitutes project roots. To support downward compatibility, the
COM interface structure remains unchanged.

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)

Activating a project location.


if Application.ProjectRoots.Contains(<project location path>):
ProjectLocation = Application.ProjectRoots.Item(<project location path>)
ProjectLocation.Activate()

Getting the active project location.


# Output the path of the active project location
ProjectLocation = Application.ActiveProjectRoot
ProjectLocation.PathName

Adding a project location.


ProjectLocation = Application.ProjectRoots.Add(<project location path>)

Removing a project location.


ProjectLocation.Remove()
Note: Active project locations cannot be removed.

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()

Opening a project backup.


Project = Application.Projects.OpenFromBackup(<archive path>,<new project name>,True)
Result: ConfigurationDesk opens the archived project. If the new name of the project is empty, the default
name from the archive is used.

Handling applications A ConfigurationDesk application is a part of a project that represents a specific


implementation. You can work with only one application at a time, and that
application must be activated.

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.

Related topics Basics

Handling ConfigurationDesk Projects and Applications (ConfigurationDesk Real-


Time Implementation Guide )
Legend for Object Model Diagrams.......................................................................................... 31

Automating Signal Chain Configuration

Introduction Automating basic tasks to configure the signal chain .

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)>)

Getting the names of function block properties.


# Output the name of a function block property.
FunctionInstance.Properties.Item(<index>).Name

Configuring function block properties.


if FunctionInstance.Properties.Contains(<index or property name>) is True:
FunctionInstance.Properties.Item(<index or property name>).Value = <value>

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)'

Creating a Simulink model interface .


ModelBlocks = []
Application.ActiveApplication.Algorithms.GenerateModelInterfaces(ModelBlocks)
Note: Call the function with a list of model port blocks or with an empty list for all unresolved blocks.
Mapping function ports to signal ports .
FunctionPort = FunctionInstance.Item(<model interface>).Item(<port>)
ModelPort = ModelTopology.Item(<behavior model>).Item(<model block>).Item(<port>)
Application.ActiveApplication.ConnectObjects(FunctionPort, ModelPort)

Creating an empty model topology .


from dspace.com import Enums
e = Enums(Application)
ModelTopology = Application.ActiveApplication.Components.Item('ModelTopology')
Args = [e.ModelTopologyCreateMode.EmptyTopology, '']
ModelTopology.Configure('Create', Args)

Adding a model to the model topology .


Args = []
Args.append(<model file path>)
Args.append(<True for analyse immediatly>)
Args.append(<Matlab initialization command or empty string>)
Args.append(<True for creating a preconfigured application process>)
# Optional parameter:
Args.append(<name or data object of the application process to assign the model to>)

ModelTopology.Configure('AddModel',Args)

Details on the AssignedProviders relation The AssignedProviders


relation manages the feature provider that is assigned to a provider request of a
function block:
§ Getting the provider object assigned to the specified provider request object by
using the GetElements function of the relation.
§ Parameter: ICaDataObject - Provider request

48
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk

§ Assigning a supported provider to the specified provider request by using the


SetElements function of the relation.
§ First parameter: ICaDataObject - Provider request
§ Second parameter: list[ICaDataObject] - A list containing the provider
to be assigned.
§ Removing the provider assignment from the specified provider request by
using the SetElements function of the relation.
§ First parameter: ICaDataObject - Provider request
§ Second parameter: list[ICaDataObject] - An empty list to remove the
provider assignment.

Related topics Basics

Basics on Automating Bus Manager Features............................................................................ 61


Implementing I/O Functionality (ConfigurationDesk Real-Time Implementation
Guide )
Legend for Object Model Diagrams.......................................................................................... 31
Specifying the Model Interface (ConfigurationDesk Real-Time Implementation
Guide )

Automating Hardware Resource Assignment

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)

Getting assignable channel sets


AppAlgorithms = Application.ActiveApplication.Algorithms
ChannelSets = AppAlgorithms.GetAssignableChannelSets (<function block instance or electrical
interface>)
# Ouput the name of the channel set:
ChannelSets.Item(<index>).Name

Assigning channel sets


Application.ActiveApplication.Algorithms.AssignChannelSet(<function block instance>,<channel
set>,False)
Result: A channel set is assigned to the function block. If you set the last parameter to True, the algorithm
also assigns channels.

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

Details on the ChannelSets relation The ChannelSets relation lets you


manage the channel set of an electrical interface:
§ Getting the list of all supported non-conflicting channel sets for a given
function block or an electrical interface by using the GetElements function
of the relation.
§ Parameter: ICaDataObject - Either a function block or an electrical
interface
For function blocks with multiple electrical interfaces, you have to use the
ICaDataObject of each electrical interface. The ICaDataObject of the
function block returns only the list of channel sets for the first electrical
interface.

Tip

The AllChannelSets relation is a special version of the ChannelSets


relation that returns all channel sets including the conflicting channel sets.

§ Assigning a supported channel set by using the SetElements function of the


relation.
§ First parameter: ICaDataObject - Either a function block or an electrical
interface
For function blocks with multiple electrical interfaces, you have to use the
ICaDataObject of each electrical interface. If you use the ICaDataObject
of the function block, you set only the first electrical interface.
§ Second parameter: list[ICaDataObject] - A list containing the channel
set to be assigned.
Note: In contrast to the GetElements function you can assign a conflicting
channel set.
§ Removing the channel set assignment by using the SetElements function of
the relation.
§ First parameter: ICaDataObject - Either a function block or an electrical
interface
For function blocks with multiple electrical interfaces, you have to use the
ICaDataObject of each electrical interface. If you use the ICaDataObject
of the function block, you remove only the first electrical interface.
§ Second parameter: list[ICaDataObject] - An empty list to remove the
channel set assignment.

Details on the AssignedChannels relation The AssignedChannels


relation lets you manage the channels that are assigned to a hardware
requirement:
§ Getting the channel which is assigned to the given hardware requirement
object (channel request ) by using the GetElements function.
§ Parameter: ICaDataObject – Hardware requirement
§ Assigning a supported channel to the given hardware requirement object by
using the SetElements function of the relation.
§ First parameter: ICaDataObject – Hardware requirement
§ Second parameter: list[ICaDataObject] - A list containing the channel
to be assigned.

52
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk

§ Removing the channel assignment for a hardware requirement by using the


SetElements function of the relation.
§ First parameter: ICaDataObject – Hardware requirement
§ Second parameter: list[ICaDataObject] - An empty list to remove the
assignment.

Related topics Basics

Basics on Hardware Resource Assignment (ConfigurationDesk Real-Time


Implementation Guide )
Legend for Object Model Diagrams.......................................................................................... 31
The Hierarchy of the Object Model........................................................................................... 36

Automating Modeling of Application Processes and Tasks

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 an application process.


ApplicationProcess =
PUApplication.CreateChild(PUApplication.DataObjectTypes.Item('ApplicationProcess'))
ApplicationProcess.Name = 'MyApplicationProcess'
Result:
A new application process is created in the specified processing unit application .
Assigning a model to an application process.
ModelTopology = Application.ActiveApplication.Components.ModelTopology
Model = ModelTopology.Item(<model name>)
ApplicationProcess = PUApplication.Item(<application process name>)
ATMRelation.AddElements(ApplicationProcess, [Model])

Creating a task
Task = ApplicationProcess.CreateChild(ApplicationProcess.DataObjectTypes.Item('Task'))
Task.Name = 'MyTask'

Assigning a runnable function to a task


ModelTopology = Application.ActiveApplication.Components.ModelTopology
Model = ModelTopology.Item(<model name>)
ModelElements = ATMRelation.GetElements(Model)
RunFunc = ModelElements.Item(<name of runnable function>)
ATMRelation.AddElements(Task, [RunFunc])

Creating a timer event


TimerEvent = Task.CreateChild(Task.DataObjectTypes.Item('SystemTimerEvent'))
TimerEvent.Name = 'MyTimerEvent'

Related topics Basics

Legend for Object Model Diagrams.......................................................................................... 31


Terms and Definitions for Building Executable Applications (ConfigurationDesk Real-
Time Implementation Guide )

54
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk

Automating Build Process

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)

Accessing build options to configure them.

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

Setting the values of the build properties.

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

Skipping the model code generation


ModelTopology = Application.ActiveApplication.Components.ModelTopology
ModelTopology.Configure('SkipModelBuild',[True])
Description: You set the SkipModelCodeGeneration flag for every model in the model topology .
Starting the build process and checking the results.
BuildResult = BuildManagement.Build()

# 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

Related topics Basics

Introducing the Build Process (ConfigurationDesk Real-Time Implementation


Guide )
Legend for Object Model Diagrams.......................................................................................... 31

Automating Platform Management

Introduction The main tasks of ConfigurationDesk’s platform management are to show


registered hardware and to load or unload real-time applications .

Note

Only the basic initialization of platform management automation is available


with ConfigurationDesk. To access the complete platform management API,
you must install a product set containing the Platform API Package such as
ControlDesk .

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

Registering the hardware.


RegistrationInfo = PlatformManagement.CreatePlatformRegistrationInfo(e.PlatformType.SCALEXIO)
RegInfo = RegistrationInfo.RegistrationInfos.Add()
RegInfo.IPAddress = <IP address>
Platform = PlatformManagement.RegisterPlatform(RegistrationInfo)

Removing all hardware registrations.


PlatformManagement.RecentPlatformConfiguration.RemoveAll()

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()

Now ConfigurationDesk searches for registered hardware in the connected


network on startup.

Related topics Basics

Managing Real-Time Hardware (ConfigurationDesk Real-Time Implementation


Guide )

References

PlatformManagement / IPmPlatformManagement <<Interface>> (ControlDesk


Automation )

58
ConfigurationDesk Automating Tool Handling May 2024
Automating Basic Tasks in ConfigurationDesk

Working with ConfigurationDesk Events

Introduction You can use events for tool automation that are triggered during the execution
of ConfigurationDesk.

Note

Do not confuse ConfigurationDesk events with I/O events , timer


events , or software events that are triggered during the execution of
the real-time application .

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 application and build events are accessible through the


ICaApplicationEvents interface. To use these events, the dispatch method
must be called with an appropriate class that implements all event
callbacks. This is the ApplicationEvents class in the following listing.
The DispatchWithEvents method must be called with the event provider.
For the ICaApplicationEvents event interface, the event provider is the
ConfigurationDesk application itself.
class MainDemoController(object):
(...)
def ConnectToEvents(self):
(...)
self.ApplicationEvents = client.DispatchWithEvents(self.ConfigurationDeskApplication, ApplicationEvents)

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

The following listing shows a simple example.


class ApplicationEvents(object):
def OnStarted(self):
PrintMessage("OnStarted")
(...)

class ProjectEvents(object):
def OnProjectRootUpdating(self, args):
PrintMessage("OnProjectRootUpdating")
(...)

def PrintMessage(Message):
print(Message)

Related topics Examples

Examples and Demo Files.......................................................................................................... 30

60
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Automating Bus Manager Features


Introduction The ConfigurationDesk automation interface provides some specific elements for
automating features of the Bus Manager.

Where to go from here Information in this section

Basics on Automating Bus Manager Features........................................... 61


You can automate Bus Manager features via various interfaces, and easily
access elements of the Bus Manager.

Accessing Communication Matrix Elements Sorted by Clusters via


XPath...................................................................................................... 63
Provided relation for accessing communication matrix elements sorted by
clusters via XPath.

Accessing Communication Matrix Elements Sorted by ECUs via


XPath...................................................................................................... 66
Provided relation for accessing communication matrix elements sorted by
ECUs via XPath.

Accessing Bus Configuration Elements via XPath..................................... 69


Provided relation for accessing bus configuration elements via XPath.

Accessing Element Properties via XPath................................................... 91


Provided relations for accessing the properties of communication matrix
elements and bus configuration elements via XPath.

Examples of Automating Bus Manager Features...................................... 95


Examples of configuring a bus configuration, modifying communication
matrices, and automating frequently performed tasks.

Basics on 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

§ Assign and remove communication matrix elements to and from bus


configurations.
§ Configure bus configurations.
§ Copying and pasting entire bus configurations or copying, cutting, and pasting
individual bus configuration elements.
§ Specify user-defined settings for communication matrix elements and export
overviews of the modified communication matrix elements.
§ Replace the currently assigned communication matrix of a bus configuration
by another communication matrix.
§ Generate bus simulation containers that contain bus configurations of the
ConfigurationDesk application.

For examples of automating Bus Manager features, refer to Examples of


Automating Bus Manager Features on page 95.

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.

Examples Avoid accessing elements via XPath as follows:


1 # Accessing the second ECU
2 '//BusEcu[2]'
3
4 # Accessing the third BusContainerIPdu of the first ECU
5 '//BusEcu[1]/BusContainerIPdu[3]'

Instead, access elements via XPath as follows:


1 # Accessing all elements with the 'RX' direction below all
2 # ECUs with the name 'Node3'
3 '//BusEcu[@Name = "Node3"]/*[@Direction = "RX"]'
4
5 # Accessing all ISignals whose name contains '_2' below all ISignal IPDUs
6 # with the 'RX' direction
7 '//BusISignalIPdu[@Direction = "RX"]/BusISignal[contains(@Name, "_2")]'
8
9 # Accessing all elements that are two levels below all LIN bus systems
10 '//BusSystemLin/*/*'

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

The syntax of most bus configuration feature role names is:


§ Bus<BusConfigurationFeatureName>Access for features of bus
configuration elements that are assigned to the Simulated ECUs bus
configuration part
§ Bus<BusConfigurationFeatureName>Inspection for features of bus
configuration elements that are assigned to the Inspection bus
configuration part
§ Bus<BusConfigurationFeatureName>Manipulation for features of
bus configuration elements that are assigned to the Manipulation bus
configuration part
For example, the role name of the ISignal Value feature is
BusISignalValueAccess if the related ISignal is assigned to the
Simulated ECUs part and BusISignalValueInspection if the ISignal is
assigned to the Inspection part of a bus configuration.
The Element Type column of bus configuration tables indicates the role
names. For example, the element type of the PDU Trigger feature is Bus
PDU Trigger Access. The features's role name is BusPduTriggerAccess.

Accessing Communication Matrix Elements Sorted by Clusters via XPath

Introduction ConfigurationDesk's automation interface provides a relation for accessing


communication matrix elements sorted by clusters . By using this relation,
you can access these elements via XPath expressions.

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 ).

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Communication /BusCommunicationMatrix - § Bus System CAN
Matrix § Bus System LIN
Bus System CAN /BusSystemCan Bus Communication Matrix Bus CAN Communication
Cluster
Bus System LIN /BusSystemLin Bus Communication Matrix Bus LIN Communication
Cluster
Bus CAN /BusCanCommunicationCluster Bus System CAN Bus Network Node
Communication
Cluster
Bus LIN /BusLinCommunicationCluster Bus System LIN Bus Network Node
Communication
Cluster
Bus Network Node /BusNetworkNode § Bus CAN Communication § Bus CAN Physical
Cluster Channel
§ Bus LIN Communication § Bus LIN Physical
Cluster Channel
Bus CAN Physical /BusCanPhysicalChannel Bus Network Node § Bus Container IPDU
Channel § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus LIN Physical /BusLinPhysicalChannel Bus Network Node § Bus ISignal IPDU
Channel § Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus Container IPDU /BusContainerIPdu § Bus CAN Physical Channel § Bus Multiplexed IPDU
§ (TX)
§ Bus Secured IPDU § Bus Secured IPDU
§ (RX) § Bus ISignal IPDU

64
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus User-Defined IPDU
Bus Multiplexed /BusMultiplexedIPdu § Bus CAN Physical Channel Bus ISignal IPDU
§ (TX)
IPDU § Bus Container IPDU
§ (RX) § Bus Secured IPDU

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

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus ISignal /BusISignal § (TX) § Bus ISignal IPDU -
§ Bus Extended Multiplexed
§ (RX) 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 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")]'

Accessing Communication Matrix Elements Sorted by ECUs via XPath

Introduction ConfigurationDesk's automation interface provides a relation for accessing


communication matrix elements sorted by ECUs . By using this relation, you
can access these elements via XPath expressions.

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 ).

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Communication /BusCommunicationMatrix - Bus ECU
Matrix
Bus ECU /BusEcu Bus Communication § Bus Container IPDU
Matrix § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus Container IPDU /BusContainerIPdu § Bus ECU § Bus Multiplexed IPDU
§ (TX)
§ Bus Secured IPDU § Bus Secured IPDU
§ (RX) § Bus ISignal IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus User-Defined IPDU
Bus Multiplexed IPDU /BusMultiplexedIPdu § Bus ECU Bus ISignal IPDU
§ (TX)
§ Bus Container IPDU
§ (RX) § Bus Secured IPDU

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

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus General-Purpose /BusGeneralPurposePdu § (TX) Bus ECU Bus Global Time Domain
PDU
§ (RX)
Bus DCM IPDU /BusDcmIPdu § (TX) § Bus ECU -
§ Bus Container IPDU
§ (RX) § Bus Secured IPDU

Bus NMPDU /BusNmPdu § (TX) Bus ECU § Bus ISignal Group


§ Bus ISignal
§ (RX)
Bus NPDU /BusNPdu § (TX) Bus ECU -

§ (RX)
Bus User-Defined IPDU /BusUserDefinedIPdu § (TX) § Bus ECU -
§ Bus Container IPDU
§ (RX) § Bus Secured IPDU

Bus User-Defined PDU /BusUserDefinedPdu § (TX) Bus ECU -

§ (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

Accessing Bus Configuration Elements via XPath

Introduction ConfigurationDesk's automation interface provides a relation for accessing bus


configuration elements. By using this relation, you can access these elements
via XPath expressions.

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.

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfiguration - Bus Configuration Part
Bus Access Requests
Bus Configuration /BusConfigurationPartBusAccess Bus Configuration § Bus Communication
Part Bus Access Requests Matrix
Requests § Bus Frame Capture
§ Bus Frame Gateway
Bus Communication /BusCommunicationMatrix Bus Configuration Part Bus § Bus System CAN
Matrix Access Requests § Bus System LIN
Bus Frame Capture /BusFrameCapture Bus Configuration Part Bus Bus System CAN
Access Requests
Bus Frame Gateway /BusFrameGateway Bus Configuration Part Bus Bus System CAN
Access Requests
Bus System CAN /BusSystemCan § Bus Communication § Bus CAN
Matrix Communication Cluster
§ Bus Frame Capture § Bus CAN Frame
§ Bus Frame Gateway Capture Cluster
§ Bus CAN Frame
Gateway Cluster
Bus System LIN /BusSystemLin Bus Communication Bus LIN Communication
Matrix Cluster

69
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus CAN /BusCanCommunicationCluster Bus System CAN § Bus Access Request
Communication Simulated ECUs
Cluster § Bus Access Request
Inspection
§ Bus Access Request
Manipulation
Bus CAN Frame /BusCanFrameCaptureCluster Bus System CAN Bus Access Request
Capture Cluster Inspection
Bus CAN Frame /BusCanFrameGatewayCluster Bus System CAN Bus Access Request
Gateway Cluster Gateways
Bus LIN /BusLinCommunicationCluster Bus System LIN § Bus Access Request
Communication Simulated ECUs
Cluster § Bus Access Request
Inspection
§ Bus Access Request
Manipulation
Bus Access Request /BusAccessRequestSimulatedEcus § Bus CAN Function Block
Simulated ECUs Communication Cluster
§ Bus LIN Communication
Cluster
Bus Access Request /BusAccessRequestInspection § Bus CAN Function Block
Inspection Communication Cluster
§ Bus CAN Frame Capture
Cluster
§ Bus LIN Communication
Cluster
Bus Access Request /BusAccessRequestManipulation § Bus CAN Function Block
Manipulation Communication Cluster
§ Bus LIN Communication
Cluster
Bus Access Request /BusAccessRequestGateways Bus CAN Frame Gateway Function Block
Gateways Cluster
Function Block /FunctionBlock § Bus Access Request -
Simulated ECUs
§ Bus Access Request
Inspection
§ Bus Access Request
Manipulation
§ Bus Access Request
Gateways

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.

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfiguration - § Bus Configuration Enable
Global
§ Bus Configuration Part
Simulated ECUs
Bus Configuration /BusConfigurationEnableGlo Bus Configuration Function Port
Enable Global bal

70
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfigurationPartSimul Bus Configuration Bus Communication Matrix
Part Simulated atedEcus
ECUs
Bus /BusCommunicationMatrix Bus Configuration Part Bus ECU
Communication Simulated ECUs
Matrix
Bus Partial /BusPartialNetworkClusters Bus Communication Matrix Bus Partial Network Cluster
Network Clusters
Bus Partial /BusPartialNetworkCluster Bus Partial Network Bus Partial Network Cluster
Network Cluster Clusters Enable Access
Bus ECU /BusEcu Bus Communication Matrix § Bus CAN Communication
Controller
§ Bus LIN Communication
Controller
§ Bus Container IPDU
§ Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended Multiplexed
IPDU
§ Bus General-Purpose IPDU
§ Bus General-Purpose PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus CAN /BusCanCommunicationContro Bus ECU § Bus Communication
Communication ller Controller Enable Access
Controller § Bus J1939 Network
Management Enable
Access
Bus LIN /BusLinCommunicationContro Bus ECU § Bus Communication
§ (LIN
Communication ller Controller Enable Access
master)
Controller § Bus Communication
§ (LIN Controller LIN Schedule
slave) Table Access
§ Bus Communication
Controller LIN Wake-Up
Access
Bus Container /BusContainerIPdu Bus ECU § Bus Frame Access
§ (TX)
IPDU § Bus J1939 PDU Priority
§ (RX) Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
Bus Multiplexed /BusMultiplexedIPdu Bus ECU § Bus Frame Access
§ (TX)
IPDU § Bus PDU Enable Access
§ (RX) § Bus J1939 PDU Priority
Access
§ Bus PDU Raw Data Access

71
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Selector Field
Access
§ Bus PDU User Code Access
Bus Secured IPDU /BusSecuredIPdu § (TX) Bus ECU § Bus Frame Access
§ Bus J1939 PDU Priority
§ (RX) Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Status Access
§ Bus PDU SecOC Access
§ Bus PDU User Code Access
Bus ISignal IPDU /BusISignalIPdu § (TX) Bus ECU § Bus Frame Access
§ Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
§ Bus ISignal Group
§ Bus ISignal
Bus Extended /BusExtendedMultiplexedIPd § (TX) Bus ECU § Bus Frame Access
Multiplexed IPDU u § Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
§ Bus ISignal
Bus General- /BusGeneralPurposeIPdu § (TX) Bus ECU § Bus Frame Access
Purpose IPDU § Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access

72
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus PDU Trigger Access
§ Bus PDU User Code Access
Bus General- /BusGeneralPurposePdu § (TX) Bus ECU § Bus Frame Access
Purpose PDU § Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
§ Bus Global Time Domain
Bus DCM IPDU /BusDcmIPdu § (TX) Bus ECU § Bus Frame Access
§ Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
Bus NMPDU /BusNmPdu § (TX) Bus ECU § Bus Frame Access
§ Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
§ Bus ISignal Group
§ Bus ISignal
Bus NPDU /BusNPdu § (TX) Bus ECU § Bus Frame Access
§ Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access

73
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus User-Defined /BusUserDefinedIPdu § (TX) Bus ECU § Bus Frame Access
IPDU § Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
Bus User-Defined /BusUserDefinedPdu § (TX) Bus ECU § Bus Frame Access
PDU § Bus PDU Cyclic Timing
§ (RX) Control Access
§ Bus PDU Enable Access
§ Bus PDU Length Access
§ Bus PDU Raw Data Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status Access
§ Bus PDU Trigger Access
§ Bus PDU User Code Access
Bus ISignal Group /BusISignalGroup § Bus ISignal IPDU § Bus ISignal Group End
§ (TX)
§ Bus NMPDU to End Protection Status
§ (RX) Access
§ Bus ISignal
Bus ISignal /BusISignal § (TX) § Bus ISignal IPDU § Bus Counter Signal Access
§ Bus Extended § Bus ISignal Value Access
§ (RX) Multiplexed IPDU
§ Bus NMPDU
§ Bus ISignal Group
Bus Global Time /BusGlobalTimeDomain § (TX) Bus General-Purpose PDU § Bus GTS Time Base Data
Domain Access
§ (RX) § Bus GTS Transmission
Control Access
§ Bus GTS Validation Access
Bus Partial /BusPartialNetworkClusterE Bus Partial Network Cluster Function Port
Network Cluster nableAccess
Enable Access
Bus /BusCommunicationControlle § Bus CAN Communication Function Port
Communication rEnableAccess Controller
Controller Enable § Bus LIN Communication
Access Controller
Bus /BusCommunicationControlle Bus LIN Communication Function Port
Communication rLinScheduleTableAccess Controller
Controller LIN
Schedule Table
Access

74
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus /BusCommunicationControlle Bus LIN Communication Function Port
Communication rLinWakeUpAccess Controller
Controller LIN
Wake-Up Access
Bus J1939 /BusJ1939NetworkManagement Bus CAN Communication -
Network EnableAccess Controller
Management
Enable Access
Bus Frame Access /BusFrameAccess § Bus Container IPDU Function Port
§ Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU Cyclic /BusPduCyclicTimingControl § Bus ISignal IPDU Function Port
Timing Control Access § Bus Extended
Access Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU Enable /BusPduEnableAccess § Bus Multiplexed IPDU Function Port
Access § Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus J1939 PDU /BusJ1939PduPriorityAccess § Bus Container IPDU Function Port
Priority Access § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU

75
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus NPDU
§ Bus User-Defined IPDU
Bus PDU Length /BusPduLengthAccess § Bus ISignal IPDU Function Port
Access § Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU Raw Data /BusPduRawDataAccess § Bus Container IPDU Function Port
Access § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU RX /BusPduRxInterruptAccess § Bus Container IPDU § Function Port
Interrupt Access § Bus Multiplexed IPDU § Event Port
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU RX Status /BusPduRxStatusAccess § Bus Container IPDU Function Port
Access § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU

76
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU SecOC /BusPduSecOCAccess Bus Secured IPDU Function Port
Access
Bus PDU Selector /BusPduSelectorFieldAccess Bus Multiplexed IPDU Function Port
Field Access
Bus PDU Trigger /BusPduTriggerAccess § Bus ISignal IPDU Function Port
Access § Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU User /BusPduUserCodeAccess § Bus Multiplexed IPDU Function Port
Code Access § Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus ISignal Group /BusISignalGroupEndToEndPr Bus ISignal Group Function Port
End to End otectionStatusAccess
Protection Status
Access
Bus Counter Signal /BusCounterSignalAccess Bus ISignal Function Port
Access
Bus ISignal Value /BusISignalValueAccess Bus ISignal Function Port
Access
Bus GTS Time Base /BusGtsTimeBaseDataAccess Bus Global Time Domain Function Port
Data Access
Bus GTS /BusGtsTransmissionControl Bus Global Time Domain Function Port
Transmission Access
Control Access
Bus GTS Validation /BusGtsValidationAccess Bus Global Time Domain Function Port
Access

77
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Function Port /FunctionPort § § Bus Configuration Enable -
(function Global
inport) § Bus Partial Network
§ Cluster Enable Access
(function § Bus Communication
outport) Controller Enable Access
§ Bus Communication
Controller LIN Schedule
Table Access
§ Bus Communication
Controller LIN Wake-Up
Access
§ Bus Frame Access
§ Bus PDU Cyclic Timing
Control Access
§ Bus PDU Enable Access
§ Bus J1939 PDU Priority
Access
§ Bus PDU Length Access
§ Bus PDU Raw Data
Access
§ Bus PDU RX Interrupt
Access
§ Bus PDU RX Status
Access
§ Bus PDU SecOC Access
§ Bus PDU Selector Field
Access
§ Bus PDU Trigger Access
§ Bus PDU User Code
Access
§ Bus ISignal Group End
to End Protection Status
Access
§ Bus Counter Signal
Access
§ Bus ISignal Value Access
§ Bus GTS Time Base Data
Access
§ Bus GTS Transmission
Control Access
§ Bus GTS Validation
Access
Event Port /EventPort Bus PDU RX Interrupt -
Access

Accessing the Inspection 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 Inspection part.

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfiguration - § Bus Configuration
Enable Global
§ Bus Configuration Part
Inspection

78
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfigurationEnableGlobal Bus Configuration Function Port
Enable Global
Bus Configuration /BusConfigurationPartInspection Bus Configuration § Bus Communication
Part Inspection Matrix
§ Bus Frame Capture
Bus /BusCommunicationMatrix Bus Configuration Part § Bus CAN
Communication Inspection Communication Cluster
Matrix § Bus LIN Communication
Cluster
Bus Frame Capture /BusFrameCapture Bus Configuration Part § Bus Frame Capture Data
Inspection Inspection
§ Bus Frame Capture Filter
Bus CAN /BusCanCommunicationCluster Bus Communication Bus CAN Physical Channel
Communication Matrix
Cluster
Bus LIN /BusLinCommunicationCluster Bus Communication Bus LIN Physical Channel
Communication Matrix
Cluster
Bus Frame Capture /BusFrameCaptureDataInspection Bus Frame Capture Function Port
Data Inspection
Bus Frame Capture /BusFrameCaptureFilter Bus Frame Capture § Bus Frame Capture Filter
Filter Control Inspection
§ Bus CAN Filter Rule
Bus CAN Physical /BusCanPhysicalChannel Bus CAN § Bus Container IPDU
Channel Communication Cluster § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus LIN Physical /BusLinPhysicalChannel Bus LIN Communication § Bus ISignal IPDU
Channel Cluster § Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus Frame Capture /BusFrameCaptureFilterControlIn Bus Frame Capture Function Port
Filter Control spection Filter
Inspection

79
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus CAN Filter /BusCanFilterRule Bus Frame Capture -
Rule Filter
Bus Container /BusContainerIPdu Bus CAN Physical § Bus J1939 PDU Priority
(RX)
IPDU Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
Bus Multiplexed /BusMultiplexedIPdu Bus CAN Physical § Bus J1939 PDU Priority
(RX)
IPDU Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU Selector Field
Inspection
§ Bus PDU User Code
Inspection
Bus Secured IPDU /BusSecuredIPdu (RX) Bus CAN Physical § Bus J1939 PDU Priority
Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU SecOC
Inspection
§ Bus PDU User Code
Inspection
Bus ISignal IPDU /BusISignalIPdu (RX) § Bus CAN Physical § Bus J1939 PDU Priority
Channel Inspection
§ Bus LIN Physical § Bus PDU Length
Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
§ Bus ISignal Group
§ Bus ISignal
Bus Extended /BusExtendedMultiplexedIPdu (RX) Bus CAN Physical § Bus J1939 PDU Priority
Multiplexed IPDU Channel Inspection
§ Bus PDU Length
Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
§ Bus ISignal

80
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus General- /BusGeneralPurposeIPdu (RX) § Bus CAN Physical § Bus J1939 PDU Priority
Purpose IPDU Channel Inspection
§ Bus LIN Physical § Bus PDU Length
Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus General- /BusGeneralPurposePdu (RX) § Bus CAN Physical § Bus PDU Length
Purpose PDU Channel Inspection
§ Bus LIN Physical § Bus PDU Raw Data
Channel Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus DCM IPDU /BusDcmIPdu (RX) § Bus CAN Physical § Bus J1939 PDU Priority
Channel Inspection
§ Bus LIN Physical § Bus PDU Length
Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus NMPDU /BusNmPdu (RX) § Bus CAN Physical § Bus PDU Length
Channel Inspection
§ Bus LIN Physical § Bus PDU Raw Data
Channel Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
§ Bus ISignal Group
§ Bus ISignal
Bus NPDU /BusNPdu (RX) § Bus CAN Physical § Bus J1939 PDU Priority
Channel Inspection
§ Bus LIN Physical § Bus PDU Length
Channel Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus User-Defined /BusUserDefinedIPdu (RX) § Bus CAN Physical § Bus J1939 PDU Priority
IPDU Channel Inspection
§ Bus LIN Physical § Bus PDU Length
Channel Inspection
§ Bus PDU Raw Data
Inspection

81
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus User-Defined /BusUserDefinedPdu (RX) § Bus CAN Physical § Bus PDU Length
PDU Channel Inspection
§ Bus LIN Physical § Bus PDU Raw Data
Channel Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU User Code
Inspection
Bus ISignal Group /BusISignalGroup § Bus ISignal IPDU § Bus ISignal Group End
(RX)
§ Bus NMPDU to End Protection Status
Inspection
§ Bus ISignal
Bus ISignal /BusISignal (RX) § Bus ISignal IPDU § Bus Counter Signal
§ Bus Extended Inspection
Multiplexed IPDU § Bus ISignal Value
§ Bus NMPDU Inspection
§ Bus ISignal Group
Bus J1939 PDU /BusJ1939PduPriorityInspection § Bus Container IPDU Function Port
Priority Inspection § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus NPDU
§ Bus User-Defined
IPDU
Bus PDU Length /BusPduLengthInspection § Bus ISignal IPDU Function Port
Inspection § Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined
IPDU
§ Bus User-Defined
PDU
Bus PDU Raw Data /BusPduRawDataInspection § Bus Container IPDU Function Port
Inspection § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU

82
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined
IPDU
§ Bus User-Defined
PDU
Bus PDU RX Status /BusPduRxStatusInspection § Bus Container IPDU Function Port
Inspection § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined
IPDU
§ Bus User-Defined
PDU
Bus PDU SecOC /BusPduSecOCInspection Bus Secured IPDU Function Port
Inspection
Bus PDU Selector /BusPduSelectorFieldInspection Bus Multiplexed IPDU Function Port
Field Inspection
Bus PDU User /BusPduUserCodeInspection § Bus Multiplexed IPDU Function Port
Code Inspection § Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined
IPDU
§ Bus User-Defined
PDU
Bus ISignal Group /BusISignalGroupEndToEndProtect Bus ISignal Group Function Port
End to End ionStatusInspection
Protection Status
Inspection

83
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Counter /BusCounterSignalInspection Bus ISignal Function Port
Signal Inspection
Bus ISignal Value /BusISignalValueInspection Bus ISignal Function Port
Inspection
Function Port /FunctionPort § § Bus Configuration -
(function Enable Global
inport) § Bus Frame Capture
§ Data Inspection
(function § Bus Frame Capture
outport) Filter Control
Inspection
§ Bus J1939 PDU
Priority Inspection
§ Bus PDU Length
Inspection
§ Bus PDU Raw Data
Inspection
§ Bus PDU RX Status
Inspection
§ Bus PDU SecOC
Inspection
§ Bus PDU Selector
Field Inspection
§ Bus PDU User Code
Inspection
§ Bus ISignal Group
End to End Protection
Status Inspection
§ Bus Counter Signal
Inspection
§ Bus ISignal Value
Inspection

Accessing the Manipulation 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 Manipulation part.

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfiguration - § Bus Configuration Enable
Global
§ Bus Configuration Part
Manipulation
Bus Configuration /BusConfigurationEnableGl Bus Configuration Function Port
Enable Global obal
Bus Configuration /BusConfigurationPartMani Bus Configuration Bus Communication Matrix
Part Manipulation pulation
Bus /BusCommunicationMatrix Bus Configuration Part § Bus CAN Communication
Communication Manipulation Cluster
Matrix § Bus LIN Communication
Cluster
Bus CAN /BusCanCommunicationClust Bus Communication Matrix Bus CAN Physical Channel
Communication er
Cluster

84
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus LIN /BusLinCommunicationClust Bus Communication Matrix Bus LIN Physical Channel
Communication er
Cluster
Bus CAN Physical /BusCanPhysicalChannel Bus CAN Communication § Bus Container IPDU
Channel Cluster § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended Multiplexed
IPDU
§ Bus General-Purpose IPDU
§ Bus General-Purpose PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus LIN Physical /BusLinPhysicalChannel Bus LIN Communication § Bus ISignal IPDU
Channel Cluster § Bus General-Purpose IPDU
§ Bus General-Purpose PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus Container IPDU /BusContainerIPdu Bus CAN Physical Channel § Bus Frame Length
(TX)
Manipulation
§ Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
Bus Multiplexed /BusMultiplexedIPdu Bus CAN Physical Channel § Bus Frame Length
(TX)
IPDU Manipulation
§ Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus Secured IPDU /BusSecuredIPdu (TX) Bus CAN Physical Channel § Bus Frame Length
Manipulation
§ Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus PDU SecOC
Authenticator Invalidation
Manipulation
§ Bus PDU SecOC
Freshness Overwrite Value
Manipulation

85
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus PDU User Code
Manipulation
Bus ISignal IPDU /BusISignalIPdu (TX) § Bus CAN Physical § Bus Frame Length
Channel Manipulation
§ Bus LIN Physical Channel § Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
§ Bus ISignal Group
§ Bus ISignal
Bus Extended /BusExtendedMultiplexedIP (TX) Bus CAN Physical Channel § Bus Frame Length
Multiplexed IPDU du Manipulation
§ Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
§ Bus ISignal
Bus General- /BusGeneralPurposeIPdu (TX) § Bus CAN Physical § Bus Frame Length
Purpose IPDU Channel Manipulation
§ Bus LIN Physical Channel § Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus General- /BusGeneralPurposePdu (TX) § Bus CAN Physical § Bus Frame Length
Purpose PDU Channel Manipulation
§ Bus LIN Physical Channel § Bus Suspend Frame
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus DCM IPDU /BusDcmIPdu (TX) § Bus CAN Physical § Bus Frame Length
Channel Manipulation
§ Bus LIN Physical Channel § Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation

86
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus NMPDU /BusNmPdu (TX) § Bus CAN Physical § Bus Frame Length
Channel Manipulation
§ Bus LIN Physical Channel § Bus Suspend Frame
Transmission Manipulation
§ Bus PDU User Code
Manipulation
§ Bus ISignal Group
§ Bus ISignal
Bus NPDU /BusNPdu (TX) § Bus CAN Physical § Bus Frame Length
Channel Manipulation
§ Bus LIN Physical Channel § Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus User-Defined /BusUserDefinedIPdu (TX) § Bus CAN Physical § Bus Frame Length
IPDU Channel Manipulation
§ Bus LIN Physical Channel § Bus J1939 PDU Priority
Manipulation
§ Bus Suspend Frame
Transmission Manipulation
§ Bus Suspend PDU
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus User-Defined /BusUserDefinedPdu (TX) § Bus CAN Physical § Bus Frame Length
PDU Channel Manipulation
§ Bus LIN Physical Channel § Bus Suspend Frame
Transmission Manipulation
§ Bus PDU User Code
Manipulation
Bus ISignal Group /BusISignalGroup § Bus ISignal IPDU Bus ISignal
(TX)
§ Bus NMPDU
Bus ISignal /BusISignal (TX) § Bus ISignal IPDU § Bus Feature Switch
§ Bus Extended § Bus ISignal Offset Value
Multiplexed IPDU Manipulation
§ Bus NMPDU § Bus ISignal Overwrite Value
§ Bus ISignal Group Manipulation
Bus Feature Switch /BusFeatureSwitch Bus ISignal Function Port

Bus Frame Length /BusFrameLengthManipulati § Bus Container IPDU Function Port


Manipulation on § Bus Multiplexed IPDU
§ Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU

87
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus J1939 /BusJ1939PduPriorityManip § Bus Container IPDU Function Port
PDU Priority ulation § Bus Multiplexed IPDU
Manipulation § Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus NPDU
§ Bus User-Defined IPDU
Bus Suspend /BusSuspendFrameTransmiss § Bus Container IPDU Function Port
Frame Transmission ionManipulation § Bus Multiplexed IPDU
Manipulation § Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus PDU SecOC /BusPduSecOCAuthenticator Bus Secured IPDU Function Port
Authenticator InvalidationManipulation
Invalidation
Manipulation
Bus PDU SecOC /BusPduSecOCFreshnessOver Bus Secured IPDU Function Port
Freshness Overwrite writeValueManipulation
Value Manipulation
Bus Suspend /BusSuspendPduTransmissio § Bus Multiplexed IPDU Function Port
PDU Transmission nManipulation § Bus ISignal IPDU
Manipulation § Bus Extended
Multiplexed IPDU
§ Bus General-Purpose
IPDU
§ Bus DCM IPDU
§ Bus NPDU
§ Bus User-Defined IPDU
Bus PDU User Code /BusPduUserCodeManipulati § Bus Multiplexed IPDU Function Port
Manipulation on § Bus Secured IPDU
§ Bus ISignal IPDU
§ Bus Extended
Multiplexed IPDU

88
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

Element Type XPath Expression Symbol Parent Elements Child Elements


§ Bus General-Purpose
IPDU
§ Bus General-Purpose
PDU
§ Bus DCM IPDU
§ Bus NMPDU
§ Bus NPDU
§ Bus User-Defined IPDU
§ Bus User-Defined PDU
Bus ISignal Offset /BusISignalOffsetValueMan Bus ISignal Function Port
Value Manipulation ipulation
Bus ISignal /BusISignalOverwriteValue Bus ISignal Function Port
Overwrite Value Manipulation
Manipulation
Function Port /FunctionPort § § Bus Configuration -
(function Enable Global
inport) § Bus Frame Length
§ Manipulation
(function § Bus Suspend
outport) Frame Transmission
Manipulation
§ Bus J1939 PDU Priority
Manipulation
§ Bus PDU
SecOC Authenticator
Invalidation
Manipulation
§ Bus PDU SecOC
Freshness Overwrite
Value Manipulation
§ Bus PDU User Code
Manipulation
§ Bus Suspend
PDU Transmission
Manipulation
§ Bus Feature Switch
§ Bus ISignal Offset Value
Manipulation
§ Bus ISignal Overwrite
Value Manipulation

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.

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Configuration /BusConfiguration - § Bus Configuration
Enable Global
§ Bus Configuration Part
Gateways
Bus Configuration /BusConfigurationEnableGlobal Bus Configuration Function Port
Enable Global
Bus Configuration Part /BusConfigurationPartGateways Bus Configuration Bus Frame Gateway
Gateways

89
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Element Type XPath Expression Symbol Parent Elements Child Elements


Bus Frame Gateway /BusFrameGateway Bus Configuration Part Bus Frame Gateway
Gateways Direction
Bus Frame Gateway /BusFrameGatewayDirection Bus Frame Gateway Function Port
Direction
Bus Frame Gateway /BusFrameGatewayFilter Bus Frame Gateway § Bus Filter Control
Filter Gateways
§ Bus CAN Filter Rule
Bus Filter Control /BusFilterControlGateways Bus Frame Gateway Filter Function Port
Gateways
Bus CAN Filter Rule /BusCanFilterRule Bus Frame Gateway Filter -

Function Port /FunctionPort § Bus Configuration -


(function Enable Global
inport) § Bus Frame Gateway
Direction
§ Bus Filter Control
Gateways

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

Accessing Element Properties via XPath

Introduction ConfigurationDesk's automation interface provides special relations for


accessing the properties of communication matrix elements and bus
configuration elements via XPath expressions.

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

These relations are elements of the ICaRelations <<Collection>> on page 195


interface.

Note

The relations with properties decrease the performance. Access as few


properties as possible via these relations.

To access elements without their properties, use the


CommunicationMatricesByClusters, CommunicationMatricesByEcus, or
BusConfigurations relations instead.

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.

XPath expressions To access elements of communication matrices and bus configurations,


you can use the same XPath expressions as for the
CommunicationMatricesByClusters, CommunicationMatricesByEcus, and
BusConfigurations relations.

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.

XPath Expression Element Available For Description


Symbol in
Properties
Browser
/BusCanCommunicationControlle § BusNetworkNode Accesses a CAN communication
r § BusEcu (only for the controller specified for a
CommunicationMatricesByEcus communication cluster of an ECU or
WithProperties relation) network node.

91
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

XPath Expression Element Available For Description


Symbol in
Properties
Browser
/BusLinCommunicationControlle § BusNetworkNode Accesses a LIN master or LIN slave
§ (LIN
r § BusEcu (only for the communication controller specified
master)
CommunicationMatricesByEcus for a communication cluster of an
§ (LIN WithProperties relation) ECU or network node.
slave)
/BusCanCommunicationConnector § BusNetworkNode Accesses a CAN communication
§ BusEcu (only for the connector specified for a
CommunicationMatricesByEcus communication cluster of an ECU or
WithProperties relation) network node.
/BusLinCommunicationConnector § BusNetworkNode Accesses a LIN master or LIN slave
§ (LIN
§ BusEcu (only for the communication connector specified
master)
CommunicationMatricesByEcus for a communication cluster of an
§ (LIN WithProperties relation) ECU or network node.
slave)
/BusJ1939TransportProtocolNod § BusNetworkNode Accesses a J1939 transport protocol
e § BusEcu (only for the node (J1939 TP node).
CommunicationMatricesByEcus
WithProperties relation)
§ BusCanCommunicationControll
er (only for the
BusConfigurationsWithProper
ties relation)
/BusJ1939NmNode § BusNetworkNode Accesses a J1939 network
§ BusEcu (only for the management node (J1939 NM
CommunicationMatricesByEcus node).
WithProperties relation)
§ BusCanCommunicationControll
er (only for the
BusConfigurationsWithProper
ties relation)
/BusFrame § BusISignalIPDU Accesses a frame of a PDU.
§ BusGeneralPurposeIPdu
§ BusGeneralPurposePdu
§ BusDcmIPdu
§ BusNmPdu
§ BusNPdu
§ BusUserDefinedIPdu
§ BusUserDefinedPdu
§ BusMultiplexedIPdu
§ BusContainerIPdu
/BusLinScheduleTable § BusISignalIPDU Accesses a LIN schedule table.
§ BusGeneralPurposeIPdu
§ BusGeneralPurposePdu
§ BusDcmIPdu
§ BusNmPdu
§ BusNPdu
§ BusUserDefinedIPdu
§ BusUserDefinedPdu

92
ConfigurationDesk Automating Tool Handling May 2024
Automating Bus Manager Features

XPath Expression Element Available For Description


Symbol in
Properties
Browser
/BusLinScheduleTableEntry § BusISignalIPDU Accesses the entries of a LIN
§ BusGeneralPurposeIPdu schedule table.
§ BusGeneralPurposePdu
§ BusDcmIPdu
§ BusNmPdu
§ BusNPdu
§ BusUserDefinedIPdu
§ BusUserDefinedPdu
/BusJ1939TransportProtocolCon § BusISignalIPDU Accesses a J1939 transport protocol
nection § BusMultiplexedIPdu connection.
/BusCyclicTiming BusISignalIPDU Accesses a Cyclic Timing node of a
PDU.
/BusEventControlledTiming BusISignalIPDU Accesses an Event-Controlled
Timing node of a PDU.
/BusTimeRange § BusCyclicTiming Accesses a time range node of
§ BusEventControlledTiming a cyclic timing or event-controlled
timing. To access a specific time
range node, you have to access it
via its name, i.e., Time Period,
Time Offset, Minimum Delay, or
Repetition Period.
/BusDynamicPart BusMultiplexedIPdu Accesses the dynamic part of a
multiplexed IPDU.
/BusStaticPart BusMultiplexedIPdu Accesses the static part of a
multiplexed IPDU.
/BusSegmentPosition BusMultiplexedIPdu Accesses the segment position of
the dynamic or static part of a
multiplexed IPDU.
/BusSelectorField BusMultiplexedIPdu Accesses the selector field of a
multiplexed IPDU.
/BusDynamicPartAlternative BusMultiplexedIPdu (only for the Accesses a dynamic‑part alternative
BusConfigurationsWithProperti of a multiplexed IPDU.
es relation)
/BusInitialDynamicPart BusMultiplexedIPdu (only for the Accesses the initial dynamic part of a
BusConfigurationsWithProperti multiplexed IPDU.
es relation)
/BusEndToEndDescription BusISignalGroup Accesses the end-to-end protection
definition of an ISignal group.
/BusEndToEndProtectionISignal BusEndToEndDescription Accesses the position of an end-to-
IPdu end protected ISignal group in a
PDU.
/BusEndToEndTransformer BusISignalGroup Accesses the end-to-end transformer
configuration of an ISignal group.
/BusISignalToIPduMapping BusISignal Accesses properties concerning the
mapping of an ISignal to a PDU.
/BusCodedType BusISignal Accesses the coded data type of an
ISignal.

93
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

XPath Expression Element Available For Description


Symbol in
Properties
Browser
/BusPhysicalType BusISignal Accesses the physical data type of an
ISignal.
/BusComputationMethod BusISignal Accesses a computation method of
an ISignal.
/BusComputationScale BusISignal Accesses a computation scale
defined for a computation method
of an ISignal.
/BusTimeMaster BusGlobalTimeDomain Accesses a time master of a global
time domain.
/BusTimeSlave BusGlobalTimeDomain Accesses a time slave of a global
time domain.

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


communication matrix elements sorted by ECUs.
1 # CommunicationMatricesByEcusWithProperties
2
3 # Accessing all Identifiers of all BusFrames in all BusCanPhysicalChannels in all BusCanCommunicationClusters in
4 # all BusISignalIPdus with the 'TX' direction of the 'DoorLeft' BusEcu in all BusCommunicationMatrices
5 '/BusCommunicationMatrix/BusEcu[@Name = "LeftDoor"]/BusISignalIPdu[@Direction =
"TX"]/BusCanCommunicationCluster/BusCanPhysicalChannel/BusFrame/@Identifier'
6
7 # Accessing all BusISignals whose name contains 'Signal' and whose lower-level elements are
8 # BusPhysicalType with Base_data_type 'UINT8'
9 '//BusPhysicalType[@Base_data_type = "UINT8"]/parent::BusISignal[contains(@Name, "Signal")]'

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

Examples of 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

The listing uses the chassis_changed.dbc communication matrix, which is


available with the CANMMDemo demo project. If you want to run the
script, you have to adjust only the path of the communication matrix.

1 # Initialize certain basic variables.


2 CurrentApplication = Application.ActiveApplication
3 BusManager = CurrentApplication.Components.Item('BusManager')
4 BusConfigurationsRelation = CurrentApplication.Relations.Item('BusConfigurations')
5 BusConfigurationsWithPropertiesRelation = CurrentApplication.Relations.Item('BusConfigurationsWithProperties')
6 BusConfigurationType = BusConfigurationsRelation.GetCreatableTypes().Item(0)
7 CommunicationMatricesByEcusRelation = CurrentApplication.Relations.Item('CommunicationMatricesByEcus')
8
9 # Add a communication matrix to the active ConfigurationDesk application.
10 CommunicationMatrixFile = r'C:\Users\<current user>\Documents\dSPACE\ConfigurationDesk\<current
version>\CANMMDemo\CfgCANMMDemo\SLModel\chassis_changed.dbc'
11 BusManager.Configure('AddCommunicationMatrix', [CommunicationMatrixFile])
12 CommunicationMatrix = CommunicationMatricesByEcusRelation.GetTopNodes().Item('chassis_changed')
13
14 # Add a new bus configuration to the active ConfigurationDesk application.
15 BusConfiguration = BusConfigurationsRelation.CreateDataObject(BusConfigurationType)
16 BusConfiguration.Name = 'New Bus Configuration'
17
18 # Assign the 'IGNITION' ECU to the Simulated ECUs bus configuration part of the 'New Bus Configuration'.
19 EcuIgnition = CommunicationMatricesByEcusRelation.GetElements(CommunicationMatrix).Item('IGNITION')
20 BusManager.Configure('AssignElements', [[EcuIgnition], BusConfiguration])
21
22 # Remove the 'Diagnostics' IPDUs from the 'New Bus Configuration'.
23 DiagnosticsIPdus = BusConfigurationsRelation.FindByXPath('/BusConfiguration[@Name = "New Bus
Configuration"]//BusMultiplexedIPdu[contains(@Name, "DIAGNOSTICS")]|/BusConfiguration[@Name = "New Bus
Configuration"]//BusDynamicPartIPdu[contains(@Name, "DIAGNOSTICS")]')
24 BusManager.Configure('RemoveElements', [DiagnosticsIPdus])
25
26 # Select the 'IGNITION_1' IPDU in the Simulated ECUs bus configuration part and add the PDU Trigger feature to it.
27 IPDUIgnition1BusCfgPartSimulation = BusConfigurationsRelation.FindByXPath('/BusConfiguration[@Name = "New Bus
Configuration"]/BusConfigurationPartSimulatedEcus//BusISignalIPdu[contains(@Name, "IGNITION_1") and @Direction =
"TX"]')
28 BusManager.Configure('AddFeature', ['BusPduTriggerAccess', IPDUIgnition1BusCfgPartSimulation[0]])

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])

Modifying communication The following listing shows:


matrices and accessing the § How to add elements to communication matrices and assign the added
modified elements elements to a bus configuration.
§ How to specify user-defined settings for communication matrix elements.
§ How to access the modified communication matrix elements.
§ How to write an overview of the modified elements to ConfigurationDesk's
Interpreter.

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

The listing uses the BusManagerBasicsDemo.arxml communication matrix,


which is available in the BusManagerBasicsDemo folder of the Documents
folder .

1 # Initializing certain basic variables.


2 CurrentApplication = Application.ActiveApplication
3 BusManager = CurrentApplication.Components.Item('BusManager')
4 BusConfigurationsRelation = CurrentApplication.Relations.Item('BusConfigurations')
5 BusConfigurationsWithPropertiesRelation = CurrentApplication.Relations.Item('BusConfigurationsWithProperties')
6 BusConfigurationType = BusConfigurationsRelation.GetCreatableTypes().Item(0)
7 CommunicationMatricesByClustersRelation = CurrentApplication.Relations.Item('CommunicationMatricesByClusters')
8
9 # Select the 'CanBodyPhysicalChannel' CAN channel of the 'BusManagerBasicsDemo' communication matrix and add
10 # one ISignal IPDU and two ISignals to the channel.
11 CanPhysicalChannel = CommunicationMatricesByClustersRelation.FindByXPath('/BusCommunicationMatrix[@Name =
"BusManagerBasicsDemo"]//BusCanPhysicalChannel[@Name = "CanBodyPhysicalChannel"]')[0]
12 BusManager.Configure('AddElementToCommunicationMatrix', ['BusISignalIPdu',
CanPhysicalChannel, 'BusDirectedElementTX'])

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

The Configure(ICaComponent) method requires the following syntax:


1 BusManager.Configure('Operation', [<parameters of the operation as
DataObjects, [list of DataObjects], and/or 'Strings'>])

XPath queries return a list of elements. Depending on the parameters that


a specific operation of the Configure(ICaComponent) method requires,
you can therefore omit the [] brackets if you access elements via XPath.

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')

Task Syntax and/or Example


Import a communication matrix
1 BusManager.Configure('AddCommunicationMatrix', [r'<absolute file path of communication matrix>'])

Remove a communication matrix


1 # Remove all communication matrices of the active ConfigurationDesk application and all their elements that
are assigned to bus configurations via the 'Communication Matrices by ECUs' view of the Buses Browser.
2 AllComMatrices = ComMatricesByEcusRelation.GetTopNodes()
3 for ComMatrix in AllComMatrices:
4 BusManager.Configure('RemoveCommunicationMatrix',[ComMatrix, 'True'])

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'])

Browse elements in the Buses Browser


1 # Browse the 'Communication Matrices by ECUs' view of the Buses Browser and get the names of all available
ECUs.
2 ComMatrices = ComMatricesByEcusRelation.GetTopNodes()
3 for ComMatrix in ComMatrices:
4 for ECU in ComMatricesByEcusRelation.GetElements(ComMatrix):
5 print (ECU.Name)

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

Task Syntax and/or Example


5 for Cluster in ComMatricesByClustersRelation.GetElements(BusSystem):
6 for ECU in ComMatricesByClustersRelation.GetElements(Cluster):
7 print (ECU.Name)

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)

Get element properties and their values


1 # Get the properties and values of all communication matrices via the 'Communication Matrices by ECUs' view
of the Buses Browser.
2 ComMatrices = ComMatricesByEcusRelation.GetTopNodes()
3 for ComMatrix in ComMatrices:
4 print (ComMatrix.Name)
5 for Property in ComMatrix.Properties:
6 print (Property.Name, Property.Value)

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 ('##################')

Add bus configurations to the ConfigurationDesk application


1 # Add one bus configuration with the default name.
2 NewBusConfig =
BusConfigurationsRelation.CreateDataObject(BusConfigurationsRelation.GetCreatableTypes().Item(0))

1 # Add two bus configurations with user-defined names.


2 BusConfigNames = ['BusConfigForSimulation', 'BusConfigForManipulation']

99
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Task Syntax and/or Example


3 for BusConfigName in BusConfigNames:
4 NewBusConfig = BusConfigurationsRelation.CreateDataObject\
5 (BusConfigurationsRelation.GetCreatableTypes().Item(0))
6 NewBusConfig.Name = BusConfigName

Delete bus configurations


1 # Delete all bus configurations whose names contain 'Gearbox'.
2 BusConfigsToDel = BusConfigurationsRelation.FindByXPath('/BusConfiguration [contains(@Name, "Gearbox")]')
3 BusConfigurationsRelation.RemoveElements(None, BusConfigsToDel)

1 # Delete all bus configrations from the ConfigurationDesk application.


2 BusConfigurationsRelation.RemoveElements(None, BusConfigurationsRelation.GetTopNodes())

Enable and disable a user‑defined bus configuration behavior

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.

1 # Enable a user-defined bus configuration behavior.


2 BusManager.Configure('EnableUserDefinedConfiguration', [True])

1 # Disable a user-defined bus configuration behavior.


2 BusManager.Configure('EnableUserDefinedConfiguration', [False])

Assign communication matrix elements to a bus configuration


Syntax:
1 # Syntax, with SelectedElements = DataObject list and SelectedBusConfigurationPart = DataObject
2 BusManager.Configure('AssignElements', [[SelectedElements], SelectedBusConfigurationPart])

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])

Create a restbus configuration


Syntax:
1 # Syntax, with SelectedECUs = DataObject list, SelectedBusConfiguration = DataObject, and ExcludeList =
String
2 BusManager.Configure('CreateRestbusConfiguration', [[SelectedECUs], SelectedBusConfiguration, 'ExcludeList'])

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

Task Syntax and/or Example


1 # Create a restbus configuration for CentralGatewayEcu and BodyControlEcu by using the existing
ConfiguredRestbus bus configuration and excluding SeatLeftEcu and SeatRightEcu from the restbus
configuration.
2 AvailableECU = ComMatricesByEcusRelation.FindByXPath('//BusEcu [@Name = "CentralGatewayEcu"]|//BusEcu [@Name
= "BodyControlEcu"]')
3 SelectedBusConfig = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "ConfiguredRestbus"]')
[0]
4 BusManager.Configure('CreateRestbusConfiguration', [AvailableECU, SelectedBusConfig,
'SeatLeftEcu;SeatRightEcu'])

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])

Remove elements from a bus configuration


Syntax:
1 # Syntax, with ElementsToRemove = DataObject list
2 BusManager.Configure('RemoveElements', [ElementsToRemove])

101
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Task Syntax and/or Example


Examples:
1 # Remove all SpeedISignal instances from Bus Configuration (1).
2 AllSpeedISignals = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]//BusISignal [@Name = "SpeedISignal"]')
3 BusManager.Configure('RemoveElements', AllSpeedISignals)

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)

Enable the simulation of PDU gateways for a bus configuration


1 # Enable the simulation of PDU gateways for Bus Configuration (1).
2 BusConfiguration = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus Configuration
(1)"]')[0]
3 BusConfiguration.Properties['Enable PDU gateway'].TrySetValue('True')

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

Task Syntax and/or Example


5
6 # Remove the selected user-defined source PDUs (RX PDUs) from the selected target PDU (TX PDU).
7 BusManager.Configure('RemoveUserDefinedGatewaySourcePdu', [[GatewaySourcePdu1, GatewaySourcePdu2],
GatewayTargetPdu])

Replace assigned communication matrices

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])

Get available bus configuration features


Syntax:
1 # Syntax, with SelectedElements = DataObject list
2 BusManager.Configure('GetAvailableFeatures', [SelectedElements])

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)

Add bus configuration features


Syntax:
1 # Syntax, with RoleNameOfBusConfigFeature = String and SelectedElements = DataObject list
2 BusManager.Configure('AddFeature', ['RoleNameOfBusConfigFeature', [SelectedElements]])

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

Task Syntax and/or Example


Configure bus configuration features
1 # Configure the Schedule Index function port of LinDoorCommController of Bus Configuration (1).
2 ScheduleIndexFunctionPort = BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name = "Bus
Configuration (1)"]//BusCommunicationMatrix [@Name = "BusManagerBasicsDemo"]//FunctionPort [@Name =
"LinDoorCommController Schedule Index"]')[0]
3 # Enable LIN communication by setting the initial value to 1.
4 FunctionPortInitialValue = ScheduleIndexFunctionPort.Properties.Item('InitialValue')
5 FunctionPortInitialValue.TrySetValue(1)
6 # Enable test automation support and model access.
7 FunctionPortTASupport = ScheduleIndexFunctionPort.Properties.Item('IsTestAutomationSupportEnabled')
8 FunctionPortTASupport.TrySetValue(True)
9 FunctionPortModelAccess = ScheduleIndexFunctionPort.Properties.Item('IsMappable')
10 FunctionPortModelAccess.TrySetValue(True)

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)

Add elements to a communication matrix


Syntax:
1 # Basic syntax, with RoleNameOfNewElement = String and ObjectOfParentElement = DataObject:
2 BusManager.Configure('AddElementToCommunicationMatrix', ['RoleNameOfNewElement', ObjectOfParentElement])
3 # Specific syntax for PDUs, with RoleNameOfNewElement = String, ObjectOfParentElement = DataObject, and
Direction = String:
4 BusManager.Configure('AddElementToCommunicationMatrix', ['RoleNameOfNewElement', ObjectOfParentElement,
'Direction'])

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

Task Syntax and/or Example


1 # Add an ISignal to the previously added TX PDU whose default name is User_defined_IPDU_1.
2 NewTxPdu = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu[@Name = "User_defined_IPDU_1"]')[0]
3 BusManager.Configure('AddElementToCommunicationMatrix', ['BusISignal', NewTxPdu])

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])

Rename user-defined IPDUs and ISignals

Note

You can only rename user-defined IPDUs and ISignals that were added to the communication matrix by using the
AddElementToCommunicationMatrix operation.

1 # Rename the User_defined_IPDU_1 PDU.


2 NewTxPdu = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu[@Name = "User_defined_IPDU_1"]')[0]
3 NewTxPdu.Name = "MyTxPdu"

1 # Rename the User_defined_ISignal_1 ISignal.


2 NewTxISignal = ComMatricesByClustersRelation.FindByXPath('//BusISignal[@Name = "User_defined_ISignal_1"]')[0]
3 NewTxISignal.Properties['Name'].Value = "MyTxISignal"

Modify properties of communication matrix elements

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

Task Syntax and/or Example


3 for ManipulatedPdu in ManipulatedPdus:
4 ManipulatedPdu.Properties['Unused bit pattern'].Value = '255'

Undo modifications of communication matrices


Syntax:
1 # Syntax, with ModifiedElement = DataObject and ModifiedProperty<n> = comma-separated list of Strings:
2 BusManager.Configure('UndoChangesToCommunicationMatrix', [ModifiedElement,
['ModifiedProperty1','ModifiedProperty2'])

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']])

1 # Undo all modifications of the GeneralInfoIPdu PDU.


2 ModifiedPdu = ComMatricesByClustersRelation.FindByXPath('//BusISignalIPdu[@Name = "GeneralInfoIPdu"]')[0]
3 BusManager.Configure('UndoChangesToCommunicationMatrix', [ModifiedPdu])

1 # Undo the modifications of all communication matrices in the ConfigurationDesk application.


2 BusManager.Configure('UndoChangesToCommunicationMatrix', [])

Add frame captures


Syntax:
1 # Syntax, with SelectedBusConfigs = DataObject list:
2 BusManager.Configure('AddFrameCapture', [SelectedBusConfigs])

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])

Add frame gateways


Syntax:
1 # Syntax, with GatewayType = String and SelectedBusConfig = DataObject:
2 BusManager.Configure('AddGateway', ['GatewayType', SelectedBusConfig])
3 # Currently, only 'BusFrameGateway' is supported as GatewayType.

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

Task Syntax and/or Example


Add filter rules to frame capture and frame gateway filters
Syntax:
1 # Syntax, with SelectedFilters = DataObject list:
2 BusManager.Configure('AddFilterRule', [SelectedFilters])

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])

Configure the synchronized timer event of a Bus Configuration task


1 # Access 'Synchronized Timer Event (1)' 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 SyncTimerEvent = RelApplConfig.GetElements(BusConfig)['Synchronized Timer Event (1)']
8 # Configure the synchronized timer event.
9 SyncTimerEvent.Properties['Period'].Value = 0.004

107
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Task Syntax and/or Example


10 SyncTimerEvent.Properties['Offset'].Value = 0.002
11 SyncTimerEvent.Properties['GlobalTimeDomainIdentifier'].Value = 14

Generate bus simulation containers


1 # Generate bus simulation containers.
2 BusManager.Configure('GenerateContainers', [])

Get the bus access requests of a bus configuration


1 # Get the names of all bus access requests of Bus Configuration (1).
2 BusConfig = BusConfigurationsRelation.GetTopNodes().Item("Bus Configuration (1)")
3 BusAccessRequests = BusConfigurationsRelation.GetElements(BusConfig).Item("Bus Access Requests")
4 for Matrix in BusConfigurationsRelation.GetElements(BusAccessRequests):
5 for BusSystem in BusConfigurationsRelation.GetElements(Matrix):
6 for Cluster in BusConfigurationsRelation.GetElements(BusSystem):
7 for BusAccessRequest in BusConfigurationsRelation.GetElements(Cluster):
8 print (BusAccessRequest.Name)

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)

Assign bus access requests to bus accesses


1 # Add two CAN function blocks to the signal chain and assign the CAN bus access requests of Bus
Configuration (1) to these blocks.
2 CanFunctionBlockNames = ['CANBodyCluster', 'CANPowertrainCluster']
3 for CanFunctionBlockName in CanFunctionBlockNames:
4 CanFunctionBlock = Application.ActiveApplication.Components["IOFunctionLib"]["Function Library"]["CAN"]
5 BlockType = CanFunctionBlock.DataObjectTypes[0]
6 CanFunctionBlock.CreateChild(BlockType, CanFunctionBlockName)
7 for BusAccessRequests in BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name =
"Bus Configuration (1)"]/BusConfigurationPartBusAccessRequests//BusCanCommunicationCluster [@Name =
"CanBodyCluster"]/*/@Bus_access'):
8 BusAccessRequests.TrySetValue("CANBodyCluster")
9 for BusAccessRequests in BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name =
"Bus Configuration (1)"]/BusConfigurationPartBusAccessRequests//BusCanCommunicationCluster [@Name =
"CanPowertrainCluster"]/*/@Bus_access'):
10 BusAccessRequests.TrySetValue("CANPowertrainCluster")

Remove assigned bus accesses


1 # Remove the bus access from the bus access request that results from CanPowertrainCluster in the Simulated
ECUs part of Bus Configuration (1).
2 for BusAccessRequests in BusConfigurationsRelation.FindByXPath('/BusConfiguration [@Name =
"Bus Configuration (1)"]/BusConfigurationPartBusAccessRequests//BusCanCommunicationCluster [@Name =
"CanPowertrainCluster"]/BusAccessRequestSimulatedEcus/@Bus_access'):
3 BusAccessRequests.TrySetValue('')

Generate a new Simulink model interface


Syntax:
1 # Syntax, with BusConfiguration = DataObject list:
2 Application.ActiveApplication.Algorithms.PropagateToSimulink([BusConfiguration])

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

Task Syntax and/or Example


Propagate changes to a Simulink model interface
Syntax:
1 # Syntax, with BusConfiguration = DataObject list and ModelName = String:
2 Application.ActiveApplication.Algorithms.PropagateToSimulink([BusConfiguration], 'ModelName')

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',[''])

Configure the template for generating XIL framework label IDs


Syntax:
1 # Syntax, with XilFrameworkLabelIdTemplate = String:
2 BusManager.Configure('ConfigureBmXilFrameworkLabelIdTemplate', ['XilFrameworkLabelIdTemplate'])

Example:
1 # Configure the template for generating XIL framework label IDs.
2 BusManager.Configure('ConfigureBmXilFrameworkLabelIdTemplate', ['MyLabelIds_{%BMBusConfiguration%}
{_%BMBusConfigurationPart%}{_%BMCommunicationMatrixName%}{_%BMPDU%}{_%BMFeature%}{_%BMFunctionPortName%}
{_%VariableName%}'])

Related topics Basics

Creating Precompiled BSC Files (ConfigurationDesk Real-Time Implementation


Guide )

Examples

Examples and Demo Files.......................................................................................................... 30

109
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

Best Practices for Automating ConfigurationDesk


Introduction There are some tips and tricks that will make your work with the
ConfigurationDesk automation API easier.

Where to go from here Information in this section

Best Practices for Using External Interpreters.......................................... 110

Best Practices for Script Optimization..................................................... 110

Best Practices for Interfaces................................................................... 113

Best Practices for Data Structures and Parameters.................................. 113

Best Practices for Property Handling....................................................... 116

Information in other sections

Limitations for Automating ConfigurationDesk...................................... 290


ConfigurationDesk lets you automate most of its features, but there are a
few limitations for its automation interface.

Best Practices for Using External Interpreters

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.

Best Practices for Script Optimization

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

Example of slow approach with many iterations


if MyDeviceBlock.Properties.Contains("PhysicalAttributes"):
pPhysicalAtt = MyDeviceBlock.Properties.Item("PhysicalAttributes")
if MyDeviceBlock.Properties.Contains("Name"):
pName = MyDeviceBlock.Properties.Item("Name")
if MyDeviceBlock.Properties.Contains("PortType"):
pPortType = MyDeviceBlock.Properties.Item("PortType")

Depending on the position of the properties PhysicalAttribute, Name, and


PortType in the device blocks properties collection, and assuming that no
caching is implemented, the implementation can iterate up to six times through
almost the whole collection.

Example of fast approach avoiding many iterations (recommended)


properties = block.Properties
ValueDict = {}
for p in properties:
Name = p.Name
if Name == "PhysicalAttributes":
ValueDict["PhysicalAttributes "] = p.Value
if Name == "Name":
ValueDict["Name"] = p.Value
if Name == "PortType":
ValueDict["PortType"] = p.Value
if len(ValueDict) == 3:
break

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.

Transactions offer the following benefits:


§ A read transaction ensures that no changes are made to the data model while
data is being read.
§ A write transaction ensures that no other client can change the data in the
meantime and that the changes can be undone in one step.
§ Transactions speed up the execution because of they block GUI updates during
processing.

Example of a transaction enabling test automation The following script


represents a function SetTestAutomationActive which iterates through the
function library (FuncLib) of an active application (activeApp) to activate
test automation for all function instances in the application.

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

There are two important constraints for using transactions:


§ Use an automation transaction only in an external interpreter to avoid
blocking.
§ Enclose the transaction in a try - finally statement to ensure that the
transaction will be closed even if an exception was raised.

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.

Example of slow approach


# do something, then call
[…]
activeApp.Algorithms.CreateSuitableModelPortBlock([FunctionInstance])
[…]
# then do something and call
[…]
activeApp.Algorithms.CreateSuitableModelPortBlock([FunctionInstance])
[…]
# again do something and call
[…]
activeApp.Algorithms.CreateSuitableModelPortBlock([FunctionInstance])

With a small number of function instances, there is no performance issue, but


calling this script for many function instances may cause considerable overhead
for interprocess communication.

Example of fast approach


# collect function instances and call method once
[…]
activeApp.Algorithms.CreateSuitableModelPortBlock(MyFunctionInstances)

112
ConfigurationDesk Automating Tool Handling May 2024
Best Practices for Automating ConfigurationDesk

Best Practices for Interfaces

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("", "");

foreach (Object obj in obs)


{
ICaWorkingView wv = obj as ICaWorkingView;
if (wv != null)
Console.WriteLine("WorkingView: " + wv.FullName);

ICaDataObject db = obj as ICaDataObject;


if (db != null)
Console.WriteLine("DataObject: " + db.Name);

ICaLink lk = obj as ICaLink;


if (lk != null)
Console.WriteLine("Link" + lk.ImplementingType);
}

Best Practices for Data Structures and Parameters

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.

Python In Python, there are no issues with using default parameters in


methods of the automation interface. For example, there is a default String-type
parameter called "Name" for creating a child object using the ICaDataObject
interface. A simple call is possible:
NewChild = MyParent.CreateChild(MyParent.DataObjectTypes.Item(0))

C# Even though C# in general supports default parameters, it is not possible


to use them in ConfigurationDesk automation. The interface definitions of the
automation API use the DefaultParameterValue attribute to mark a parameter as
default. This declaration forbids the use of a default value for C# but is necessary
to enable default parameters for scripting clients like Python and VB. Thus, the
call of the CreateChild method for C# looks as follows:
NewChild = MyParent.CreateChild(MyParent.DataObjectTypes.Item(0),String.Empty);

MATLAB In MATLAB M-code it is not possible to use default parameters for


ConfigurationDesk automation at all. Use quotes for empty strings as defaults:
NewChild = MyParent.CreateChild(MyParent.DataObjectTypes.Item(int32(0)),’’);

Or use brackets for an empty array:


Relation.AddElements(Parent, {Element}, []);

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:

C# Methods with untyped array parameters should be called with an array


list:
System.Collections.ArrayList arrList = new System.Collections.ArrayList();
arrList.Add(MyFunctionBlock);
ActiveApplication.Algorithms.CreateSuitableModelPortBlock(arrList.ToArray());

Python In Python you can use a list:


ActiveApplication.Algorithms.CreateSuitableModelPortBlock([MyFunctionBlock])

MATLAB If you need an array, you must use a MATLAB-specific cell array
which is stated in braces:
ActiveApplication.Algorithms.CreateSuitableModelPortBlock({MyFunctionBlock});

For an empty array, use brackets:


Relation.AddElements(Parent, {Element}, []);

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', {''},'');

If you want to provide one or more string values:


Algorithms.ExportTableViewToXML('c:\test.xml', 'Function Electrical Interface', {'OneString' },'');
Algorithms.ExportTableViewToXML('c:\test.xml', 'Function Electrical Interface', {'OneString'; 'AnotherString'},'');

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

MATLAB In M-scripts, the vector is represented by a cell array:


NumbPulsProp = InjectionIgnition.Properties.Item('NumberOfExpectedPulses');
Val = NumbPulsProp.Value{1};

Changing a specific value of the vector:


Val = NumbPulsProp.Value;
Val{1} = 3;
NumbPulsProp.Value = Val;
Setting a complete vector can be useful.
NumbPulsProp.Value = [3; 2];

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.

For example, the properties of the Common Functions item in a FlexRay


function block are represented in the Properties Browser in a list with
checkboxes, as illustrated below.

115
May 2024 ConfigurationDesk Automating Tool Handling
Automating ConfigurationDesk

For automation, use a list as follows:


propertylist = ["Enable operations", "Enable reception"]
prop.Value = propertylist

To print the values, iterate the list:


for value in prop.Value:
print(f)

Enable operations
Enable reception
Enable transmission
Com state

Best Practices for Property Handling

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

Code Examples in Different Programming


Languages

Where to go from here Information in this section

Examples of Python Scripts.................................................................... 118


The basic tasks and operations are explained by short Python examples.
This includes object‑oriented features and exception handling.

Code Sequence Examples...................................................................... 120


Short examples of typical working steps show the main differences
between the languages.

Code Examples Showing Programming Constructs................................ 125


Code examples in different programming languages show how to create
an object, get access to properties and methods, and select items from a
collection.

117
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages

Examples of Python Scripts


Introduction The basic tasks and operations are explained by short Python examples. This
includes object‑oriented features and exception handling.

Where to go from here Information in this section

Python Demo Scripts............................................................................. 118


The basic tasks and operations are explained by short Python examples.
This includes object‑oriented features and exception handling.

Information in other sections

Automating Basic Tasks in ConfigurationDesk.......................................... 42


Automation examples to automate different tasks with the COM API.

Python Demo Scripts

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

Overview of example scripts The following example scripts are available:

Script file Description


lesson_01_StringHandling.py Demonstrates basic and advanced features of string handling and the converting
of strings to other types.
lesson_02_ListHandling.py Demonstrates how to define lists and use their predefined operators and
methods.
You can think of a list object as an array of Python objects. The content of a list
can be modified. Lists can be resized and sorted. Lists are heterogeneous, that is,
there is no restriction on the type of objects that can be contained in a list, and
objects of different types can reside in the same list.
lesson_03_SetHandling.py Demonstrates basic features of sets.
lesson_04_ControlStructures.py Demonstrates the definition of control structures.
lesson_05_SequenceHandling.py Demonstrates features of general sequence handling (e.g. tuple and list).

118
ConfigurationDesk Automating Tool Handling May 2024
Examples of Python Scripts

Script file Description


lesson_06_DictionaryHandling.py Demonstrates how to define dictionaries and use their predefined operators and
methods.
Python dictionaries associate constant Python objects (the keys) with other
arbitrary Python objects (the values). For example, you can associate strings to
phone numbers (represented as integers).
lesson_07_ArgumentHandling.py Demonstrates how to use functions and handle arguments.
Functions can be defined at any location in a script. If the script has been
executed once, the function can be reused without reloading the script.
Default values for function arguments can be defined. Argument passing can be
performed by position or by name.
Arguments can be derived from any Python type. The type can be changed at
run time, that is, functions can be overloaded.
lesson_08_ExceptionHandling.py Demonstrates how to define exceptions. There is an extensive set of predefined
exceptions which can be used by exception handlers. User-defined exceptions
can also be used. The “except” part can be made conditionally, which is not
shown in this example.
For further information on error handling, refer to Built-in Exceptions in the
Python Library Reference.
lesson_09_FileHandling.py Demonstrates basic file I/O operations, such as opening and closing a file with
different access modes, and writing, reading and positioning the file pointer.
For further information on file operations, refer to File Objects in the Python
Library Reference.
lesson_10_ObjectOriented.py Demonstrates several object-oriented features of Python, in particular the
inheritance of functions.
For further information on object-oriented features, refer to Data Model and
Compound Statements in the Python Language Reference.
lesson_11_ThreadingBasics.py Demonstrates how to stop a thread from another thread using the threading
module to start the threads.
lesson_12_ThreadingWaiting.py Demonstrates how to synchronize different threads of execution by using a lock
object.
lesson_13_ThreadingWaitingAdvanced.py Demonstrates how to wait in the main thread for other threads which are
executed.
lesson_14_UseThreadingBaseClass.py Demonstrates how to use the dSPACE threading base class.

Related topics Basics

Main Characteristics of Python............................................................................................... 132

119
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages

Code Sequence Examples


Introduction The following examples show the same working steps in languages: Python,
Visual Basic (VB) , MATLAB M file (M), and C#.

Where to go from here Information in this section

Control Structures................................................................................. 120


Short examples of working with control structures show the main
differences between different programming languages.

Line Continuation.................................................................................. 121


Short examples of working with line continuation show the main
differences between 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.

Calling Methods without Parameters..................................................... 122


Short examples of calling methods without parameters 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.

Array Handling...................................................................................... 124


Short examples of array handling show the main differences between
different programming languages.

Control Structures

Python if Item.EnumProperty == ENUM_VALUE and\


Item.StringProperty == "String":
...

120
ConfigurationDesk Automating Tool Handling May 2024
Code Sequence Examples

Visual Basic If Item.EnumProperty = ServerLib.ENUM_VALUE


If Item.StringProperty = "String" Then
...
End If

M-Code if Item.EnumProperty == ENUM_VALUE


if strcmp(Item.StringProperty, 'String')
...;
end;
end;

C# if ( item.EnumProperty == EnumClass.ENUM_VALUE
&& item.StringProperty.Equals("String")
{
...
}

Line Continuation

Python CallMethodWithParameter(\
Parameter ...

Visual Basic CallMethodWithParameter ( _


Parameter ...

M-Code CallMethodWithParameter ( ...


Parameter);

C# CallMethodWithParameter (
Parameter);

Creation

Python Server = Dispatch('Server.Object.1')

Visual Basic Set Server = CreateObject("Server.Object.1")

121
May 2024 ConfigurationDesk Automating Tool Handling
Code Examples in Different Programming Languages

M-Code Server = actxserver('Server.Object.1');

C# Type remoteType = Type.GetTypeFromProgID(


"Server.Object.1", "127.0.0.1", true);
object remoteObj = Activator.CreateInstance(remoteType);
IServerInterface server = remoteObj as IServerInterface;

Destruction

Python del Server

Visual Basic Set Server = Nothing

M-Code clear Server;

C# Marshal.ReleaseComObject(server);
this.server = null;

Calling Methods without Parameters

Python With parentheses:


Server.CallMethod()

Visual Basic Without parentheses:


Server.CallMethod

M-Code Without parentheses:


Server.CallMethod;

C# With parentheses:
Server.CallMethod ();

122
ConfigurationDesk Automating Tool Handling May 2024
Code Sequence Examples

Collections

Python Indexing possible:


Server.Collection[0]
for Item in Server.Collection:

Visual Basic Indexing possible:


Server.Collection(0)
For Each Item In Server.Collection

M-Code Indexing not possible:


Server.Collection.Item(int32(0))
for Index = 0:( Server.Collection.Count - 1)
Item = Server.Collection.Item(int32(Index));
end;

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

Python Access via global variables:


ENUM_VALUE = 1

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

M-Code Not accessible

C# EnumClass.ENUM_VALUE

Array Handling

Python Simple brackets:


Server.ArrayProperty = [0,0]

Visual Basic Declaration and setting of each value:


Dim Values(2) As Variant
Values(0) = 0
Values(1) = 0
Server.ArrayProperty = Values

M-Code Simple brackets:


Server.ArrayProperty = [0,0];

C# object[] values = new object[2] { 0, 0 };


Server.ArrayProperty = values;

124
ConfigurationDesk Automating Tool Handling May 2024
Code Examples Showing Programming Constructs

Code Examples Showing Programming Constructs


Introduction Code examples in different programming languages show 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.

Where to go from here Information in this section

Code Example in Python........................................................................ 125


Code examples in Python show how to create an object, access
properties and methods, and select items from a collection.

Code Example in Visual Basic................................................................. 126


A Visual Basic code example that shows you how to create an object,
access properties and methods, and select items from a collection.

Code Example in M............................................................................... 127


An M code example that shows you how to create an object, access
properties and methods, and select items from a collection.

Code Example in C#.............................................................................. 128


A C# code example that shows you how to create an object, access
properties and methods, and select items from a collection.

Code Example in Python

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

from win32com.client import Dispatch


ENUM_VALUE = 1
Server = Dispatch('Server.Object.1')
StringValue = Server.StringProperty
print(StringValue)
Item = Server.Collection[0]
Collection = Server.Collection
for Item in Collection:
if Item.EnumProperty == ENUM_VALUE and\
Item.StringProperty == "String":
Item.CallMethod()
Item.IntegerProperty = 42
ArrayValue = Server.ArrayProperty
print(ArrayValue)
del StringValue
del ArrayValue
del Item
del Collection
Server.Quit()
del Server

Tip

You can find more demo scripts written in Python in the


%USERPROFILE%\Documents\dSPACE\ConfigurationDesk\
<ReleaseVersion> (<ProductVersion>)\Toolautomation\Python
demo folder.

Related topics Basics

Best Practices for Data Structures and Parameters................................................................... 113

Code Example in Visual Basic

Example The following example shows how to create an object, access properties and
methods, and select items from a collection.

Note

The following example is not runnable.

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

The following example is not runnable.

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;

Related topics Basics

Best Practices for Data Structures and Parameters................................................................... 113

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

The following example is not runnable.

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));
}
...

Related topics Basics

Best Practices for Data Structures and Parameters................................................................... 113


Best Practices for Interfaces.................................................................................................... 113

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

Using ConfigurationDesk to Edit and Execute Scripts

Where to go from here Information in this section

Basics on Python.................................................................................... 132


Basic terms, important characteristics and features of Python.

Ways to use Python Scripts in ConfigurationDesk.................................. 138


ConfigurationDesk offers different ways to write, edit, and run Python
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

Main Characteristics of Python.............................................................. 132


To get an idea of the Python programming language, you need to know
its main characteristics.

Structuring Python Scripts...................................................................... 134


If you use Python to automate ConfigurationDesk, there are some points
to note on structuring Python scripts that apply to all ConfigurationDesk
interfaces.

Multithreaded Scripting......................................................................... 135


To execute automation scripts in parallel, you can run each script in a
separate thread.

Main Characteristics of Python

Introduction "Python is an interpreted, object-oriented, high-level programming language


with dynamic semantics. Its high-level built-in data structures, combined with
dynamic typing and dynamic binding, make it very attractive for rapid application
development, as well as for use as a scripting or glue language to connect
existing components together. Python's simple, easy to learn syntax emphasizes
readability and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program modularity and
code reuse." ("Python Reference Manual")

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

§ You will find the corresponding example scripts in


the .\Demos\Python\Tutorial folder of your ConfigurationDesk
installation.
§ In the examples, the screen output produced by the Python interpreter is
integrated into the script. The output is printed in bold type and preceded
by “>>>” so that you can recognize it easily.

Related topics Examples

Python Demo Scripts.............................................................................................................. 118

Structuring Python Scripts

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

Write separate script modules to use ConfigurationDesk's features and run


them when working on a project . For example, you can write separate
scripts to set up a project, configure components, and work with signal
chain elements.

Related topics Basics

Opening a COM Connection to ConfigurationDesk.................................................................. 40

Multithreaded Scripting

Introduction To execute automation scripts in parallel, you can run each script in a separate
thread.

You can execute an automation script


§ In the main thread or
§ In a separate thread (multithreading).

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

Only the main thread should be used for developing scripts.

Tip

You might consider using an external Python interpreter (see Using an


External Interpreter on page 147) in preference to multithreaded scripting.

135
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

Executing a thread Multithreaded execution is achieved in different ways:


§ Using the standard Python _thread module. For example:
import _thread
def f(Param):
for i in range(Param):
print(i)
_thread.start_new_thread(f, (1000,))
§ Using the standard Python threading module. For example:
import threading
def f(Param):
for i in range(Param):
print(i)
t = threading.Thread(target=f, args=(1000,))
t.start()

Note

It is recommended to use the threading module only if you need to


program threads directly, because it allows you to have more control and
information.

Stopping a thread A thread is stopped when


§ The script or the function ends (preferred way) or
§ The script or the function is interrupted via the context menu of the program's

Interpreter symbol in the system tray: .

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

§ Do not pass these objects between threads as parameters.


§ Do not use these objects with the global statement.
§ Polling loops within a separate thread must have a call to Sleep from either
the win32api or the time Python module. This ensures that the separate thread
does not block other threads.
§ If you run a script in a separate thread, it is not allowed to create dialogs. For
example, you cannot use wxwindows or raw_input.

Tip

To stop the execution of a separate thread, you can use the MessageBox
provided by the win32api Python module.

Related topics Examples

Python Demo Scripts.............................................................................................................. 118

137
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

Ways to use Python Scripts in ConfigurationDesk


Where to go from here Information in this section

Using the Internal Interpreter................................................................. 138

Using an External Interpreter................................................................. 147

Using the Source Code Editor................................................................ 148

Using the Internal Interpreter


Introduction The Interpreter lets you edit and execute Python commands and run Python
scripts.

Where to go from here Information in this section

Basics on the Interpreter........................................................................ 139


Provides basic information on the features of the Interpreter.

How to Enable Auto Completion........................................................... 141


You can complete command strings automatically in the interpreter
window.

How to Use Auto Completion................................................................ 142


To edit commands in the Interpreter easily and more efficiently, you can
use the auto completion feature.

How to Import a Python Module to the Interpreter Namespace..... ........ 143


You can import a Python module to use its variables and methods in the
current command and script.

How to Run Scripts................................................................................ 144


You can run a Python script in the Interpreter.

How to Specify the Python Path............................................................. 145


You have to specify the Python path to tell the Interpreter where to find
the imported scripts.

138
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk

Basics on the Interpreter

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.

Auto completion Completes Python variables, functions, and object


attributes automatically so that you can save time and avoid spelling mistakes.
For instructions, refer to How to Enable Auto Completion on page 141 and How
to Use Auto Completion on page 142.

Auto indentation In Python, multi-line commands are introduced by a


colon and their scopes are declared by indentation. The indentation indicates
the structure of a multi-line command. The Interpreter indents the next line
automatically. The indent depth of the line depends on the number of control
structures or command blocks. You can decrease the indent depth by entering
an empty line or pressing the Backspace key: for example, to close an If
branch.

Command history The Interpreter stores a command history to let you


quickly execute already executed commands during the current work session.
During a work session, you might often repeat some commands with only minor
changes. All the commands entered at the command prompt are stored in a
command history. You can navigate through the command history by using the
shortcut key combinations Ctrl+Up/Down to move up or down in the command
history, and Ctrl+Home/End to go to the first or last command in the command
history.

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

Find/Copy/Cut/Paste You can use the standard Windows commands Find,


Copy, Cut and Paste from the context menu of the Interpreter window or via
shortcut keys. This feature helps you edit your commands more efficiently.

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

You can use the Application interface as starting point to browse


the ConfigurationDesk API Reference. Refer to ICaApplicationMain
<<Interface>> on page 214.

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.

How to Enable Auto Completion

Objective To complete commands automatically in ConfigurationDesk's Interpreter


window, you have to enable the auto completion feature.

Basics ConfigurationDesk's Interpreter includes an auto completion feature that


makes typing commands easy. This feature helps you enter the names of
variables, methods, and objects correctly and quickly. You do not have to
remember the full name or worry about the spelling mistakes.

Method To enable/disable auto completion


1 On the File ribbon, click Options and change to the Python Editor page.

141
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

2 On the Python Editor page, select the Autocompletion checkbox to


enable autocompletion or clear the checkbox to disable it.

3 Click OK.

Result You have enabled/disabled auto completion in the Interpreter.

Related topics Basics

Basics on the Interpreter......................................................................................................... 139

HowTos

How to Use Auto Completion................................................................................................. 142

How to Use Auto Completion

Objective To edit commands in the Interpreter easily and more efficiently, you can use the
auto completion feature in ConfigurationDesk.

Method To use auto completion


1 In the Interpreter, enter the beginning letters of a Python
variable/method/object of any length.
2 Press Ctrl + SPACE.
The Interpreter completes the matching Python variable/method/object
name automatically.

142
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk

If the result is ambiguous, a drop-down list appears with the Python


variables/methods/objects that are currently known to the Interpreter’s
namespace.

3 To complete the command, select the entry and press Return.

Tip

You can also use the Tab key to select the entry and press Return or
you can double-click the entry.

To close the selection list, press Esc.

Result You have completed the Python variable, method, or object automatically.

Related topics Basics

Basics on the Interpreter......................................................................................................... 139

HowTos

How to Enable Auto Completion............................................................................................ 141

How to Import a Python Module to the Interpreter Namespace

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

Unlike the import <module_name> Python command, the Import


Module command overwrites the module if it was imported before, i.e.,
you do not need to clear the Interpreter namespace to reload a module.
For details about namespace, refer to Clear Namespace (ConfigurationDesk
User Interface Reference ).

143
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

Method To import a Python module to the Interpreter namespace


1 On the Automation ribbon, click Interpreter – Import Module to open
the Import Module dialog.
2 In the Import Module dialog, specify the Python file.

3 Click OK.

Result The module is imported into the Interpreter's namespace.

Related topics Basics

Basics on the Interpreter......................................................................................................... 139

How to Run Scripts

Objective You can run a Python script in ConfigurationDesk's Interpreter to execute


Python commands automatically to do tasks such as building a project or
validating specified elements.

Method To run a Python script


1 From the context menu of the Interpreter, select Run Script, or press
Ctrl+R, or go to the Automation ribbon and click Interpreter – Run
Script.
The Run Script dialog opens.

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.

3 If necessary, specify additional arguments.


4 If necessary, specify a working directory. If you specify one, the Interpreter
sets this as the current directory before executing the script.

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.

Related topics Basics

Basics on the Interpreter......................................................................................................... 139

How to Specify the Python Path

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

Additional Python paths specified for the Interpreter are ignored by


external Python interpreters. They can only use System Python paths. System
Python paths are not editable in this dialog.

Method To specify the Python path


1 On the File ribbon, click Options.
2 Select the Python - Interpreter options.

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

Related topics Basics

Basics on the Interpreter......................................................................................................... 139

Using an External Interpreter

Basics on External Interpreters

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:

External Interpreter Default Installation Folder


Python.exe C:\Program Files\Python39
Pythonw.exe C:\Program Files\Python39
PythonWin.exe C:\Program Files\Python39\Lib\site-
packages\pythonwin

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.

PythonWin.exe Pythonwin.exe is a Windows application with an integrated context‑sensitive


editor and debugger. Its interactive window is similar to ConfigurationDesk’s
Interpreter.

147
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

Note

Running scripts in PythonWin might take considerably longer than


in different external interpreters such as Python.exe. You should use
PythonWin only to make use of its debugging features.

PythonWin debugger PythonWin's built-in debugger supports the usual


debug features such as breakpoints, watch lists, different step modes, and post-
mortem debugging.

Using the Source Code Editor


Introduction The Source Code Editor is optimized for displaying and editing Python source
code.

Where to go from here Information in this section

Basics on the Source Code Editor........................................................... 148


You can edit a Python script and check its syntax in the Source Code
Editor.

How to Configure the Source Code Editor............................................. 149


You can configure the Source Code Editor as required. For example, you
can specify the number of spaces used for indentation.

How to Create a New Python Script....................................................... 150


You can insert a new Python script into a ConfigurationDesk project.

How to Work with Python Scripts in the Project Manager...................... 152


In the Project Manager, several commands are available for Python
scripts.

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.

How to Use Bookmarks in the Source Code Editor................................. 153


You can set bookmarks to mark specific lines in a script.

Basics on the Source Code Editor

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 .

Related topics Basics

Basics on Python..................................................................................................................... 132

How to Configure the Source Code Editor

Objective You can configure the Source Code Editor as required. For example, you can
specify the number of spaces used for indentation.

Method To configure the Source Code Editor


1 On the File ribbon, click Options and change to the Python options.
The ConfigurationDesk Options dialog opens.

149
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

2 Via the Python - Editor options, configure the settings.

Result You have configured the settings of the Source Code Editor.

Related topics References

Python Options (ConfigurationDesk User Interface Reference )

How to Create a New Python Script

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

Method To create a new Python script

1 On the Automation ribbon, click Python Editor – New.


ConfigurationDesk opens a New dialog.

2 Select a file name and folder for the new Python script.

Tip

If a project is open, the project folder is recommended by default. Only


Python script files in the project folder are part of the project and saved
or backed up with it.

3 Click Save.
The file is opened in the Source Code Editor .

Result You created a new Python script.

151
May 2024 ConfigurationDesk Automating Tool Handling
Using ConfigurationDesk to Edit and Execute Scripts

How to Work with Python Scripts in the Project Manager

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.

Method To work with a Python script in the Project Manager


1 Switch to the Project view set if necessary.
2 In the Project Manager, right-click a Python script file.

3 The following commands are available in the context menu:


§ Close (Script) (ConfigurationDesk User Interface Reference ) to close a
script that is currently open in the Source Code Editor.
§ Edit (Script) (ConfigurationDesk User Interface Reference ) to open the
script in the Source Code Editor.
§ Save (Script File) (ConfigurationDesk User Interface Reference ) to save
any changes that have been made to the script in the Source Code Editor.
§ Run (ConfigurationDesk User Interface Reference ) to run the script in
the Interpreter.
§ Run on Load (ConfigurationDesk User Interface Reference ) (not
available in application folders) to run a script in the Interpreter every time
the project is loaded.

Result You worked with Python scripts in the Project Manager.

Related topics HowTos

How to Create a New Python Script........................................................................................ 150

152
ConfigurationDesk Automating Tool Handling May 2024
Ways to use Python Scripts in ConfigurationDesk

References

Close (Script) (ConfigurationDesk User Interface Reference )


Edit (Script) (ConfigurationDesk User Interface Reference )
Run (ConfigurationDesk User Interface Reference )
Run on Load (ConfigurationDesk User Interface Reference )
Save (Script File) (ConfigurationDesk User Interface Reference )

How to Work with Selected Text in the Source Code Editor

Objective To edit text in line and column mode, for example, drag it to another position.

Method To work with selected text in the Source Code Editor


1 In the Source Code Editor, select the text you want to edit.

Tip

§ You can select text columns by pressing Alt while selecting.


§ To select text with the keyboard you must press an Arrow
key+Shift(Shift+Alt for column mode).

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.

How to Use Bookmarks in the Source Code Editor

Objective To set bookmarks to mark specific lines in a script.

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

Method To use bookmarks in the Source Code Editor


1 Click the line where you want to set a bookmark.
2 On the Automation ribbon, click Edit Script ‑ Advanced ‑ Toggle
Bookmark, or press Ctrl+F2.
The bookmark is displayed in the marker margin.

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.

Result You have set, selected, and cleared bookmarks in a script.

Related topics References

Toggle Bookmark (ConfigurationDesk User Interface Reference )

154
ConfigurationDesk Automating Tool Handling May 2024
ConfigurationDesk API Reference

ConfigurationDesk API Reference

Where to go from here Information in this section

Introduction to ConfigurationDesk's Automation API............................. 156


Overview of the main parts and most useful interfaces of the API.

API Interfaces........................................................................................ 158


Description of the COM API interfaces.

Information in other sections

Model Interface Package for Simulink API Reference


Provides reference information on the API functions of the Model
Interface Package for Simulink.

dSPACE Platform Management API Reference


To automate the management of dSPACE platforms, for example
registering a platform or loading a real-time application to a platform.

155
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Introduction to ConfigurationDesk's Automation API

Overview of the API

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

<<interface>> <<interface>> <<interface>>


ICaDataObjects ICaProperties ICaLinks

<<interface>> <<interface>> <<interface>>


ICaObjects ICaProperty ICaLink

Related topics Basics

Automating ConfigurationDesk................................................................................................ 33

157
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

API Interfaces
Where to go from here Information in this section

Build Management................................................................................ 158

Component Handling............................................................................ 160

Framework............................................................................................ 212

Project and Application Management.................................................... 230

Enumeration Properties......................................................................... 250

Events................................................................................................... 266

Build Management
Where to go from here Information in this section

ICaBuildManagement <<Interface>>..................................................... 158

ICaBuildResult <<Interface>>................................................................ 159

ICaBuildManagement <<Interface>>

Description Provides access to the build management.

Properties The element has the following properties:

Name Description Get/Set Type


DirectoryName Gets the folder name relative to the application Get String
folder where the build results are located.
Properties Gets the build properties. Get ICaProperties (refer
to ICaProperties
<<Collection>> on
page 224)

158
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Methods The element has the following methods:

Name Description Parameter1) Returns


Build Builds a real-time application. None Result of the build.
§ ICaBuildResult (refer
to ICaBuildResult
<<Interface>> on page 159)
1) <Type> Name: Description

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.

Related topics Examples

Automating Build Process......................................................................................................... 55

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

Properties The element has the following properties:

Name Description Get/Set Type


Canceled Gets a value indicating whether the build Get Boolean
process was canceled before being started.
Downloaded Gets a value indicating whether a download Get Boolean
of the real time application was successfully
performed or not.
ResultFolderFullPath Gets the full path to the build results folder. Get String
RtaFullPath Gets the full path to the built real-time Get String
application.
Success Gets a value indicating whether the build Get Boolean
process was successful or failed.

Methods The element has no methods.

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.

Related topics Examples

Automating Build Process......................................................................................................... 55

Component Handling
Where to go from here Information in this section

ApplicationProcessToModel <<Enumeration>>...................................... 161

ConfigurationReplaceMode <<Enumeration>>...................................... 162

DeviceTopologyCreateMode <<Enumeration>>..................................... 162

160
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

ExternalWiringCreateMode <<Enumeration>>...................................... 163

HardwareTopologyCreateMode <<Enumeration>>................................ 163

HtfxFileFormat <<Enumeration>>.......................................................... 163

ICaAlgorithms <<Interface>>................................................................ 164

ICaComponent <<Collection>>............................................................. 171

ICaComponents <<Interface>>............................................................. 180

ICaDataObject <<Interface>>................................................................ 182

ICaDataObjectType <<Interface>>......................................................... 186

ICaDataObjectTypes <<Collection>>...................................................... 187

ICaDataObjects <<Collection>>............................................................. 188

ICaLink <<Interface>>........................................................................... 189

ICaLinks <<Collection>>........................................................................ 190

ICaModelDescription <<Interface>>...................................................... 191

ICaObjects <<Collection>>.................................................................... 192

ICaRelation <<Interface>>..................................................................... 193

ICaRelations <<Collection>>................................................................. 195

ICaStrings <<Collection>>..................................................................... 201

ICaTransaction <<Interface>>................................................................ 202

ICaTransactionCreator <<Interface>>.................................................... 203

ICaWorkingView <<Collection>>.......................................................... 204

ICaWorkingViewGroup <<Interface>>................................................... 206

ICaWorkingViews <<Collection>>......................................................... 207

MatchingPlatformConnectionState <<Enumeration>>........................... 211

ModelTopologyCreateMode <<Enumeration>>..................................... 212

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

Enumeration values The enumeration has the following values:

Name Description Value


OneForEach For every model added by the call of AddModels create one 0
application process operation.
OneForAll Create only one application process for all models added by 1
the call of AddModels operation.
No Create no application process for the models added by the 2
call of AddModels operation.

ConfigurationReplaceMode <<Enumeration>>

Description The mode how to replace a configuration. This enumeration is only for
backwards compatibility. A configuration component is no more supported.

Enumeration values The enumeration has the following values:

Name Description Value


DefaultSettings Replaces a configuration by setting the defaults. 0
FileImportCds Replaces a configuration by importing a *.cds file. 2

DeviceTopologyCreateMode <<Enumeration>>

Description The mode how to create a device topology.

Enumeration values The enumeration has the following values:

Name Description Value


EmptyTopology Creates an empty device topology. 1
FileImportDtf Creates a device topology by importing a *.dtfx file. 2
FileImportXls Creates a device topology by importing a *.xlsx file. 3

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.

Enumeration values The enumeration has the following values:

Name Description Value


Calculate Creates the external wiring by calculating it. 1
FileImportEch Creates the external wiring by importing an *.echx file. 2

HardwareTopologyCreateMode <<Enumeration>>

Description The mode how to create a hardware topology.

Enumeration values The enumeration has the following values:

Name Description Value


ScanRegisteredHardware Scans the registered hardware to create the topology from. 0
FileImportHtf Imports a htfx-file to create the topology from. 1
EmptyTopology Creates an empty topology. 2

HtfxFileFormat <<Enumeration>>

Description The file format of a htfx file.

Enumeration values The enumeration has the following values:

Name Description Value


JSON Use the JSON serialization format. 1
XML Use the XML exchange format. 2

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.

Properties The element has no properties.

Methods The element has the following methods:

Name Description Parameter1) Returns


AssignChannelSet Assigns a channel set and § <ICaDataObject (refer None
a suitable channel to an to ICaDataObject
I/O function block instance <<Interface>> on
or an electrical interface. page 182)>
If parameter AssignChannel IOFunctionItem:
is set to False only a IOFunction instance or
channel set will be assigned. electrical interface.
If it is not possible to § <ICaDataObject (refer
assign the channel set (for to ICaDataObject
example IOFunctionItem is a <<Interface>> on
LambdaDCR) an exception will page 182)> ChannelSet:
be thrown. Channelset to assign.
§ <Boolean>
AssignChannels: Flag to
indicate if channel(s) should
be assigned.
AssignDefaultValuesAutomatic Tries to assign the default § <Object> Items: The items None
ally values for the given to assign the default values
items. Currently supported: for, currently supported are
FunctionBlocks with assigned FunctionBlocks
hardware.
AssignHardwareAutomatically Assigns the specified function § <Object> FunctionBlocks: None
blocks automatically to The function blocks
hardware resources. for which to assign
automatically.
AutoAssignChannels Assigns suitable channels to § <ICaDataObject (refer None
an I/O function block instance to ICaDataObject
or an electrical interface. If <<Interface>> on
no channel set was assigned page 182)>
to the given IOFunctionItem IOFunctionItem:
before an exception will be IOFunction instance or
thrown. electrical interface.
AutoAssignChannelSet Assigns a suitable channel set § <Object> None
and channels to I/O function IOFunctionItems: Array
block instances or electrical of IOFunctions or electrical
interfaces. interfaces.
ChangeToSynchronizedTimerEv Change the specified timer § <Object> TimerEvents: None
entType events into synchronized timer The timer events which are
events about to be changed.

164
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


ChangeToTimerEventType Change the specified § <Object> None
synchronized timer events into SyncTimerEvents: The
timer events synchronized timer events
which are about to be
changed.
ConnectIOFunctionBlocksToMo Lets you automatically map § <Object> Items: Instances Collection containing the new
delPortBlocks function and model ports of with ports. links.
the given function blocks and § ICaLinks (refer to
model port blocks using a ICaLinks <<Collection>> on
name-based algorithm. Ports page 190)
that cannot be mapped
according to mapping rules are
ignored.
ConnectModelPortBlocksToMo Lets you automatically map § <Object> Items: Instances Collection containing the new
delPortBlocks model ports of the given with ports. links.
model port blocks for § ICaLinks (refer to
model communication using ICaLinks <<Collection>> on
a namebased algorithm. Ports page 190)
that cannot be mapped
according to mapping rules are
ignored.
ConnectObjectsAutomatically Lets you automatically map § <ICaDataObject (refer Return value of the method.
all ports of a function to ICaDataObject § ICaLinks (refer to
block and a model port <<Interface>> on ICaLinks <<Collection>> on
block. Alternatively, it lets page 182)> First: page 190)
automatically map all ports ICaDataObject like a
of a model port block and function block.
another model port block. A § <ICaDataObject (refer
name based algorithm is used to ICaDataObject
to identify matching ports. <<Interface>> on
Ambiguities are automatically page 182)> Second:
resolved if possible. Model port ICaDataObject like a model
blocks that are not used in the port block.
signal chain are automatically § <String> ConnectionType:
added to it. String identifying the
algorithm of the connection.
Currently only default
(empty string) is supported.
CreateAssociatedDataObject Creates an associated § <ICaDataObject (refer The new created
ICaDataObject of the to ICaDataObject ICaDataObject (e.g. a
specified type for the <<Interface>> on VoltageOutFunctionBlock)
given ICaDataObject. Currently page 182)> DataObject: § ICaDataObject (refer
supported: Create an ICaDataObject to create the to ICaDataObject
IOFunctionBlock for the given new DataObject for (e.g. <<Interface>> on page 182)
IOChannel and assign the AnalogOut-IOChannel)
channel as a hardware § <String> AssociatedType:
resource. Name of the
new ICaDataObject
to create (e.g.
'VoltageOutFunctionBlock')
§ <String>
AdditionalInformation:
This parameter is reserved

165
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


for later use, default is
empty string.
CreateInverseBlocks Lets you create inverse § <Object> Collection with created blocks.
model port blocks for the ModelPortBlocks: Model § ICaDataObjects (refer
given model port blocks port blocks to generate to ICaDataObjects
as counterparts for model counter parts for. <<Collection>> on
communication. Unmapped page 188)
ports are automatically
mapped to the ports of the
inverse blocks.
CreatePreConfiguredApplicatio Creates an application process § <Object> Models: The None
nProcessAutomatically for task modeling for every models.
given model implementation § <ICaDataObject (refer
automatically. If array is empty to ICaDataObject
an application process will be <<Interface>> on
created for all valid models. If page 182)> Parent: The
array contains models which processing unit application
are not valid, an error will be to create the application
generated. process in, default is null for
new application process.
CreateSuitableModelPortBlock Creates suitable model ports § <Object> FunctionBlocks: None
for the specified function The function blocks to
blocks. create the model ports for.
CreateTaskAndRunnableFuncti Creates for every not used § <ICaDataObject (refer None
onBlockForIOEvent i/o-event of an i/o-function a to ICaDataObject
suitable task and a runnable <<Interface>> on
function block. page 182)> Function:
Function to generate
suitable task and runnable
function for
§ <ICaDataObject (refer
to ICaDataObject
<<Interface>> on
page 182)>
ApplicationProcess:
Application process, empty
for new.
DeleteCompletely Deletes ICaDataObject items § <Object> Entities: None
and usages from the signal ICaDataObject items to
chain and from topologies of delete.
the active ConfigurationDesk
application. For example
device: Delete from application
and topology. No unresolved
elements remain. For example
model: Delete model from
topology and its assignment to
application process and delete
assignment of all subelements.
If the parameter includes one
or more elements which are
not deletable an exception will
be thrown.

166
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


ExportConfiguration ExportConfiguration is no § <String> FullPath: The full None
longer supported since 2023- path to the file.
B.
ExportConflictsToXML Exports the conflicts to an XML § <String> FullPath: The None
file. full path to the XML file.
Write permission should be
granted.
§ <System.String[]> Infos:
Strings to query for special
information. Use an empty
array for the default
information.
§ <String> ConflictGroup:
The conflict group to
query for export. Default is
String.Empty for all groups.
ExportPropertyGridToXML Exports the property grid to § <String> FullPath: The full None
XML. path.
§ <System.String[]> Infos:
Strings to query for special
information. Use an empty
array for the default
information.
ExportTableViewToXML Exports a table view to an XML § <String> FullPath: The None
file. full path to the XML file.
Write permission should be
granted.
§ <String> TableName: The
name of the table to export.
§ <System.String[]> Infos:
Strings to query for special
information. Use an empty
array for the default
information.
§ <String> ColumnsSet: The
set of columns to export.
GenerateModelInterfaces Generates model interfaces § <Object> None
for the specified model port ModelPortBlocks: The
blocks. If the array of model model port blocks. Empty
port blocks is empty, interfaces array for all unresolved
for all unresolved blocks are blocks.
generated.
GetAllWorkingViewsContainin Calculates all working views § <Object> Entities: The Array with ICaWorkingView
gElements in which at least one of entities which should be items.
the given entities is contained contained into the working § System.Object[]
and returns the working views.
view items. If parameter § <Boolean>
ExcluceGlobal is set to false ExcludeGlobal: True to
(default) the global working exclude it from the returned
view is included in the list list, otherwise false.
of the return working views,
otherwise not.

167
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


GetAssignableChannelSets Returns a collection of § <ICaDataObject (refer ICaDataObject collection.
assignable channel sets for an to ICaDataObject § ICaDataObjects (refer
I/O function block instance or <<Interface>> on to ICaDataObjects
an electrical interface. If it page 182)> <<Collection>> on
is not possible to calculate IOFunctionItem: page 188)
suitable channel sets for IOFunction instance or
the given IOFunctionItem an electrical interface.
exception will be thrown.
GetConnectedElements Gets the elements which are § <Object> Items: Array ICaObjects collection with
connected to the elements in of elements to get the elements
Items. connected items for § ICaObjects (refer to
ICaObjects <<Collection>>
on page 192)
GetSupportedIOFunctionTypes Returns the supported and § <ICaDataObject (refer Collection of
creatable I/O function block to ICaDataObject ICaDataObjectTypes
types for a channel or channel <<Interface>> on § ICaDataObjectTypes (refer
set If the given item is not a page 182)> ChannelItem: to ICaDataObjectTypes
valid channel or channel set an Channel or channel <<Collection>> on
exception will be thrown. set instance to get page 187)
IOFunctionTypes for.
ImportECUInterfaceContainer Imports an ECU Interface § <ICaDataObject (refer to None
description container for an ICaDataObject
ECU Interface Configuration. <<Interface>> on
page 182)>
ECUInterfaceConfigurat
ion: Function instance to
import container for.
§ <String> FilePath: Path
to a valid ECU Interface
description container.
OptimizeConfiguration Sorts the given items § <Object> Entities: None
automatically. The array ICaDataObject items
contains ICaDataObject items representing tasks.
which represent tasks
or application processes.
For application processes
OptimizeConfiguration assigns
runnable functions to tasks
and determines the execution
order of runnable functions
within tasks depending
on their providers’ model
communication connections. If
necessary it creates new tasks.
Task priorities are set based
on their runnable functions’
restrictions as well as their
communication connections.
If executed on tasks the
operation sorts runnable
functions within each task. -
If one or more objects are not
valid (e.g. null or not of type
task or application process)

168
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


an ArgumentException will be
thrown and no sorting will
be performed. If the array is
empty an ArgumentException
will be thrown.
PropagateToConfigurationDesk Updates the connected § <Object> Entities: None
ModelInterface model port blocks in Function block instances.
ConfigurationDesk for the
given function block instances
and creates new model port
blocks in ConfigurationDesk
if the function block has
unconnected ports.
PropagateToSimulink Updates the connected model § <Object> Entities: None
port blocks in Function block instances or
ConfigurationDesk for the model port blocks.
given function block instances § <String> ModelName: Name
and creates new model port of existing model in
blocks in ConfigurationDesk if ModelTopology, default is
the function block has null for new model.
unconnected ports. If
ModelName is provided:
Updates the Simulink model
for the given function block
instances and model port
blocks.Model port blocks in
Simulink are created if
necessary.The structure of the
model is not modified, e.g., no
subsystems are created or
removed. No model port
blocks are removed from the
model. This replaces the
former bus operation
UpdateConnectedModelPortBl
ocks. If no ModelName is
provided: A new Simulink
model containing a structured
model interface including
model port blocks and
subsystems is created. This
replaces the former bus
operation
GenerateStructuredModel.
TransferData Transfers the data specified § <Object> Ports: The ports. None
by the TransferType § <TransferType (refer
(refer to TransferType to TransferType
<<Enumeration>> on <<Enumeration>> on
page 264) from the ports to page 264)> TransferType:
the connected ports. The TransferType
enumeration: All
(numerical value: 0)
AllowedFailureClasses (1)
ExpectedLoadDescription (2)

169
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


UpdateECUInterfaceContainer Updates an ECU Interface § <ICaDataObject (refer to None
description container for an ICaDataObject
ECU Interface Configuration. <<Interface>> on
page 182)>
ECUInterfaceConfigurat
ion: Function instance to
update container for.
§ <String> FilePath: Path
to a valid ECU Interface
description container.
1) <Type> Name: Description

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.

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

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.

Bus Manager Description


Configuring the Bus Manager It is possible to configure the Bus Manager component but it is not necessary to create or
remove it.
Importing a communication matrix Import a communication matrix by calling the Configure(ICaComponent) method
with the "AddCommunicationMatrix" operation. With this operation, you can import
a communication matrix from a file (*.xml, *.arxml, *.dbc,*.ldf) into the current
application. You can import a specific communication matrix only once into an
application. To import a communication matrix, use the absolute file path as a string
value.

175
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Bus Manager Description


Removing a communication matrix Remove a communication matrix by calling the Configure(ICaComponent) method with
the "RemoveCommunicationMatrix" operation. Select the communication matrix (first
argument) and use one of the following string values (second argument): Use "True" to
remove the selected communication matrix and all its elements that are assigned to bus
configurations. Use "False" to remove only the communication matrix. If elements of the
communication matrix are assigned to bus configurations, these elements are marked as
unresolved.
Assigning an element to a bus Assign elements from a communication matrix by calling the Configure(ICaComponent)
configuration method with the "AssignElements" operation. With this operation, you can assign
selected elements from a communication matrix (first argument) to a specific bus
configuration (second argument). Bus configurations can contain elements from different
communication matrices.
Creating a restbus configuration Create a restbus configuration by calling the Configure(ICaComponent) method with
the "CreateRestbusConfiguration" operation. With this operation, you can create a
restbus configuration to configure a restbus simulation for ECUs (in the context
of the CommunicationMatricesByEcus or CommunicationMatricesByEcusWithProperties
relation) or network nodes (in the context of the CommunicationMatricesByClusters or
CommunicationMatricesByClustersWithProperties relation). Select the ECUs or network
nodes (first argument, list of ECU/network node names) and specify the bus
configuration (second argument) to which the communication matrix elements that are
required for the restbus simulation are assigned. If the second argument is empty, a
new bus configuration is created and the communication matrix elements are assigned
to this bus configuration. You can also exclude ECUs from the restbus configuration
(third argument, list of ECU names). This excludes the ECU's bus communication on all
communication clusters from the restbus configuration. If the third argument is empty,
all ECUs/network nodes that are required for the restbus simulation are added to the
restbus configuration.
Copying elements to the Clipboard Copy elements to the Clipboard by calling the Configure(ICaComponent) method with
the "CopyBusElements" operation. With this operation, you can copy either one selected
bus configuration or one or more selected bus configuration elements, such as multiple
selected PDUs, to the Clipboard. However, if you copy multiple selected bus configuration
elements, the selected elements must all be of the same element type and must be
elements of the same bus configuration.
Cutting elements to the Clipboard Cut elements to the Clipboard by calling the Configure(ICaComponent) method with the
"CutBusElements" operation. With this operation, you can cut one or more selected bus
configuration elements, such as multiple selected PDUs, to the Clipboard. However, if you
cut multiple selected bus configuration elements, the selected elements must all be of
the same element type and must be elements of the same bus configuration.
Pasting elements from the Clipboard Paste elements from the Clipboard to a bus configuration by calling the
Configure(ICaComponent) method with the "PasteBusElements" operation. With this
operation, you can paste the elements that were copied or cut to the Clipboard to a
selected bus configuration.
Removing an element from a bus Remove elements by calling the Configure(ICaComponent) method with the
configuration "RemoveElements" operation. With this operation, you can remove selected elements
from bus configurations. Those elements can be of different bus configurations.
Replacing assigned communication Replace an assigned communication matrix by calling the Configure(ICaComponent)
matrices method with the "ReplaceCommunicationMatrixAssignment" operation. With this
operation, you can replace a selected communication matrix in a specific bus
configuration (first argument) with a modified version of the matrix (second argument).

176
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Bus Manager Description


Get available features Get a list of all the features (used and unused) that are available for the selected
bus configuration element by calling the Configure(ICaComponent) method with the
"GetAvailableFeatures" operation. The list provides the role names that are required to
add an available feature via the "AddFeature" operation.
Add feature Add an available feature to the selected bus configuration element by calling the
Configure(ICaComponent) method with the "AddFeature" operation. To add an available
feature, you must use its role name as a string value. To get an overview of the role
names of the available features, you can use the "GetAvailableFeatures" operation.
Adding elements to communication Add a new communication matrix element (first argument) to an existing element
matrices (second argument) by calling the Configure(ICaComponent) method with the
"AddElementToCommunicationMatrix" operation. To add a new element, you must use
its role name as a string value. If you want to add an ISignal IPDU to a CAN channel, you
must also specify the direction, i.e., "BusDirectedElementTX" or "BusDirectedElementRX"
(third argument). Depending on the existing element, it is possible to call this configure
operation several times to add more than one new element.
Undo modifications of communication Undo the modifications of a communication matrix by calling the
matrices Configure(ICaComponent) method with the "UndoChangesToCommunicationMatrix"
operation in one of the following ways: For a specific imported communication matrix
element (first argument), undo the changes to some of its properties (second argument,
list of properties) or to all of its properties (omit second argument). In case of an added
communication matrix element (first argument), you can remove the element and all its
dependent elements (omit second argument). For the entire communication matrix, you
can undo all of the modifications (empty first argument, omit second argument).
Generating bus simulation containers Generate bus simulation containers by calling the Configure(ICaComponent) method
with the "GenerateContainers" operation.
Adding frame captures Add a frame capture to the Inspection part of a specific bus configuration by calling the
Configure(ICaComponent) method with the "AddFrameCapture" operation. It is possible
to call this configure operation several times to add more than one frame capture to the
Inspection part.
Adding frame gateways Add a frame gateway of the given type (first argument) to the Gateways part of a
specific bus configuration (second argument) by calling the Configure(ICaComponent)
method with the "AddGateway" operation. It is possible to call this configure operation
several times to add more than one frame gateway to the Gateways part. Currently
supported gateway type is "BusFrameGateway".
Adding filter rules Add a filter rule to a specific frame capture filter or frame gateway filter by calling the
Configure(ICaComponent) method with the "AddFilterRule" operation. It is possible to
call this configure operation several times to add more than one filter rule to the specific
filter.
Adding user-defined gateway source Add RX PDUs as user-defined gateway source PDUs to a TX PDU
RX PDUs to a TX PDU (gateway target) by calling the Configure(ICaComponent) method with the
"AddUserDefinedGatewaySourcePdu" operation. With this operation, you can add RX
PDUs that are selected in communication matrices (first argument, list of RX PDUs) to a
TX PDU that is selected in a bus configuration (second argument).
Removing user-defined gateway source Remove user-defined gateway source PDUs from a TX PDU (gateway
RX PDUs from a TX PDU target) by calling the Configure(ICaComponent) method with the
"RemoveUserDefinedGatewaySourcePdu" operation. With this operation, you can
remove RX PDUs that are selected in communication matrices (first argument, list of
RX PDUs) from a TX PDU that is selected in a bus configuration (second argument).

177
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Bus Manager Description


Get the active or default XIL framework Get the active or default XIL framework label ID template by calling the
label ID template Configure(ICaComponent) method with the "GetBmXilFrameworkLabelIdTemplate"
operation. Use an empty string as the argument to get the active XIL framework label
ID template. Use "Default" as the argument to get the default XIL framework label ID
template of the Bus Manager.
Configure the active XIL framework Configure the active XIL framework label ID template
label ID template by calling the Configure(ICaComponent) method with the
"ConfigureBmXilFrameworkLabelIdTemplate" operation. Use static texts, macros, and/or
macro groups to configure the template. Tip: The default XIL framework label ID
template, which you can get by using the "GetBmXilFrameworkLabelIdTemplate"
operation, contains commonly used macros and macro groups. The specified settings are
checked for errors. If no errors occur, the settings are used as the active XIL framework
label ID template.
Enabling and disabling a user‑defined Enable or disable a user-defined bus configuration behavior by calling the
bus configuration behavior Configure(ICaComponent) method with the "EnableUserDefinedConfiguration"
operation. Use "True" to enable the user-defined bus configuration behavior, use "False"
to disable it. When enabled, the Bus Configuration Behavior table lets you specify the
behavior for assigning communication matrix elements to bus configurations and for
adding bus configuration features to communication matrix elements. When disabled,
the default behavior applies. Note: You can specify the user-defined bus configuration
behavior only in the user interface of the Bus Manager.

Properties The element has the following properties:

Name Description Get/Set Type


ComponentType Gets the type of the component. Get String
Count Returns the number of data objects of the Get Signed 32 Bit Integer
components data repository.
DataObjectTypes Gets the collection of creatable data Get ICaDataObjectTypes (refer
object types of this component. The items to ICaDataObjectTypes
can be used as type parameter when <<Collection>> on
creating ICaDataObject (refer to ICaDataObject page 187)
<<Interface>> on page 182)s.
IsConfigured Returns always true. Get Boolean

Methods The element has the following methods:

Name Description Parameter1) Returns


Configure Provides access to the basic § <String> operation: The None
creation of a component and operation.
to configure various aspects of § <Object> Params: The
it. The supported configuration params.
possibilities can be retrieved by
the GetSupportedOperations
method.

178
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


Contains Tests if a data object is § <ICaDataObject (refer True if the repository contains
contained in the component to ICaDataObject the data object.
data repository. <<Interface>> on § Boolean
page 182)> DataObject:
Data object instance
searched for.
CreateRootObject Creates a top level § <ICaDataObjectType (refer New data object.
ICaDataObject (refer to to ICaDataObjectType § ICaDataObject (refer
ICaDataObject <<Interface>> <<Interface>> on to ICaDataObject
on page 182) instance of the page 186)> Type: Type of <<Interface>> on page 182)
type given by the parameter the data object.
"ICaDataObjectType". A newly § <String> Name: Name of
created object will become a the data object or auto-
member of the component's generated name if not
data. repository. specified or is empty string.
GenerateWorkingViews Generates WorkingViews § <Signed 32 Bit Integer> None
according to the content of Mode: Parameter is for
the topology. If a component further use, default is 0
does not support generating
WorkingViews a not supported
exception will be thrown.
GetSupportedOperations Gets a collection of strings None String collection with
that identifies the supported supported operations.
operation by this component. § ICaStrings (refer to
Collection can be empty. ICaStrings <<Collection>>
on page 201)
Item Returns a data object from the § <String> Index: Full path of The found data object.
components data repository the data object or a numeric § ICaDataObject (refer
according to the specified index value. to ICaDataObject
index or full path (full path <<Interface>> on page 182)
currently not supported).
1) <Type> Name: Description

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.

Related topics Examples

Automating Build Process......................................................................................................... 55


Automating Signal Chain Configuration................................................................................... 46
Examples of Automating Bus Manager Features....................................................................... 95

ICaComponents <<Interface>>

Description Provides access to the components of an application. The collection


contains predefined ICaComponent (refer to ICaComponent <<Collection>> on
page 171)s and is read-only. The implementing object is only valid in its active
application. Any access after closing the application is undefined and can cause
unpredictable results.

180
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


BusManager Gets the bus manager topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)
DeviceTopology Gets the device topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)
ExternalWiring Gets the external wiring topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)
HardwareTopology Gets the hardware topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)
IOFunctionLib Gets the function library topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)
ModelTopology Gets the model topology. Get ICaComponent (refer
to ICaComponent
<<Collection>> on
page 171)

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if a component with § <String> Type: True if the collection contains a
the specified type name is Configuration type component with given type.
contained in the collection. § Boolean
Item Returns a component § <String> Index: Type of the The found component object.
according to the specified component or a numeric § ICaComponent (refer
index or type. index value. to ICaComponent
<<Collection>> on
page 171)
1) <Type> Name: Description

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.

Related topics Examples

Automating Hardware Resource Assignment............................................................................ 49


Automating Modeling of Application Processes and Tasks......................................................... 53
Automating Signal Chain Configuration................................................................................... 46
Examples of Automating Bus Manager Features....................................................................... 95

ICaDataObject <<Interface>>

Description Provides access to a DataObject that specifies a logical element within


an ICaComponent (refer to ICaComponent <<Collection>> on page 171)
application. The implementing object is only valid in the current application.
Any access after closing the application or after deleting the object is undefined
and can cause unpredictable results. A data object can have the following
membership states:
§ Application AND Component Data Repository: Object is both in application
and repository.
§ Application ONLY: Object is only in the application and not in the repository.
Usually this means the object is unresolved.
§ Component Data Repository ONLY: Object is only in the repository and not in
the application.
§ None: Object is neither in the repository nor in the application. This usually
means the object is no longer valid.

The membership states are changed by modifying the IsInApplication and


IsInRepository properties if this is allowed by the real object. Therefore, the
behavior by setting these properties depends on the component type that the
object belongs to and on the type of the ICaDataObject (for example, port,
function). The IsInApplication property has the following constraints regarding
the different topologies.

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.

The IsInRepository property corresponds to the element state "unresolved".


Setting this property is only supported by elements of the device topology and
the hardware topology and only for the value False. Setting the value to True
or setting the value of elements from other topologies results in an exception.
The IsInRepository property has the following constraints regarding the different
topologies.

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

Properties The element has the following properties:

Name Description Get/Set Type


ConnectedObjects Gets the collection of directly connected Get ICaDataObjects (refer
ICaDataObject's. to ICaDataObjects
<<Collection>> on
page 188)
DataObjectTypes Gets the collection of creatable data object Get ICaDataObjectTypes (refer
types that are supported by this data object. to ICaDataObjectTypes
Empty collection if no type is supported. The <<Collection>> on
items can be used as type parameters when page 187)
creating elements.
ImplementingType Returns the name of the interface that is Get String
implemented by this object.
IsInApplication Gets or sets a value indicating whether this Get/Set Boolean
instance is a member of the current application.
Changing this value adds/removes the data
object to/from the current application if the
type of the data object and the topology
supports this.
IsInRepository Gets or sets a value indicating whether Get/Set Boolean
this instance is a member of a certain
component's data repository. Changing this
value adds/removes the data object to/from the
component's data repository if the type of the
data object and the topology supports this.
True for a newly created data object.
Links Gets the collection of ICaLink (refer to ICaLink Get ICaLinks (refer to
<<Interface>> on page 189)s. ICaLinks <<Collection>>
on page 190)
Name Gets or sets the name of the object. Get/Set String
Parent Gets the parent data object. Null if root. Get ICaDataObject
Properties Gets the properties of the object. Get ICaProperties (refer
to ICaProperties
<<Collection>> on
page 224)
Roles Gets the roles which are currently associated Get ICaStrings (refer to
with the ICaDataObject. This preliminary and ICaStrings <<Collection>>
experimental feature is not fully documented. on page 201)
Type Gets the data object type. Get ICaDataObjectType (refer
to ICaDataObjectType
<<Interface>> on
page 186)

184
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if Object is contained in § <ICaDataObject> True if contained in the
the children's collection. DataObject: The data children's collection, otherwise
object. false.
§ Boolean
CreateChild Creates an ICaDataObject § <ICaDataObjectType (refer New data object.
instance of a certain to ICaDataObjectType § ICaDataObject
type as a child of the <<Interface>> on
current data object. The page 186)> Type: Type of
IsInRepository(ICaDataObject) the data object.
value of the created child data § <String> Name: Name of
object value is inherited from the data object or auto-
the parent value. generated name if not
specified or is empty string.
Equals Checks whether or not the § <ICaDataObject> True if equal, otherwise false.
internal referenced object DataObject: ICaDataObject § Boolean
of the given ICaDataObject to compare with.
refers to the same internal
referenced object of this
instance. Different to the
call of Equals the '=='
operator checks equality of the
wrapping automation objects.
GetCount Gets the number of None Return value of the method.
ICaDataObjects in the § Signed 32 Bit Integer
children's collection.
IsOfRole Returns true if the given role § <String> Role: String which True if role is currently
is currently associated with identifies role to query for. associated with the object,
the ICaDataObject, otherwise otherwise false.
false. This preliminary and § Boolean
experimental feature is not
fully documented.
Item Returns a child data object § <String> Index: Name of The found data object.
according to the specified the data object or a numeric § ICaDataObject
index or name. index value.
1) <Type> Name: Description

Returned by The element is returned by properties or methods of the following elements:


§ ICaAlgorithms (refer to ICaAlgorithms <<Interface>> on page 164)
§ ICaComponent (refer to ICaComponent <<Collection>> on page 171)
§ ICaDataObjects (refer to ICaDataObjects <<Collection>> on page 188)
§ ICaLink (refer to ICaLink <<Interface>> on page 189)
§ ICaRelation (refer to ICaRelation <<Interface>> on page 193)
§ ICaWorkingView (refer to ICaWorkingView <<Collection>> on page 204)

185
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Related topics Basics

Best Practices for Data Structures and Parameters................................................................... 113

Examples

Automating Hardware Resource Assignment............................................................................ 49


Automating Modeling of Application Processes and Tasks......................................................... 53
Automating Signal Chain Configuration................................................................................... 46

ICaDataObjectType <<Interface>>

Description Provides information about the type of a creatable data object.

Properties The element has the following properties:

Name Description Get/Set Type


Name Returns the name of the data object type. Get String

Methods The element has no methods.

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.

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of data object types. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Item Returns a data object type § <String> Index: Name of The found data object type.
according to the specified the data object type or a § ICaDataObjectType (refer
index or name. numeric index value. to ICaDataObjectType
<<Interface>> on page 186)
1) <Type> Name: Description

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

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

ICaDataObjects <<Collection>>

Description Provides access to ICaDataObjects. The collection of the implementing object is


not updated if changes like removing or adding objects occurs. Therefore any
access after changes can cause unpredictable results.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of data objects in the Get Signed 32 Bit Integer
collection.

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if a data object with the § <ICaDataObject (refer True if the collection contains
specified name is contained in to ICaDataObject the given data object.
the collection. <<Interface>> on § Boolean
page 182)> DataObject:
The data object to check for.
Item Returns a data object § <String> Index: Name of The found data object.
according to the specified the data object or a numeric § ICaDataObject (refer
index or type. index value. to ICaDataObject
<<Interface>> on page 182)
1) <Type> Name: Description

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.

Related topics Examples

Automating Hardware Resource Assignment............................................................................ 49


Automating Modeling of Application Processes and Tasks......................................................... 53
Automating Signal Chain Configuration................................................................................... 46

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.

Properties The element has the following properties:

Name Description Get/Set Type


First Gets the first data object of the link. Access to Get ICaDataObject (refer
it after deleting a link or port is undefined. to ICaDataObject
<<Interface>> on
page 182)
ImplementingType Returns the name of the automation interface Get String
that is implemented by this object.
Second Gets the second data object of the link. Access Get ICaDataObject (refer
to it after deleting a link or port is undefined. to ICaDataObject
<<Interface>> on
page 182)

189
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Methods The element has no methods.

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of links. The collection can Get Signed 32 Bit Integer
be empty.

Methods The element has the following methods:

Name Description Parameter1) Returns


Item Returns a link according to the § <Signed 32 Bit Integer> The found link.
specified index. Index: Numeric index value. § ICaLink (refer to ICaLink
<<Interface>> on page 189)
1) <Type> Name: Description

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>>

Description An implementation of this interface can be used to provide information about


a model to add to the application using the AddModels operation. To get an
implementation of this interface use the "CreateModelDescription" operation of
the model topology.

Properties The element has the following properties:

Name Description Get/Set Type


AnalyzeComplete Gets or sets a flag to indiciate if the model Get/Set Boolean
should be analyzed completely. Default is true.
Flag is ignored for not supported types.
FilePath Gets or sets the file path to the model. Get/Set String
InitializeCommand Gets or sets the model initialization command Get/Set String
for Matlab. Default is empty. Command is
ignored for not supported types.

Methods The element has no methods.

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of objects in the collection. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Item Returns an object according § <Object> Index: Index of None
to the specified index in the object in the collection.
collection. Attention: if given index is
a string ensure that the
objects in the collection
supports name property.
1) <Type> Name: Description

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).

Properties The element has the following properties:

Name Description Get/Set Type


Name Gets the name of the Relation. Get String

Methods The element has the following methods:

Name Description Parameter1) Returns


AddElements Adds the given elements to the § <Object> ParentObject: None
given Object. The parent object.
§ <Object> Elements:
Elements to add as children.
§ <Object> Follower: The
follower, elements will be
inserted before this element,
maybe null.
CreateDataObject Creates an ICaDataObject as § <ICaDataObjectType (refer The new created
child for the given parent. to ICaDataObjectType ICaDataObject.
<<Interface>> on § ICaDataObject (refer
page 186)> to ICaDataObject
CreatableType: The type <<Interface>> on page 182)
of the object which should
be created
§ <ICaDataObject (refer
to ICaDataObject
<<Interface>> on
page 182)> Parent: The
ICaDataObject which should
be the parent for the new
created object. Default value
is null.
ExportXmlData prototype version of exporting. § <String> filename: The None
parameter filename.
FindByXPath Finds and return elements of § <String> Pattern: XPath Elements of the used relation
a provided relation matching expression compatible to the matching the given XPath 1.0
a given XPath 1.0 expression. XPath 1.0 standard expression
Currently only supported for § <Object> StartObject: § ICaObjects (refer to
CommunicationMatrix and Bus For one object of ICaObjects <<Collection>>
Configuration relations. type ICaDataObject on page 192)

193
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


(refer to ICaDataObject
<<Interface>> on
page 182): use this object as
start element. Other types:
Reserved for future use
GetCreatableTypes Gets the creatable types § <ICaDataObject (refer Collection of creatable types,
which are supported by an to ICaDataObject maybe empty
ICaDataObject. <<Interface>> on § ICaDataObjectTypes (refer
page 182)> to ICaDataObjectTypes
ParentDataObject: The <<Collection>> on
ICaDataObject which should page 187)
be the parent for the new
created object. Default value
is null.
GetElements Gets the elements for the § <Object> DataObject: The Collection of ICaObjects
related Object. data object to get the which represents the related
related elements for. elements, maybe empty.
§ ICaObjects (refer to
ICaObjects <<Collection>>
on page 192)
GetTopNodes Gets the top nodes of a None Collection of ICaObjects which
relation. represents the top nodes.
Maybe empty.
§ ICaObjects (refer to
ICaObjects <<Collection>>
on page 192)
RemoveElements Removes the given elements § <Object> ParentObject: None
from the given Objects The parent object.
children. § <Object> Elements:
Elements to remove from
the children.
SetElements Sets the given elements to § <Object> Elements: None
specified relation for the given Elements to set the relation.
Object. Removes the previous § <Object> DataObject:
elements for this relation Object to set the related
before. Attention: This method elements for.
may be not supported by all
available RelationAccessors.
1) <Type> Name: Description

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.

Related topics Examples

Automating Build Process......................................................................................................... 55


Automating Hardware Resource Assignment............................................................................ 49
Automating Modeling of Application Processes and Tasks......................................................... 53
Examples of Automating Bus Manager Features....................................................................... 95

ICaRelations <<Collection>>

Description Use this interface to get a ICaRelation (refer to ICaRelation <<Interface>> on


page 193) for accessing DataObjects with a specific relation. The currently
supported relations are listed below with a short description. Look at the more
detailed examples written in Python, which are located in the ToolAutomation
folder, which is a sub folder of the customers demo folder. 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.

Relation Accessor Usages


ChannelSets This relation is useful for hardware assignment. Use the ChannelSets relation to
get the channel sets which are designated for a function. E.g. if you got an
accessor for ChannelSets via the RelationAccessors.Item("ChannelSets") you can query
with RelationAccessor.GetElements(<SignalConditioningPartofFunctionBlockItem>) for a

195
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Relation Accessor Usages


collection of appropriate requirements of this FunctionBlock. Attention: With the
SetElements method then you can assign a specific ChannelSet.
AllChannelSets In comparison to the ChannelSets relation this relation gets all channel sets even if an
assignment would result in a conflict.
HardwareRequirements This relation is useful for hardware assignment. Use the HardwareRequirements
relation to get the requirements which are designated for a
function. E.g. if you got an accessor for HardwareRequirements via
the RelationAccessors.Item("HardwareRequirements") you can query with
RelationAccessor.GetElements(<SignalConditioningPartofFunctionBlockItem>) for a
collection of appropriate requirements of this FunctionBlock. Attention: The SetElements
method is not supported for the HardwareRequirements relation. To use the
HardwareRequirements relation successfully you have to assign a ChannelSet before.
ApplicableChannels This relation is useful for hardware assignment. Use the ApplicableChannels relation
to get the channels which fit a hardware requirement. E.g. if you got a
hardware requirement for a function block use the ApplicableChannels relation
accessor (RelationAccessors.Item("ApplicableChannels")) to query for the channels:
RelationAccessor.GetElements(<HardwareRequirementItem>). Attention: The SetElements
method is not supported for the ApplicableChannels relation.
AssignedChannels This relation is useful for hardware assignment. Use the AssignedChannels relation
to query for or to set channels regarding hardware requirements. E.g. if you
got a hardware requirement you can query with the AssignedChannels relation
accessor (RelationAccessors.Item("AssignedChannels")) for the assigned channels:
RelationAccessor.GetElements(<HardwareRequirementItem>). If you got applicable
channels for a hardware requirement you can assign one of them with
the SetElements method: RelationAccessor.SetElements(<HardwareRequirementItem>,
<ApplicableChannelItems>).
ApplicationConfiguration This relation is useful for application and task modeling. Use the
ApplicationConfiguration relation to get the executable application via
RelationAccessor.GetTopNodes(), to query for configurable elements with
RelationAccessor.GetElements(<ParentItem>) or to add elements to an
application process or to a task with RelationAccessor.SetElements(<ParentItem>).
Create new tasks or timer events by querying for the creatable
type with RelationAccessor.GetCreatableTypes(<ParentItem>) and calling
RelationAccessor.CreateDataObject(<CreatableTypeItem>, <ParentItem>).
ModelCommunication This relation is useful for configuring the communication regarding models and
application processes. Use the ModelCommunication relation to get or create
communication packages and to add or remove models to or from communication
packages. Get the standard communication package and previously created packages
with RelationAccessor.GetTopNodes(). Create new communication packages by
querying for the creatable type with RelationAccessor.GetCreatableTypes() and calling
RelationAccessor.CreateDataObject(<CreatableTypeItem>).
BuildConfiguration This relation is useful for configuring the build configuration. Use
RelationAccessor.GetTopNodes() to get the executable application and
to query then for global build settings and build configuration
sets via RelationAccessor.GetElements(<ExecutableApplicationItem>). Configure
the global build settings via the properties of the ICaDataObject.
Create new build configuration sets by getting the creatable
types with RelationAccessor.GetCreatableTypes(<ExecutableApplicationItem>) and
calling RelationAccessor.CreateDataObject(<CreatableTypeItem>, <ParentItem>).
Get application processes from build configuration sets with
RelationAccessor.GetElements(<BuildConfigurationSetItem>) and assign it to
other build configuration sets via RelationAccessor.SetElements(<ParentItem>,
<ApplicationProcessItems>);

196
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Relation Accessor Usages


DeviceConnectors This relation is useful for getting or creating device connectors
and device pins. Use the RelationAccessor.GetElements(<DeviceBlockItem>)
to get the related device connectors and pins (including unresolved
elements). Use the RelationAccessor.GetCreatableTypes(<DeviceBlockItem>) and the
RelationAccessor.CreateDataObject(<CreatableTypeItem>, <DeviceBlockItem>) to create
a device connector or a device pin. To assign a pin to a device port use
the ports "AssignedPins" property and set its value to the port object. To
assign pins to a different device connector or a different device block use the
RelationAccessors.AddElements(<ParentItem>, <PinItems>) method. It is even possible to
assign device connectors to a different device block.
Links This relation is useful for getting all links from a parent object. Currently supported are
blocks. Use the RelationAccessor.GetElements(<BlockItem>) method to get all links from
a block.
PropertyDataObjects This relation is useful for getting the ICaDataObjects in the hierarchy of the PropertyGrid
TreeView. Because this hierarchy often represents no parent - child relation it may be not
possible to get the objects via ICaDataObject.Item or ICaDataObject.Parent. Therefore
this relation supports the RelationAccessor.GetElements(<DataObjectItem>> method to
get these data objects.
CommunicationMatricesByClusters This relation is useful for getting Communication Matrix elements in a hierarchy ordered
by clusters. This hierarchy represents a cluster based communication, which means every
ECU is ordered under its Communication Cluster, regardless used bus system type.
CommunicationMatricesByEcus This relation is useful for getting Communication Matrix elements in a hierarchy ordered
by ECUs. This hierarchy represents an ECU based communication, which means every
ECU is ordered by itself, containing all bus system types it represents, regardless of the
Communication Cluster its connected with.
BusConfigurations This relation is useful for getting the configured Communication Matrix elements for all
Bus Configurations.
CommunicationMatricesByClustersWith The relation is useful for getting Communication Matrix elements, including their
Properties properties, in a hierarchy ordered by clusters via XPath. Attention: This relation decreases
the performance. Access as few properties as possible via this relation. To access a high
number of properties, use the PropertyDataObjects relation instead. You cannot use
XPath expressions with the PropertyDataObjects relation.
CommunicationMatricesByEcusWithPro The relation is useful for getting Communication Matrix elements, including their
perties properties, in a hierarchy ordered by ECUs via XPath. Attention: This relation decreases
the performance. Access as few properties as possible via this relation. To access a high
number of properties, use the PropertyDataObjects relation instead. You cannot use
XPath expressions with the PropertyDataObjects relation.
BusConfigurationsWithProperties The relation is useful for getting the configured Communication Matrix elements,
including their properties, for all Bus Configurations via XPath. Attention: This relation
decreases the performance. Access as few properties as possible via this relation. To
access a high number of properties, use the PropertyDataObjects relation instead. You
cannot use XPath expressions with the PropertyDataObjects relation.
BusParentElement This relation is useful for getting the parent element of a bus element, i.e., a
communication matrix element or a bus configuration element. For root elements and
non-bus elements, the parent element is always 'null'. Note: For function ports and
event ports that are available for bus configuration features, the parent elements that
are accessed by this relation and the ICaDataObject.Parent relation differ: This relation
accesses the parent elements in the Bus Configurations table. The ICaDataObject.Parent
relation accesses the parent elements in the Bus Configuration function block. Therefore,
the element types of the accessed parent elements differ.

197
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Relation Accessor Usages


AssignableProviders This relation is useful for assigning provider blocks, e.g. blocks providing a master APU.
Use the AssignableProviders relation to get the providers which can be assigned to a
given provider request: RelationAccessor.GetElements(<ProviderRequest>). Attention: The
SetElements method is not supported for the AssignableProviders relation.
ProviderRequests This relation is useful for assigning provider blocks, e.g. blocks providing a master APU.
Use the ProviderRequests relation to get the provider requests a function block has.
You can query a function block via RelationAccessor.GetElements(< FunctionBlock>) for
its contained requests. Attention: The SetElements method is not supported for the
ProviderRequests relation. The ProviderRequests relation supports groups of requests, for
example, used in ECU Interface Configuration function blocks. To get single requests
from groups you have to call the relation a second time with the respective group
element.
AssignedProviders This relation is useful for assigning provider blocks, e.g. blocks providing a master
APU. Use the AssignedProviders relation to query for or to set providers for a
given block request. E.g. if you got a provider request for a function block you
can query with the AssignedProviders relation accessor for the assigned providers:
RelationAccessor.GetElements(< ProviderRequest >). If you got assignable providers
for a provider request you can assign one of them with the SetElements method:
RelationAccessor.SetElements(< ProviderRequest >, < AssignableProviderItems>).
FeatureProviders This relation is useful for full configuration of provider blocks, e.g. blocks providing an I/O
function trigger, or getting such contained feature providers for later assignment via the
AssignedProviders relation. Use the FeatureProviders relation to get the feature providers
of a function block. You can query a function block via RelationAccessor.GetElements(<
FunctionBlock>) for its contained feature providers. Attention: The SetElements method
is not supported for the FeatureProviders relation.
HardwareNetworkView This relation is useful to get objects according the network view hierarchy, e.g. assigning
provider blocks, e.g. displayed in the hardware browser when activating network view
instead of assembly view.

Properties The element has the following properties:

Name Description Get/Set Type


AllChannelSets Gets the all channel sets relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
ApplicableChannels Gets the applicable channels relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
ApplicationConfiguration Gets the application configuration relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
AssignableProviders Gets the assignable providers relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
AssignedChannels Gets the assigned channels relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
AssignedProviders Gets the assigned providers relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)

198
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Get/Set Type


BuildConfiguration Gets the build configuration relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
BusConfigurations Gets the bus configurations relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
BusConfigurationsWithProperties Gets the bus configurations with properties Get ICaRelation (refer to
relation. ICaRelation <<Interface>>
on page 193)
BusParentElement Gets the bus parent element relation for bus Get ICaRelation (refer to
elements. ICaRelation <<Interface>>
on page 193)
ChannelSets Gets the channel set relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
CommunicationMatricesByClusters Gets the communication matrices by clusters Get ICaRelation (refer to
relation. ICaRelation <<Interface>>
on page 193)
CommunicationMatricesByClustersWith Gets the communication matrices by clusters Get ICaRelation (refer to
Properties with properties relation. ICaRelation <<Interface>>
on page 193)
CommunicationMatricesByEcus Gets the communication matrices by ecus Get ICaRelation (refer to
relation. ICaRelation <<Interface>>
on page 193)
CommunicationMatricesByEcusWithPro Gets the communication matrices by ecus with Get ICaRelation (refer to
perties properties relation. ICaRelation <<Interface>>
on page 193)
Count Gets the number of available Relations Get Signed 32 Bit Integer
DeviceConnectors Gets the device connectors relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
FeatureProviders Gets the feature providers relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
HardwareNetworkView Gets the hardware-network view relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
HardwareRequirements Gets the hardware requirements relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
Links Gets the links relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
ModelCommunication Gets the model communication relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)

199
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Get/Set Type


PropertyDataObjects Gets the property data objects relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)
ProviderRequests Gets the provider requests relation. Get ICaRelation (refer to
ICaRelation <<Interface>>
on page 193)

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Determines whether an item § <String> AccessorName: true if [contains] [the specified
with the specified accessor Name of the accessor. accessor name]; otherwise,
name is contained in the false.
collection. § Boolean
Item Gets the item by the specified § <String> Index: Accessor Return value of the method.
index. name or a numeric index § ICaRelation (refer to
value. ICaRelation <<Interface>>
on page 193)
1) <Type> Name: Description

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.

Related topics Examples

Automating Build Process......................................................................................................... 55


Automating Hardware Resource Assignment............................................................................ 49
Automating Modeling of Application Processes and Tasks......................................................... 53
Examples of Automating Bus Manager Features....................................................................... 95

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of strings. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Determines whether the § <String> item: The item. true if string is in the collection
specified string is contained in otherwise, false.
the collection. § Boolean
Item Returns a string according to § <Signed 32 Bit Integer> The found string.
the specified index. Index: Numeric index value. § String

1) <Type> Name: Description

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>>

Description Represents a transaction.

Properties The element has the following properties:

Name Description Get/Set Type


CanRollback Indicates if it is possible to perform a rollback Get Boolean
for the operation which was executed during
this transaction.
IsInWriteState Returns the current state of the ICaTransaction Get Boolean
object. A read transaction returns always false.
A write transaction returns true if it is in write
state, otherwise false.
IsWriteTransaction Indicates if this transaction is a write Get Boolean
transaction. A read transaction returns always
false. A write transaction returns always true.

Methods The element has the following methods:

Name Description Parameter1) Returns


Close Closes the transaction. After None None
the relation was closed every
access to it will throw an
exception.
Rollback Performs a rollback for the None None
operation which was executed
during this transaction.
SwitchToReadState Switches a write transaction None None
into read state. If a transaction
is in read state nothing will be
done.
SwitchToWriteState Switches a write transaction None None
into write state. If a write
transaction is in write state
nothing will be done. If this
operation is performed on
a read transaction a not
supported exception will be
thrown.
1) <Type> Name: Description

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>>

Description This interface provides creating a transaction. A transaction can be used to


encapsulate more than one automation operation.

Properties The element has no properties.

Methods The element has the following methods:

Name Description Parameter1) Returns


CreateReadTransaction Creates a read transaction. None ICaTransaction representing a
read transaction.
§ ICaTransaction (refer
to ICaTransaction
<<Interface>> on page 202)
CreateWriteTransaction Creates a write transaction. § <String> Description: ICaTransaction representing a
String describing the write transaction
purpose of the action which § ICaTransaction (refer
should be wrapped by this to ICaTransaction
transaction. <<Interface>> on page 202)
§ <Boolean>
isInitiallyInReadState
: if set to true transaction is
initially in read state.
1) <Type> Name: Description

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Gets the number of data objects. The number Get Signed 32 Bit Integer
of data objects refers to the ports in the
working view.
FullName Gets the full name of the working view. The Get String
string includes the working view group.
ImplementingType Returns the name of the interface that is Get String
implemented by this object.

204
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Get/Set Type


Name Gets or sets the name of the working view. Get/Set String
Forward slashes and backslashes are not
allowed in a name.
WorkingViewGroup Gets the working view group. The returned Get String
string can be empty if the working view is in
the root level.

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Adds a data object to the § <ICaDataObject (refer None
working view. to ICaDataObject
If data object to add is invalid <<Interface>> on
the behavior is undefined. page 182)> DataObject:
Data object to add.
Clear Removes all data objects. None None
Export Exports the content of a § <String> FullPath: Full None
working view to a file. If the path to the file which
file exist, it will be overwritten. should contain the working
Export is not supported by a view content.
global working view.
Import Imports the content of a file to § <String> FullPath: Full None
the working view. The content path to the file to import
of the file will be imported due the content from.
to the specified import mode. § <ImportToWorkingViewMod
Supported import modes are: e (refer to
Replace, Merge and Add. ImportToWorkingViewMode
Import is not supported by a <<Enumeration>> on
global working view. page 257)> ImportMode:
The import mode.
Item Returns a data object § <String> Index: Full path of The found data object.
according to the specified the data object or a numeric § ICaDataObject (refer
index or full path. Full path is index value. to ICaDataObject
currently not supported. <<Interface>> on page 182)
Remove Removes the data object § <ICaDataObject (refer None
from the working view. It to ICaDataObject
is not possible to remove <<Interface>> on
data objects from the Global page 182)> DataObject:
working view. DataObject to remove.
If data object to remove
is invalid the behavior is
undefined.
ShowModelCommunication Shows a model § <Boolean> NewWindow: None
communication window for Deprecated: This parameter
this working view. With will be ignored (always
Release 2017B the parameter false).
NewWindow is no more
supported.

205
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


ShowSignalChain Shows a window for § <Boolean> NewWindow: None
this working view. With Deprecated: This parameter
Release 2017B the parameter will be ignored (always
NewWindow is no more false).
supported.
1) <Type> Name: Description

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.

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

ICaWorkingViewGroup <<Interface>>

Description Provides access to a WorkingViewGroup item. A working view group is


represented by a string containing a path under which working views are
located. Normally you can use these strings representing working view groups
for work (e.g. Create, Copy,...) if you want to work with working views
which are located under working view groups other than root. (The root is
represented by an empty string and is not a valid group.) Therefore the main
purpose of a WorkingViewGroupItem object is to add/remove it to/from the
selection. If you need a WorkingViewGroup item for such an operation just call
GetWorkingViewGroupItem(FullName) from the WorkingViews interface to get
an object which represents a WorkingViewGroup working path string.

206
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


FullName Returns the full name (or working path) for the Get String
WorkingViewGroup item.
ImplementingType Returns the name of the interface that is Get String
implemented by this object.
Name Returns the name of the WorkingViewGroup Get String
item.
Parent Returns the parent WorkingViewGroup full Get String
name of this WorkingViewGroup item. Empty
string for root.

Methods The element has no methods.

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.

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

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

the ICaWorkingViews interface is valid in the context of the current active


application. If this application is closed, the object is no longer valid even after
reopening the application. Access to a invalid object is undefined and can cause
unpredictable results.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of working views. Get Signed 32 Bit Integer
The count includes all WorkingViews regardless
of the WorkingViewGroup.

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Adds a new working view § <String> The new WorkingView.
to the specified working view WorkingViewGroup: The § ICaWorkingView (refer
group. A working view group WorkingViewGroup under to ICaWorkingView
is created if it does not exist. which the new <<Collection>> on
Slashes or backslashes can WorkingView will be page 204)
be used to separate the located. String.Empty for
WorkingViewGroups. root.
§ <String> Name: The Name
of the WorkingView.
String.Empty for default
name.
AddWorkingViewGroup Adds a new working view § <String> Parent: The The full name of the new
group to the specified parent. full name of the WorkingViewGroup.
If no name is specified, parent WorkingViewGroup. § String
a default name for the String.Empty for root.
working view group is created § <String> Name: The
automatically. name of the new
Slashes and back slashes are WorkingViewGroup.
separators and not allowed for
the name. Use an empty string
for the root directory.
Clear Removes all working view None None
groups and working views
except "Global" and
"Temporary".
Contains Tests if working view with § <String> FullName: True if the collection contains
the specified full name is FullName of WorkingView a WorkingView with given
contained in the collection. searched for. FullName
If the parameter § Boolean
"FullName" identifies a
WorkingViewGroup, false will
be returned.
Copy Creates a copy of the current § <String> FullName: The full FullName of the copy of
working view or working view name. the new WorkingView or
group below the specified § <String> WorkingViewGroup.
working view group. A DestinationWorkingView § String

208
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


working view group is created Group: The destination
if it does not exist. WorkingViewGroup.
The copy gets a new name
if an item with the same
name exists in the destination
WorkingViewGroup.
GetParentWorkingViewGroup Gets the parent working view § <String> ChildFullName: String with FullName of
group. Full name of the the WorkingViewGroup under
child WorkingView or which the child is located.
WorkingViewGroup. Must Empty string for root.
exist. § String
GetWorkingViewFullNamesFro Gets the full names of all § <String> Strings collection with
mParent working views for the specified ParentWorkingViewGroup FullNames.
working view group. : The WorkingViewGroup to § ICaStrings (refer to
The returned strings get WorkingViews from. ICaStrings <<Collection>>
collection doesn't include Empty string for root. on page 201)
FullNames of WorkingViews
which are located in
WorkingViewGroups, which
are present under the given
ParentWorkingViewGroup. If
no WorkingView can be found
under the specified parent,
an empty collection will
be returned. The ICaStrings
collection doesn't reflect
changes.
GetWorkingViewGroupItem Creates an object that § <String> FullName: WorkingViewGroup
represents the specified full FullName of existing representing the given
name. If an empty string is WorkingViewGroup. Must FullName or null for root.
used as argument ("root"), exist. § ICaWorkingViewGroup
null is returned. (refer to
ICaWorkingViewGroup
<<Interface>> on page 206)
GetWorkingViewGroups Gets the collection of working § <String> Filter: The filter. Collection of strings with the
view groups. An empty string Default value is null for all WorkingViewGroups.
representing the root working WorkingViewGroups. § ICaStrings (refer to
view group is always included ICaStrings <<Collection>>
in the returned collection. on page 201)
Currently no filter is
supported and the call
will always return all
present WorkingViewGroups
of the application. An empty
string is returned for the
root path. The ICaStrings
collection doesn't reflect
changes made by deleting
or adding WorkingViewGroups
after getting it from the
ICaWorkingViews object.

209
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


GetWorkingViewGroupsFromP Gets the working view groups § <String> A collection of strings
arent from a parent working view ParentWorkingViewGroup containing the full names of
group. : The parent the WorkingViewGroups.
The returned strings collection WorkingViewGroup. Empty § ICaStrings (refer to
doesn't include FullNames of string for root. ICaStrings <<Collection>>
WorkingViewGroups in "sub" on page 201)
WorkingViewGroups, which
are located under the given
ParentWorkingViewGroup. If
no WorkingViewGroup is
present under the specified
parent, an empty collection
will be returned. The
ICaStrings collection doesn't
reflect changes.
Item Returns a working view § <String> Index: FullName The found WorkingView
according to the specified of the WorkingView or a object.
index or full name. numeric index value. § ICaWorkingView (refer
If the FullName is to ICaWorkingView
used as parameter slashes <<Collection>> on
or backslashes can be page 204)
used to separate the
WorkingViewGroups.
Move Moves the working view or § <String> FullName: Full None
working view group to the name of the WorkingView
specified working view group. or WorkingViewGroup
A working view group is which should be moved.
created if it does not exist. § <String>
NewParentWorkingViewGr
oup: The new
WorkingViewGroup parent.
Remove Removes the specified working § <ICaWorkingView (refer None
view. to ICaWorkingView
If parameter "WorkingView" <<Collection>> on
refers to the global or page 204)> WorkingView:
temporary WorkingView no The working view to
action will be taken. remove.
RemoveByFullName Removes the specified working § <String> FullName: The full None
view or working view group. name of the item to remove.
If the given parameter
identifies a WorkingViewGroup
all WorkingViews and
WorkingViewGrooups that are
located in that path will be
removed. The root cannot
be removed. Use Clear() to
remove all WorkingViews and
WorkingViewGroups except
Global and Temporary view
from the application.
1) <Type> Name: Description

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.

Related topics Examples

Automating Signal Chain Configuration................................................................................... 46

MatchingPlatformConnectionState <<Enumeration>>

Description The state of indicating if a matching platform is connected.

Enumeration values The enumeration has the following values:

Name Description Value


NotConnected No or no matching platform is connected. 0
Connected A matching platform is connected. 1

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>>

Description The mode how to create a model topology.

Enumeration values The enumeration has the following values:

Name Description Value


FileImportMdl Creates a model topology by importing a Simulink *.mdl 1
file.
FileImportMtf Creates a model topology by importing a *.mtfx file. 2
FileImportMcd Creates a model topology by importing a *.mcd file. 3
EmptyTopology Creates an empty model topology without any model. 4
FileImportSlx Creates a model topology by importing an *.slx file. 5
FileImportOther Creates a model topology by importing a file with none of 6
the above extensions.

Framework
Where to go from here Information in this section

ControlbarTabsLayout <<Enumeration>>............................................... 213

ICaApplicationMain <<Interface>>........................................................ 214

ICaMainWindow <<Interface>>............................................................ 218

ICaMessageDispatcher <<Interface>>.................................................... 219

ICaPath <<Interface>>.......................................................................... 220

212
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

ICaPathProvider <<Interface>>.............................................................. 221

ICaPaths <<Collection>>....................................................................... 223

ICaProperties <<Collection>>................................................................ 224

ICaProperty <<Interface>>.................................................................... 226

ICaUserFunction <<Interface>>............................................................. 227

ICaUserFunctions <<Collection>>.......................................................... 228

MainWindowState <<Enumeration>>................................................... 229

WorkbookTabPosition <<Enumeration>>............................................... 230

ControlbarTabsLayout <<Enumeration>>

Description Types of controlbar tabs layout.

Enumeration values The enumeration has the following values:

Name Description Value


AutoSized Each controlbar tab contains the symbol and the name of 0
the component that it represents.
Compressed Only the active controlbar tab contains the symbol and 1
name of the component that it represents.
SizeToFit Each controlbar tab contains the symbol and the name of 2
the component that it represents.

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.

This is the only creatable object of the ConfigurationDesk tool automation.

Properties The element has the following properties:

Name Description Get/Set Type


ActiveApplication Returns the currently active application. Get ICaActiveApplication (refer
If no active application is available, null is to ICaActiveApplication
returned. <<Interface>> on
page 232)
ActiveProject Returns the currently active project. Get ICaActiveProject (refer
If no active project is available, null is returned. to ICaActiveProject
<<Interface>> on
page 235)
ActiveProjectRoot Returns the active project location folder. Get ICaProjectRoot (refer
If no project location is set, null is returned. to ICaProjectRoot
<<Interface>> on
page 245)
CommandLineArguments Returns the application's command line Get System.String[]
arguments, including the full path of the
application.
Interpreter Returns the internal Python interpreter. Get dSPACE.Common.Automa
tion.PythonInterpreter.IPiIn
terpreter
MainWindow Gets the main window. Get ICaMainWindow (refer
to ICaMainWindow
<<Interface>> on
page 218)
MessageDispatcher Gets the message dispatcher. Get ICaMessageDispatcher
(refer to
ICaMessageDispatcher
<<Interface>> on
page 219)
Name Returns the name of the application. Get String
PathProvider Returns the global search path provider. Get ICaPathProvider (refer
to ICaPathProvider
<<Interface>> on
page 221)
PlatformManagement Returns the platform management. Get dSPACE.PlatformManagem
ent.Automation.IPmPlatfor
mManagement
ProjectManagement Gets the project management Get ICaProjectManagement
(refer to
ICaProjectManagement
<<Interface>> on
page 244)

214
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Get/Set Type


ProjectRoots Returns the collection of project location Get ICaProjectRoots (refer
folders. to ICaProjectRoots
Returned collection may be empty. <<Collection>> on
page 247)
Projects Returns a collection of projects in the active Get ICaProjects (refer
project location folder. to ICaProjects
If no project location is set, null is returned. <<Collection>> on
Returned collection may be empty. page 248)
TemplatePathProvider Returns the search path provider for the Get ICaPathProvider (refer
Application Paths template. to ICaPathProvider
<<Interface>> on
page 221)
UserFunctions Returns the user-defined functions. Get ICaUserFunctions (refer
The collection of the functions may be empty. to ICaUserFunctions
<<Collection>> on
page 228)
Version Returns the current version of the application. Get String

Methods The element has the following methods:

Name Description Parameter1) Returns


GetCustomInformation Gets the information which § <System.String[]> Infos: Array with the information.
is specified by the collection Collection of strings which § System.Object[]
parameter infos. If the specifies the queried
information is not supported information.
an exception will be
generated. If information does
not exist, empty array will be
returned. If Infos collection is
null or empty the queriable
information types will be
returned. Since Release 2017B
it is no more possible to get
the ExtendSignalChainOptions
information.
Refer to Details on
GetCustomInformation on
page 216.
OpenApplication Opens the project specified by § <String> ProjectPath: Full The Application opened, which
the full path and activates the path name to the projects is now active.
application with the specified Data.CfgDeskProject (or the § ICaActiveApplication (refer
name. former *.CDP) file. to ICaActiveApplication
The project should be located § <String> <<Interface>> on page 232)
under a valid project location. ApplicationName:
If the project is not located Applications display name.
in a project location, a new
project location will be created.
An already open project will be
closed without saving it.

215
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


OpenProject Opens the project specified by § <String> ProjectPath: Full The project opened, which is
the full path. path name to the projects now active.
The project should be located Data.CfgDeskProject (or the § ICaActiveProject (refer
in a valid project location. If former *.CDP) file. to ICaActiveProject
the project is not located in a <<Interface>> on page 235)
project location, a new project
location will be created. An
already open project will be
closed without saving it.
Quit Quits the application. § <Boolean> SaveChanges: None
Determines if to save
changes.
SetCustomInformation Sets the custom information § <System.String[]> Infos: Array with possible results,
for the information which The information for which otherwise empty array.
is specified by the Infos to set the values. § System.Object[]
collection. If information type § <Object> Params: The
is not supported, exception values to set for the
will be generated. Since information.
Release 2017B it is no
more possible to set the
ExtendSignalChainOptions.
Refer to Details on
SetCustomInformation on
page 217.
1) <Type> Name: Description

Details on
GetCustomInformation

Custom Information Supported Information


CustomFunctionDirectory Query for the path to the directory with custom functions
and returns a string containing the path. Example usage:
Application.GetCustomInformation(["CustomFunctionDirectory"])
ProjectCacheRootDirectory The project cache is no more supported. Use the ApplicationCacheRootDirectory instead.
ProjectCacheDirectory The project cache is no more supported. Use the ApplicationCacheDirectory instead.
ApplicationCacheRootDirectory The root directory in which ConfigurationDesk will maintain the cached data for all
ConfigurationDesk applications. Cached data are usually additional files that are not
stored in the application itself. The ApplicationCacheRootDirectory can be changed.
ApplicationCacheDirectory The directory in which ConfigurationDesk maintains cached data for the currently loaded
ConfigurationDesk application. Cached data are usually additional files that are not
stored in the application itself. The ApplicationCacheDirectory is read-only.

216
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Details on
SetCustomInformation

Custom Information Supported Information


CustomFunctionDirectory Set the path to the directory with custom functions Example usage (Python):
Application.SetCustomInformation(["CustomFunctionDirectory"], [r"C:\temp"])
ImportCustomFunctions Imports an archive file with custom functions from the given path either to
the custom function folder or to the currently active project with optional
parameter True. If active project is used an active application must be open.
Example usage (Python): Application.SetCustomInformation(["ImportCustomFunctions"],
[r"C:\IOConfigurationStuff\CustomFunctions.zip", True])
PrecompileFMU Precompiles an FMU, for example, to protect intellectual property. Possible usage
with required path to the FMU (string), optional path and (optional) name of the
precompiled file (string, default is same path and suffix '_precompiled'), optional
compiler options (string), optional boolean flag to keep the sources (default is false) and
optional target platform (string, default is SCALEXIO_LNX64). Example usage (Python):
Application.SetCustomInformation(["PrecompileFMU"], [r"C:\Models\MyFMU.fmu"])
PrecompileSIC Precompiles a SIC, for example, to protect intellectual property. Possible usage
with required path to the SIC (string), optional path and (optional) name of the
precompiled file (string, default is same path and suffix '_precompiled'), optional
compiler options (string), optional boolean flag to keep the sources (default is false)
and optional target platform (string, default is SCALEXIO_LNX64). Example usage
(python): Application.SetCustomInformation(["PrecompileSIC"], [r"C:\Models\MySIC.sic",
None, None, True])
PrecompileBSC Precompiles a BSC, for example, to protect intellectual property. Possible usage
with required path to the BSC (string), optional path and (optional) name of the
precompiled file (string, default is same path and suffix '_precompiled'), optional
compiler options (string), optional boolean flag to keep the sources (default is false) and
optional target platform (string, default is SCALEXIO_LNX64). Example usage (python):
Application.SetCustomInformation(["PrecompileBSC"], [r"C:\Models\MyBSC.bsc"])
ProjectCacheRootDirectory The project cache is no more supported. Use the ApplicationCacheRootDirectory instead.
ApplicationCacheRootDirectory The root directory in which ConfigurationDesk will maintain the cached data for all
ConfigurationDesk applications. Cached data are usually additional files that are not
stored in the application itself.

Event Interfaces The element provides the following event interfaces:


§ ICaApplicationEvents (refer to ICaApplicationEvents <<EventInterface>> on
page 266)

Related topics Examples

Automating Platform Management.......................................................................................... 57


Automating Project Handling.................................................................................................... 42

217
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

ICaMainWindow <<Interface>>

Description Provides access to the application's main window.

Properties The element has the following properties:

Name Description Get/Set Type


AnimateAutoHiding Enables or disables animation of windows auto Get/Set Boolean
hiding.
Caption Gets the main window's caption. Get String
ControlbarTabsLayout Specifies the layout of the controlbar tabs. Use Get/Set ControlbarTabsLayout
(0) for auto-sized, (1) for compressed or (2) for (refer to
sized to fit. ControlbarTabsLayout
<<Enumeration>> on
page 213)
FullScreenModeEnabled Enables or disables full screen mode. Get/Set Boolean
Height Returns or sets the height of the main window. Get/Set Signed 32 Bit Integer
LargeToolbarIconsEnabled Displays the toolbar buttons in large format. Get/Set Boolean
Left Returns or sets the left position of the main Get/Set Signed 32 Bit Integer
window.
ShortcutKeysVisible If you select this option, the tool tip of a Get/Set Boolean
selected command contains information on its
shortcut key, if available.
State Returns or sets the state of the main window. Get/Set MainWindowState (refer
Use (0) to minimize, (1) to maximize, or (2) to to MainWindowState
restore the main window. <<Enumeration>> on
page 229)
Top Returns or sets the top position of the main Get/Set Signed 32 Bit Integer
window.
Visible Returns or sets the visibility of the main Get/Set Boolean
window.
Width Returns or sets the width of the main window. Get/Set Signed 32 Bit Integer
WorkbookModeEnabled Enables or disables workbook mode. Get/Set Boolean
WorkbookTabPosition Specifies whether to display the tabs at the top Get/Set WorkbookTabPosition
(0) or the bottom (1) of ConfigurationDesk's (refer to
working area. WorkbookTabPosition
<<Enumeration>> on
page 230)

Methods The element has no methods.

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.

Properties The element has the following properties:

Name Description Get/Set Type


ShowDiscontinuationMessages Specifies if the dSPACE Log contains messages Get/Set Boolean
on planned discontinuations for commands
that you use, for example, via the automation
interface. The severity of discontinuation
messages is Warning.

Methods The element has the following methods:

Name Description Parameter1) Returns


ClearMessages Clears the logging messages in None None
the Messages View.
SubmitErrorLogFile Writes an error message in § <String> Message: String None
the ConfigurationDesk dSPACE message, must not be null
Log or empty.

219
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


SubmitErrorLogView Writes an error message in the § <String> Message: String None
ConfigurationDesk Message message, must not be null.
Viewer
SubmitInfoLogFile Writes an info message in § <String> Message: String None
the ConfigurationDesk dSPACE message, must not be null
Log. or empty.
SubmitInfoLogView Writes an info message in the § <String> Message: String None
ConfigurationDesk Message message, must not be null
Viewer. or empty.
SubmitMessage Submits the message. § <String> Message: The None
Currently, only the default type message, must not be null
to set an info message in the or empty.
dSPACE Log is supported. § <String> Type: The type.
Default is Info dSPACE Log
with null or empty string.
SubmitWarningLogFile Writes a warning message in § <String> Message: String None
the ConfigurationDesk dSPACE message, must not be null
Log or empty.
SubmitWarningLogView Writes a warning message § <String> Message: String None
in the ConfigurationDesk message, must not be null
Message Viewer or empty.
1) <Type> Name: Description

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>>

Description Provides access to a search path.

220
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


Alias Gets the alias. Get String
IsExisting Determines whether the path currently exists in Get Boolean
the file system.
IsPersistent Gets or sets whether the search path is Get/Set Boolean
persistently stored in the path configuration
file. Changing this value adds/removes the
search path to/from the path configuration file.
False for search paths that are non-persistently
stored.
IsRecursive Gets or sets whether the search path is treated Get/Set Boolean
as recursive.
Path Gets the full search path. Get String

Methods The element has no methods.

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.

Related topics Basics

Basics on Search Paths and User Location Files (ConfigurationDesk Custom I/O
Function Implementation Guide )

ICaPathProvider <<Interface>>

Description Provides access to the search path provider.

221
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Properties The element has the following properties:

Name Description Get/Set Type


Paths Returns the search paths managed by a search Get ICaPaths (refer to
path provider. ICaPaths <<Collection>>
on page 223)

Methods The element has the following methods:

Name Description Parameter1) Returns


AddPath Adds a new search path to the § <String> alias: The alias The created search path object.
search path provider. Adding for the search path. None § ICaPath (refer to ICaPath
an existing search path results or empty string will result in <<Interface>> on page 220)
in an exception. default alias.
§ <String> path: Full or
relative search path to be
added.
§ <Boolean> isRecursive:
Includes subfolders in the
specified search path.
§ <PathPriority (refer
to PathPriority
<<Enumeration>> on
page 260)> pathPriority:
Position in the search path
priority list. The entries
at the top position are
searched with highest path
priority.
§ <Boolean> isPersistent:
Writes the search path
to the search path
configuration file. Persistent
search paths are retained
after the project is closed.
ClearPaths Clears search paths of the § <Storage (refer to Storage None
specified storage type from the <<Enumeration>> on
search path provider. page 263)> storage: Lets
you specify the storage type
of the search paths to be
cleared. Clears either all,
persistent, or non-persistent
search paths.
CopyPathsTo Copies search paths (of the § <ICaPathProvider> target: None
specified storage type) from ICaPathProvider object
this search path provider defining the target for the
instance to another. path copy operation.
§ <Storage (refer to Storage
<<Enumeration>> on
page 263)> storage: Lets
you specify the storage type
of the search paths to be
copied. Copies either all,

222
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


persistent, or non-persistent
search paths.
RefreshAll Refreshes all search path None None
usages with paths from the
global path provider and the
application path provider.
RemovePath Removes the specified search § <ICaPath (refer to None
path from the search path ICaPath <<Interface>> on
provider. page 220)> aliasOrPath:
ICaPath object or a string
with the alias.
1) <Type> Name: Description

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.

Related topics Basics

Basics on Search Paths and User Location Files (ConfigurationDesk Custom I/O
Function Implementation Guide )

ICaPaths <<Collection>>

Description Provides access to the paths managed by a search path provider.

223
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of search paths provided Get Signed 32 Bit Integer
by the search path provider.

Methods The element has the following methods:

Name Description Parameter1) Returns


Item Returns a search path § <String> index: Alias or a The found property object.
according to the specified numerical index value. § ICaPath (refer to ICaPath
index or alias. <<Interface>> on page 220)
1) <Type> Name: Description

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.

Related topics Basics

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>>

Description Provides access to a collection of properties.

224
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of properties. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if the property with the § <String> Name: Name of True if the collection contains a
specified name is contained in property searched for. property with given name.
the collection. § Boolean
Item Returns a property according § <String> Index: Name of The found property object.
to the specified index or name. the property or a numeric § ICaProperty (refer to
index value. ICaProperty <<Interface>>
on page 226)
TryGetItem Tries to get a property item § <Object> Index: Name or ICaProperty item if item is
from the properties collection. numerical index of item. present in the collection,
otherwise null.
§ ICaProperty (refer to
ICaProperty <<Interface>>
on page 226)
1) <Type> Name: Description

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.

Related topics Examples

Automating Build Process......................................................................................................... 55

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.

Properties The element has the following properties:

Name Description Get/Set Type


DisplayName Gets the display name of this property object. Get String
The display name is the name shown in the
PropertyGrid of ConfigurationDesk and may
change in future. Therefore scripting with
names should only rely on the automation
name.
IsCurrentlySignificant Gets a value indicating whether this property is Get Boolean
currently significant, i.e., if its setting is relevant
in the current context or not. This may depend,
for example, on the setting of a different
property.
IsReadOnly Gets a value indicating whether this property is Get Boolean
read only.
Name Gets the property name. Get String
Type Gets the property value type. Get String
Value Gets or sets the value of the property. Get/Set Object

Methods The element has the following methods:

Name Description Parameter1) Returns


TrySetValue Tries to the set the value of the § <Object> Value: The value True if value was set, otherwise
property. to set. false.
§ Boolean
1) <Type> Name: Description

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

Related topics Basics

Best Practices for Data Structures and Parameters................................................................... 113

Examples

Automating Signal Chain Configuration................................................................................... 46

ICaUserFunction <<Interface>>

Description Provides access to a user-defined function.

A user-defined function is an external command that can be executed via


ConfigurationDesk's 'User Functions' toolbar.

Properties The element has the following properties:

Name Description Get/Set Type


Arguments Returns or sets the arguments of the command Get/Set String
of the user-defined function.
CaptureOutput Enables or disables the capturing of output Get/Set Boolean
during execution.
Command Returns/Sets the command to be executed. Get/Set String
Description Returns or sets the description of the user- Get/Set String
defined function.
InitialDirectory Returns or sets the initial folder where the Get/Set String
command is executed.
Name Returns or sets the name of the user-defined Get/Set String
function.
ShowWindow Shows or hides the commands window of the Get/Set Boolean
user-defined functions during execution.

Methods The element has the following methods:

Name Description Parameter1) Returns


Execute Executes the command of the None None
user-defined function.
Remove Removes the user-defined None None
function from the collection.
SetImage Defines the image of the user- § <String> ImageFileName: None
defined function. Full path name of the image
The image may be defined by file.
a bitmap (BMP) or PNG file.

227
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


The image should be 16 pixels
width and height.
1) <Type> Name: Description

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.

User-defined functions are external commands that can be executed via


ConfigurationDesks 'User Functions' toolbar.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of user-defined functions. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Adds a new user-defined § <String> Name: Name of The new added user function.
function to the collection. new user function. § ICaUserFunction (refer
to ICaUserFunction
<<Interface>> on page 227)
Contains Tests if the user-defined § <String> Name: Name of True if the collection contains a
function with the specified user function searched for. user function with given name.
name is contained in the § Boolean
collection.

228
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


Item Returns the user-defined § <String> Index: Name of The found user function
function by index or name. the user function or a object.
numeric index value. § ICaUserFunction (refer
to ICaUserFunction
<<Interface>> on page 227)
1) <Type> Name: Description

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>>

Description States of the application's main window.

Enumeration values The enumeration has the following values:

Name Description Value


Minimized The main window is minimized. 0
Maximized The main window is maximized. 1
Restored The main window is restored. 2

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>>

Description Types of workbook tab position.

Enumeration values The enumeration has the following values:

Name Description Value


Top The workbook tab is on the top. 0
Bottom The workbook tab is on the bottom. 1

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.

Project and Application Management


Where to go from here Information in this section

FileType <<Enumeration>>.................................................................... 231

ICaActiveApplication <<Interface>>...................................................... 232

ICaActiveProject <<Interface>>............................................................. 235

ICaApplication <<Interface>>................................................................ 237

ICaApplications <<Collection>>............................................................ 239

ICaFile <<Interface>>............................................................................ 240

ICaFiles <<Collection>>......................................................................... 242

230
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

ICaProject <<Interface>>....................................................................... 243

ICaProjectManagement <<Interface>>.................................................. 244

ICaProjectRoot <<Interface>>................................................................ 245

ICaProjectRoots <<Collection>>............................................................ 247

ICaProjects <<Collection>>................................................................... 248

FileType <<Enumeration>>

Description The type of a file.

Enumeration values The enumeration has the following values:

Name Description Value


Unknown A unknown file. 0
DeviceTopology A DeviceTopology file. 1
Text A text file. 2
Log A logging file. 3
ExternalCableHarness A ExternalCableHarness file. 4
HardwareTopology A HardwareTopology file. 5
ModelTopology A ModelTopology file. 6
Script A Python script file. 7

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

Properties The element has the following properties:

Name Description Get/Set Type


Algorithms Returns an object that can be used to execute Get ICaAlgorithms (refer
algorithms. to ICaAlgorithms
<<Interface>> on
page 164)
Application Gets the application interface of this Get ICaApplication (refer
application. to ICaApplication
<<Interface>> on
page 237)
BuildManagement Returns the build management for building and Get ICaBuildManagement
downloading real-time applications. (refer to
ICaBuildManagement
<<Interface>> on
page 158)
Components Returns the components of the application. Get ICaComponents (refer
Each component is contained only once in an to ICaComponents
application. <<Interface>> on
page 180)
ComponentTypes Gets the collection of supported component Get ICaStrings (refer to
types. ICaStrings <<Collection>>
on page 201)
Description Returns or sets the application's description. Get/Set String
Files Returns the files managed by the application. Get ICaFiles (refer to
Currently not supported. Collection is always ICaFiles <<Collection>> on
empty. page 242)
IsModified Returns the modified state of the application. Get Boolean
MatchingPlatformConnectionState The state if a platform which matches the Get MatchingPlatformConnecti
hardware topology is currently connected. onState (refer to
MatchingPlatformConnecti
onState <<Enumeration>>
on page 211)
PathProvider Returns the application-specific search path Get ICaPathProvider (refer
provider. to ICaPathProvider
<<Interface>> on
page 221)

232
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Get/Set Type


Relations Returns an object which provides access Get ICaRelations (refer
to the Relations for the ConfigurationDesk to ICaRelations
automation. <<Collection>> on
page 195)
TransactionCreator Gets the transaction creator. Get ICaTransactionCreator
(refer to
ICaTransactionCreator
<<Interface>> on
page 203)
WorkingViews Returns the working views that provide user- Get ICaWorkingViews (refer
defined signal chain segments. to ICaWorkingViews
<<Collection>> on
page 207)

Methods The element has the following methods:

Name Description Parameter1) Returns


AddToSelection Adds objects to the current § <Object> Objects: The None
selection. objects to add to the
If parameter Array includes no selection. Must not be null.
addable objects no warning § <Boolean> EmptyBefore:
will be generated. Indicates if current selection
should be cleared before
adding. Default is false.
§ <String> SelectionType:
The selection type if
different selections exists.
Default is default selection.
CanRedo Determines whether an § <Signed 32 Bit Integer> true if this instance can undo
operation on this instance can Count: The count of the specified count; otherwise,
be redone. operations which should be false.
redone. Default is 1. § Boolean
CanUndo Determines whether an § <Signed 32 Bit Integer> true if this instance can undo
operation on this instance can Count: The count of the specified count; otherwise,
be undone. operations which should be false.
undone. Default is 1. § Boolean
ClearBuildResults Irreversibly removes existing None None
build results from a
ConfigurationDesk application
and saves the project and
application. Throws exception
if clear operation fails.
ConnectObjects Connects two data objects and § <ICaDataObject (refer Connection link
creates a mapping between to ICaDataObject § ICaLink (refer to ICaLink
them. If you map ports of <<Interface>> on <<Interface>> on page 189)
model port blocks or device page 182)> First: First
blocks that are not used in data object of the
the signal chain, the blocks connection.
are automatically added to the § <ICaDataObject (refer
signal chain. to ICaDataObject
<<Interface>> on

233
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


page 182)> Second:
Second data object of the
connection.
DeleteLink Deletes the specified link. § <ICaLink (refer to None
ICaLink <<Interface>> on
page 189)> Link: The link
which is to delete.
DeleteLinks Deletes all links of the specified § <Object> Links: The links. None
link array. The specified array
must have the dimension of 1.
Export Exports the application to an § <String> None
archive. ArchiveFullPath: The full
path name of the archive
where to export the
application.
GetRedoDescriptions Gets the redo description.If § <Signed 32 Bit Integer> Collection of strings with
count exceeds number of Count: The count of description, possible empty.
possible redo operations only operation for which the § ICaStrings (refer to
the available strings will be description should be ICaStrings <<Collection>>
returned. returned. on page 201)
GetSelectedObjects Gets the currently selected § <String> Filter: Filter to Collection of objects. Maybe
objects. Currently, only the query special objects from empty.
default selection is supported. the selection. Null or String § ICaObjects (refer to
Currently, no filter is empty for no filter. ICaObjects <<Collection>>
supported. § <String> SelectionType: on page 192)
The selection type if
different selections exists.
Null or String empty for
default.
GetUndoDescriptions Gets the undo descriptions. § <Signed 32 Bit Integer> Collection of strings with
If count exceeds number of Count: The count of description, possible empty.
possible undo operations only operation for which the § ICaStrings (refer to
the available strings will be description should be ICaStrings <<Collection>>
returned. returned. on page 201)
Redo Redoes an operation on § <Signed 32 Bit Integer> None
this instance. If redo cannot Count: The count of
performed exception will be operations which should be
generated. redone, default is 1.
RemoveFromSelection Removes objects form the § <Object> Objects: The None
current selection. Currently, objects to remove from the
only the default selection is selection. Must not be null.
supported. § <String> SelectionType:
If parameter Array includes The selection type if
objects which are not different selections exists.
removable no warning will be Null or String.Empty for
generated. default.
Rename Renames the active § <String> The renamed application,
application. Invalidates this NewApplicationName: which is now active.
object. Display name of the new § ICaActiveApplication
application.

234
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


SaveAs Saves a copy of the active § <String> The copy of the application,
application and activates the NewApplicationName: which is now active.
copy. Invalidates this object. Display name of the new § ICaActiveApplication
application.
Undo Undoes an operation on § <Signed 32 Bit Integer> None
this instance. If undo cannot Count: The count of
performed exception will be operations which should be
generated. undone, default is 1.
1) <Type> Name: Description

Returned by The element is returned by properties or methods of the following elements:


§ ICaActiveProject (refer to ICaActiveProject <<Interface>> on page 235)
§ ICaApplication (refer to ICaApplication <<Interface>> on page 237)
§ ICaApplicationMain (refer to ICaApplicationMain <<Interface>> on page 214)
§ ICaApplications (refer to ICaApplications <<Collection>> on page 239)

Related topics Examples

Automating Build Process......................................................................................................... 55


Automating Hardware Resource Assignment............................................................................ 49
Automating Signal Chain Configuration................................................................................... 46

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.

Properties The element has the following properties:

Name Description Get/Set Type


ActiveApplication Returns the active application. Get ICaActiveApplication (refer
May be void. to ICaActiveApplication
<<Interface>> on
page 232)
Applications Returns the collection of applications managed Get ICaApplications (refer
by the project. to ICaApplications
<<Collection>> on
page 239)
Description Returns or sets the description of the project. Get/Set String
DirectoryName Returns the project folder. Get String

235
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Get/Set Type


FileName Returns the name of the project's Get String
Data.CfgDeskProject file.
Files Returns the collection of files managed by the Get ICaFiles (refer to
project. Currently, the files functionality is not ICaFiles <<Collection>> on
implemented. Count of files collection is -1. page 242)
FullPath Returns the full path of the project's Get String
Data.CfgDeskProject file.
IsModified Returns the modified state of the project. Get Boolean
Currently, this always returns false, because of
the file system oriented approach.
Name Returns the display name of the project. Get String

Methods The element has the following methods:

Name Description Parameter1) Returns


Backup Exports the project to an § <String> ArchivePath: Full None
archive. path name of the archive
file.
Close Closes the project. Invalidates § <Boolean> SaveChanges: None
this object. Determines if to save
changes. Default is true.
RefreshFiles Synchronizes the files None None
collection with the current file
system content. Currently not
supported, because the Files
property is not implemented.
Save Saves the project. None None
SaveAs Saves the project under a § <String> ProjectName: The copy of the project, which
different name. Invalidates this Name of the new project. is now active.
object. § ICaActiveProject
SaveTo Lets you save the active § <String> ProjectName: The copy of the project, which
project to a target directory. Name of the new project. is now active.
Invalidates this object. Due § <String> § ICaActiveProject
to the new project handling ProjectTargetDirectory
this method is currently not : The target directory of the
supported! new project.
1)
<Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

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

Properties The element has the following properties:

Name Description Get/Set Type


Active Determines if the application is active. Get Boolean
DirectoryName Returns the folder of the application. Get String
FileName Returns the name of the application's file, Get String
always Application.cfgx.
FullPath Returns the full path of the Application.cfgx Get String
file.
Name Returns the display name of the application. Get String

Methods The element has the following methods:

Name Description Parameter1) Returns


Activate Activates the application. § <Boolean> The now active Application.
AutoSaveActiveApplicat § ICaActiveApplication (refer
ion: True to automatically to ICaActiveApplication
save the current active <<Interface>> on page 232)
Application.
Remove Deletes the application. The § <Boolean> None
parameter will be ignored DeleteFromDisk:
but the method signature is Determines if to delete the
not changed for backwards Applications files from disk.
compatibility. An application
is only removable if it is not
active.
1) <Type> Name: Description

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

Related topics Examples

Automating Project Handling.................................................................................................... 42

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of applications. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Create a new application. § <String> The Application created, which
Returns the new active ApplicationName: Display is now active.
application. name of new Application. § ICaActiveApplication (refer
§ <Boolean> to ICaActiveApplication
AutoSaveActiveApplicat <<Interface>> on page 232)
ion: Lets you specify
whether an active
application should be saved.
Contains Tests if an application with the § <String> Name: Display True if the collection contains
specified name is contained in name of Application an Application with given
the collection. searched for. display name.
§ Boolean
Import Imports an application § <String> The imported Application,
archive. The imported ArchiveFullPath: Full which is now active.
application becomes the active path name of the § ICaActiveApplication (refer
application. Applications archive to to ICaActiveApplication
import. <<Interface>> on page 232)
§ <String>
NewApplicationName:
Display name of the
imported Application.
§ <Boolean>
AutoSaveActiveApplicat
ion: Lets you specify
whether an active
application should be saved.

239
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


Item Returns an application § <String> Index: Name of The found Application object.
according to the specified the Application or a numeric § ICaApplication (refer
index or display name. index value. to ICaApplication
<<Interface>> on page 237)
1) <Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

ICaFile <<Interface>>

Description Provides access to a file of a project or application.

240
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


DirectoryName Returns the folder name where the file is Get String
located.
Extension Returns the file name extension of the file. Get String
FileName Returns the file name. Get String
FullPath Returns the full path of the file. Get String
Type Returns the type of the file. Get FileType (refer to FileType
<<Enumeration>> on
page 231)

Methods The element has the following methods:

Name Description Parameter1) Returns


Open Opens a file. Returns the None Document of the file opened.
associated document, for § Object
example, layout document or
Python document.
Remove Removes the file from § <Boolean> None
its project or application. DeleteFromDisk:
Optionally deletes the file from Determines if the file is
disk. deleted from disk.
1) <Type> Name: Description

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of files. This property is Get Signed 32 Bit Integer
currently not supported and returns 0.

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if the specified file is § <String> FileName: File True if the collection contains a
contained in the collection. name of file searched for. file with given file name.
Files are currently not § Boolean
supported. Currently returns
an empty collection.
Item Returns a file according to § <String> Index: Name of The found file object.
the specified index or file the file or a numeric index § ICaFile (refer to ICaFile
name. This method is currently value. <<Interface>> on page 240)
not supported. No automation
object is returned.
1) <Type> Name: Description

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.

Properties The element has the following properties:

Name Description Get/Set Type


Applications Returns the collection of the applications of the Get ICaApplications (refer
project. to ICaApplications
<<Collection>> on
page 239)
FullPath Returns the full path of the project's Get String
Data.CfgDeskProject file.
Name Returns the display name of project. Get String

Methods The element has the following methods:

Name Description Parameter1) Returns


Open Opens a project. Returns the § <Boolean> The opened project, which is
now active project. AutoSaveActiveProject: now active.
True to automatically save § ICaActiveProject (refer
the current active project. to ICaActiveProject
<<Interface>> on page 235)
Remove Removes the project from the § <Boolean> None
project's collection. Optionally PurgeProjectDirectory:
deletes the whole project from Lets you specify whether the
disk. whole project directory shall
be purged.
1) <Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

ICaProjectManagement <<Interface>>

Description Provides access to the project management.

Properties The element has the following properties:

Name Description Get/Set Type


AutomaticSaveProjectEnabled Gets or sets a value indicating whether to Get/Set Boolean
enable the automatic saving of a project.
AutomaticSaveProjectInterval Gets or sets the interval time (in minutes) for Get/Set Signed 32 Bit Integer
automatically saving a project.
LoadRecentApplicationOnStartupEnabl Gets or sets a value indicating whether to Get/Set Boolean
ed load the most recently used application when
ConfigurationDesk is started.

Methods The element has no methods.

244
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Event Interfaces The element provides the following event interfaces:


§ ICaProjectEvents (refer to ICaProjectEvents <<EventInterface>> on page 267)

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.

Properties The element has the following properties:

Name Description Get/Set Type


PathName Gets the full path of the project location folder. Get String
Projects Returns the projects contained in the project Get ICaProjects (refer
location folder. to ICaProjects
<<Collection>> on
page 248)

245
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Methods The element has the following methods:

Name Description Parameter1) Returns


Activate Makes the project location None None
folder active.
The active project location is
the one with index 0. This
method re-orders the project
locations in their collection,
they get new indices.
Remove Removes the project location None None
folder from its collection.
Attention: Remove is only
possible for a not active project
location.
1) <Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of project location folders. Get Signed 32 Bit Integer

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Adds a new project location § <String> FullPath: Full The new project location.
folder. A folder of the full path path name of the new § ICaProjectRoot (refer
is created if it does not exist. project location directory. to ICaProjectRoot
If the given parameter FullPath <<Interface>> on page 245)
contains not a complete and
routed path the behavior is
undefined.
Contains Tests if a project location folder § <String> PathName: Full True if the collection contains a
with the specified path is path name of project project location with given full
contained in the collection. location searched for. path name.
§ Boolean
Item Returns a project location § <String> Index: Full path The found project location
folder according to the name of the project location object.
specified index or full path. or a numeric index value. § ICaProjectRoot (refer
to ICaProjectRoot
<<Interface>> on page 245)
1) <Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

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.

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of projects. Get Signed 32 Bit Integer
ProjectRoot Returns the project location for the projects. Get ICaProjectRoot (refer
to ICaProjectRoot
<<Interface>> on
page 245)

Methods The element has the following methods:

Name Description Parameter1) Returns


Add Creates a new project in the § <String> ProjectName: The project created, which is
project location of this object. Display name of the new now active.
project. § ICaActiveProject (refer
to ICaActiveProject
<<Interface>> on page 235)

248
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


The object returned is the now
active project.
An open project will be closed.
Attention: It is not possible to
create a new project if the
project location is not active.
Contains Tests if a project with the § <String> Name: Display True if the collection contains
specified name is contained in name of project searched a project with given display
the collection. for. name.
§ Boolean
Item Returns a project according to § <String> Project: Name of The found project object.
the specified index or display the project or a numeric § ICaProject (refer to
name. index value. ICaProject <<Interface>> on
page 243)
OpenFromBackup Opens an archived project. If § <String> ArchivePath: Full The project opened, which is
the new project's name is path name of the projects now active.
empty, the default name from archive. § ICaActiveProject (refer
the archive is used. § <String> NewProjectName: to ICaActiveProject
Display name of the new <<Interface>> on page 235)
project. If empty the default
name from the archive is
used.
§ <Boolean>
AutoSaveActiveProject:
True to automatically save
the current active project.
1) <Type> Name: Description

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.

Related topics Examples

Automating Project Handling.................................................................................................... 42

Enumeration Properties
Where to go from here Information in this section

AveragingLevel <<Enumeration>>......................................................... 251

BitOrder <<Enumeration>>................................................................... 252

BlockColor <<Enumeration>>............................................................... 252

ChannelType <<Enumeration>>............................................................ 252

CylinderStates <<Enumeration>>.......................................................... 253

DigitalOutputMode <<Enumeration>>.................................................. 254

Direction <<Enumeration>>.................................................................. 254

EdgeType <<Enumeration>>.................................................................. 254

EncoderType <<Enumeration>>............................................................. 255

EventTriggerCondition <<Enumeration>>.............................................. 255

ExecutionMode <<Enumeration>>........................................................ 256

FunctionMode <<Enumeration>>.......................................................... 256

HighSideReference <<Enumeration>>................................................... 256

IdleValue <<Enumeration>>.................................................................. 257

ImportToWorkingViewMode <<Enumeration>>..................................... 257

InitializationMode <<Enumeration>>..................................................... 257

JitterAndLatencyOptimization <<Enumeration>>................................... 258

LoadManualChecking <<Enumeration>>............................................... 258

MappingType <<Enumeration>>........................................................... 259

MeasurementMode <<Enumeration>>.................................................. 259

MeasurementMode2 <<Enumeration>>................................................ 259

MeasurementPoint <<Enumeration>>................................................... 260

250
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

OvercurrentProtection <<Enumeration>>.............................................. 260

PathPriority <<Enumeration>>............................................................... 260

PhaseUpdateMode <<Enumeration>>................................................... 261

Polarity <<Enumeration>>..................................................................... 261

Potential <<Enumeration>>................................................................... 261

ReadMode <<Enumeration>>............................................................... 262

Role <<Enumeration>>......................................................................... 262

SensorMode <<Enumeration>>............................................................. 262

SignalMode <<Enumeration>>.............................................................. 263

StandstillBehavior <<Enumeration>>..................................................... 263

Storage <<Enumeration>>.................................................................... 263

Termination <<Enumeration>>.............................................................. 264

TransceiverType <<Enumeration>>................................................ ........ 264

TransferType <<Enumeration>>............................................................. 264

TriggerEdgeType <<Enumeration>>....................................................... 265

UpdateMode <<Enumeration>>............................................................ 265

VoltagePolarity <<Enumeration>>......................................................... 265

AveragingLevel <<Enumeration>>

Description Definition of the Averaging Level type.

Enumeration values The enumeration has the following values:

Name Description Value


Precise Represents the precise averaging level type. 1
Dynamic Represents the dynamic averaging level type. 2
DefinedByModel Represents the defined by model averaging level type. 3

251
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

BitOrder <<Enumeration>>

Description Definition of the BitOrder type.

Enumeration values The enumeration has the following values:

Name Description Value


Inverse Represents the inverse bitorder type. 0
Normal Represents the normal bitorder type. 1

BlockColor <<Enumeration>>

Description Definition of the block colors.

Enumeration values The enumeration has the following values:

Name Description Value


LightBlue Represents the color light blue (default). 0
White Represents the color white. 1
Red Represents the color red. 2
Green Represents the color green. 3
Blue Represents the color blue. 4
Cyan Represents the color cyan. 5
Magenta Represents the color magenta. 6
Yellow Represents the color yellow. 7
Gray Represents the color gray. 8
Orange Represents the color orange. 9
DarkGreen Represents the color dark green. 10
Beige Represents the color beige. 11

ChannelType <<Enumeration>>

Description Definition of the ChannelType type.

252
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Enumeration values The enumeration has the following values:

Name Description Value


FlexibleOut1 Represents the flexibleout1 channel type. 0
DigitalOut1 Represents the digitalout1 channel type. 1
AnalogOut1 Represents the analogout1 channel type. 2
AnalogOut4 Represents the analogout4 channel type. 3
AnalogOut3 Represents the analogout3 channel type. 4
ResistanceOut1 Represents the resistanceout1 channel type. 5
FlexibleIn1 Represents the flexiblein1 channel type. 6
DigitalIn1 Represents the digitalin1 channel type. 7
AnalogIn1 Represents the analogin1 channel type. 8
FlexibleIn2 Represents the flexiblein2 channel type. 9
Bus1 Represents the bus1 channel type. 10
CAN1 Represents the can1 channel type. 11
Lin1 Represents the lin1 channel type. 12
FlexRay1 Represents the flexray channel type. 13
PowerSwitch1 Represents the powerswitch1 channel type. 14
PowerSwitch2 Represents the powerswitch2 channel type. 15
PowerControl1 Represents the powercontrol1 channel type. 16
AnalogOut2 Represents the analogout2 channel type. 17
AnalogIn2 Represents the analogin2 channel type. 18
Load1 Represents the load1 channel type. 19

CylinderStates <<Enumeration>>

Description Definition of the CylinderStates type.

Enumeration values The enumeration has the following values:

Name Description Value


Inactive Represents the inactive cylinder state. 0
Active Represents the active cylinder state. 1

253
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

DigitalOutputMode <<Enumeration>>

Description Definition of the DigitalOutputMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Unspecified Represents the Unspecified digital output mode. -1
Undefined Represents the Undefined digital output mode. 0
Switch Represents the switch digital output mode. 1
LowSideSwitch Represents the lowside switch digital output mode. 2
TriState Represents the TriState digital output mode. 3
HighSideSwitch Represents the highside switch digital output mode. 4
PushPull Represents the push pull digital output mode. 8

Direction <<Enumeration>>

Description Definition of the Direction type.

Enumeration values The enumeration has the following values:

Name Description Value


Unspecified Represents an unspecified direction. 0
Reference Represents the Reference direction. 1
In Represents the In direction. 2
Out Represents the Out direction. 3
BiDirectional Represents the BiDirectional direction. 4

EdgeType <<Enumeration>>

Description Definition of the EdgeType type.

254
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Enumeration values The enumeration has the following values:

Name Description Value


None Represents the none edge type type. 0
Rising Represents the rising edge type type. 1
Falling Represents the falling edge type type. 2
Both Represents the both edge type type. 3
BothRisingFirst Represents the both rising first edge type type. 4
BothFallingFirst Represents the both falling first edge type type. 5

EncoderType <<Enumeration>>

Description Definition of the EncoderType type.

Enumeration values The enumeration has the following values:

Name Description Value


Rotary Represents the rotary encoder type. 1
Linear Represents the linear encoder type. 2

EventTriggerCondition <<Enumeration>>

Description Definition of the EventTriggerCondition type.

Enumeration values The enumeration has the following values:

Name Description Value


NoEvent Represents the no event event trigger condition. 0
FirstEdge Represents the first edge event trigger condition. 1
WindowEnding Represents the window ending event trigger condition. 2

255
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

ExecutionMode <<Enumeration>>

Description Definition of the ExecutionMode type.

Enumeration values The enumeration has the following values:

Name Description Value


StateDependent Represents the state dependent execution mode. 1
Immediate Represents the immediate execution mode. 2

FunctionMode <<Enumeration>>

Description Definition of the FunctionMode type.

Enumeration values The enumeration has the following values:

Name Description Value


PwmMode Represents the pwm mode function mode. 1
FrequencyMode Represents the frequency mode function mode. 2

HighSideReference <<Enumeration>>

Description Definition of the HighSideReference type.

Enumeration values The enumeration has the following values:

Name Description Value


Individual Represents the individual highside reference. 1
ExternalIndividual Represents the external individual highside reference. 1
Vbat Represents the external highside reference. 2
ExternalShared Represents the external shared highside reference. 2
Unused Represents the unused highside reference. 3
ExternalShared2 Represents the second external shared highside reference. 3
Shared Represents the shared highside reference. 4
InternalShared Represents the internal shared highside reference. 4

256
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Value


Shared2 Represents the shared2 highside reference. 5
InternalShared2 Represents the shared2 highside reference. 5

IdleValue <<Enumeration>>

Description Definition of the IdleValue type.

Enumeration values The enumeration has the following values:

Name Description Value


FirstValue Represents the firstvalue idlevalue type. 1
LastValue Represents the lastvalue idlevalue type. 2
OtherValue Represents the othervalue idlevalue type. 3

ImportToWorkingViewMode <<Enumeration>>

Description Definition of the ImportToWorkingViewMode

Enumeration values The enumeration has the following values:

Name Description Value


Add Specific elements will be added as duplicates, even if entities 0
with the same ID have been found. All elements that were
present before the operation stay in the application.
Merge All elements that can be found during import are reused. All 1
elements that were present before the operation stay in the
application.
Replace All elements in context are removed before the import 2
operation.

InitializationMode <<Enumeration>>

Description Definition of the InitializationMode type.

257
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Enumeration values The enumeration has the following values:

Name Description Value


First Represents the first simulation initialization mode. 1
Each Represents the every simulation initialization mode. 2

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.

Enumeration values The enumeration has the following values:

Name Description Value


Standard Represents the standard task mode. 0
NoJitterLowLatency Represents the no jitter, low latency optimization mode. 2

LoadManualChecking <<Enumeration>>

Description Definition of the LoadManualChecking type.

Enumeration values The enumeration has the following values:

Name Description Value


BySystem Represents the by system load manual checking. 1
ByUser Represents the by user load manual checking. 2

258
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

MappingType <<Enumeration>>

Description The type of a mapping relation.

Enumeration values The enumeration has the following values:

Name Description Value


None No mapping relation. 0
DeviceMapping Device mapping relation. 1
ModelMapping Model mapping relation. 2
All Considers all mapping types. 3

MeasurementMode <<Enumeration>>

Description Definition of the MeasurementMode type.

Enumeration values The enumeration has the following values:

Name Description Value


FreeRunning Represents the free running measurement mode. 1
SingleTriggered Represents the single triggered measurement mode. 2

MeasurementMode2 <<Enumeration>>

Description Definition of the MeasurementMode2 type.

Enumeration values The enumeration has the following values:

Name Description Value


DutyCycle Represents the duty cycle measurementmode2 type. 4
Frequency Represents the frequency measurementmode2 type. 8
Both Represents the both measurementmode2 type. 16

259
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

MeasurementPoint <<Enumeration>>

Description Definition of the MeasurementPoint type.

Enumeration values The enumeration has the following values:

Name Description Value


Load Represents the load measurement point. 1
Ecu Represents the ECU measurement point. 2

OvercurrentProtection <<Enumeration>>

Description Definition of the OvercurrentProtection type.

Enumeration values The enumeration has the following values:

Name Description Value


Saturation Saturation 0
Shutdown Shutdown 1

PathPriority <<Enumeration>>

Description Position in the search path priority list.

Enumeration values The enumeration has the following values:

Name Description Value


Top The search path is at the top of the search path priority list 1
with the highest search path priority.
Bottom The search path is at the bottom of the search path priority 2
list with the lowest search path priority.

260
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

PhaseUpdateMode <<Enumeration>>

Description Definition of the PhaseUpdateMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Immediate Represents the immediate phase update mode. 1
Smoothed Represents the smoothed phase update mode. 2

Polarity <<Enumeration>>

Description Definition of the Polarity type.

Enumeration values The enumeration has the following values:

Name Description Value


ActiveLow Represents the active low polarity type. 0
ActiveHigh Represents the active high polarity type. 1

Potential <<Enumeration>>

Description Definition of the Potential type.

Enumeration values The enumeration has the following values:

Name Description Value


Unbound Represents the Unbound potential type. 1
Bound Represents the Bound potential type. 2
Ground Represents the Ground potential type. 3
VBat Represents the VBat potential type. 4
Unused Represents the Unused potential type. 5

261
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

ReadMode <<Enumeration>>

Description Definition of the ReadMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Contiguous Represents the contiguous read mode. 1
Overlapped Represents the overlapped read mode. 2

Role <<Enumeration>>

Description Definition of the Role type.

Enumeration values The enumeration has the following values:

Name Description Value


Signal Represents the Signal role type. 1
HighReference Represents the HighReference role type. 2
LowReference Represents the LowReference role type. 3
LoadSignal Represents the LoadSignal role type. 4
LoadReference Represents the LoadReference role type. 5
SignalInternal Represents the SignalInternal role type. 6
LowReferenceInternal Represents the LowReferenceInternal role type. 7
Unused Represents the Unused role type. 8

SensorMode <<Enumeration>>

Description Definition of the SensorMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Normal Represents the normal sensor mode. 1
Reverse Represents the reverse sensor mode. 2

262
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

SignalMode <<Enumeration>>

Description Definition of the SignalMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Current Represents the current signal mode. 1
Voltage Represents the voltage signal mode. 2

StandstillBehavior <<Enumeration>>

Description Definition of the StandstillBehavior type.

Enumeration values The enumeration has the following values:

Name Description Value


PitchSynchronousTransmission Represents the pitch synchronous transmission stand still 1
behavior.
PeriodicTransmission Represents the periodic transmission stand still behavior. 2

Storage <<Enumeration>>

Description Definition of the storage for search path information.

Enumeration values The enumeration has the following values:

Name Description Value


All All storage types. 1
Persistent Persistent storage type. 2
NonPersistent Non-persistent storage type. 3

263
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Termination <<Enumeration>>

Description Definition of the Termination type.

Enumeration values The enumeration has the following values:

Name Description Value


On Represents the on termination type. 0
Off Represents the off termination type. 1
R1600Ohm Represents the r1600ohm termination type. 2
R10000Ohm Represents the r10000ohm termination type. 3

TransceiverType <<Enumeration>>

Description Definition of the TransceiverType type.

Enumeration values The enumeration has the following values:

Name Description Value


Iso9141Lin Represents the iso9141lin transceiver type. 0
Iso118982HighspeedCan Represents the iso118982highspeedcan transceiver type. 1
Iso118983FaulttolerantCan Represents the iso118983faulttolerantcan transceiver type. 2
PiggybackModule Represents the piggybackmodule transceiver type. 3

TransferType <<Enumeration>>

Description Type of settings transfer.

Enumeration values The enumeration has the following values:

Name Description Value


All Transfers all settings. 0
AllowedFailureClasses Transfers only the allowed failure classes. 1
LoadRejection Transfers only the load rejection setting. 2

264
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

TriggerEdgeType <<Enumeration>>

Description Definition of the TriggerEdgeType type.

Enumeration values The enumeration has the following values:

Name Description Value


Rising Represents the rising trigger edge type. 1
Falling Represents the falling trigger edge type. 2
BothRisingFirst Represents the both rising first trigger edge type. 3
BothFallingFirst Represents the both falling first trigger edge type. 4

UpdateMode <<Enumeration>>

Description Definition of the UpdateMode type.

Enumeration values The enumeration has the following values:

Name Description Value


Synchronous Represents the synchronous update mode. 1
Asynchronous Represents the asynchronous update mode. 2

VoltagePolarity <<Enumeration>>

Description Definition of the Voltage Polarity type.

Enumeration values The enumeration has the following values:

Name Description Value


Positive Represents the positive voltage polarity type. 0
Negative Represents the negative voltage polarity type. 1

265
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Events
Where to go from here Information in this section

ICaApplicationEvents <<EventInterface>>.............................................. 266

ICaProjectEvents <<EventInterface>>..................................................... 267

ICaAutomationEventArgs <<Collection>>............................................. 270

ICaApplicationEvents <<EventInterface>>

Description The application's events.

Methods The element has the following methods:

Name Description Parameter1) Returns


BuildFinished A build process was finished. § <ICaAutomationEventArgs None
The build process was either (refer to
successfully completed or ICaAutomationEventArgs
canceled. <<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
BuildStarted A build process was started. § <ICaAutomationEventArgs None
The start of the build process (refer to
cannot be prevented at this ICaAutomationEventArgs
stage. <<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
BuildStarting A build process was requested. § <ICaAutomationEventArgs None
The start of the build process (refer to
can be prevented by setting ICaAutomationEventArgs
the Cancel event arguments. <<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to

266
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
Quitting The application is exiting. None None
Any documents, applications
and projects are closed. The
shutdown of the application
can not be prevented at this
stage.
Started The application has started. None None
All components have been
loaded and the command
line arguments may be
accessed. All automation
objects may be accessed. If
a project has been loaded
via command line it can be
accessed. This event is useful
only for working with the
Internal Interpreter. Starting
ConfigurationDesk with an
external client via dispatch
gets the automation object
right after ConfigurationDesk's
startup process has been
finished, so that no started
event should be necessary.
1) <Type> Name: Description

Related topics Examples

Working with ConfigurationDesk Events................................................................................... 59

ICaProjectEvents <<EventInterface>>

Description The project's events.

Methods The element has the following methods:

Name Description Parameter1) Returns


ApplicationClosed Fired if application was closed. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on

267
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ApplicationClosing Fired if application will be § <ICaAutomationEventArgs None
closed. (refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ApplicationLoaded Fired if application was loaded. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ApplicationLoading Fired if application will be § <ICaAutomationEventArgs None
loaded. (refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ApplicationSaved Fired after application was § <ICaAutomationEventArgs None
saved. (refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ApplicationSaving Fired before application will be § <ICaAutomationEventArgs None
saved. (refer to
ICaAutomationEventArgs

268
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Name Description Parameter1) Returns


<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ProjectClosed Fired if project was closed. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ProjectClosing Fired if project will be closed. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ProjectLoaded Fired if project was loaded. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ProjectLoading Fired if project will be loaded. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.

269
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

Name Description Parameter1) Returns


ProjectRootUpdated Fired if project root was § <ICaAutomationEventArgs None
changed. No longer supported (refer to
without replacement! ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
parameter EArgs.
ProjectRootUpdating Fired if project root is § <ICaAutomationEventArgs None
changing. No longer supported (refer to
without replacement! ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
parameter EArgs.
ProjectSaved Fired after Project was saved. § <ICaAutomationEventArgs None
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
ProjectSaving Fired before Project will be § <ICaAutomationEventArgs None
saved. (refer to
ICaAutomationEventArgs
<<Collection>> on
page 270)> EArgs: The
ICaAutomationEventArgs
(refer to
ICaAutomationEventArgs
<<Collection>> on
page 270) instance
containing the event data.
1) <Type> Name: Description

Related topics Examples

Working with ConfigurationDesk Events................................................................................... 59

ICaAutomationEventArgs <<Collection>>

Description Provides access to the event arguments of an event of the application.

270
ConfigurationDesk Automating Tool Handling May 2024
API Interfaces

Properties The element has the following properties:

Name Description Get/Set Type


Count Returns the number of properties in the event Get Signed 32 Bit Integer
arguments collection.

Methods The element has the following methods:

Name Description Parameter1) Returns


Contains Tests if a property with the § <String> Name: The name. True if the collection contains a
specified name is contained in property with given name.
the collection. § Boolean
Item Returns an event arguments § <String> Name: The name. None
object according to the
specified name.
SetValue Sets one or more values § <String> Name: The name of None
according to the event that the value to set.
occurred. § <Object> Values: The
If the event does not values.
support SetValue or the Name
parameter of SetValue isn't
known the value will be
ignored.
1) <Type> Name: Description

Related topics Examples

Working with ConfigurationDesk Events................................................................................... 59

271
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk API Reference

272
ConfigurationDesk Automating Tool Handling May 2024
Message Reader API

Message Reader API

Where to go from here Information in this section

Introduction to the Message Reader API................................................ 274

dSPACE.Common.MessageHandler.Logging Reference.......................... 281

273
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

Introduction to the Message Reader API


Where to go from here Information in this section

Reading dSPACE Log Messages via the Message Reader API.................. 274
You can read log messages of the dSPACE Log via the Message Reader
API.

Supported dSPACE Products and Components.............................. ........ 276


Provides an overview of all dSPACE products and components whose
messages you can access via the Message Reader API.

Example of Reading Messages with Python............................................ 277


You can read the log messages via Python. You can combine multiple
filters to display only messages according to your specifications.

Example of Reading Messages with C#.................................................. 279


You can read the log messages via C#. You can combine multiple filters
to display only messages according to your specifications.

Reading dSPACE Log Messages 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

The Message Reader API is available as of dSPACE Release 2020‑A. For


information on the dSPACE products and components that support the Message
Reader API, refer to Supported dSPACE Products and Components on page 276.

dSPACE.Common.MessageReader.dll The Message Reader API is


implemented by the dSPACE.Common.MessageReader.dll file. It is located
in the bin subfolder of the installation folder of each dSPACE product that
supports the Message Reader API.
As an exception, the dSPACE.Common.MessageReader.dll for the Bus
Manager (stand-alone) is located in the \bin subfolder of the ConfigurationDesk
installation folder.

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#.

Specifying a product filter As of dSPACE Release 2021‑A, the


Products property of the MessageReaderSettings class can no longer be
used to set the list of products for which to filter in the log sessions. The
Message Reader API provides the SetProducts method for this purpose.
The following table shows how to specify a product filter before and after
migration:

Using Message Reader API of ...


... dSPACE Release 2020‑B and Earlier (Python 3.6) ... dSPACE Release 2021‑A and Later (Python 3.9)
# Specify products whose messages to read: # Specify products whose messages to read:
Settings = MessageReaderSettings() Settings = MessageReaderSettings()
Settings.Products.Add('ControlDesk') Settings.SetProducts(['ControlDesk', 'AutomationDesk'])
Settings.Products.Add('AutomationDesk')

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#.

Implicit type conversion of enumeration values is disabled The implicit


conversion from C# enums to Python int and vice versa has been disabled. As a
consequence, when you use the Severity enumeration of the Message Reader
API, you have to use an enum member, e.g., Severity.Error.

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:

Using Message Reader API of ...


... dSPACE Release 2023‑A and Earlier (Python 3.9) ... dSPACE Release 2023‑B and Later (Python 3.11)
Message.Severity == SEVERITY_ERROR Message.Severity == Severity.Error

Related topics Basics

Supported dSPACE Products and Components........................................................................ 276

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

References

MessageReaderSettings Class................................................................................................. 285

Supported dSPACE Products and Components

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

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Example of Reading Messages with Python

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.

Referencing a message reader You have to reference a dSPACE.Common.MessageReader.dll assembly.


assembly For information on the location of the assembly, refer to
dSPACE.Common.MessageReader.dll on page 275.

In the following examples it is assumed that the dSPACE Installation


Manager is installed and that the message reader assembly is installed in
C:\Program Files\Common Files\dSPACE\InstallationManager\bin.

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)

# Add reference to assembly and import it:


import clr
clr.AddReference('dSPACE.Common.MessageReader')
from dSPACE.Common.MessageHandler.Logging import *

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

# Configure products and sessions whose messages to read:


Settings = MessageReaderSettings()
Settings.MaximalSessionCount = 1
Settings.SetProducts(['ControlDesk', 'AutomationDesk'])

# Create message reader and print text of each error message:


Reader = MessageReader(Settings)
for Message in Reader.ReadMessages():
# Print error messages only:
if Message.Severity == Severity.Error or \
Message.Severity == Severity.SevereError or \
Message.Severity == Severity.SystemError:
print('%s: %s' % (Message.Session.ProductName, Message.MessageText))
Reader.Dispose()

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. Refer to MessageReader Class on page 284.

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()

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274
Supported dSPACE Products and Components........................................................................ 276

References

MessageReaderSettings Class................................................................................................. 285

278
ConfigurationDesk Automating Tool Handling May 2024
Introduction to the Message Reader API

Example of Reading Messages with C#

Introduction You can read the log messages via C#. You can combine multiple filters to
display only messages according to your specifications.

Referencing a message reader You have to reference a dSPACE.Common.MessageReader.dll assembly.


assembly For information on the location of the assembly, refer to
dSPACE.Common.MessageReader.dll on page 275.

Reading all messages The following example reads all existing message log files and prints the
messages:
using dSPACE.Common.MessageHandler.Logging;
...

// Create message reader and print text of each message:


using (MessageReader reader = new MessageReader(null))
{
foreach (message in reader.ReadMessages())
{
Console.WriteLine(message.MessageText);
}
}

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;
...

// Read the last log sessions of ControlDesk and AutomationDesk only:


MessageReaderSettings settings = new MessageReaderSettings();
settings.MaximalSessionCount = 1;
settings.Products.Add("ControlDesk");
settings.Products.Add("AutomationDesk");

using (MessageReader reader = new MessageReader(settings))


{
foreach (ILogMessage message in reader.ReadMessages())
{
// Print error messages only:
if (message.Severity == Severity.Error
|| message.Severity == Severity.SevereError
|| message.Severity == Severity.SystemError)
{
Console.WriteLine(message.Session.ProductName + ": " + message.MessageText);
}
}
}

279
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

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. Refer to MessageReader Class on page 284.

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274
Supported dSPACE Products and Components........................................................................ 276

References

MessageReaderSettings Class................................................................................................. 285

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........................................................................... 281


To access information about a message as written to a log file.

ILogSession Interface............................................................................. 282


To access information about a message log session.

MessageReader Class............................................................................ 284


To read serialized messages written by dSPACE products.

MessageReaderSettings Class................................................................ 285


To define the settings of a message reader.

Severity Enumeration............................................................................. 286


To specify the severity of a message.

ILogMessage Interface

Namespace dSPACE.Common.MessageHandler.Logging

Description To access information about a message as written to a log file.

Properties The element has the following properties:

Name Description Get/Set Type


IsStartMessage Gets a value indicating whether the message is a Get Boolean
session start message.
IsStopMessage Gets a value indicating whether the message is a Get Boolean
session stop message.
MainModuleNumber Gets the main module number of the message. Get Integer
MessageCode Gets the error code of the message. Get Integer
MessageText Gets the text of the message. Get String
ModuleName Gets the module name of the message. Get String
Session Gets the log session which issued the message. Get ILogSession2)
Severity Gets the severity of the message. Get Severity1)
SubmoduleNumber Gets the submodule number of the message. Get Integer
ThreadId Gets the thread ID of the submitting thread. Get Integer

281
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

Name Description Get/Set Type


TimeStamp Gets the time when the message was submitted. Get DateTime
Given as local time in the time zone of the
session.
UtcTimeStamp Gets the time when the message was submitted Get DateTime
in UTC time.
1) Refer to Severity Enumeration on page 286.
2) Refer to ILogSession Interface on page 282.

Methods The element has no methods.

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

References

ILogSession Interface.............................................................................................................. 282


Severity Enumeration.............................................................................................................. 286

ILogSession Interface

Namespace dSPACE.Common.MessageHandler.Logging

Description To access information about a message log session.

Properties The element has the following properties:

Name Description Get/Set Type


CloseTime Gets the time when the session was closed. Get DateTime
Returns an undefined time (0,
DateTimeKind.Unspecified) if the session is still
open or was not closed successfully. Given as local
time in the time zone of the session.

282
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference

Name Description Get/Set Type


IsOpen Gets a value indicating whether the session is still Get Boolean
open.
If true, the session is still open and new messages
can be written.
IsValid Gets a value indicating whether the session is Get Boolean
valid.
A session can become invalid if its log files are
corrupted.
MetaData Gets the products metadata as read from log file Get Dictionary< String, String >
session info.
ProcessId Gets the process ID of the log session. Get Integer
ProductName Gets the product name of the log session. Get String
SessionId Gets the ID of the log session. Get Integer
This ID is unique in the context of its session
reader.
StartTime Gets the sessions start time. Get DateTime
Given as local time in the time zone of the
session.
TimezoneName Gets the standard time zone name of the session. Get String
TimezoneOffset Gets the time zone offset of the session relative to Get TimeSpan
UTC.
UtcCloseTime Gets the time when the session was closed as Get DateTime
UTC time.
Returns an undefined time (0,
DateTimeKind.Unspecified) if the session is still
open or was not closed successfully.
UtcStartTime Gets the start time of the log session as UTC time. Get DateTime

Methods The element has the following methods:

Name Description Parameter1) Returns


ToSessionTime Converts UTC time to time § <DateTime> utcTime: Time in the time zone of the
zone used when the session Specifies the UTC time to logging session.
was written. convert. § DateTime
1) <Type> Name: Description

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

283
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

MessageReader Class

Description To read serialized messages written by dSPACE products.

Constructor The element has the following constructor:

Name Description Parameter1) Returns


MessageReader Initializes a new instance of the § <MessageReaderSettings>2) None
MessageReader class. settings: Settings which
allow to specify which
sessions and messages are
read. Can be null, causing
all existing log files to be
read.
1) <Type> Name: Description
2) Refer to MessageReaderSettings Class on page 285

Properties The element has no properties.

Methods The element has the following methods:

Name Description Parameter1) Returns


Dispose Performs application-specific None None
tasks associated with freeing,
releasing, or resetting
unmanaged resources.
ReadMessages Reads the messages written to None Messages read from log file.
the log files of the sessions up § IEnumerable< ILogMessage
to now. (refer to ILogMessage
The messages are returned in Interface on page 281) >
chronological order according
to their time stamps.

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.

1) <Type> Name: Description

284
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

References

MessageReaderSettings Class................................................................................................. 285

MessageReaderSettings Class

Description To define the settings of a message reader.

Used to filter the log sessions and messages read.

Constructor The element has the following constructor:

Name Description Parameter1) Returns


MessageReaderSettings Initializes a new instance of the None None
MessageReaderSettings class.
1)
<Type> Name: Description

Properties The element has the following properties:

Name Description Get/Set Type


DirectoryNames Gets a list of specific directory names from which Get List< String >
to read log files.
If the list is empty, all standard directories are
searched for log files.
MaximalSessionCount Gets or sets the maximal number of log sessions Get/Set Integer
read for each product.
If the count is a positive number n, only the last
n sessions are read. If the count is not positive, an
unlimited number of sessions is read. The default
value is zero, i.e., unlimited.
MessageTimeAfter Gets or sets the minimal time for which messages Get/Set DateTime
are read, given as UTC time.
Only messages submitted after the message time
are read. The message time may be in the past.
The message time must be given as valid UTC

285
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

Name Description Get/Set Type


time. The default time is undefined, i.e., each
message time is allowed.
Products Gets the list of product names for which to read Get List< String >
log sessions.
If the list is empty sessions of all products are
read.
StartTimeAfter Gets or sets the minimal start time for which Get/Set DateTime
sessions are read, given as UTC time.
Only sessions which started after the start time
are read. The start time may be in the past. The
start time must be given as valid UTC time. The
default time is undefined, i.e., each start time is
allowed.

Methods The element has the following methods:

Name Description Parameter1) Returns


SetDirectoryNames Sets the list of specific directory <string[]> names: Array of None
names from which to read log directory names.
files.
You do not have to specify
a list. If the list is empty,
all standard directories are
searched for log files.
SetProducts Sets the list of product names <string[]> products: Array of None
for which to read log sessions. product names.
1) <Type> Name: Description

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

Severity Enumeration

Description To specify the severity of a message.

286
ConfigurationDesk Automating Tool Handling May 2024
dSPACE.Common.MessageHandler.Logging Reference

Enumeration values The enumeration has the following values:

Value Name Description


0 Trace A trace message.
Trace messages are usually not created. It depends on the host
application if it is possible to configure the message handler to
create trace messages.
1 Info An information message.
2 Warning A warning message.
3 Error An error message.
4 SevereError A severe error message.
5 SystemError A system error message.
6 Question A question message.
7 Advice An advice message.

Related topics Basics

Reading dSPACE Log Messages via the Message Reader API................................................... 274

Examples

Example of Reading Messages with C#................................................................................... 279


Example of Reading Messages with Python............................................................................. 277

287
May 2024 ConfigurationDesk Automating Tool Handling
Message Reader API

288
ConfigurationDesk Automating Tool Handling May 2024
Appendix

Appendix

Where to go from here Information in this section

Limitations............................................................................................. 290

Migrating Python Scripts from Python 3.9 to Python 3.11...................... 294

289
May 2024 ConfigurationDesk Automating Tool Handling
Appendix

Limitations

Limitations for Automating ConfigurationDesk

Global limitations § Do not use ConfigurationDesk's automation interface when a modal


ConfigurationDesk dialog is currently open. For example, if you close the
project and application via automation and a modal ConfigurationDesk dialog
is currently open, this can lead to inconsistencies or even to ConfigurationDesk
crashing.
§ You cannot lock your ConfigurationDesk automation session against other
automated ConfigurationDesk accesses, such as automated access via
AutomationDesk. All entities that are involved in automation have to
cooperate. There is no mechanism that protects changes or configurations by
one entity from those made by others.

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

§ Set the ModelSaveMode preference to DoNotSave or


SaveAndCloseWithoutConfirmation using the dsmpb_pref() API
command:
dsmpb_pref("Set","ModelSaveMode","DoNotSave")
For more information, refer to dsmpb_pref (Model Interface Package for
Simulink API Reference ).

Using tool internal Python interpreters When automating processes


that affect ConfigurationDesk and MATLAB, do not use the internal Python
interpreter of ConfigurationDesk nor the integrated Python support of MATLAB.
Use an external Python interpreter instead the tool internal interpreters.
Using an external Python interpreter has the following advantages:
§ Avoiding blocking or deadlock situations between ConfigurationDesk and
MATLAB.
§ Reducing the compatibility requirements. For example, the version of
the external Python interpreter can be selected independently from the
ConfigurationDesk interpreter or the MATLAB Python interface.

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.

TransferType The TransferType Enumeration member


ExpectedLoadDescription is obsolete. The corresponding value now refers to load
rejection.

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)"

Related topics Basics

Limitations (ConfigurationDesk Real-Time Implementation Guide )


Limitations for Using the Bus Manager (ConfigurationDesk Bus Manager
Implementation Guide )

293
May 2024 ConfigurationDesk Automating Tool Handling
Appendix

Migrating Python Scripts from Python 3.9 to Python 3.11


Where to go from here Information in this section

Main Changes in Python 3.11................................................................ 294


General information on Python 3.11.

Main Changes in Handling Python 3.11 with dSPACE Software............. 295


Overview of the packages in the Python 3.11 distribution that is
contained in the dSPACE Release 2024‑A.

General Information on Using Python Installations................................. 296


Information on using Python installations in parallel.

Technical Changes................................................................................. 297


The migration to Python 3.11 has caused changes in the Python API.

Main Changes in Python 3.11

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.

Therefore, dSPACE switches to Python 3.11 with dSPACE Release 2023‑B.

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.

The Python Software Foundation provides the following documents:


§ What's New from Python 3.9 to 3.10:
https://docs.python.org/3.10/whatsnew/3.10.html
§ What's New from Python 3.10 to 3.11:
https://docs.python.org/3.11/whatsnew/3.11.html

Related topics Basics

Technical Changes.................................................................................................................. 297

294
ConfigurationDesk Automating Tool Handling May 2024
Migrating Python Scripts from Python 3.9 to Python 3.11

Main Changes in Handling Python 3.11 with dSPACE Software

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.

Package Python 3.9 Python 3.11


(Release 2023‑A) (Release 2024‑A)
certifi 2022.12.7 2024.2.2
cffi ‑ 1.16.0
charset‑normalizer 3.0.1 3.3.2
clr‑loader ‑ 0.2.6
comtypes 1.1.14 1.3.0
contourpy 1.0.6 1.2.0
Core 3.9.16.11) 3.11.8
cycler 0.11.0 0.12.1
fonttools 4.38.0 4.48.1
future 0.18.3 0.18.3
grpcio 1.51.1 1.60.1
grpcio_tools 1.51.1 1.60.1
idna 3.4 3.6
Jinja2 ‑ 3.1.3 (new)
kiwisolver 1.4.4 1.4.5
lxml 4.9.2 5.1.0
MarkupSafe ‑ 2.1.5 (new)
matplotlib 3.6.3 3.8.2
mpId3 ‑ 0.5.10 (new)
numpy 1.24.1 1.26.3
packaging 23.0 23.2
pillow 9.4.0 10.2.0
pip 22.3.1 24.0
protobuf 4.21.12 4.25.2
pycparser 2.21 2.21
pyglet 2.0.3 2.0.10
pyparsing 3.0.9 3.1.1
pypubsub 4.0.3 4.0.3
Python‑dateutil 2.8.2 2.8.2
pythonnet 2.5.31) 3.0.111), 2)
pytz 2020.7 2024.1

295
May 2024 ConfigurationDesk Automating Tool Handling
Appendix

Package Python 3.9 Python 3.11


(Release 2023‑A) (Release 2024‑A)
pywin32 305.101) 306.101)
requests 2.28.2 2.31.0
scipy 1.10.0 1.12.0
six 1.16.0 1.16.0
urllib3 1.26.14 2.2.0
wxPython 4.2.0 4.2.1
yapsy 1.12.2 1.12.2
1) This component contains some dSPACE‑specific bugfixes. It should not be replaced by
the component from the standard Python distribution.
2) Do not additionally install the clr module of the pypi package, because it conflicts with
the clr module in pythonnet.

General Information on Using Python Installations

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

If you install dSPACE Release 2023-A or earlier after the installation of


dSPACE Release 2023‑B, Python 3.9 will be installed last. Therefore,
PythonWin 3.9 is registered to open Python files. To set the file
associations to PythonWin 3.11, execute the PythonInstaller.exe
from <DVDRoot>\Products\Common\Python3.11 again.
To open a Python file with PythonWin 3.11 temporarily, use the Edit
with PythonWin 3.11 command on the context menu of the file.

§ 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

To avoid unintentional effects, which can be difficult to identify, you are


recommended to not use environment variables. For the same reason, you
should not extend the system path by a Python installation path.

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

It is recommended to use only dSPACE software from the same Release


when using Python scripts. Using both Python versions in the same
application context, such as automating the access to an older version
of ControlDesk via AutomationDesk or using AutomationDesk with an
activated Real‑Time Testing version that does not support Python 3.11,
might cause a conflict.

Technical Changes

Introduction Migrating from Python 3.9 to Python 3.11 has caused changes in the Python API.

Note

Independently of the number of required manual modifications, you must


test the migrated code.

Migration issues The following changes in pythonnet 3.0 from Python 3.11 require manual
migration of your Python scripts.

pythonnet: Change of the return values of .NET methods If you use


pythonnet 3.0 in Python 3.11, .NET methods that return an interface are
automatically wrapped in that interface. Therefore, you cannot access members
that are only part of the implementation class. You can only access members that
are part of the interface.

pythonnet: Implicit type conversion of enumeration values is


disabled The implicit conversion from C# enums to Python int and vice
versa has been disabled. If the Enum object does not provide a member
with the related integer value, you must either use an enum member, e.g.,
MyEnum.Option, or an enum constructor, e.g., MyEnum(<intValue>).

297
May 2024 ConfigurationDesk Automating Tool Handling
Appendix

pythonnet: .NET collections and arrays are no longer automatically


converted to Python collections The automatic conversion of .NET
collections and arrays introduced with pythonnet 2.4 is undone with
pythonnet 3.0. You must therefore migrate the methods and properties of a
Python collection to the methods and properties of the .NET collection. For
example, you must use MyObject.Count instead of len(MyObject).

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.

Where to go from here Information in this section

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

Application There are two types of applications in ConfigurationDesk:


§ A part of a ConfigurationDesk project: ConfigurationDesk application .
§ An application that can be executed on dSPACE real-time hardware: real-time
application .

Application process A component of a processing unit application . An


application process contains one or more tasks .

Application process component A component of an application process .


The following application process components are available in the Components
subfolder of an application process:
§ Behavior models that are assigned to the application process, including their
predefined tasks , runnable functions , and events .
§ Function blocks that are assigned to the application process.

AutomationDesk A dSPACE software product for creating and managing


any kind of automation tasks. Within the dSPACE tool chain, it is mainly used for
automating tests on dSPACE hardware.

AUTOSAR system description file An AUTOSAR XML (ARXML) file that


describes a system according to AUTOSAR. A system is a combination of a
hardware topology, a software architecture, a network communication, and
information on the mappings between these elements. The described network
communication usually consists of more than one bus system (e.g., CAN, LIN,
FlexRay).

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.

Behavior model A model that contains the control algorithm for a


controller (function prototyping system) or the algorithm of the controlled
system (hardware-in-the-loop system). It does not contain I/O functionality

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.

Bidirectional signal port A signal port that is independent of a data


direction or current flow. This port is used, for example, to implement bus
communication.

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 process A process that generates an executable real-time application


based on your ConfigurationDesk application that can be run on dSPACE
real-time hardware. The build process can be controlled and configured via the
Build Log Viewer . If the build process is successfully finished, the build result
files (build results ) are added to the ConfigurationDesk application.

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 .

Bus access The representation of a run-time communication cluster . By


assigning one or more bus access requests to a bus access, you specify which
communication clusters form one run-time communication cluster.
In ConfigurationDesk, you can use a bus function block (CAN, LIN) to
implement a bus access. The hardware resource assignment of the bus
function block specifies the bus channel that is used for the bus communication.

Bus access request The representation of a request regarding the bus


access . There are two sources for bus access requests:
§ At least one element of a communication cluster is assigned to the
Simulated ECUs, Inspection, or Manipulation part of a bus configuration .
The related bus access requests contain the requirements for the bus channels
that are to be used for the cluster's bus communication.
§ A frame gateway is added to the Gateways part of a bus configuration. Each
frame gateway provides two bus access requests that are required to specify
the bus channels for exchanging bus communication.

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 A Bus Manager element that implements bus


communication in a ConfigurationDesk application and lets you configure
it for simulation, inspection, and/or manipulation purposes. The required bus
communication elements must be specified in a communication matrix and
assigned to the bus configuration. Additionally, a bus configuration lets you
specify gateways for exchanging bus communication between communication
clusters . A bus configuration can be accessed via specific tables and its related
Bus Configuration function block .

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 Custom Code interface A C-based API interface provided by dSPACE.


It is required to implement user code and its functionalities in executable
applications . In general, the Bus Custom Code interface lets you do the
following:
§ Specify the unique user code ID for each user code implementation . The ID
is required to unambiguously reference the user code implementation in bus
configurations .
§ Initialize the functionalities provided by user code in the executable
application.
§ Exchange data between the user code and the Bus Manager, for example, to
access properties of secured IPDUs or write calculated checksum values to
ISignals of an IPDU .

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.

Bus simulation container A container that contains bus communication


configured with the Bus Manager or the Ethernet Configuration Package.

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.

CAFX file A ConfigurationDesk application fragment file that contains signal


chain elements that were exported from a user-defined working view or the
Temporary working view of a ConfigurationDesk application . This includes
the elements' configuration and the mapping lines between them.

Channel multiplication A feature that allows you to enhance the max.


current or max. voltage of a single hardware channel by combining several
channels. ConfigurationDesk uses a user-defined value to calculate the number
of hardware channels needed. Depending on the function block type , channel
multiplication is provided either for current enhancement (two or more channels
are connected in parallel) or for voltage enhancement (two or more channels are
connected in series).

Channel request A channel assignment required by a function block .


ConfigurationDesk determines the type(s) and number of channels required
for a function block according to the assigned channel set , the
function block features, the block configuration and the required physical
ranges. ConfigurationDesk provides a set of suitable and available hardware
resources for each channel request. This set is produced according to the
hardware topology added to the active ConfigurationDesk application . You

303
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary

have to assign each channel request to a specific channel of the hardware


topology.

Channel set A number of channels of the same channel type located on


the same I/O board or I/O unit. Channels in a channel set can be combined, for
example, to provide a signal with channel multiplication .

Channel type A term to indicate all the hardware resources (channels) in


the hardware system that provide exactly the same characteristics. Examples for
channel type names: Flexible In 1, Digital Out 3, Analog In 1. An I/O board
in a hardware system can have channel sets of several channel types. Channel
sets of one channel type can be available on different I/O boards.

Cluster A short form of communication cluster .

Common Program Data folder A standard folder for application-specific


program data that is used by all users.
%PROGRAMDATA%\dSPACE\<InstallationGUID>\<ProductName>
or
%PROGRAMDATA%\dSPACE\<ProductName>\<VersionNumber>

Communication cluster A communication network of network nodes that


are connected to the same physical channels and share the same bus protocol
and address range.

Communication matrix A file that defines the communication of a bus


network. It can describe the bus communication of one communication
cluster or a bus network consisting of different bus systems and clusters. Files
of various file formats can be used as a communication matrix: For example,
AUTOSAR system description files , DBC files , LDF files , and FIBEX files .

Communication package A package that bundles Data Inport blocks which


are connected to Data Outport blocks. Hence, it also bundles the signals that
are received by these blocks. If Data Inport blocks are executed within the
same task and belong to the same communication package , their data
inports are read simultaneously. If Data Outport blocks that are connected to the
Data Inport blocks are executed in the same task, their output signals are sent
simultaneously in one data package. Thus, communication packages guarantee
simultaneous signal updates within a running task (data snapshot).

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

Configuration Port block A model port block that is created in


ConfigurationDesk during model analysis for each of the following blocks found
in the Simulink behavior model:
§ RTICANMM ControllerSetup block
§ RTILINMM ControllerSetup block
§ FLEXRAYCONFIG UPDATE block
Configuration Port blocks are also created for bus simulation containers. A
Configuration Port block provides a configuration port that must be mapped
to the Configuration port of a CAN, LIN, or FlexRay function block to create the
signal chain for bus communication.

ConfigurationDesk application A part of a ConfigurationDesk


project that represents a specific implementation. You can work with only one
application at a time, and that application must be activated.
An application can contain:
§ Device topology
§ Hardware topology
§ Model topology
§ Communication matrices
§ External cable harness
§ Build results (after a successful build process has finished)

ConfigurationDesk model interface The part of the model interface that


is available in ConfigurationDesk. This specific term is used to explicitly
distinguish between the model interface in ConfigurationDesk and the model
interface in Simulink.

Conflict A result of conflicting configuration settings that is displayed in


the Conflicts Viewer . ConfigurationDesk allows flexible configuration without
strict constraints. This lets you work more freely, but it can lead to conflicting
configuration settings. ConfigurationDesk automatically detects conflicts and
provides the Conflicts Viewer to display and help resolve them. Before you build
a real-time application , you have to resolve at least the most severe conflicts
(e.g., errors that abort the build process ) to get proper build results .

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.

Container IPDU A term according to AUTOSAR. An IPDU that contains


one or more smaller IPDUs (i.e., contained IPDUs). Contained IPDUs can be
multiplexed IPDUs , secured IPDUs , and ISignal IPDUs , for example.

ControlDesk A dSPACE software product for managing, instrumenting


and executing experiments for ECU development. ControlDesk also supports
calibration, measurement and diagnostics access to ECUs via standardized
protocols such as CCP, XCP, and ODX.

Countdown event An event that triggers a task exactly once, after a


specified time (offset) has elapsed. Countdown events are provided by bus
simulation containers (BSC files).

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.

Cycle time restriction A value of a runnable function that indicates the


sample time the runnable function requires to achieve correct results. The cycle
time restriction is indicated by the Period property of the runnable function in
the Properties Browser .

Data inport A port that supplies data from ConfigurationDesk's function


outports to the behavior model.
In a multimodel application, data inports also can be used to provide data from a
data outport associated to another behavior model (model communication ).

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 ).

Data.CfgDeskApp file A ConfigurationDesk application file that contains


links to all the documents related to an application.

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 block A graphical representation of devices from the device


topology in the signal chain . It can be mapped to function blocks via
device ports .

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 .

Device pin A representation of a connector pin of your external device .


Device ports are assigned to device pins. ConfigurationDesk can use the
device pin assignment together with the hardware resource assignment and
the device port mapping to calculate the external cable harness .

Device port An element of a device topology that represents the signal of


an external device in ConfigurationDesk.

Device port group A structural element of a device topology that can


contain device ports and other device port groups.

306
ConfigurationDesk Automating Tool Handling May 2024
E

Device topology A component of a ConfigurationDesk application that


represents external devices in ConfigurationDesk. You can create a device
topology from scratch or easily extend an existing device topology. You can
also merge device topologies to extend one. To edit or create device topologies
independently of ConfigurationDesk, you can export and import DTFX and
XLSX files.

Documents folder A standard folder for application‑specific files that are


used by the current user.
%USERPROFILE%\Documents\dSPACE\<ProductName>\<VersionNumber>

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.

dSPACE Log A collection of errors, warnings, information, questions, and


advice issued by all dSPACE products and connected systems over more than one
session.

DTFX file A device topology export file that contains information on


the interface to the external devices , such as the ECUs to be tested. The
information includes details of the available device ports , their characteristics,
and the assigned pins.

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 Abbreviation of electronic control unit.


An embedded computer system that consists of at least one CPU and associated
peripherals. An ECU contains communication controllers and communication
connectors, and usually communicates with other ECUs of a bus network. An
ECU can be member of multiple bus systems and communication clusters .

ECU application An application that is executed on an ECU . In ECU


interfacing scenarios, parts of the ECU application can be accessed (e.g., by a
real-time application ) for development and testing purposes.

ECU function A function of an ECU application that is executed on the


ECU . In ECU interfacing scenarios, an ECU function can be accessed by
functions that are part of a real-time application , for example.

ECU Interface Manager A dSPACE software product for preparing ECU


applications for ECU interfacing . The ECU Interface Manager can generate
ECU interface container (EIC ) files to be used in ConfigurationDesk.

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

development and testing purposes while the ECU application is executed on


the ECU . For example, you can perform ECU interfacing with SCALEXIO
systems or MicroAutoBox III systems to access individual ECU functions by
a real-time application .

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.

Electrical interface unit A segment of a function block that provides the


interface to the external devices and to the real-time hardware (via hardware
resource assignment ). Each electrical interface unit of a function block usually
needs a channel set to be assigned to it.

Event A component of a ConfigurationDesk application that triggers the


execution of a task . The following event types are available:
§ Timer event
§ I/O event
§ Software event
§ Delayed event
§ Countdown event
§ Synchronized timer event

Event port An element of a function block . The event port can be mapped
to a runnable function port for modeling an asynchronous task.

Executable application The generic term for real-time applications and


offline simulation applications . In ConfigurationDesk, an executable
application is always a real-time application since ConfigurationDesk does not
support offline simulation applications.

Executable application component A component of an executable


application . The following components can be part of an executable
application:
§ Imported behavior models including predefined tasks , runnable
functions , and events . You can assign these behavior models to
application processes via drag & drop or by selecting the Assign Model
command from the context menu of the relevant application process.
§ Function blocks added to your ConfigurationDesk application including
associated I/O events . Function blocks are assigned to application processes
via their model port mapping.

Executable Application table A pane that lets you model executable


applications (i.e., real-time applications ) and the tasks used in them.

EXPSWCFG file An experiment software configuration file that contains


configuration data for automotive fieldbus communication. It is created during
the build process and contains the data in XML format.

Extended multiplexed IPDU An IPDU that is used for extended signal


multiplexing, which can be specified only in DBC communication matrices.
The IPDU contains multiplexer signals and multiplexed signals: The value of a

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 cable harness A component of a ConfigurationDesk


application that contains the wiring information for the external cable harness
(also known as cable harness ). It contains only the logical connections and
no additional information such as cable length, cable diameters, dimensions
or the arrangement of connection points, etc. It can be calculated by
ConfigurationDesk or imported from a file so that you can use an existing cable
harness and do not have to build a new one. The wiring information can be
exported to an ECHX file or XLSX file .

External device A device that is connected to the dSPACE hardware, such as


an ECU or external load. The external device topology is the basis for using
external devices in the signal chain of a ConfigurationDesk application .

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 .

Frame A piece of information of a bus communication. It contains an


arbitrary number of non-overlapping PDUs and the data length code (DLC).

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.

Frame triggering An instance of a frame that is exchanged via a bus


channel. It includes transmission information of the frame (e.g., timings, ID,
sender, receiver). The requirements regarding the frame triggerings depend on
the bus system, e.g., CAN or LIN.

Function block A graphical representation in the signal chain that is


instantiated from a function block type . A function block provides the I/O
functionality and the connection to the real-time hardware. It serves as a
container for functions, for electrical interface units and their logical signals .
The function block's ports (function ports and/or signal ports ), provide the
interfaces to the neighboring blocks in the signal chain.

Function block type A software plug-in that provides a specific I/O


functionality. Every function block type has unique features that are different
from other function block types.
To use a function block type in your ConfigurationDesk application , you have
to create an instance of it. This instance is called a function block . Instances
of function block types can be used multiple times in a ConfigurationDesk
application. The types and their instantiated function blocks are displayed in the
function library of the Function Browser .

Function Browser A pane that displays the function library in a


hierarchical tree structure. Function block types are grouped in function
classes. Instantiated function blocks are added below the corresponding
function block type.

Function inport A function port that inputs the values from the behavior
model to the function block to be processed by the function.

Function library A collection of function block types that allows access


to the I/O functionality in ConfigurationDesk. The I/O functionality is based on
function block types. The function library provides a structured tree view on the
available function block types. It is displayed in the Function Browser .

Function outport A function port that outputs the value of a function to


be used in the behavior model .

Function port An element of a function block that provides the interface


to the behavior model via model port blocks .

Functional Mock-up Unit An archive file that describes and implements


the functionality of a model based on the Functional Mock-up Interface (FMI)
standard.

Global working view The default working view that always contains all
signal chain elements.

310
ConfigurationDesk Automating Tool Handling May 2024
H

Hardware resource A hardware element (normally a channel on an I/O


board or I/O unit) that is required to execute a function block . A hardware
resource can be localized unambiguously in a hardware system. Every hardware
resource has specific characteristics. A function block therefore needs a hardware
resource that matches the requirements of its functionality. This means that not
every function block can be executed on every hardware resource. There could
be limitations on a function block's features and/or the physical ranges.

Hardware resource assignment An action that assigns the electrical


interface unit of a function block to one or more hardware resources .
Function blocks can be assigned to any hardware resource that is suitable
for the functionality and available in the hardware topology of your
ConfigurationDesk application .

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.

Hardware topology A component of a ConfigurationDesk


application that contains information on a specific hardware system which
can be used with ConfigurationDesk. It provides information on the components
of the system, such as channel type and slot numbers. It can be scanned
automatically from a registered platform , created in ConfigurationDesk's
Hardware Resource Browser from scratch, or imported from an HTFX file .

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

IOCNET Abbreviation of I/O carrier network.


A dSPACE proprietary protocol for internal communication in a SCALEXIO
system between the real-time processors and I/O units. The IOCNET lets you
connect more than 100 I/O nodes and place the parts of your SCALEXIO system
long distances apart.

IPDU Abbreviation of interaction layer protocol data unit.


A term according to AUTOSAR. An IPDU contains the communication data
that is routed from the interaction layer to a lower communication layer and
vice versa. An IPDU can be implemented, for example, as an ISignal IPDU ,
multiplexed IPDU , or container IPDU .

ISignal A term according to AUTOSAR. A signal of the interaction layer


that contains communication data as a coded signal value. To transmit the
communication data on a bus, ISignals are instantiated and included in ISignal
IPDUs .

ISignal IPDU A term according to AUTOSAR. An IPDU whose


communication data is arranged in ISignals . ISignal IPDUs allow the exchange
of ISignals between different network nodes .

LDF file A LIN description file that describes networks of the LIN bus system
according to the LIN standard.

LIN master A member of a LIN communication cluster that is responsible


for the timing of LIN bus communication. A LIN master provides one LIN master
task and one LIN slave task. The LIN master task transmits frame headers on
the bus, and provides LIN schedule tables and LIN collision resolver tables. The
LIN slave task transmits frame responses on the bus. A LIN cluster must contain
exactly one LIN master.

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.

LIN slave A member of a LIN communication cluster that provides only


a LIN slave task. The LIN slave task transmits frame responses on the bus
when they are triggered by a frame header. The frame header is sent by a LIN
master . A LIN cluster can contain several LIN slaves.

Local Program Data folder A standard folder for application-specific


program data that is used by the current user.
%USERPROFILE%\AppData\Local\dSPACE\<InstallationGUID>\
<ProductName>

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.

MAP file A file that maps symbolic names to physical addresses.

Mapping line A graphical representation of a connection between two ports


in the signal chain . You can draw mapping lines in a working view .

MCD file A model communication description file that is used to implement


a multimodel application . It lets you add several behavior models that were
separated from an overall model to the model topology .
The MCD file contains information on the separated models and information on
the connections between them. The file is generated with the Model Separation
Setup Block in MATLAB/Simulink. The block resides in the Model Interface
Blockset (dsmpblib) from dSPACE.

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 The exchange of signal data between the models


within a multimodel application . To set up model communication, you must
use a mapping line to connect a data outport (sending model) to a data inport
(receiving model). The best way to set up model communication is using the
Model Communication Browser .

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 Communication Package table A pane that lets you create


and configure model communication packages which are used for model
communication in multimodel applications .

Model implementation An implementation of a behavior model . It can


consist of source code files, precompiled objects or libraries, variable description
files, and a description of the model’s interface. Specific model implementation
types are, for example, model implementation containers , such as Functional
Mock-up Units or Simulink implementation containers .

Model implementation container A file archive that contains a model


implementation . Examples are FMUs and SIC files.

Model interface An interface that connects ConfigurationDesk with a


behavior model . This interface is part of the signal chain and is implemented
via model port blocks. The model port blocks in ConfigurationDesk can provide
the interface to:
§ Model port blocks (from the Model Interface Package for Simulink ) in
a Simulink behavior model. In this case, the model interface is also called
ConfigurationDesk model interface to distinguish it from the Simulink model
interface available in the Simulink behavior model.
§ Different types of model implementations based on code container files, e.g.,
Simulink implementation containers and Functional Mock-up Units.

Model Interface Package for Simulink A dSPACE software product that


lets you specify the interface of a behavior model that you can directly use
in ConfigurationDesk. You can also create a code container file (SIC file ) that
contains the model code of a Simulink behavior model . The SIC file can be
used in ConfigurationDesk and VEOS .

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

Model port block A graphical representation of the ConfigurationDesk


model interface in the signal chain . Model port blocks contain model ports
that can be mapped to function blocks to provide the data flow between the
function blocks in ConfigurationDesk and the behavior model . The model
ports can also be mapped to the model ports of other model port blocks with

314
ConfigurationDesk Automating Tool Handling May 2024
M

data inports or data outports to set up model communication . Model port


blocks are available in different types and can provide different port types:
§ Data port blocks with data inports and data outports
§ Runnable Function blocks with runnable function ports
§ Configuration Port blocks with configuration ports . Configuration Port
blocks are created during model analysis for each of the following blocks
found in the Simulink behavior model:
§ RTICANMM ControllerSetup block
§ RTILINMM ControllerSetup block
§ FLEXRAYCONFIG UPDATE block
Configuration Port blocks are also created for bus simulation containers.

Model Separation Setup Block A block that is contained in the Model


Interface Package for Simulink . It is used to separate individual models from
an overall model in MATLAB/Simulink. Additionally, model separation generates
a model communication description file (MCD file ) that contains information
on the separated models and their connections. You can use this MCD file in
ConfigurationDesk.

Model topology A component of a ConfigurationDesk application that


contains information on the subsystems and the associated model port blocks
of all the behavior models that have been added to a ConfigurationDesk
application.

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.

Multicore real-time application A real-time application that is executed


on several cores of one PU of the real-time hardware.

Multimodel application A real-time application that executes several


behavior models in parallel on dSPACE real-time hardware.

Multiplexed IPDU A term according to AUTOSAR. An IPDU that consists


of one dynamic part, a selector field, and one optional static part. Multiplexing
is used to transport varying ISignal IPDUs via the same bytes of a multiplexed
IPDU.
§ The dynamic part is one ISignal IPDU that is selected for transmission at run
time. Several ISignal IPDUs can be specified as dynamic‑part alternatives, i.e.,
as dynamic‑part IPDUs. One of these alternatives is transmitted at a time.
§ The selector field value indicates which ISignal IPDU is transmitted in the
dynamic part during run time. For each ISignal IPDU that is configured as
a dynamic‑part alternative, there must be a unique selector field value. The
selector field value is evaluated by the receiver of the multiplexed IPDU.
§ The static part is one ISignal IPDU, i.e., the static‑part IPDU, that is always
transmitted.

315
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary

Multi-PU application Abbreviation of multi-processing-unit application. A


multi-PU application is a real-time application that is partitioned into several
processing unit applications . Each processing unit application is executed on a
separate PU of the real-time hardware. The processing units are connected via
IOCNET and can be accessed from the same host PC.

Navigation bar An element of ConfigurationDesk's user interface that lets


you switch between view sets .

Network node A term that describes the bus communication of an


ECU for only one communication cluster .

Offline simulation application An application that runs on VEOS to


perform SIL simulation . For example, you can use the VEOS Player to build
an offline simulation application and load the resulting OSA file to VEOS.

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.

PDU Abbreviation of protocol data unit.


A term according to AUTOSAR. A PDU transports data (e.g., control information
or communication data) via one or multiple network layers according to the
AUTOSAR layered architecture. Depending on the involved layers and the
function of a PDU, various PDU types can be distinguished, e.g., ISignal IPDUs ,
multiplexed IPDUs , or NMPDUs.

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

Platform A dSPACE real-time hardware system that can be registered and


displayed in the Platform Manager .

Platform Manager A pane that lets you handle registered hardware


platforms . You can download, start, and stop real-time applications via the
Platform Manager. You can also update the firmware of your dSPACE real-time
hardware.

Preconfigured application process An application process that was


created via the Create preconfigured application process command. If you
use the command, ConfigurationDesk creates new tasks for each runnable
function provided by the model that is not assigned to a predefined task.
ConfigurationDesk assigns the corresponding runnable function and (for periodic
tasks) timer events to the new tasks. The tasks are preconfigured (e.g., DAQ
raster name, period).

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 .

Processing unit application A component of an executable application .A


processing unit application contains one or more application processes .

Project A container for ConfigurationDesk applications . You must define


a project or open an existing one to work with ConfigurationDesk. Projects are
stored in a project location .

Project location A designated folder in your file system where


ConfigurationDesk stores project and application folders. Several projects
can use the same project location. ConfigurationDesk uses the Documents
folder as the default project location. You can specify further project locations,
but only one can be active at a time.

Project Manager A pane that provides access to ConfigurationDesk


projects and applications and all the components and files they contain.

Properties Browser A pane that lets you access the properties of selected
elements.

PU Abbreviation of processing unit.


A hardware assembly that consists of a motherboard or a dSPACE processor
board, possibly additional interface hardware for connecting I/O boards, and an
enclosure, e.g., a SCALEXIO Processing Unit.

Real-time application An application that can be executed in real time on


dSPACE real‑time hardware. The real-time application is the result of a build

317
May 2024 ConfigurationDesk Automating Tool Handling
ConfigurationDesk Glossary

process . It can be downloaded to real-time hardware via an RTA file . There


are different types of real-time applications:
§ Single-core real-time application .
§ Multicore real-time application .
§ Multi-PU application .

Restbus simulation A simulation method to test real ECUs by connecting


them to a simulator that simulates the other ECUs in the communication
clusters .

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.

Runnable function A function that is called by a task to compute results.


A model implementation provides a runnable function for its base rate task.
This runnable function can be executed in a task that is triggered by a timer
event. In addition, a Simulink behavior model provides a runnable function for
each Hardware-Triggered Runnable Function block contained in the Simulink
behavior model. This runnable function is suitable for being executed in an
asynchronous task.

Runnable Function block A type of model port block . A Runnable


Function block provides a runnable function port that can be mapped to
an event port of a function block for modeling an asynchronous task.

Runnable function port An element of a Runnable Function block . The


runnable function port can be mapped to an event port of a function
block for modeling an asynchronous task.

RX Communication data that is received by a bus member.

SCALEXIO system A dSPACE hardware-in-the-loop (HIL) system consisting of


one or more real-time industry PCs (PUs ), I/O boards, and I/O units. They
communicate with each other via the IOCNET . The system simulates the
environment to test an ECU . It provides the sensor signals for the ECU,
measures the signals of the ECU, and provides the power (battery voltage) for
the ECU and a bus interface for restbus simulation .

SDF file A system description file that contains information on the


CPU name(s), the corresponding object file(s) to be downloaded and the
corresponding variable description file(s). It is created during the build process.

Secured IPDU A term according to AUTOSAR. An IPDU that secures the


payload of another PDU (i.e., authentic IPDU) for secure onboard communication
(SecOC). The secured IPDU contains the authentication information that is used
to secure the authentic IPDU's payload. If the secured IPDU is configured as a
cryptographic IPDU, the secured IPDU and the authentic IPDU are mapped to
different frames . If the secured IPDU is not configured as a cryptographic IPDU,

318
ConfigurationDesk Automating Tool Handling May 2024
S

i.e., it is a non‑cryptographic IPDU, the authentic IPDU is directly included in the


secured IPDU.

SIC file A Simulink implementation container file that contains the


model code of a Simulink behavior model . The SIC file can be used in
ConfigurationDesk and in VEOS.

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 inport A signal port that represents an electrical connection point


of a function block which provides signal measurement (= input) functionality.

Signal outport A signal port that represents an electrical connection point


of a function block which provides signal generation (= output) functionality.

Signal port An element of a function block that provides the interface to


external devices (e.g., ECUs ) via device blocks . It represents an electrical
connection point of a function block.

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).

SIL simulation Abbreviation of software‑in‑the‑loop simulation.


A purely PC-based simulation scenario without a connection to a physical
system, i.e., neither simulator hardware nor ECU hardware prototypes are
needed. SIL simulations are independent from real time and can run on VEOS .

Simulink implementation container A container that contains the model


code of a Simulink behavior model. A Simulink implementation container is
generated from a Simulink behavior model by using the Model Interface Package
for Simulink . The file name extension of a Simulink implementation container
is SIC.

Simulink model interface The part of the model interface that is available
in the connected Simulink behavior model.

Single-core real-time application An executable application that is


executed on only one core of the real-time hardware.

Single-PU system Abbreviation of single-processing-unit system.


A system consisting of exactly one PU and the directly connected I/O units and
I/O routers.

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®.

Software event An event that is activated from within a task to trigger


another subordinate task. Consider the following example: A multi-tasking
Simulink behavior model has a base rate task with a sample time = 1 ms and
a periodic task with a sample time = 4 ms. In this case, the periodic task is

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 .

Structured data port A hierarchically structured port of a Data Inport block


or a Data Outport block. Each structured data port consists of more structured
and/or unstructured data ports. The structured data ports can consist of signals
with different data types (single, double, int8, int16, int32, int64, uint8, uint16,
uint32, uint64, Boolean).

Synchronized timer event A periodic event that lets you trigger a


task periodically and synchronously to a global time. You can specify a period,
a global time domain identifier, and an optional offset for a synchronized timer
event.

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.

TargetLink A dSPACE software product for production code generation.


It lets you generate highly efficient C code for microcontrollers in electronic
control units (ECUs). It also helps you implement control systems that have been
modeled graphically in a Simulink/Stateflow diagram on a production ECU.
TargetLink is able to provide a Simulink implementation container (SIC file) to be
used in ConfigurationDesk.

Task A piece of code whose execution is controlled by a real-time operating


system (RTOS). A task is usually triggered by an event , and executes one
or more runnable functions . In a ConfigurationDesk application, there are
predefined tasks that are provided by executable application components . In
addition, you can create user-defined tasks that are triggered, for example, by I/O
events. Regardless of the type of task, you can configure the tasks by specifying
the priority, the DAQ raster name, etc.

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.

Topology A hierarchy that serves as a repository for creating a signal chain .


All the elements of a topology can be used in the signal chain, but not every
element needs to be used. You can export each topology from and import it to

320
ConfigurationDesk Automating Tool Handling May 2024
U

a ConfigurationDesk application . Therefore a topology can be used in several


applications.
A ConfigurationDesk application can contain the following topologies:
§ Device topology
§ Hardware topology
§ Model topology

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 .

TX Communication data that is transmitted by a bus member.

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 .

User code implementation A term used in the Bus Manager context.


An implementation of user code in ConfigurationDesk. A user code
implementation consists of one or more source files (*.c, *.cpp) and optional
include files (*.h, *.hpp), such as header files.

User function An external function or program that is added to the


Automation – User Functions ribbon group for quick and easy access during
work with ConfigurationDesk.

VEOS The dSPACE software product for building offline simulation


applications and performing SIL simulation . VEOS is a PC‑based simulation
platform that allows SIL simulation independently from real time. VEOS can run
on Windows or Linux and consists of different components, such as the VEOS
Player .

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

View set A specific arrangement of some of ConfigurationDesk's panes. You


can switch between view sets by using the navigation bar . ConfigurationDesk
provides preconfigured view sets for specific purposes. You can customize
existing view sets and create user-defined view sets.

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 area The central area of ConfigurationDesk's user interface.

Working view A view of the signal chain elements (blocks, ports,


mappings, etc.) used in the active ConfigurationDesk application . A working
view can be opened in the Signal Chain Browser or the Model Communication
Browser . ConfigurationDesk provides two default working views: The Global
working view and the Temporary working view . In the Working View
Manager , you can also create user-defined working views that let you focus
on specific signal chain segments according to your requirements.
You can export the signal chain elements from a working view to a CAFX
file and import them to a working view in a different ConfigurationDesk
application.

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

You might also like