The product ARXF-CP comes with standard content which you can use when creating a model:
- RXF_ErrorHandler to add ARXF-CP Error handling which you must implement according to your needs
- SWC to create a new AUTOSAR SW-C including runnables, inter-runnable variables and exclusive areas
Standard Content is a sort of copy and paste solution for your model:
From now on, when adding stereotype X to your model, that artifact will be copied into your model.
- create an artifact which will serve as copy and paste solution. This artifact can be a stereotype X (when New Term is set on X) or apply a stereotype to the artifact when applicable
- create a dependency from a stereotype X to this artifact and stereotype this dependency as StandardContent
To add Standard Content you can add an SWC from ArUML_ARXF_CP:
Because it is a bit tricky to create your own SW-C from scratch, we created standard content you can use or inspect as an example.
The standard content is located in the profile ArUML_ARXF_CP
This SWC contains:
You must set the tag supportsMultipleInstantiation to True if the SW-C supports multiple instantiation.
The RTE generates a self pointer as argument for a runnable in a SW-C which has the AUTOSAR property supportsMultipleInstantiation set to true.
In any RTE call from within this SW-C you must pass this self pointer as argument: during initialization of the SWC we store this self pointer into this attribute.
- the exclusive areas mutexEventListSwc, mutexMemoryPools and mutexTimerList.
The ARXF-CP uses AUTOSAR Exclusive Areas for critical regions; the RTE generates an entry- and exit function.
At initialization of your SWC, the call to RXF_SWC_Init() needs the RTE generated entry- and exit function pointers.
- an inter-runnable variable rhapsodyTaskPointerSwc.
It is used to exchange an ARXF-CP internal task pointer between runnables.
- the runnables RXFInit and eventDispatcherSwc. The runnables contain sample code.
See stereotype CpRunnable for AUTOSAR runnable name versus Rhapsody public name in Profiles.
- a Structure Diagram which you can use to easily add your classes which must be instantiated when this SWC is instantiated.
It is good practice to use an attribute self. Each runnable uses a self pointer as argument, which is of type Rte_Instance,
when the tag supportsMultipleInstantiation is set to True. Obviously, this must match the specification of the SW-C in the AUTOSAR tool.
You must restrict the number of UML events processed by an eventDispatcher runnable before giving control back to the RTE.
There is no UML modeling support for the AUTOSAR Execution Budget. The number 10000 used is an arbitrary value: