The configuration is done via Properties. Because there are many properties in Rhapsody models, there are two distinct so-called Property perspectives:
- RXF which allows you to configure RXF properties, for example the deployer, memory pools, etc.
- ARXF-CP which allows you to configure ARXF_CP properties, typically for code generation towards an AUTOSAR Classic Platform environment.
You typically configure the RXF at the Component level of your model. Via the Features of a Component and the Properties tab,
you see a dropdown list: All, Overridden, Locally overridden, Common, ARXF-CP, RXF and Filter..
On this tab you configure if you want to deploy and if you want to launch or activate the IDE project where the generated code
and ARXF-CP sources are deployed to. The Deployment configuration of the exact paths and optional IDE used, are described separately.
The configuration tab shows features which all result in constants defined in a generated RXF_Config.h for a combination of Component/Configuration.
If you want different dimensions for different SW-Cs, you must organize the SW-Cs in different Components.
On this tab, you can configure:
Rhapsody generates a so-called virtual table or VTBL for each class owning a statechart which is a structure containing function pointers.
This virtual table is used by the ARXF-CP to call statechart operations which are generated by Rhapsody.
The configuration details result in RXF_VirtualTable.h which is generated next to your model code. This file contains the virtual table used by the reactive classes of your model. There is only one file per model generated, so this configuration should be done at the model level and allows you to set a default behavior for the entire model.
There are two properties which you might want to override at a class level, if the behavior of a class should be different than the default behavior specified for the model:
- RXF_MS_PER_TICK. Its value in milliseconds must match the RTE configuration for the eventDispatcherSwc runnable.
See AUTOSAR section Runnable.
- RXF_REACTIVE_MAX_NULL_STEPS. Please refer to the description of RXF_ERROR_INFINITE_NULL_TRANSITIONS in Error handling
- RXF_TIMEOUT_GUARANTEE_TIME. Please refer to the description on Realtime behavior
- C_CG::Framework::ReactiveHandleEventNotConsumed when RXF::VTBL::handleEventNotConsumed is enabled, see RXF_ERROR_REACTIVE_EVENT_NOT_CONSUMED
- C_CG::Framework::ReactiveHandleTONotConsumed when RXF::VTBL::handleTONotConsumed is enabled
Interface Code Generation Tab
In this tab you can configure the way interfaces are generated.
For example if there should be a NULL pointer check for uninitialized interface associations and default return values for uninitialized interface associations.
User Hooks Tab
Here you can configure a command to be called at the start or at the end of a Make command when pressing Generate/Make/Run.
The properties are described a property help file in XML format, see Properties.
Memory Pools Tab
Each SW-C uses a queue for time outs. Its size RXF_MAX_TIMEOUTS can be configured. If the queue is not big enough, the error handler will be called with RXF_ERROR_TIMER_CREATE_FAILED, see Error handling.
The ARXF-CP statically allocates memory pools which you can use to dynamically allocate objects, like events.
The generated code uses the macros RXF_MemoryManager_getMemory() and RXF_MemoryManager_returnMemory() to allocate objects in one of the pools.
You can finetune the size of each pool by specifying the size of respective blocks and the number of blocks (when 0, that
pool is not allocated).
All pools are allocated per SW-C.
See List of Defines section Memory Pools for more details
Configuration is at the model level: this is a restriction which will be fixed later
All configurable details result in List of Defines in a generated configuration file RXF_Config.h
Code Generation Tab
On this tab, you can override properties to influence the code generation. You can do this at the Component level,
but also more specific for a particular ArPackage, SWC, active class or Configuration.
The properties are used for:
- AdditionalDefines allows you to add lines to a generated RXF_Config.h
to build the deployed sources using additional defines.
- Critical Region handlers used by the ARXF-CP, see OS Integration
- RTE API to store ARXF-CP information in an inter-runnable per SW-C or active class
- ARXF-CP Event Dispatchers to trigger an active class when a UML event is added to its UML event queue.
If the property ARXF_CP::CodeGeneration::RTEtriggerUMLeventDispatcherActiveClass or ARXF_CP::CodeGeneration::RTEtriggerUMLeventDispatcherSWC
is empty the event dispatcher runnable of an active class or SWC must be called already by the RTE.
See Code Generation for more details.