ComXf - COM Based Transformer Overview and Configuration
The COM-Based Transformer (ComXf) is a serializer transformer which is used between the RTE and the COM, to transform the data elements from the application into signals and signal groups from the COM and vice-versa. In essence, it describes how the data is specified within a PDU.
Regarding pre-requisites to this article, it would not hurt to learn a little bit about I-SignalGroups
and data transformers in Autosar. Both these topics were already explored in previous posts, Exploring ISignal and ISignalGroup Definitions in Autosar ARXML (opens in a new tab), SomeIpXf Overview - SOME/IP Messages and VFB Serialization in Autosar (opens in a new tab) and E2EXf - How to Use E2E Transformers in Autosar (opens in a new tab).
ComXf Overview
Each COM-Based transformer is based on the PortPrototype
of a Software Component with a SenderReceiverInterface
, each of the dataElements
defined by the interface and the ISignalToIPduMapping
for the SystemSignalGroup
. As you can see, its configuration is almost entirely handled on ARXML.
ComXf does not support all features of transformers. Some of its limitations are:
-
Client-server and external trigger communication are not supported.
-
Only complex data types (signal groups) are supported. In case you want to add a signal to be transformed (to add E2E protection to it, for example), you have to wrap it around a structure of a single element. Then, at the COM, your signal will have E2E at the signal group level (not at the application, you add E2E capabilities within the ARXML in a different way, as we will see in future sections).
-
Only fixed size data types are supported (
UINT8_DYN
is not supported). -
Only byte aligned signal groups are supported.
-
Signal groups must be consecutively (but can include gaps) into an I-PDU.
In the figure below, you can check the interactions taking place between the application, RTE and COM, for serialization. In it, we can observe the serializer coming first in the transformer chain executed by the RTE, followed by other transformers which add data to it (in this case, E2E), before passing the serialized data with the expected signals to the COM. From the application point of view, these transformations are invisible. On the receiver side, the transformer chain will be executed in the opposite order.
Tranformer chain handled by the RTE, where a ComXf is present
Configuration in ARXML
You can configure the transformations taking place on your signal group by referencing a DataTransformation
to the parameter ComBasedSignalGroupTransformation
within your ISignalGroup
, in the Autosar meta-model, as you can see below:
ARXML properties of an I-SIGNAL-GROUP, where the DataTransformation reference is located
The DataTransformation
itself is defined by the properties:
ARXML properties of the DataTransformation meta-class
From all these properties, the most relevant are:
-
DataTransformationKind
– Indicates the type ofDataTransformation
that will be applied. It is defined by theDataTransformationKindEnum
, which can beasymmetricFromByteArray
(only applied on the receiver, from byte array to data type),asymmetricToByteArray
(only applied on the sender side, from data type to byte array) orsymmetric
(both sides). -
TransformerChain
– Indicates a set of transformers that will be executed, in ascending order (representing the order on the sender side), up to 255 elements and with one transformer of each class (except for custom). The first transformer on the chain should always be a serializer. Each transformer of aTransformerChain
is of typeTransformationTechnology
.
The TransformationTechnology
meta-class contains these attributes:
-
BufferProperties
– Container for thebufferProperties
headerLength
andinPlace
, specifying how the RTE should handle the buffer of the transformer. It defines the propertiesHeaderLength
(indicates the length of the header to be added in front of the data, in bits, and should be a multiple of eight) andInPlace
(a boolean that specifies if the transformer should use in-place or out-of-place buffering, where the first transformer in the chain cannot use in-place buffering). -
HasInternalState
– Boolean property that specifies if the transformer has internal state. It should be always set to true for a safety transformer and if the propertySessionHandlingSR
of theSOMEIPTransformationISignalProps
container is set to active. -
NeedsOriginalData
– Boolean that indicates if the transformer has access to the original data coming from the SW-C. It is only relevant for a transformer that is not the first on the chain, so it is not applicable for a COM-based transformer. -
Protocol
– Human readable string indicative of the protocol used. -
Version
– Version of the implemented protocol. -
TransformationDescription
– Container for specific properties of the transformer. It can be of one of three types:EndToEndTransformationDescription
,SOMEIPTransformationDescription
orUserDefinedTransformationDescription
. You do not need any of these for a COM-based transformer. -
TransformerClass
– Indicates the class of the transformer, which can be safety, security, serializer or custom. For a COM-based transformer it is set to serializer.
Configuration in the COM Module
To be able to transform data, you also need to enable ComSignalGroupArrayAccess
in the COM configuration of your signal group, because you intend to work with a serialized version of your signal group, aka an array. This option will tell the COM the length or your signal group and its start position within the I-PDU, since you will only transform signal groups individually, as we have discussed previously.
ComSignalGroup container within the COM module, where the ComSignalGroupArrayAccess property is present
Optionally, if there are gaps within your signal group, you will also need to fill the ComTxIPduUnusedAreasDefault
value of the respective ComTxIPdu
, defining a value for the gaps within the I-PDU.
ComTxIPdu container within the COM module, where the ComTxIPduUnusedAreasDefault property is present
Closing Notes
And that's it! This is all you need to know in order to configure a COM-based transformer. As you can see, the RTE takes care of serializing and de-serializing the data between the Sender-Receiver interface and the COM on both directions, along with the other transformations that occur.
If you want to learn more about transformers and Autosar in general, do read our other posts, there is a good library to choose from. And remember, we are building ebooks about Autosar. Make sure to join our waiting list!
Author: Micael Coutinho (opens in a new tab)
References:
© AutosarToday —@LinkedIn