-
-
July 22, 2024 at 7:40 am
Solution
ParticipantIntroduction
This blog entry is special: we have a video for you!
Aubanel, our director of Ansys Customer Excellence, demonstrates a new construct in Swan, the modeling language used in Scade One, called variant types.
Variant types?
A variant type defines a data structure holding a value that can take on several different, but fixed, types. The generated C code uses union in a safe, MISRA-compatible way, by using a tag field to know which type is in use.
In short, a variant type is a type that can be this or that or something else.
In the video, Aubanel showcases this with a
shape
type that can be either a rectangle, a circle or a polygon.This makes it easy to design generic operators that perform calculations on shapes, with no need to duplicate our logic to handle various cases for various shape types:
Demo time 🎬
Want to know more?
In this video, you saw how variant types can power cleaner, easier-to-maintain models.
If you’d like to find out more about Scade One, request a demo today over at https://www.ansys.com/products/embedded-software/ansys-scade-one.
-
![](https://innovationspace.ansys.com/knowledge/wp-content/uploads/sites/4/2022/06/Ansys-Cloud.jpeg)
Introducing Ansys Electronics Desktop on Ansys Cloud
The Watch & Learn video article provides an overview of cloud computing from Electronics Desktop and details the product licenses and subscriptions to ANSYS Cloud Service that are...
![](https://innovationspace.ansys.com/knowledge/wp-content/uploads/sites/4/2022/03/Optical-1-1.png)
How to Create a Reflector for a Center High-Mounted Stop Lamp (CHMSL)
This video article demonstrates how to create a reflector for a center high-mounted stop lamp. Optical Part design in Ansys SPEOS enables the design and validation of multiple...
![](https://innovationspace.ansys.com/knowledge/wp-content/uploads/sites/4/2022/03/Geko_Video-1-1.png)
Introducing the GEKO Turbulence Model in Ansys Fluent
The GEKO (GEneralized K-Omega) turbulence model offers a flexible, robust, general-purpose approach to RANS turbulence modeling. Introducing 2 videos: Part 1Â provides background information on the model and a...
![](https://innovationspace.ansys.com/knowledge/wp-content/uploads/sites/4/2022/06/EnSight_PP.webp)
Postprocessing on Ansys EnSight
This video demonstrates exporting data from Fluent in EnSight Case Gold format, and it reviews the basic postprocessing capabilities of EnSight.
- Scade One – Bridging the Gap between Model-Based Design and Traditional Programming
- How to Verify a Model on Host with SCADE Test? (Part 4 of 6)
- Scade One – An Open Model-Based Ecosystem, Ready for MBSE
- Scade One – A Visual Coding Experience
- Introduction to the SCADE Environment (Part 1 of 5)
- Using the SCADE Python APIs from your favorite IDE
- Scade One – Democratizing model-based development
- How to integrate multiple SCADE models into one executable
- How to Generate Code with SCADE Display (Part 6 of 6)
- ANSYS SCADE – Map Iterator – Comparison Function: C and SCADE Methods Comparison (Part 4 of 4)
© 2025 Copyright ANSYS, Inc. All rights reserved.