Created by Tatiana Trifonova, last modified on Apr 30, 2024
Topics
Part I AUTOSAR Bus Communication Features
1. AUTOSAR Bus Communication Features
▪ End to End Protection
2. Global Time Synchronization
▪ Motivation and Use Cases
▪ Relevant AUTOSAR Components
3. Global Time Synchronization at dSPACE
▪ RTI Synchronized Timebase Manager Blockset
▪ CAN Protocol
4. GTS Implementation in Bus Manager
▪ Configuration Desk
▪ Simulink
▪ Control Desk
▪ Hands-On Exercise
5. Secure Onboard Communication
▪ SecOC AUTOSAR Motivation
▪ DsBusCustom API
▪ SecOC User Code
▪ Hands-On
Part II Bus Manager Tool Automation
1. Configuration Desk Tool Automation Overview
▪ Config Desk API Interface
▪ Internal Interpreter / External IDE
▪ Help / Sources / Scripts / Demos
2. Basic Object Model Structure
▪ Project and Application Handling
▪ Components Handling
▪ Relations
▪ Algorithms
▪ Data Object Handling
▪ Data-Objects and Properties
▪ Collections
3. Basic Workflow steps
▪ Create Project / Add Application
▪ Load Matrix
▪ Add Elements to Bus Configurations
▪ Add / Remove Bus Features / Properties
▪ Add Model
▪ Assign Function Ports to Model Ports
▪ Add CAN Function Blocks to Bus Access Requests
▪ Assign Hardware Channels to Function Blocks
▪ Build Management / Platfom Management
4. Best Practice
▪ Optimization / Transactions
[Link]
Bus Manager Tool Automation
>> ConfiguratuionDesk Tool Automation Overview
Supports uniform access to all bus configurations and simulation platforms
For (Scripting) languages (Python, VB, Java, C#, M, etc.)
Python is an object oriented high level interpreted language that supports line based execution
for interactive usage
Internal interactive line based interpreter for script development
Supports auto completion and object inspection ( “.” or Ctrl + Space Space)
Supports “Application” object and tooltips for function parameters
Syntax highlighting & more (F1 Help in interpreter)
External Python IDEs
[Link] (console) Interactive line based interpreter and debugger, e.g. [Link]
(windows application with editor and build in debugger) PyCharm, Eclipse, Visual Studio, ..
This is implemented via COM (Component Object Model) API
>> Automating the Tool Chain for Buses
For assigning different Bus configuration parts to each Data file.
Example,
Project
Common Framework for Test Operation and Tools & Capability Development
Overview
An effort was made to write low level python libraries that communicate with Automation Desk and
create the test sequence. This spike covers the observations and workaround available to this
approach as Automation Desk does not support sequence creation through COM API's in the same
way as tools like National Instruments Teststand.
Initial approach and observations
A demo was planned to run an existing test cases in LabCar through the robot framework
environment. The test case uses the LabCar NI test rig to execute the steps written in Automation
Desk. Steps planned in the tasks
1. Open Automation Desk COM object model from python
2. Create a project
3. Create a Sequence within the project
4. Create a Sequence
5. Create the Steps in the sequence
6. Add variables both global and local
7. Save and Close the sequence and project
8. Execute the Project
In the above approach step 6 was not possible, this was confirmed with dSPACE engineers during a
discussion and also the same question was raised during the Automation Desk overview demo.
Alternate approach suggested by dSPACE and other methods yet to be tried are listed below.
1. Using Generic Sequence - passing steps as dictionary element
2. Using XML file creation/manipulation approach
3. Using Sequences as Custom Library elements
Using Generic Sequence
One of the method suggested was to use generic steps that parses the values from a dictionary
variable, these dictionary variable should contain the steps for the test cases. As variables are
accessible and editable via COM APIs, they can be controlled by robot framework keyword libraries.
The steps in this method are shown below,
These are the steps involved in the steps,
1. Iterate block - iterates over the dictionary variable
a. Serial Block - Executes the items in the block Serially (also it has the link to the Custom
Library)
i. ProcessStepParameters - reads the parameters from a dictionary variable that
contains step data
ii. SetLibraryLink - Links the library element from a dictionary variable that
contains step names
iii. Invoke - Invokes the particular library item and executes
The above steps executes for each element in the dictionary that contains the step names
Pros and Cons
The Sequence layout for every test case will look exactly same which makes debugging more
complex with the generated test sequences
Report file does not contain useful information
Library items many need to be tweaked to add its output to report
Implementing the test case generation library from robot framework may be less complex as it
only has to pass the steps and variables to a local variable
More images for reference are added below,
Automation Desk UI showing keywords in Library and variables that are used to passed the steps as
string
Using XML file creation/manipulation approach
Automation Desk saves most of its files in xml formats as well. This can be used to create new
sequences that can be executed from Automation Desk. There is an XML template used for quiet a
long time in JLR. Currently working with this template at the moment, this section will be updated
soon ate the findings are mature
Pros and Cons
XML schema can not be expected to be consistent between different versions of Automation
desk, this could block updating test cases to new version of Automation Desk
Given the fact that XML structure is complex for test cases in Automation desk, creating or
editing them appears to be too complicated
One advantage is the availability of extensive packages in python for XML manipulation
Using Sequences as Custom Library elements
An implementation of this approach was tried. The implementation of the python library is in
this Gitlab link.
This method creates a test case from the sequences in custom library and executes them. Also it can
import existing projects and execute them and collect the report.
Conclusion
Using a custom sequence for test case creation through Automation Desk API is the only feasible
solution as long as the blocks are accessible and editable using API. Please follow the [Link] in
the Gitlab link provided to get more details about the implementation.