Autosar Sws Someiptransformer
Autosar Sws Someiptransformer
AUTOSAR CP R21-11
Specification of SOME/IP
Document Title Transformer
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 660
Disclaimer
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
1 Introduction and functional overview 7
3 Related documentation 9
3.1 Input documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Related standards and norms . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 Constraints and assumptions 11
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Dependencies to other modules 12
5.1 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 12
6 Requirements Tracing 13
7 Functional specification 19
7.1 Definition of Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.2 Specification of the SOME/IP on-wire format . . . . . . . . . . . . . . . 23
7.2.1 Message Length Limitations . . . . . . . . . . . . . . . . . . 23
7.2.2 Endianess . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2.3 Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2.3.1 Message ID [32 bit] . . . . . . . . . . . . . . . . . . . 25
7.2.3.2 Length [32 bit] . . . . . . . . . . . . . . . . . . . . . . 26
7.2.3.3 Request ID [32 bit] . . . . . . . . . . . . . . . . . . . 26
7.2.3.4 Protocol Version [8 bit] . . . . . . . . . . . . . . . . . 27
7.2.3.5 Interface Version [8 bit] . . . . . . . . . . . . . . . . . 27
7.2.3.6 Message Type [8 bit] . . . . . . . . . . . . . . . . . . 28
7.2.3.7 Return Code [8 bit] . . . . . . . . . . . . . . . . . . . 28
7.2.3.8 Payload [variable size] . . . . . . . . . . . . . . . . . 29
7.2.4 Serialization of Parameters and Data Structures . . . . . . . 29
7.2.4.1 Basic Datatypes . . . . . . . . . . . . . . . . . . . . 31
7.2.4.2 Structured Datatypes (structs) . . . . . . . . . . . . . 31
7.2.4.3 Structured Datatypes and Arguments with Identifier
and optional Members . . . . . . . . . . . . . . . . . 34
7.2.4.4 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.4.5 Arrays (fixed length) . . . . . . . . . . . . . . . . . . 44
7.2.4.6 Optional Parameters / Optional Elements . . . . . . 47
7.2.4.7 Dynamic Length Arrays / Variable Size Arrays . . . . 47
7.2.4.8 Bitfield . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2.4.9 Union / Variant . . . . . . . . . . . . . . . . . . . . . 50
10 Configuration specification 80
C Examples 103
C.1 Serialization of a Client/Server Operation . . . . . . . . . . . . . . . . . 104
C.1.1 Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
C.1.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
3 Related documentation
References
[1] Glossary
AUTOSAR_TR_Glossary
[2] Specification of Service Discovery
AUTOSAR_SWS_ServiceDiscovery
[3] General Specification of Transformers
AUTOSAR_ASWS_TransformerGeneral
[4] Specification of Socket Adaptor
AUTOSAR_SWS_SocketAdaptor
[5] Specification of RTE Software
AUTOSAR_SWS_RTE
[6] Requirements on AUTOSAR Features
AUTOSAR_RS_Features
[7] System Template
AUTOSAR_TPS_SystemTemplate
[8] Specification of Platform Types
AUTOSAR_SWS_PlatformTypes
[9] Software Component Template
AUTOSAR_TPS_SoftwareComponentTemplate
[10] Requirements on Transformer
AUTOSAR_SRS_Transformer
[11] UTF-8, a transformation format of ISO 10646
http://www.ietf.org/rfc/rfc3629.txt
[12] UTF-16, an encoding of ISO 10646
http://www.ietf.org/rfc/rfc2781.txt
[13] SOME/IP Protocol Specification
AUTOSAR_PRS_SOMEIPProtocol
[14] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[15] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
4.1 Limitations
For the SOME/IP Transformer all general transformer limitations (see [3, ASWS Trans-
former General]) apply.
The SOME/IP transformer doesn’t implement the whole SOME/IP protocol:
• a part is implemented by [2, SWS Service Discovery]
• a part is implemented by [4, SWS Socket Adaptor]
• a part is currently not implemented in AUTOSAR. This is documented in Ap-
pendix B
• The processing order of header fields in AUTOSAR CP deviates from the pro-
cessing order defined in [PRS_SOMEIP_00195] (also Figure 4.21: Message Val-
idation and Error Handling in SOME/IP). This deviation is caused by the layered
architecture of AUTOSAR CP.
[SWS_SomeIpXf_CONSTR_0001] dIn accordance with [SWS_SomeIpXf_00245],
2ˆ(8*sizeof(data type of length field)) shall be larger than the number of elements given
by the size indicator multiplied by the size in bytes of each element (i.e., 1 for UTF-8
and 2 for UTF-16) and increased by the size in bytes required by the BOM.c(SRS_-
Xfrm_00101)
[SWS_SomeIpXf_CONSTR_0002] dSerialization based on the network representa-
tion according to [TPS_SYST_02136] is currently not supported in combination with
structured datatypes and arguments with identifier and optional members, strings, dy-
namic length arrays / variable size arrays, and unions / variants and shall therefore not
be used in those combinations.c(SRS_Xfrm_00101)
Note:
Optional members according to section 7.2.4.3, Strings according to section 7.2.4.4.1
and 7.2.4.4.2, Dynamic Length Arrays / Variable Size Arrays according to section
7.2.4.7 and Unions / Variants according to section 7.2.4.9.
The source code file structure is defined in the [3, ASWS Transformer General].
6 Requirements Tracing
The following table references the features specified in [6] and links to the fulfillments
of these.
Feature Description Satisfied by
[SRS_BSW_00159] All modules of the [SWS_SomeIpXf_00185]
AUTOSAR Basic
Software shall
support a tool based
configuration
[SRS_BSW_00337] Classification of [SWS_SomeIPxf_00184]
development errors
[SRS_BSW_00346] All AUTOSAR Basic [SWS_SomeIpXf_00136]
Software Modules
shall provide at least
a basic set of
module files
[SRS_BSW_00404] BSW Modules shall [SWS_SomeIpXf_00183]
support post-build
configuration
[SRS_BSW_00407] Each BSW module [SWS_SomeIpXf_00180]
shall provide a [SWS_SomeIpXf_00181]
function to read out [SWS_SomeIpXf_00182]
the version
information of a
dedicated module
implementation
[SRS_BSW_00411] All AUTOSAR Basic [SWS_SomeIpXf_00180]
Software Modules [SWS_SomeIpXf_00181]
shall apply a naming [SWS_SomeIpXf_00182]
rule for enabling/
disabling the
existence of the API
[SRS_BSW_00441] Naming convention [SWS_SomeIpXf_00183]
for type, macro and
function
[SRS_Xfrm_00001] A transformer shall [SWS_SomeIpXf_00264]
work on data given [SWS_SomeIpXf_00265]
by the Rte [SWS_SomeIpXf_00266]
[SWS_SomeIpXf_00155]
[SWS_SomeIpXf_00156]
[SWS_SomeIpXf_00160]
[SWS_SomeIpXf_00161]
[SWS_SomeIpXf_00163]
[SWS_SomeIpXf_00164]
[SWS_SomeIpXf_00165]
[SWS_SomeIpXf_00166]
[SWS_SomeIpXf_00168]
[SWS_SomeIpXf_00172]
[SWS_SomeIpXf_00212]
[SWS_SomeIpXf_00213]
[SWS_SomeIpXf_00234]
[SWS_SomeIpXf_00235]
[SWS_SomeIpXf_00236]
[SWS_SomeIpXf_00237]
[SWS_SomeIpXf_00238]
[SRS_Xfrm_00101] The SOME/IP [SWS_SomeIpXf_00016]
Transformer shall [SWS_SomeIpXf_00017]
define the [SWS_SomeIpXf_00034]
serialization of [SWS_SomeIpXf_00036]
atomic and [SWS_SomeIpXf_00037]
structured data [SWS_SomeIpXf_00042]
elements into linear [SWS_SomeIpXf_00053]
arrays [SWS_SomeIpXf_00054]
[SWS_SomeIpXf_00055]
[SWS_SomeIpXf_00056]
[SWS_SomeIpXf_00057]
[SWS_SomeIpXf_00058]
[SWS_SomeIpXf_00059]
[SWS_SomeIpXf_00060]
[SWS_SomeIpXf_00069]
[SWS_SomeIpXf_00070]
[SWS_SomeIpXf_00072]
[SWS_SomeIpXf_00076]
[SWS_SomeIpXf_00088]
[SWS_SomeIpXf_00098]
[SWS_SomeIpXf_00099]
[SWS_SomeIpXf_00151]
[SWS_SomeIpXf_00169]
[SWS_SomeIpXf_00216]
[SWS_SomeIpXf_00217]
[SWS_SomeIpXf_00218]
[SWS_SomeIpXf_00219]
[SWS_SomeIpXf_00220]
[SWS_SomeIpXf_00221]
[SWS_SomeIpXf_00222]
[SWS_SomeIpXf_00223]
[SWS_SomeIpXf_00224]
[SWS_SomeIpXf_00225]
[SWS_SomeIpXf_00226]
[SWS_SomeIpXf_00227]
[SWS_SomeIpXf_00234]
[SWS_SomeIpXf_00235]
[SWS_SomeIpXf_00236]
[SWS_SomeIpXf_00237]
[SWS_SomeIpXf_00238]
[SWS_SomeIpXf_00239]
[SWS_SomeIpXf_00240]
[SWS_SomeIpXf_00241]
[SWS_SomeIpXf_00242]
[SWS_SomeIpXf_00243]
[SWS_SomeIpXf_00244]
[SWS_SomeIpXf_00245]
[SWS_SomeIpXf_00246]
[SWS_SomeIpXf_00247]
[SWS_SomeIpXf_00248]
[SWS_SomeIpXf_00249]
[SWS_SomeIpXf_00250]
[SWS_SomeIpXf_00251]
[SWS_SomeIpXf_00252]
[SWS_SomeIpXf_00253]
[SWS_SomeIpXf_00254]
[SWS_SomeIpXf_00256]
[SWS_SomeIpXf_00257]
[SWS_SomeIpXf_00258]
[SWS_SomeIpXf_00259]
[SWS_SomeIpXf_00260]
[SWS_SomeIpXf_00262]
[SWS_SomeIpXf_00263]
[SWS_SomeIpXf_00306]
[SWS_SomeIpXf_00307]
[SWS_SomeIpXf_CONSTR_0001]
[SWS_SomeIpXf_CONSTR_0002]
[SWS_SomeIpXf_00291]
[SWS_SomeIpXf_00292]
[SWS_SomeIpXf_00293]
[SWS_SomeIpXf_00294]
[SWS_SomeIpXf_00295]
7 Functional specification
Com Com
The SOME/IP Transformer has no module specific EcuC because its whole configu-
ration is based on the SOMEIPTransformationDescription and SOMEIPTrans-
formationISignalProps.
Identifiable
TransformationTechnology
+transformer 1
FibexElement «atpVariation»
ISignal
+transformationDescription 0..1
+ dataTypePolicy: DataTypePolicyEnum
+ iSignalType: ISignalTypeEnum [0..1] Describable
+ length: UnlimitedInteger TransformationDescription
+transformationISignalProps 0..*
Describable
«atpVariation»
TransformationISignalProps SOMEIPTransformationDescription
SOMEIPTransformationISignalProps
«enumeration»
+ implementsLegacyStringSerialization: Boolean [0..1] CSTransformerErrorReactionEnum
+ interfaceVersion: PositiveInteger [0..1]
+ isDynamicLengthFieldSize: Boolean [0..1] autonomous
+ messageType: SOMEIPMessageTypeEnum [0..1] applicationOnly
+ sessionHandlingSR: SOMEIPTransformerSessionHandlingEnum [0..1]
+ sizeOfArrayLengthFields: PositiveInteger [0..1]
+ sizeOfStringLengthFields: PositiveInteger [0..1]
+ sizeOfStructLengthFields: PositiveInteger [0..1]
+ sizeOfUnionLengthFields: PositiveInteger [0..1]
«enumeration»
SOMEIPTransformerSessionHandlingEnum
«enumeration»
«enumeration» sessionHandlingActive
SOMEIPMessageTypeEnum
ByteOrderEnum sessionHandlingInactive
Attributes
Attributes
+ request
+ mostSignificantByteFirst
+ requestNoReturn
+ mostSignificantByteLast
+ notification
+ opaque
+ response
Class SOMEIPTransformationDescription
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note The SOMEIPTransformationDescription is used to specify SOME/IP transformer specific attributes.
Base ARObject, Describable, TransformationDescription
Attribute Type Mult. Kind Note
alignment PositiveInteger 1 attr Defines the padding for alignment purposes that will be
added by the SOME/IP transformer after the serialized
data of the variable data length data element. The
alignment shall be specified in Bits.
byteOrder ByteOrderEnum 1 attr Defines which byte order shall be serialized by the
SOME/IP transformer
interfaceVersion PositiveInteger 1 attr The interface version the SOME/IP transformer shall use.
Enumeration ByteOrderEnum
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes
Note When more than one byte is stored in the memory the order of those bytes may differ depending on
the architecture of the processing unit. If the least significant byte is stored at the lowest address, this
architecture is called little endian and otherwise it is called big endian.
ByteOrder is very important in case of communication between different PUs or ECUs.
5
4
Enumeration ByteOrderEnum
Literal Description
mostSignificantByte Most significant byte shall come at the lowest address (also known as BigEndian or as
First Motorola-Format)
Tags:atp.EnumerationLiteralIndex=0
mostSignificantByte Most significant byte shall come highest address (also known as LittleEndian or as Intel-Format)
Last
Tags:atp.EnumerationLiteralIndex=1
opaque For opaque data endianness conversion has to be configured to Opaque. See AUTOSAR COM
Specification for more details.
Tags:atp.EnumerationLiteralIndex=2
Enumeration SOMEIPMessageTypeEnum
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note Depending on the style of the communication different message types shall be set in the header of a
SOME/IP message.
Literal Description
notification A request of a notification expecting no response.
Tags:atp.EnumerationLiteralIndex=1
request A request expecting a response.
Tags:atp.EnumerationLiteralIndex=2
requestNoReturn A fire&forget request.
Tags:atp.EnumerationLiteralIndex=3
response The response message.
Tags:atp.EnumerationLiteralIndex=4
The usage of TCP allows for larger streams of data to transport SOME/IP header and
payload. However, current transport protocols for CAN and FlexRay limit messages
to 4095 Bytes. When compatibility to those has to be achieved, SOME/IP messages
including the SOME/IP header shall not exceed 4095 Bytes.
7.2.2 Endianess
7.2.3 Header
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
Covered by Length
Protocol Version [8 bit] Interface Version [8 bit] Message Type [8 bit] Return Code [8 bit]
Figure 7.3 shows the complete SOME/IP header. The SOME/IP transformer only
implements the lower part (all except Message ID and Length).
[SWS_SomeIpXf_00015] dThe SOME/IP transformer shall implement all fields of the
header except Message ID and Length.c(SRS_Xfrm_00008)
Rationale:
Message-ID and Length are not covered since this allows the AUTOSAR Socket Adap-
tor header mode to work.
These are added by other modules in the AUTOSAR BSW. Nonetheless they are con-
tained in Figure 7.3 to show the whole on-wire-format.
The Message ID is a 32 bit identifier that is used to identify the message. The Message
ID has to uniquely identify a method or event of a service.
The assignment of the Message ID is up to the user; however, the Message ID has
to be unique for the whole system (i.e. the vehicle). The Message ID can be best
compared to a CAN ID and should be handled with a comparable process. The next
section 7.2.3.1.1 describes how to structure the Message IDs in order to ease the
organization of Message IDs.
In order to structure the different methods, events, and fields, they are clustered into
services. Services have a set of methods, events, and fields as well as a Service ID,
which is only used for this service.
An event shall be part of zero to many eventgroups and an eventgroup shall contain
zero to many events. A field shall be part of zero to many eventgroups and an event-
group can contain zero to many fields.
For inter-ECU Client/Server communication calls we structure the ID in 216 services
with 215 methods:
Service ID [16 bit] 0 [1 bit] Method ID [last 15 bits]
where the 0-Bit is the first bit of the 16 bit Method ID.
With 16 bit Service-ID and a 16 bit Method-ID starting with a 0-Bit (15 bit are still left
in the Method-ID for real values), this allows for up to 65536 services with up to 32768
methods each.
Since events and notifications are transported using Client/Server communication, the
ID space for the events is further structured:
where the 1-Bit is the first bit of the 16 bit Method ID.
This means that up to 32768 events or notifications per service are possible.
The Length field is 32 bit long and contains the length in Byte of the payload beginning
with the Request ID/Client ID until the end of the SOME/IP-message.
A regular client request (message type 0x00) is answered by a server response (mes-
sage type 0x80), when no error occurred. If errors occur an error message (message
type 0x81) will be sent.
For updating values through notification a callback interface exists (message type
0x02).
It is possible to send a request that does not have a response message (message type
0x01) to use SOME/IP for AUTOSAR Sender/Receiver communication.
The Byte Order is specified common for all parameters by byteOrder of SOMEIP-
TransformationDescription. See chapter 7.2.2.
Insert reserved/padding elements into the AUTOSAR data type if needed for alignment,
since the SOME/IP implementation shall not automatically add such padding.
So if for example a struct includes a uint8 and a uint32, they are just written sequentially
into the buffer. This means that there is no padding between the uint8 and the first byte
of the uint32; therefore, the uint32 might not be aligned. So the system designer has
to consider to add padding elements to the data type to achieve the required alignment
or set it globally.
Warning about unaligned structs or similar shall not be done in the implementation but
only in the tool chain used to generate the implementation.
Messages of legacy busses like CAN and FlexRay are usually not aligned. Warnings
can be turned off or be ignored in such cases.
The SOME/IP transformer does not automatically insert dummy/padding elements.
SOME/IP allows to add a length field of 8, 16 or 32 bit in front of structs. The length
field of a struct describes the number of bytes of the struct. This allows for extensible
structs which allow better migration of interfaces.
[SWS_SomeIpXf_00216] dIf attribute sizeOfStructLengthFields of SOMEIP-
TransformationISignalProps is set to a value greater 0, a length field shall be
inserted in front of every serialized struct.c(SRS_Xfrm_00101)
Note:
[SWS_SomeIpXf_00216] also applies to nested structs which means that additionally
every nested struct has its own length field. Furthermore, in an array of structs where
all structs have the same length, the length field is inserted in front of every struct inside
the array.
[SWS_SomeIpXf_00252] dIf attribute sizeOfStructLengthField of SOMEIP-
TransformationProps is set to a value greater 0, a length field shall be inserted
in front of the serialized struct for which the SOMEIPTransformationProps is de-
fined. (See [TPS_SYST_02121])c(SRS_Xfrm_00101)
Note:
[SWS_SomeIpXf_00252] applies if the length fields of the struct and all nested structs
contained within the root struct are configured to different values for the lengths of the
length fields via SOMEIPTransformationProps.
[SWS_SomeIpXf_00217] dThe data type of the length field of the struct and all nested
structs within the struct shall be the same and shall be determined by the value
of SOMEIPTransformationISignalProps.sizeOfStructLengthFields of the
serialized ISignal:
• uint8 if sizeOfStructLengthFields equals 1
• uint16 if sizeOfStructLengthFields equals 2
• uint32 if sizeOfStructLengthFields equals 4
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00253] dIf SOMEIPTransformationProps.sizeOf-
StructLengthField is present for a struct the data type for the length field of
the struct shall be determined by the value of SOMEIPTransformationProps.
sizeOfStructLengthField:
• uint8 if sizeOfStructLengthField equals 1
• uint16 if sizeOfStructLengthField equals 2
• uint32 if sizeOfStructLengthField equals 4
• Otherwise [SWS_SomeIpXf_00217] applies.
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00218] dThe serializing SOME/IP transformer shall write the size (in
bytes) of the serialized struct (without the size of the length field) into the length field of
the struct.c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00219] dIf the length is greater than the expected length of a struct
(as specified in the data type definition) a deserializing SOME/IP transformer shall only
interpret the expected data and skip the unexpected.c(SRS_Xfrm_00101)
To determine the start of the next expected data following the skipped unexpected part,
the SOME/IP transformer can use the supplied length information.
Struct_1 uint32 a
float32 b_1
uint32 a float32 b_2
float32 b[2] serialization uint32 d
float32 e_1
Struct_2 c Struct_2
float32 e_2
uint32 d …
float32 e[2]
Struct_3 f
Figure 7.4: Serialization of Structs without Length Fields (Example)
7.2.4.3 Structured Datatypes and Arguments with Identifier and optional Mem-
bers
Please note that the content of this chapter has draft character
To achieve enhanced forward and backward compatibility, an additional Data ID can
be added in front of struct members or method arguments. The receiver then can
skip unknown members/arguments, i.e. where the Data ID is unknown. New member-
s/arguments can be added at arbitrary positions when Data IDs are transferred in the
serialized byte stream.
Structs are modeled in the Software Component Template using an Implementa-
tionDataType of category STRUCTURE and members are represented by Imple-
mentationDataTypeElements. Method arguments are represented by Argument-
DataPrototypes. Refer to [9] for more details.
The assignment of Data IDs is modeled in the System Template in the context of
SOMEIPTransformationISignalProps. Refer to [7] for more details.
Moreover, the usage of Data IDs allows describing structs with optional members. To
serialize data with optional members, the transformer has to know which optional mem-
bers are available or not. This is stored in a bitfield which is contained inside the Im-
plementationDataType. This availabilityBitfield is realized as array of uint8.
Whether an optional member is actually present in the struct or not, must be deter-
mined during runtime.
In addition to the Data ID, a wire type encodes the datatype of the following member.
Data ID and wire type are encoded in a so-called tag.
Data ID (Higher
Wire Type Data ID (Lower Sig. Part) Length Field (8/16/32 bit) Member Data ...
Sig. Part)
Note:
Wire type 4 ensures the compatibility with the current approach where the size of length
fields is statically configured. This approach has the drawback that changing the size
of the length field during evolution of interfaces is always incompatible. Thus, wire
types 5, 6 and 7 allow to encode the size of the used length field in the transferred byte
stream.
[SWS_SomeIpXf_00271] dIf SOMEIPTransformationISignalProps.isDynami-
cLengthFieldSize is set to false or is not defined, the transformer shall use wire
type 4 for serializing complex types and shall use the fixed size length fields. The size of
the length fields is defined in SOMEIPTransformationISignalProps.sizeOfAr-
rayLengthFields, sizeOfStructLengthFields and sizeOfUnionLength-
Fields.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00272] dSOMEIPTransformationISignalProps.isDynami-
cLengthFieldSize is set to true, the transformer shall use wire types 5,6,7 for
serializing complex types and shall chose the size of the length field according to this
wire type.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00273] dA deserializer shall always be able to handle the wire types
4, 5, 6 and 7 independent of the setting of SOMEIPTransformationISignalProps.
isDynamicLengthFieldSizec(SRS_Xfrm_00106)
[SWS_SomeIpXf_00274] dIf a Data ID is defined for an ArgumentDataPrototype
or ImplementationDataTypeElement by means of SOMEIPTransformation-
ISignalProps.tlvDataId.id, a tag shall be inserted in the serialized byte stream.c
(SRS_Xfrm_00106)
Note:
regarding existence of Data IDs, refer to [7].
[SWS_SomeIpXf_00275] dIf the datatype of the serialized member / argument is a
basic datatype (wire types 0-3) and a Data ID is configured, the tag shall be inserted
directly in front of the member/argument. No length field shall be inserted into the
serialized stream.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00276] dIf the datatype of the serialized member/argument is not a
basic datatype (wire type 4-7) and a Data ID is configured, the tag shall be inserted in
front of the length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00277] dIf the datatype of the serialized member/argument is not a
basic datatype and a Data ID is configured, a length field shall always be inserted in
front of the member/argument.c(SRS_Xfrm_00106)
Rationale: The length field is required to skip unknown members/arguments during
deserialization.
[SWS_SomeIpXf_00278] dThe length field shall always contain the length up to the
next tag of the struct, but does not include the tag size and length field size itself.c
(SRS_Xfrm_00106)
[SWS_SomeIpXf_00279] dIf the member itself is of type struct, there shall be exactly
one length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00280] dIf the member itself is of type dynamic length string, there
shall be exactly one length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00281] dIf the member itself is of type fixed length string, there
shall be exactly one length field corresponding to dynamic length strings.c(SRS_Xfrm_-
00106)
Note:
When serialized without tag, fixed length strings do not have a length field. For the
serialization with tag, a length field is also required for fixed length strings in the same
way as for dynamic length strings.
[SWS_SomeIpXf_00282]{DRAFT} dIf the member itself is of type dynamic length ar-
ray, there shall be exactly one length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00283] dIf the member itself is of type fixed length array, there shall
be exactly one length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00284] dIf the member itself is of type union, there shall be exactly
one length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00285] dFor the serialization of extensible structs and methods the
length field shall cover the size of the type field, data and padding bytes if the member
itself is of type union.c(SRS_Xfrm_00106)
Note:
For the serialization without tags, the length field of unions does not cover the type
field (see [SWS_SomeIpXf_00226]). For the serialization with tags, it is required that
the complete content of the serialized union is covered by the length field.
[SWS_SomeIpXf_00286] dA member of a non-extensible (standard) struct which is of
type extensible struct, shall be serialized according to the requirements for extensible
structs.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00287] dA member of an extensible struct which is of type non-
extensible (standard) struct, shall be serialized according to the requirements for stan-
dard structs.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00288] dFor the serialization of extensible structs and methods no
alignment shall be applied.c(SRS_Xfrm_00106)
Rationale: When alignment greater 8 bits is used, the serializer may add padding bytes
after variable length data. The padding bytes are not covered by the length field. If the
receiver does not know the Data ID of the member, it also does not know that it is
variable length data and that there might be padding bytes.
[SWS_SomeIpXf_00289] dIf the attribute isStructWithOptionalElement of the
ImplementationDataType representing the extensible struct is set to true, the
transformer shall ignore the first ImplementationDataTypeElement and shall not se-
rialize or deserialize it.c(SRS_Xfrm_00106)
Rationale: the first ImplementationDataTypeElement represents the availability
bitfield which is not transferred on the wire.
[SWS_SomeIpXf_00290] dThe transformer shall only serialize an optional member of
a struct if the corresponding bit in the availability bitfield is set as follows:
(availabilityBitfield[(pos/8)] & (1<<(pos mod 8))) != 0
c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00291] dIf an optional member is available in the serialized byte
stream, the transformer shall set the corresponding bit in the availability bitfield as
follows:
availabilityBitfield[(pos/8)] = availabilityBitfield[(pos/8)] | (1<<(pos mod 8))
c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00292] dIf an optional member is not available in the serialized byte
stream, the transformer shall clear the corresponding bit in the availability bitfield as
follows:
availabilityBitfield[(pos/8)] = availabilityBitfield[(pos/8)] & ~(1<<(pos mod 8))
c(SRS_Xfrm_00106)
In the requirements [SWS_SomeIpXf_00288], [SWS_SomeIpXf_00289] and [SWS_-
SomeIpXf_00290] pos is the position of the optional ImplementationDataType-
Element among all optional ImplementationDataTypeElements within the Im-
plementationDataType starting with pos = 0.
Note:
Non-optional ImplementationDataTypeElements do not count since they do not
need a bit in the availabilityBitfield. So the bit position within the availabilityBitfield
is determined by the order of the optional ImplementationDataTypeElements.
Examples:
• 1st optional ImplementationDataTypeElement (pos=0):
(availabilityBitfield[0] & 0x01) != 0
[SWS_SomeIpXf_00293] dIf the transformer reads an unknown Data ID (i.e. not con-
tained in its data definition), it shall skip the unknown member/argument by using the
information of the wire type and length field.c(SRS_Xfrm_00106)
[SWS_SomeIpXf_00294] dIf the transformer cannot find a required (i.e. non-optional)
member defined in its data definition in the serialized byte stream, the deserialization
shall be aborted with E_SER_MALFORMED_MESSAGE. For examples, please refer to
[10].c(SRS_Xfrm_00106)
7.2.4.4 Strings
for both fixed-length and dynamic-length strings. Unused space shall be filled using
"\0".c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00054] dDifferent Unicode encoding shall be supported including
UTF-8, UTF-16BE, and UTF-16LE. Since these encoding have a dynamic length of
bytes per character, the maximum length in bytes is up to three times the length of
characters in UTF-8 plus 1 Byte for the termination with a "\0" or two times the length
of the characters in UTF-16 plus 2 Bytes for a "\0". UTF-8 character can be up to 6
bytes and an UTF-16 character can be up to 4 bytes.c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00055] dUTF-16LE and UTF-16BE strings shall be zero terminated
with a
"\textbackslash0"-character
. This means they shall end with (at least) two 0x00 Bytes.c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00056] dUTF-16LE and UTF-16BE strings shall have an even
length.c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00057] dFor UTF-16LE and UTF-16BE strings having an odd length
the last byte shall be silently removed by the receiving SOME/IP transformer.c(SRS_-
Xfrm_00101)
[SWS_SomeIpXf_00248] dIn case of UTF-16LE and UTF-16BE strings having an odd
length, after removal of the last byte, the two bytes before shall be 0x00 bytes (termi-
nation) for a string to be valid.c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00058] dAll strings shall always start with a Byte Order Mark (BOM).
The BOM shall be included in fixed-length-strings as well as dynamic-length strings.c
(SRS_Xfrm_00101)
For the specification of BOM, see [11] and [12]. Please note that the BOM is used in
the serialized strings to achieve compatibility with Unicode.
The length of the string (this includes the "\0") in Bytes is specified in the data type
definition.
[SWS_SomeIpXf_00240] Recognition of UTF-8 Fixed Length Strings dAn UTF-8
Fixed Length String shall be detected if an ApplicationPrimitiveDataType and
an ImplementationDataType with the following pattern are used:
• ApplicationPrimitiveDataType
– with category equal to STRING
– ApplicationPrimitiveDataType.swDataDefProps.swTextProps.
baseType refers to a BaseType with baseTypeDefinition.baseType-
Encoding equal to UTF-8
• ImplementationDataType
– with category ARRAY
– that contains exactly one ImplementationDataTypeElement that boils
down to a uint8 ImplementationDataType:
∗ ImplementationDataTypeElement.arraySize is set to a value
∗ ImplementationDataTypeElement.arraySizeSemantics is set
to fixedSize
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00241] Recognition of UTF-16 Fixed Length Strings dAn UTF-16
Fixed Length String shall be detected if an ApplicationPrimitiveDataType and
an ImplementationDataType with the following pattern are used:
• ApplicationPrimitiveDataType
– with category equal to STRING
– ApplicationPrimitiveDataType.swDataDefProps.swTextProps.
baseType refers to a BaseType with baseTypeDefinition.baseType-
Encoding equal to UTF-16
• ImplementationDataType
– with category ARRAY
– that contains exactly one ImplementationDataTypeElement that boils
down to a uint16 ImplementationDataType:
∗ ImplementationDataTypeElement.arraySize is set to a value
∗ ImplementationDataTypeElement.arraySizeSemantics is set
to fixedSize
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00244] Serialization of fixed length strings dSerialization of fixed
length strings shall consist of the following steps:
1. Check whether the string terminates with 0x00 (UTF-8) or 0x0000 (UTF-16). If
not, a E_SER_GENERIC_ERROR error shall be issued.
2. Appending BOM at the beginning of the output buffer, if BOM is not already avail-
able in the first three (UTF-8) or two (UTF-16) bytes of the to be serialized array
containing the string. If the BOM is already present, simply copy the BOM into
the output buffer.
3. Copying the string data (the number of bytes according to the string’s fixed length)
from the array into the output buffer, optionally performing a conversion between
UTF-16LE and UTF-16BE between ECU and network byte order if BaseTypeDi-
rectDefinition.byteOrder and SOMEIPTransformationDescription.
byteOrder have different values
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00246] Deserialization of fixed length strings dDeserialization of
fixed length strings shall consist of the following steps:
1. Check whether the string starts with a BOM. If not, a MALFORMED_MESSAGE error
shall be issued
2. Check whether BOM has the same value as SOMEIPTransformationDe-
scription.byteOrder. If not, a MALFORMED_MESSAGE error shall be issued
3. Remove the BOM
4. Silently discard the last byte of the string in case of an UTF-16 string with odd
length
5. Check whether the string terminates with 0x00 (UTF-8) or 0x0000 (UTF-16). If
not, a MALFORMED_MESSAGE error shall be issued
6. Copy the string data (the number of bytes according to the string’s fixed length)
from the input buffer into the array, optionally performing a conversion between
UTF-16LE and UTF-16BE between network and ECU byte order if BaseTypeDi-
rectDefinition.byteOrder and SOMEIPTransformationDescription.
byteOrder have different values.
c(SRS_Xfrm_00101)
Strings with dynamic length can be realized in an AUTOSAR system as an array with
dynamic length that transports the single characters.
[SWS_SomeIpXf_00242] Recognition of UTF-8 Variable Length Strings dAn UTF-8
Fixed Length String shall be detected if an ApplicationPrimitiveDataType and
an ImplementationDataType with the following pattern are used:
• ApplicationPrimitiveDataType
– with category equal to STRING
– ApplicationPrimitiveDataType.swDataDefProps.swTextProps.
baseType refers to a BaseType with baseTypeDefinition.baseType-
Encoding equal to UTF-8
• ImplementationDataType
The ImplementationDataType shall be defined according to [TPS_SWCT_-
01650] as a STRUCTURE that contains exactly two Implementation-
DataTypeElements and shall follow the rules defined by [constr_1318]:
– one ImplementationDataTypeElement represents the Size Indica-
tor and has the category equal to TYPE_REFERENCE which points to a
uint8, uint16 or uint32 ImplementationDataType
– one ImplementationDataTypeElement has the category equal to
ARRAY and contains exactly one ImplementationDataTypeElement
that boils down to a uint8 ImplementationDataType
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00243] Recognition of UTF-16 Variable Length Strings dAn
UTF-16 Fixed Length String shall be detected if an ApplicationPrimitive-
DataType and an ImplementationDataType with the following pattern are used:
• ApplicationPrimitiveDataType
– with category equal to STRING
– ApplicationPrimitiveDataType.swDataDefProps.swTextProps.
baseType refers to a BaseType with baseTypeDefinition.baseType-
Encoding equal to UTF-16
• ImplementationDataType
The ImplementationDataType shall be defined according to [TPS_SWCT_-
01650] as a STRUCTURE that contains exactly two Implementation-
DataTypeElements and shall follow the rules defined by [constr_1318]:
– one ImplementationDataTypeElement represents the Size Indica-
tor and has the category equal to TYPE_REFERENCE which points to a
uint8, uint16 or uint32 ImplementationDataType
– one ImplementationDataTypeElement has the category equal to
ARRAY and contains exactly one ImplementationDataTypeElement
that boils down to a uint16 ImplementationDataType
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00245] Serialization of dynamic length strings dSerialization of
dynamic length strings shall consist of the followign steps:
1. Check whether the string terminates with 0x00 (UTF-8) or 0x0000 (UTF-16). If
not, a E_SER_GENERIC_ERROR error shall be issued.
2. Add the Length Field - The value of the length field shall be computed by multi-
plying the number of elements given by the size indicator with the size in bytes of
each element (i.e., 1 for UTF-8 and 2 for UTF-16) increased by the size in bytes
required by the BOM. The data type of the length field shall be determined from
the sizeOfStringLengthFields. If the attribute sizeOfStringLength-
Fields is not configured then the default value of 32 bit shall be used as de-
fined by [PRS_SOMEIP_00094]. The value of the length field shall comply with
[SWS_SomeIpXf_CONSTR_0001].
3. Appending BOM at the beginning, if BOM is not already available in the first 3
(UTF-8) or 2 (UTF-16) bytes of the to be serialized array containing the string. If
the BOM is already present, simply copy the BOM into the output buffer
4. Copying the string data (copy the the number of bytes according to the string’s
size indicator and the size of bytes of each element) from the array into the out-
put buffer, optionally performing a conversion between UTF-16LE and UTF-16BE
between ECU and network byte order BaseTypeDirectDefinition.byte-
Order and SOMEIPTransformationDescription.byteOrder have differ-
ent values
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00247] Deserialization of dynamic length strings
dDeserialization of dynamic length strings shall consist of the following steps:
1. Check whether the string starts with a BOM. If not, a MALFORMED_MESSAGE error
shall be issued
2. Check whether BOM has the same value as SOMEIPTransformationDe-
scription.byteOrder. If not, a MALFORMED_MESSAGE error shall be issued
3. Remove the BOM and reduce the value of the length field accordingly
4. Silently discard the last byte of the string in case of an UTF-16 string with odd
length (according to the reduced value of the length field)
5. Check whether the string terminates with 0x00 (UTF-8) or 0x0000 (UTF-16). If
not, a MALFORMED_MESSAGE error shall be issued
6. Check whether the length of the received dynamic length string is less or
equal than the specified maximum length of the string (ApplicationPrimitive-
DataType.swTextProps.swMaxTextSize or arraySize of ImplementationDataType-
Element of category ARRAY). If not, a MALFORMED_MESSAGE error shall be
issued.
7. Copy the string data (copy the number of bytes according to the string’s reduced
value of the length field) from the input buffer into the array, optionally perform-
ing a conversion between (UTF-16LE) and (UTF-16BE) between ECU and bus
if BaseTypeDirectDefinition.byteOrder and SOMEIPTransformation-
Description.byteOrder have different values.
c(SRS_Xfrm_00101)
Instead of transferring application strings as SOME/IP strings with BOM and "\0" ter-
mination, strings can also be transported as plain dynamic length arrays without BOM
and "\0" termination (see chapter Dynamic Length Arrays of [13]).
Please note that this requires the full string handling (e.g. endianness conversion) to
be done in the applications. This can also be achieved by setting the attribute im-
plementsLegacyStringSerialization to true. In CP this attribute is configured
in SOMEIPTransformationISignalProps, in AP it is configured in ApSomeip-
TransformationProps.
NOTE! This attribute is not future safe and will be removed in an upcoming AUTOSAR
release! Therefore, to be forward compatible, plain dynamic length arrays should
preferably be used in this case.
To determine the start of the next expected data following the skipped unexpected part,
the SOME/IP transformer can use the supplied length information.
7.2.4.5.1 One-dimensional
The one-dimensional arrays with fixed length n carry exactly n elements of the same
type. The layout is shown in Figure 7.7.
[SWS_SomeIpXf_00070] dA one-dimensional array with fixed length shall be serial-
ized by concatenating the array elements in order.c(SRS_Xfrm_00101)
…
element size e [byte]
n*e
7.2.4.5.2 Multidimensional
Optional Elements can be encoded as array with 0 to 1 elements. For the serialization
of arrays with dynamic length see Chapter 7.2.4.7.
Variable size arrays are implemented in AUTOSAR as structs with two members
• a size indicator which is an integer and holds the number of valid elements in the
array
• the array with variable size
In SOME/IP variable size arrays are implemented in a similar manner. Only the size
indicator is replaced by a length indicator.
• a length indicator which is an integer and holds the length (in bytes) of the follow-
ing variable size array
• the array which contains the valid elements of the variable size array
In AUTOSAR also so called "old-world" variable-size array data types exist which don’t
have a size indicator. These are not supported by data transformation in general and
hence also not supported by the SOME/IP transformer. For details, refer to [con-
str_1387] ([7, System Template]), [TPS_SWCT_01644], [TPS_SWCT_01645], [TPS_-
SWCT_01642] and [TPS_SWCT_01643].
[SWS_SomeIpXf_00076] dA variable size array embedded in a structure which also
contains a size indicator shall be serialized as the concatenation of the following ele-
ments:
• the length indicator which holds the length (in bytes) of the following variable size
array
• the array which contains the valid elements of the variable size array
where
• the data type of the length field shall be determined as specified in
[SWS_SomeIpXf_00234]
• the array shall be serialized like a static size array but does only contain the valid
elements. The number of elements to serializer shall be taken from the size
indicator.
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00234] dA variable size array is represented in AUTOSAR by an
ImplementationDataType with the category STRUCTURE and two sub-elements
(namely payload and size indicator ). The data type of the length fields for the
SOME/IP message for an variable size array shall be determined from the sizeOfAr-
rayLengthFields. If the attribute sizeOfArrayLengthFields is not configured
then the default value of 32 bit shall be used as defined by [PRS_SOMEIP_00945].
In case of nested variable size arrays, AUTOSAR allows to use profiles to specify size
indicators which apply to more than one variable size array nested within the same
ImplementationDataType. Depending on the specific profile (dynamicArray-
SizeProfile), the data type of the of the length fields inside the SOME/IP message
shall be determined differently:
• VSA_LINEAR
The data type of the SOME/IP length field shall be determined from the single
sizeOfArrayLengthFields. If the attribute sizeOfArrayLengthFields is
not configured then the default value of 32 bit shall be used as defined by [PRS_-
SOMEIP_00945].
• VSA_SQUARE
All data type of the SOME/IP length fields shall be determined from the single
sizeOfArrayLengthFields. If the attribute sizeOfArrayLengthFields is
not configured then the default value of 32 bit shall be used as defined by [PRS_-
SOMEIP_00945].
• VSA_RECTANGULAR
The data type of all SOME/IP length fields for all dimensions (nesting level) shall
be determined from the single sizeOfArrayLengthFields. If the attribute
sizeOfArrayLengthFields is not configured then the default value of 32 bit
shall be used as defined by [PRS_SOMEIP_00945].
• VSA_FULLY_FLEXIBLE
The data type of all SOME/IP length fields for all variable size arrays shall be de-
termined from the single sizeOfArrayLengthFields. If the attribute sizeO-
fArrayLengthFields is not configured then the default value of 32 bit shall be
used as defined by [PRS_SOMEIP_00945].
c(SRS_Xfrm_00101, SRS_Xfrm_00008)
This means only the first m elements of the variable size array are serialized where m is
the value of the size indicator.
The layout of dynamic arrays is shown in 7.9 and Figure 7.10 where L_1 and L_2
denote the length in bytes.
…
8,16 or 32 bit element size e
n [byte]
In the one-dimensional array one length field is used, which carries the size in bytes of
the valid elements in the array.
[SWS_SomeIpXf_00235] dIf the value of dynamicArraySizeProfile equals
VSA_LINEAR, the value of the length field of the serialized variable size array shall
be calculated based on the value of the size indicator of the AUTOSAR data type.c
(SRS_Xfrm_00101, SRS_Xfrm_00008)
The number of static length elements can be easily calculated by dividing the array
length n by the Byte size of an element.
In the case of dynamical length elements the number of elements cannot be calculated
but the elements must be parsed sequentially.
In case of multidimensional variable size arrays, each variable size array needs to
have its own length field, independent of the way how the variable size array is de-
signed in the AUTOSAR data type (i.e. independent from the value of dynamicAr-
raySizeProfile) as specified in [SWS_SomeIpXf_00234]. Hence it is supported to
have different length columns and different length rows in the same dimension. See
k_1 and k_2 in Figure 7.10.
[SWS_SomeIpXf_00236] dIf the value of dynamicArraySizeProfile of a multi-
dimensional variable size array equals VSA_SQUARE, the value of all length fields of
the nested serialized variable size arrays that belong to this multi-dimensional variable
size arrays shall be calculated based on the value of the single size indicator of the
AUTOSAR data type.c(SRS_Xfrm_00101, SRS_Xfrm_00008)
In case of VSA_SQUARE, the AUTOSAR data type only has one size indicator. The
value of this size indicator will be used as base for the calculation for the value of all
length fields of such a multi-dimensional variable size array.
[SWS_SomeIpXf_00237] dIf the value of dynamicArraySizeProfile of a multi-
dimensional variable size array equals VSA_RECTANGULAR, the values of all length
fields of the nested serialized variable size arrays of the same nesting level (i.e. the
same dimension) that belong to this multi-dimensional variable size array shall be cal-
culated based on the values of the size indicators of the AUTOSAR data type for this
respective nesting level.c(SRS_Xfrm_00101, SRS_Xfrm_00008)
In case of VSA_RECTANGULAR, the AUTOSAR data type has exactly one size indicator
for each dimension of the the multi-dimensional variable size array. For all variable size
arrays in one dimension, the value of the according size indicator of this dimension will
be used as base for the calculation of the values of all length fields of this dimension.
[SWS_SomeIpXf_00238] dIf the value of dynamicArraySizeProfile of a multi-
dimensional variable size array equals VSA_FULLY_FLEXIBLE, the values of all length
fields of the nested serialized variable size arrays that belong to this multi-dimensional
variable size arrays shall be calculated based on the value of the size indicator of the
corresponding variable size array that is contained in the AUTOSAR data type.c(SRS_-
Xfrm_00101, SRS_Xfrm_00008)
In case of VSA_FULLY_FLEXIBLE, in the AUTOSAR data type the outer variable size
array and each nested variable size arrays has its own size indicator. For the calculation
of the values of the length fields both of the outer and all nested variable size arrays
the according values of the size indicators of the AUTOSAR data type will be used as
base.
The RTE provides a buffer where serialization result will be written into by the SOME/IP
transformer which is large enough to keep the length field and a fully filled dynamic
array.
7.2.4.8 Bitfield
A union (also called variant) is a parameter that can contain different types of elements.
For example, if one defines a union of type uint8 and type uint16, the union shall carry
an element of uint8 or uint16.
The union serialization will only be triggered if the pattern defined in
[SWS_SomeIpXf_00249] applies.
SOME/IP allows to add a length field of 8, 16 or 32 bit in front of unions. The length
field of a union describes the number of bytes in the union.
This allows the deserializer to quickly calculate the position where the data after the
union begin in the serialized data stream. This gets necessary if the union con-
tains data which are larger than expected, for example if a struct was extended with
appended new members and only the first "old" members are deserialized by the
SOME/IP transformer.
[SWS_SomeIpXf_00224] dIf attribute sizeOfUnionLengthFields of SOMEIP-
TransformationISignalProps is set to a value greater 0, a length field shall be
inserted in front of every serialized union.c(SRS_Xfrm_00101)
Note:
[SWS_SomeIpXf_00224] also applies to nested unions which means that additionally
every nested union has its own length field.
[SWS_SomeIpXf_00254] dIf attribute sizeOfUnionLengthField of SOMEIP-
TransformationProps is set to a value greater 0, a length field shall be inserted
in front of the serialized union for which the SOMEIPTransformationProps is de-
fined. (See [TPS_SYST_02121]).c(SRS_Xfrm_00101)
Note:
[SWS_SomeIpXf_00254] applies if the length fields of the union and all nested unions
contained within the root union are configured to different values for the lengths of the
length fields via SOMEIPTransformationProps.
[SWS_SomeIpXf_00225] dThe data type of the length field of the union and all nested
unions within the union shall be determined by the value of SOMEIPTransforma-
tionISignalProps.sizeOfUnionLengthFields of the serialized ISignal:
• uint8 if sizeOfUnionLengthFields equals 1
• uint16 if sizeOfUnionLengthFields equals 2
• uint32 if sizeOfUnionLengthFields equals 4
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00258] dIf SOMEIPTransformationProps.sizeOfUnion-
LengthField is present for a union the data type of the length field for the union
shall be determined by the value of SOMEIPTransformationProps.sizeOfU-
nionLengthField:
• uint8 if sizeOfUnionLengthFields equals 1
• uint16 if sizeOfUnionLengthFields equals 2
• uint32 if sizeOfUnionLengthFields equals 4
• Otherwise [SWS_SomeIpXf_00225] applies.
c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00226] dThe serializing SOME/IP transformer shall write the size (in
bytes) of the serialized union (including padding bytes but without the size of the length
field and type field) into the length field of the union. This requirement does not apply
for the serialization of extensible structs and methods.c(SRS_Xfrm_00101)
Note:
See also chapter 7.2.4.3.
[SWS_SomeIpXf_00227] dIf the length is greater than the expected length of a union
(as specified in the data type definition) a deserializing SOME/IP transformer shall only
interpret the expected data and skip the unexpected.c(SRS_Xfrm_00101)
To determine the start of the next expected data following the skipped unexpected part,
the SOME/IP transformer can use the supplied length information.
The length of the type field shall be 32, 16, 8 or 0 bits.
The type field describes the type of the element.
[SWS_SomeIpXf_00250] dThe data type of the type field of the union shall be
determined from the ImplementationDataType of the first Implementation-
DataTypeElement (memberSelector) in the wrapped union data type defined in
[SWS_SomeIpXf_00249].c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00098] dPossible values of the type field are defined by the data
type specification of the union. The types are encoded as in the data type in ascending
order starting with 1. The 0 is reserved for the NULL type - i.e. an empty union.c
(SRS_Xfrm_00101)
[SWS_SomeIpXf_00251] dThe value of the type field shall be set to the value defined
by the first ImplementationDataTypeElement (memberSelector) in the wrapped
union data type defined in [SWS_SomeIpXf_00249].c(SRS_Xfrm_00101)
[SWS_SomeIpXf_00099] dThe element is serialized depending on the type in the type
field. This also defines the length of the data. All bytes behind the data that are covered
by the length, are padding. The deserializer shall skip the padding bytes by calculat-
ing the required number according to the formula given in [SWS_SomeIpXf_00088].c
(SRS_Xfrm_00101)
By using a struct in the data type definition, different padding layouts can be achieved.
In this example a length of the length field is specified as 32 bits. The union shall
support a uint8 and a uint16 as elements. Both are padded to the 32 bit boundary
(length=4 Bytes).
A uint8 will be serialized like this:
Length = 4 Bytes
Type = 1
uint8 Padding 0x00 Padding 0x00 Padding 0x00
Payload
…, …
INOUT/OUT argumentN argumentN
)
Note:
Error messages can only be sent as a response for client/server requests, not for
Sender/Receiver communication or error messages.
[SWS_SomeIpXf_00202] dA SOME/IP transformer on the server-ECU that builds
an autonomous error response shall return with a return value equal to E_OK (See
[SWS_SomeIpXf_00141]).c(SRS_Xfrm_00102)
If the SOME/IP transformer would return with a return code different from E_OK this
would issue a hard error that prevents the RTE from sending the autonomous error
response.
Session Handling ID counter is used to set the correct Request ID in the SOME/IP
header in case of Sender/Receiver communication where session handling is acti-
vated.
[SWS_SomeIpXf_00212] dOne Session Handling ID counter (16 Bit) has to
be maintained per transformer function for Sender/Receiver communication (see
[SWS_SomeIpXf_00138]) if sessionHandlingSR is set to sessionHandlingAc-
tive.c(SRS_Xfrm_00008)
[SWS_SomeIpXf_00213] dAll Session Handling ID counters shall be initialized with
0x0001.c(SRS_Xfrm_00008)
[SWS_SomeIpXf_00108] dThe SOME/IP transformer on the sender side of trans-
formed Sender/Receiver communication shall construct header and payload in the fol-
lowing way:
• Construct the payload
• Set the Request ID
– to 0x00 if sessionHandlingSR of SOMEIPTransformationISignal-
Props is not set to sessionHandlingActive
– the current value of the Session Handling ID counter otherwise
• Set the Protocol Version according [SWS_SomeIpXf_00029]
• Set the Interface Version. If interfaceVersion of SOMEIPTransforma-
tionISignalProps is set, this shall be used. Otherwise interfaceVersion
of SOMEIPTransformationDescription shall be used.
• Set the Message Type according to messageType of SOMEIPTransforma-
tionISignalProps:
– NOTIFICATION (0x02) shall be used in the header if attribute mes-
sageType is set to notification
External trigger events are used to trigger RPCs without any IN, INOUT or OUT ar-
guments or to represent a special kind of an event without any parameters that is
transmitted from a server to one or more client(s) and at which occurrence the Service
Consumer shall react in a particular manner. External trigger events are realized by
SOME/IP as fire-and-forget methods without arguments
[SWS_SomeIpXf_00204] dThe SOME/IP transformer on the trigger source side of
transformed external trigger events shall construct header in the following way:
• Set the Request ID
– to 0x00 if sessionHandlingSR of SOMEIPTransformationISignal-
Props is not set to sessionHandlingActive
– the current value of the Session Handling ID counter otherwise
• Set the Protocol Version according [SWS_SomeIpXf_00029]
• Set the Interface Version. If interfaceVersion of SOMEIPTransforma-
tionISignalProps is set, this shall be used. Otherwise interfaceVersion
of SOMEIPTransformationDescription shall be used.
• Set the Message Type to REQUEST_NO_RETURN (i.e. 0x01)
• Set the Return Code to 0x00
c(SRS_Xfrm_00102)
[SWS_SomeIpXf_00205] dThe payload of a message for external trigger event com-
munication shall be empty.c(SRS_Xfrm_00102)
Error handling and return codes have to be implemented by the application when
needed.
The error handling will be done solely in the application. SOME/IP only transports the
errors.
Two different mechanisms for error transportation are supported: Return Code and
Error Message
[SWS_SomeIpXf_00111] dThe SOME/IP transformer shall use the Return Code error
handling.c(SRS_Xfrm_00102, SRS_Xfrm_00103)
Exceptions are specified in SOME/IP but not yet supported by this version of the
SOME/IP transformer.
This can be used to handle all different application errors that might occur in the server.
In addition, problems with the communication medium or intermediate components
(e.g. switches) may occur, which have to be handled e.g. by means of reliable trans-
port.
All messages have a return code field to carry the return code. However, only re-
sponses (Message Types 0x80 and 0x81) use this field to carry a return code to the
request (Message Type 0x00) they answer. All other messages set this field to 0x00
(see Chapter 7.2.3.6). For more detailed errors the layout of the Error Message (Mes-
sage Type 0x81) can carry specific fields for error handling, e.g. an Exception String.
Error Messages are sent instead of Response Messages.
[SWS_SomeIpXf_00112] dThe Error Handling via Return Code shall be based on the
Std_ReturnType.c(SRS_Xfrm_00102)
[SWS_SomeIpXf_00113] dThe Return Codes shall only be used for Client/Server
communicationc(SRS_Xfrm_00102)
[SWS_SomeIpXf_00170] dIn case of Client/Server communication the Return Code
shall transport the ApplicationErrors of the executed ClientServerOperation
if no SOME/IP error occurred.c(SRS_Xfrm_00102)
This means: If a SOME/IP error occurred, this error is contained in the Return Code. If
no SOME/IP error occurred, the Return Code contains the error (or success) code of
the executed server runnable.
If an error occurs in case of client/server communication the server can be configured
to create an autonomous error reaction which will be sent back to the client. In that
response, the SOME/IP header fields RequestId and Interface Version shall
be equal to the values in the header of the request message.
This is realized by [SWS_SomeIpXf_00201] which fills the header fields accordingly:
RequestId is handed over from RTE and InterfaceVersion is consistent to the
request as the configuration of the SOME/IP transformer only allows the same inter-
faceVersion for request and response.
[SWS_SomeIpXf_00115] dThe Return Codes of Table 7.11 are currently defined and
shall be implemented as described:c(SRS_Xfrm_00102)
ID Name Description
0x00 E_OK No error occurred
0x01 E_NOT_OK An unspecified error occurred
0x04 SOMEIPXF_E_NOT_READY Service ID and Method ID are known. Application
not running.
0x05 SOMEIPXF_E_NOT_ System running the service is not reachable (inter-
REACHABLE nal error code only).
0x06 SOMEIPXF_E_TIMEOUT A timeout occurred (internal error code only).
0x07 SOMEIPXF_E_WRONG_ Version of SOME/IP protocol not supported
PROTOCOL_
VERSION
0x08 SOMEIPXF_E_WRONG_ Interface version mismatch
INTERFACE_
VERSION
0x09 SOMEIPXF_E_ Deserialization error, so that payload cannot be de-
MALFORMED_MESSAGE serialized.
0x0a SOMEIPXF_E_ An unexpected message type was received (e.g.
WRONG_MESSAGE_TYPE REQUEST_NO_RETURN for a method defined as
REQUEST.)
0x0b E_E2E Not further specified E2E error
0x0c - RESERVED Reserved for generic SOME/IP errors. These errors
0x1f will be specified in future versions of this document.
0x20 - - Specific ApplicationErrors of
0x5e ClientServerOperations. These errors are the
application errors specified by the ClientServer-
Interface.
As the range of ApplicationErrors of the
ClientServerInterface is 0x01-0x3F, the
value of an ApplicationError has to be adapted
for transport over SOME/IP by adding 0x1F.
• At least once — the message reaches the communication partner at least once
• Exactly once — the message reaches the communication partner exactly once
When using these terms in regard to client/server communication the term applies to
both messages (i.e. call and response or error).
While different implementations may implement different approaches, SOME/IP trans-
former currently achieves "maybe" reliability when using the UDP binding and "exactly
once" reliability when using the TCP binding by a suitable configuration of the Ethernet
modules. Further error handling is left to the application.
For "maybe" reliability, only a single timeout is needed, when using client/server com-
munication in combination with UDP as transport protocol. Figure 7.13 shows the
state machines for "maybe" reliability. The client’s SOME/IP implementation has to
wait for the response for a specified timeout. If the timeout occurs SOME/IP shall
signal SOMEIPXF_E_TIMEOUT to the client application.
Client
/Send Response
Request WaitingForResponse Received
Server
For "exactly once" reliability the TCP binding may be used, since TCP was defined to
allow for reliable communication.
Additional mechanisms to reach higher reliability may be implemented in the applica-
tion or in a SOME/IP implementation. Keep in mind that the communication does not
have to implement these features. Chapter 7.3.4.2.1 describes such optional reliability
mechanisms.
The application can easily implement "at least once" reliability by using idempotent
operations (i.e. operation that can be executed multiple times without side effects)
and using a simple timeout mechanism. Figure 7.14 shows the state machines for
"at least once" reliability using implicit acknowledgements. When the client sends out
the request it starts a timer with the timeout specified for the specific method. If no
response is received before the timer expires (round transition at the top), the client
will retry the operation. A Typical number of retries would be 2, so that 3 requests are
sent.
The number of retries, the timeout values, and the timeout behavior (constant or expo-
nential back off) are outside of the SOME/IP specification.
No Response Received
/TimeoutCounter++
Client
/Send Request, Response
set TimeoutCounter = 0 WaitingForResponse Received
Error:
SOMEIPXF_E_TIMEOUT
TimeoutCounter == n,
(No Response received)
Server
Figure 7.14: State Machines for Reliability "At least once" (idempotent operations)
Service-ID Description
0x0000 Reserved
Instance-ID Description
0x0000 Reserved
0xFFFF All Instances
Method-ID Description
0x0000 Reserved
0x7FFF Reserved
0x8000 Reserved
0xFFFF Reserved
Method-ID/Event- Description
ID
0x0000 SOME/IP Magic Cookie Messages
0x8000 SOME/IP Magic Cookie Messages
0x8100 SOME/IP-SD messages (events)
Name Description
hostname Used to name a host or ECU.
instancename Used to name an instance of a service.
servicename Used to name a service.
[SWS_SomeIPxf_00184] d
Type of error Related error code Error value
Error code if any other API service, except Get SOMEIPXF_E_UNINIT 0x01
VersionInfo is called before the transformer
module was initialized with Init or after a call to De
Init
Error code if an invalid configuration set was SOMEIPXF_E_INIT_FAILED 0x02
selected
API service called with wrong parameter SOMEIPXF_E_PARAM 0x03
API service called with invalid pointer SOMEIPXF_E_PARAM_POINTER 0x04
c(SRS_BSW_00337)
All Extended Production Errors valid for SOME/IP Transformer are specified in [3,
ASWS Transformer General].
8 API specification
c(SRS_BSW_00404, SRS_BSW_00441)
8.3.1 SomeIpXf_ExtractProtocolHeaderFields
[SWS_SomeIpXf_91001] d
c(SRS_Xfrm_00002)
[SWS_SomeIpXf_00296] dThe function SomeIpXf_ExtractProtocolHeader-
Fields specified in [SWS_SomeIpXf_91001] shall extract the type of a message and
the type of the message result from the SOME/IP protocol header and provide this in-
formation in a canonical representation via its output arguments.c(SRS_Xfrm_00002)
[SWS_SomeIpXf_00297] dThe function SomeIpXf_ExtractProtocolHeader-
Fields specified in [SWS_SomeIpXf_91001] shall check whether the provided
bufferLength is larger or equal than the size of the protocol header processed by
the SOME/IP transformer (i.e., 8 bytes). – If this is not the case, E_NOT_OK shall be
returned. Neither messageType nor messageResult shall be modified in this case.c
(SRS_Xfrm_00002)
[SWS_SomeIpXf_00298] dThe function SomeIpXf_ExtractProtocolHeader-
Fields specified in [SWS_SomeIpXf_91001] shall check whether the value of the
Protocol Version field (see [PRS_SOMEIP_00052]) is equal to the value defined by
[PRS_SOMEIP_00051]. – If this is not the case, E_NOT_OK shall be returned. Nei-
ther messageType nor messageResult shall be modified in this case.c(SRS_Xfrm_-
00002)
8.3.2 SomeIpXf_<transformerId>
[SWS_SomeIpXf_00138] d
Service Name SomeIpXf_<transformerId>
Syntax uint8 SomeIpXf_<transformerId> (
uint8* buffer,
uint32* bufferLength,
<paramtype> dataElement
)
4
Parameters (out) buffer Buffer allocated by the RTE, where the transformed data has to
be stored by the transformer
bufferLength Used length of the buffer
Return value uint8 0x00 (E_OK): Serialization successful
0x81 (E_SER_GENERIC_ERROR): A generic error occurred
Description This function transforms a Sender/Receiver communication using the serialization of SOME/IP.
It takes the data element as input and outputs a uint8 array containing the serialized data.
The length of the serialized data shall be calculated by the transformer during runtime and
returned in the OUT-parameter bufferLength. It may be smaller than the maximum buffer size
used by the RTE for buffer allocation.
Available via SomeIpXf.h
c()
[SWS_SomeIpXf_00228] dIn function SomeIpXf_<transformerId> defined in
[SWS_SomeIpXf_00138]
• paramtype is derived from type according to the parameter passing rules rules
defined by the [15, SRS BSW General] (see [SRS_BSW_00484], [SRS_BSW_-
00485], and [SRS_BSW_00486]) and [14, SWS BSW General] (see [SWS_-
BSW_00186] and [SWS_BSW_00187]).
• type shall be the data type of the data element after all data conversion activities
of the RTE
• transformerId shall be the name pattern for the transformer specified in
[SWS_Xfrm_00062] ([3, ASWS Transformer General])
c()
This function specified in [SWS_SomeIpXf_00138] exists for each transformed
Sender/Receiver communication which uses the SOME/IP serialization.
[SWS_SomeIpXf_00139] dThe function SomeIpXf_<transformerId> specified in
[SWS_SomeIpXf_00138] shall exist for the first reference in the list of ordered refer-
ences transformer from a DataTransformation to a TransformationTech-
nology if the DataTransformation is referenced by an ISignal in the role data-
Transformation where the ISignal references a SystemSignal which is refer-
enced by SenderReceiverToSignalMapping.c()
[SWS_SomeIpXf_00140] dThe function SomeIpXf_<transformerId> specified
in [SWS_SomeIpXf_00138] shall serialize primitive or complex data elements of
Sender/Receiver communication into a linear byte array representation using the
SOME/IP serialization.c()
[SWS_SomeIpXf_00214] dAfter serialization of the data, the function
SomeIpXf_<transformerId> specified in [SWS_SomeIpXf_00138] shall in-
crement the Session Handling ID counter assigned to <transformerId> if
sessionHandlingSR is set to sessionHandlingActive.c()
c()
[SWS_SomeIpXf_00229] dIn function SomeIpXf_<transformerId> defined in
[SWS_SomeIpXf_00141]
• paramtype is derived from type according to the parameter passing rules rules
defined by the [15, SRS BSW General] (see [SRS_BSW_00484], [SRS_BSW_-
00485], and [SRS_BSW_00486]) and [14, SWS BSW General] (see [SWS_-
BSW_00186] and [SWS_BSW_00187]).
• type shall be the data type of the data element after all data conversion activities
of the RTE
• transformerId shall be the name pattern for the transformer specified in
[SWS_Xfrm_00062] ([3, ASWS Transformer General]).
c()
This function specified in [SWS_SomeIpXf_00141] exists for the server and each client
of each transformed Client/Server communication which uses the SOME/IP serializa-
tion.
It exists on both the Client and the Server but the arguments are different.
On the client it serializes the request of the Client/Server call. There, the data_1, ...,
data_n arguments of the API correpsond to the IN and INOUT arguments of the
ClientServerOperation. The argument returnValue doesn’t exist.
On the server it serializes the response of the Client/Server call. There, the data_1,
..., data_n arguments of the API correpsond to the INOUT and OUT arguments of the
ClientServerOperation. The argument returnValue exists here if at least one
PossibleError is defined for the ClientServerOperation because the return
code of the operation has to be transmitted.
[SWS_SomeIpXf_00142] dThe function SomeIpXf_<transformerId> specified in
[SWS_SomeIpXf_00141] shall exist for the first reference in the list of ordered refer-
ences transformer from a DataTransformation to a TransformationTech-
nology if the DataTransformation is referenced by an ISignal in the role
dataTransformation where the ISignal references a SystemSignal which
is referenced by ClientServerToSignalMapping in the callSignal or re-
turnSignal.c()
Due to [SWS_SomeIpXf_00142], the API of [SWS_SomeIpXf_00141] exists both on
client and server.
[SWS_SomeIpXf_00143] dThe function SomeIpXf_<transformerId>
[_<symbolSuffix>] specified in [SWS_SomeIpXf_00141] shall serialize all primi-
tive or complex operation arguments and the return value (if executed on server side) of
Client/Server communication into a linear byte array representation using the SOME/IP
serialization.c()
[SWS_SomeIpXf_00203] dThe function SomeIpXf_<transformerId>
[_<symbolSuffix>] specified in [SWS_SomeIpXf_00141] shall ignore all argu-
ments data_1, ..., data_n if the return code is greater or equal to 0x80 because
they are not filled with meaningful values.c(SRS_Xfrm_00105)
[SWS_SomeIpXf_00206] d
Service Name SomeIpXf_<transformerId>
Syntax uint8 SomeIpXf_<transformerId> (
uint8* buffer,
uint32* bufferLength
)
c(SRS_Xfrm_00002)
[SWS_SomeIpXf_00230] dIn function SomeIpXf_<transformerId> defined in
[SWS_SomeIpXf_00206]
• transformerId shall be the name pattern for the transformer specified in
[SWS_Xfrm_00062] ([3, ASWS Transformer General]).
c()
This function specified in [SWS_SomeIpXf_00206] exists on the trigger source side for
each transformed external trigger event which uses SOME/IP transformation.
[SWS_SomeIpXf_00207] dThe function SomeIpXf_<transformerId> specified in
[SWS_SomeIpXf_00206] shall exist for the first referenced TransformationTech-
nology in the ordered transformerChain of a DataTransformation if the
DataTransformation is referenced by an ISignal in the role dataTransfor-
mation where the ISignal references a SystemSignal which is referenced by a
TriggerToSignalMapping.c(SRS_Xfrm_00002)
[SWS_SomeIpXf_00208] dThe function SomeIpXf_<transformerId> specified in
[SWS_SomeIpXf_00206] shall serialize an external trigger event into a linear byte array
representation using the SOME/IP serialization.c(SRS_Xfrm_00002)
As an external trigger event consists of an ISignal with length equal to zero, the
serialized SOME/IP message only contains a header but no payload.
8.3.3 SomeIpXf_Inv_<transformerId>
[SWS_SomeIpXf_00144] d
Service Name SomeIpXf_Inv_<transformerId>
Syntax uint8 SomeIpXf_Inv_<transformerId> (
const uint8* buffer,
uint32 bufferLength,
<type>* dataElement
)
c()
[SWS_SomeIpXf_00231] dIn function SomeIpXf_Inv_<transformerId> defined
in [SWS_SomeIpXf_00144]
• type shall be the data type of the data element before all data conversion activi-
ties of the RTE
• transformerId shall be the name pattern for the transformer specified in
[SWS_Xfrm_00062] ([3, ASWS Transformer General]).
c()
This function specified in [SWS_SomeIpXf_00144] exists for each transformed
Sender/Receiver communication which uses the SOME/IP serialization.
[SWS_SomeIpXf_00146] dThe function SomeIpXf_Inv_<transformerId> speci-
fied in [SWS_SomeIpXf_00144] shall exist for the first reference in the list of ordered
4
Return value uint8 0x00 (E_OK): Deserialization successful
0x01 (E_NO_DATA): No data available which can be deserialized
0x81 (E_SER_GENERIC_ERROR): A generic error occurred
0x87 (E_SER_WRONG_PROTOCOL_VERSION): The version of
the receiving transformer didn’t match the sending transformer.
0x88 (E_SER_WRONG_INTERFACE_VERSION): Interface
version of serialized data is not supported.
0x89 (E_SER_MALFORMED_MESSAGE): The received
message is malformed. The transformer is not able to produce an
output.
0x8a (E_SER_WRONG_MESSAGE_TYPE): The received
message type was not expected.
Description This function deserializes a Client/Server communication using the deserialization of SOME/IP.
It takes the uint8 array containing the serialized data as input and outputs the return value of
the server runnable and the operation arguments which have to be passed from the server to
the client.
Available via SomeIpXf.h
c()
[SWS_SomeIpXf_00232] dIn function SomeIpXf_Inv_<transformerId> defined
in [SWS_SomeIpXf_00145]
• paramtype is derived from type according to the parameter passing rules rules
defined by the [15, SRS BSW General] (see [SRS_BSW_00484], [SRS_BSW_-
00485], and [SRS_BSW_00486]) and [14, SWS BSW General] (see [SWS_-
BSW_00186] and [SWS_BSW_00187]).
• type shall be the data type of the data element before all data conversion activi-
ties of the RTE
• transformerId shall be the name pattern for the transformer specified in
[SWS_Xfrm_00062] ([3, ASWS Transformer General]).
c()
This function specified in [SWS_SomeIpXf_00145] exists for the server and each client
of each transformed Client/Server communication which uses the SOME/IP serializa-
tion.
It exists on both the Client and the Server but the arguments are different.
On the server it deserializes the request of the Client/Server call. There, the data_1,
..., data_n arguments of the API correpsond to the IN and INOUT arguments of the
ClientServerOperation. The argument returnValue doesn’t exist.
On the client it deserializes the response of the Client/Server call. There, the data_1,
..., data_n arguments of the API correpsond to the INOUT and OUT arguments of the
ClientServerOperation. The argument returnValue exists here if at least one
PossibleError is defined for the ClientServerOperation because the return
code of the operation has to be transmitted
[SWS_SomeIpXf_00148] d
c(SRS_Xfrm_00002)
8.3.4 SomeIpXf_Init
[SWS_SomeIpXf_00181] d
Service Name SomeIpXf_Init
Syntax void SomeIpXf_Init (
const SomeIpXf_ConfigType* config
)
4
Available via SomeIpXf.h
c(SRS_BSW_00407, SRS_BSW_00411)
8.3.5 SomeIpXf_DeInit
[SWS_SomeIpXf_00182] d
Service Name SomeIpXf_DeInit
Syntax void SomeIpXf_DeInit (
void
)
c(SRS_BSW_00407, SRS_BSW_00411)
8.3.6 SomeIpXf_GetVersionInfo
[SWS_SomeIpXf_00180] d
Service Name SomeIpXf_GetVersionInfo
Syntax void SomeIpXf_GetVersionInfo (
Std_VersionInfoType* VersionInfo
)
c(SRS_BSW_00407, SRS_BSW_00411)
9 Sequence diagrams
There are no sequence diagrams applicable to SOME/IP Transformer.
10 Configuration specification
There is no module specific configuration available to the SOME/IP Transformer. The
EcuC defined in [3, ASWS Transformer General] shall be used.
[SWS_SomeIpXf_00185] dThe apiServicePrefix of the SOME/IP transformer’s
EcuC shall be set to SomeIpXf.c(SRS_BSW_00159)
Class ApplicationError
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This is a user-defined error that is associated with an element of an AUTOSAR interface. It is specific for
the particular functionality or service provided by the AUTOSAR software component.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mult. Kind Note
errorCode Integer 0..1 attr The RTE generator is forced to assign this value to the
corresponding error symbol. Note that for error codes
certain ranges are predefined (see RTE specification).
Class ApplicationPrimitiveDataType
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes
Note A primitive data type defines a set of allowed values.
Tags:atp.recommendedPackage=ApplicationDataTypes
Base ARElement, ARObject, ApplicationDataType, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType,
AutosarDataType, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement,
Referrable
Attribute Type Mult. Kind Note
– – – – –
Table A.3: ApplicationPrimitiveDataType
Class ArgumentDataPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note An argument of an operation, much like a data element, but also carries direction information and is
owned by a particular ClientServerOperation.
Base ARObject, AtpFeature, AtpPrototype, AutosarDataPrototype, DataPrototype, Identifiable, Multilanguage
Referrable, Referrable
Attribute Type Mult. Kind Note
direction ArgumentDirection 0..1 attr This attribute specifies the direction of the argument
Enum prototype.
serverArgument ServerArgumentImpl 0..1 attr This defines how the argument type of the servers
ImplPolicy PolicyEnum RunnableEntity is implemented.
If the attribute is not defined this has the same semantics
as if the attribute is set to the value useArgumentType for
primitive arguments and structures.
Enumeration ArraySizeSemanticsEnum
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note This type controls how the information about the number of elements in an ApplicationArrayDataType
is to be interpreted.
Literal Description
fixedSize This means that the ApplicationArrayDataType will always have a fixed number of elements.
Tags:atp.EnumerationLiteralIndex=0
variableSize This implies that the actual number of elements in the ApplicationArrayDataType might vary at
run-time. The value of arraySize represents the maximum number of elements in the array.
Tags:atp.EnumerationLiteralIndex=1
4
Class BaseType (abstract)
baseType BaseTypeDefinition 1 aggr This is the actual definition of the base type.
Definition
Tags:
xml.roleElement=false
xml.roleWrapperElement=false
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
Class BaseTypeDirectDefinition
Package M2::MSR::AsamHdo::BaseTypes
Note This BaseType is defined directly (as opposite to a derived BaseType)
Base ARObject, BaseTypeDefinition
Attribute Type Mult. Kind Note
baseType BaseTypeEncoding 0..1 attr This specifies, how an object of the current BaseType is
Encoding String encoded, e.g. in an ECU within a message sequence.
Tags:xml.sequenceOffset=90
baseTypeSize PositiveInteger 0..1 attr Describes the length of the data type specified in the
container in bits.
Tags:xml.sequenceOffset=70
byteOrder ByteOrderEnum 0..1 attr This attribute specifies the byte order of the base type.
Tags:xml.sequenceOffset=110
memAlignment PositiveInteger 0..1 attr This attribute describes the alignment of the memory
object in bits. E.g. "8" specifies, that the object in
question is aligned to a byte while "32" specifies that it is
aligned four byte. If the value is set to "0" the meaning
shall be interpreted as "unspecified".
Tags:xml.sequenceOffset=100
native NativeDeclarationString 0..1 attr This attribute describes the declaration of such a base
Declaration type in the native programming language, primarily in the
Programming language C. This can then be used by a
code generator to include the necessary declarations into
a header file. For example
BaseType with shortName: "MyUnsignedInt" native
Declaration: "unsigned short"
Results in
typedef unsigned short MyUnsignedInt;
If the attribute is not defined the referring Implementation
DataTypes will not be generated as a typedef by RTE.
If a nativeDeclaration type is given it shall fulfill the
characteristic given by basetypeEncoding and baseType
Size.
This is required to ensure the consistent handling and
interpretation by software components, RTE, COM and
MCM systems.
Tags:xml.sequenceOffset=120
Class ClientServerInterface
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note A client/server interface declares a number of operations that can be invoked on a server by a client.
Tags:atp.recommendedPackage=PortInterfaces
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
Identifiable, MultilanguageReferrable, PackageableElement, PortInterface, Referrable
Attribute Type Mult. Kind Note
operation ClientServerOperation * aggr ClientServerOperation(s) of this ClientServerInterface.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=blueprintDerivationTime
possibleError ApplicationError * aggr Application errors that are defined as part of this interface.
Class ClientServerOperation
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note An operation declared within the scope of a client/server interface.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mult. Kind Note
argument ArgumentDataPrototype * aggr An argument of this ClientServerOperation
(ordered)
Stereotypes: atpVariation
Tags:vh.latestBindingTime=blueprintDerivationTime
diagArgIntegrity Boolean 0..1 attr This attribute shall only be used in the implementation of
diagnostic routines to support the case where input and
output arguments are allocated in a shared buffer and
might unintentionally overwrite input arguments by
tentative write operations to output arguments.
This situation can happen during sliced execution or while
output parameters are arrays (call by reference). The
value true means that the ClientServerOperation is aware
of the usage of a shared buffer and takes precautions to
avoid unintentional overwrite of input arguments.
If the attribute does not exist or is set to false the Client
ServerOperation does not have to consider the usage of a
shared buffer.
possibleError ApplicationError * ref Possible errors that may by raised by the referring
operation.
Class ClientServerToSignalMapping
Package M2::AUTOSARTemplates::SystemTemplate::DataMapping
Note This element maps the ClientServerOperation to call- and return-SystemSignals.
Base ARObject, DataMapping
Attribute Type Mult. Kind Note
callSignal SystemSignal 1 ref Reference to the callSignal to which the IN and INOUT
ArgumentDataPrototypes are mapped.
5
4
Class ClientServerToSignalMapping
clientServer ClientServerOperation 1 iref Reference to a ClientServerOperation, which is mapped
Operation to a call SystemSignal and a return SystemSignal.
InstanceRef implemented by:OperationInSystem
InstanceRef
returnSignal SystemSignal 0..1 ref Reference to the returnSignal to which the OUT and
INOUT ArgumentDataPrototypes are mapped.
Class DataTransformation
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note A DataTransformation represents a transformer chain. It is an ordered list of transformers.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mult. Kind Note
data DataTransformationKind 0..1 attr This attribute controls the kind of DataTransformation to
Transformation Enum be applied.
Kind
executeDespite Boolean 1 attr Specifies whether the transformer chain is executed even
Data if no input data are available.
Unavailability
transformer Transformation 1..* ref This attribute represents the definition of a chain of
Chain (ordered) Technology transformers that are supposed to be executed according
to the order of being referenced from DataTransformation.
Enumeration DataTransformationErrorHandlingEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions
Note This enumeration defines different ways how a RunnableEntity shall handle transformer errors.
Literal Description
noTransformerError A runnable does not handle transformer errors.
Handling
Tags:atp.EnumerationLiteralIndex=0
transformerError The runnable implements the handling of transformer errors.
Handling
Tags:atp.EnumerationLiteralIndex=1
Class EcucModuleDef
Package M2::AUTOSARTemplates::ECUCParameterDefTemplate
Note Used as the top-level element for configuration definition for Software Modules, including BSW and RTE
as well as ECU Infrastructure.
Tags:atp.recommendedPackage=EcucModuleDefs
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpDefinition, CollectableElement, Ecuc
DefinitionElement, Identifiable, MultilanguageReferrable, PackageableElement, Referrable
Attribute Type Mult. Kind Note
apiServicePrefix CIdentifier 0..1 attr For CDD modules this attribute holds the apiService
Prefix.
The shortName of the module definition of a Complex
Driver is always "Cdd". Therefore for CDD modules the
module apiServicePrefix is described with this attribute.
container EcucContainerDef * aggr Aggregates the top-level container definitions of this
specific module definition.
Stereotypes: atpSplitable
Tags:
atp.Splitkey=container.shortName
xml.sequenceOffset=11
postBuildVariant Boolean 0..1 attr Indicates if a module supports different post-build variants
Support (previously known as post-build selectable configuration
sets). TRUE means yes, FALSE means no.
refinedModule EcucModuleDef 0..1 ref Optional reference from the Vendor Specific Module
Def Definition to the Standardized Module Definition it refines.
In case this EcucModuleDef has the category
STANDARDIZED_MODULE_DEFINITION this reference
shall not be provided. In case this EcucModuleDef has
the category VENDOR_SPECIFIC_MODULE_
DEFINITION this reference is mandatory.
Stereotypes: atpUriDef
supported EcucConfiguration * attr Specifies which ConfigurationVariants are supported by
ConfigVariant VariantEnum this software module. This attribute is optional if the Ecuc
ModuleDef has the category STANDARDIZED_
MODULE_DEFINITION. If the category attribute of the
EcucModuleDef is set to VENDOR_SPECIFIC_
MODULE_DEFINITION then this attribute is mandatory.
Class ISignal
Package M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication
Note Signal of the Interaction Layer. The RTE supports a "signal fan-out" where the same System Signal is
sent in different SignalIPdus to multiple receivers.
To support the RTE "signal fan-out" each SignalIPdu contains ISignals. If the same System Signal is to
be mapped into several SignalIPdus there is one ISignal needed for each ISignalToIPduMapping.
ISignals describe the Interface between the Precompile configured RTE and the potentially Postbuild
configured Com Stack (see ECUC Parameter Mapping).
In case of the SystemSignalGroup an ISignal shall be created for each SystemSignal contained in the
SystemSignalGroup.
Tags:atp.recommendedPackage=ISignals
Base ARObject, CollectableElement, FibexElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Attribute Type Mult. Kind Note
5
4
Class ISignal
data DataTransformation 0..1 ref Optional reference to a DataTransformation which
Transformation represents the transformer chain that is used to transform
the data that shall be placed inside this ISignal.
Stereotypes: atpSplitable; atpVariation
Tags:
atp.Splitkey=dataTransformation.dataTransformation,
dataTransformation.variationPoint.shortLabel
vh.latestBindingTime=codeGenerationTime
dataTypePolicy DataTypePolicyEnum 1 attr With the aggregation of SwDataDefProps an ISignal
specifies how it is represented on the network. This
representation follows a particular policy. Note that this
causes some redundancy which is intended and can be
used to support flexible development methodology as well
as subsequent integrity checks.
If the policy "networkRepresentationFromComSpec" is
chosen the network representation from the ComSpec
that is aggregated by the PortPrototype shall be used. If
the "override" policy is chosen the requirements specified
in the PortInterface and in the ComSpec are not fulfilled
by the networkRepresentationProps. In case the System
Description doesn’t use a complete Software Component
Description (VFB View) the "legacy" policy can be
chosen.
initValue ValueSpecification 0..1 aggr Optional definition of a ISignal’s initValue in case the
System Description doesn’t use a complete Software
Component Description (VFB View). This supports the
inclusion of legacy system signals.
This value can be used to configure the Signal’s "Init
Value".
If a full DataMapping exist for the SystemSignal this
information may be available from a configured Sender
ComSpec and ReceiverComSpec. In this case the
initvalues in SenderComSpec and/or ReceiverComSpec
override this optional value specification. Further
restrictions apply from the RTE specification.
iSignalProps ISignalProps 0..1 aggr Additional optional ISignal properties that may be stored
in different files.
Stereotypes: atpSplitable
Tags:atp.Splitkey=iSignalProps
iSignalType ISignalTypeEnum 0..1 attr This attribute defines whether this iSignal is an array that
results in a UINT8_N / UINT8_DYN ComSignalType in the
COM configuration or a primitive type.
length UnlimitedInteger 1 attr Size of the signal in bits. The size needs to be derived
from the mapped VariableDataPrototype according to the
mapping of primitive DataTypes to BaseTypes as used in
the RTE. Indicates maximum size for dynamic length
signals.
The ISignal length of zero bits is allowed.
network SwDataDefProps 0..1 aggr Specification of the actual network representation. The
Representation usage of SwDataDefProps for this purpose is restricted to
Props the attributes compuMethod and baseType. The optional
baseType attributes "memAllignment" and "byteOrder"
shall not be used.
The attribute "dataTypePolicy" in the SystemTemplate
element defines whether this network representation shall
be ignored and the information shall be taken over from
the network representation of the ComSpec.
5
4
Class ISignal
4
If "override" is chosen by the system integrator the
network representation can violate against the
requirements defined in the PortInterface and in the
network representation of the ComSpec.
In case that the System Description doesn’t use a
complete Software Component Description (VFB View)
this element is used to configure "ComSignalDataInvalid
Value" and the Data Semantics.
systemSignal SystemSignal 1 ref Reference to the System Signal that is supposed to be
transmitted in the ISignal.
timeout ValueSpecification 0..1 aggr Defines and enables the ComTimeoutSubstituition for this
Substitution ISignal.
Value
transformation TransformationISignal * aggr A transformer chain consists of an ordered list of
ISignalProps Props transformers. The ISignal specific configuration
properties for each transformer are defined in the
TransformationISignalProps class. The transformer
configuration properties that are common for all ISignals
are described in the TransformationTechnology class.
4
Class Identifiable (abstract)
4
Channel, PortElementToCommunicationResourceMapping, PortGroup, PortInterfaceMapping, Possible
ErrorReaction, ResourceConsumption, RootSwCompositionPrototype, RptComponent, RptContainer,
RptExecutableEntity, RptExecutableEntityEvent, RptExecutionContext, RptProfile, RptServicePoint, Rte
EventInCompositionSeparation, RteEventInCompositionToOsTaskProxyMapping, RteEventInSystem
Separation, RteEventInSystemToOsTaskProxyMapping, RunnableEntityGroup, SdgAttribute, SdgClass,
SecureCommunicationAuthenticationProps, SecureCommunicationFreshnessProps, SecurityEvent
ContextProps, ServerCallPoint, ServiceNeeds, SignalServiceTranslationElementProps, SignalService
TranslationEventProps, SignalServiceTranslationProps, SocketAddress, SomeipTpChannel, Spec
ElementReference, StackUsage, StaticSocketConnection, StructuredReq, SwGenericAxisParamType,
SwServiceArg, SwcServiceDependency, SwcToApplicationPartitionMapping, SwcToEcuMapping, SwcTo
ImplMapping, SystemMapping, TDCpSoftwareClusterMapping, TDCpSoftwareClusterResourceMapping,
TcpOptionFilterList, TimingCondition, TimingConstraint, TimingDescription, TimingExtensionResource,
TimingModeInstance, TlsCryptoCipherSuite, TlsCryptoCipherSuiteProps, Topic1, TpAddress, Traceable
Table, TraceableText, TracedFailure, TransformationProps, TransformationTechnology, Trigger, Variable
Access, VariationPointProxy, ViewMap, VlanConfig, WaitPoint
Attribute Type Mult. Kind Note
adminData AdminData 0..1 aggr This represents the administrative data for the identifiable
object.
Stereotypes: atpSplitable
Tags:
atp.Splitkey=adminData
xml.sequenceOffset=-40
annotation Annotation * aggr Possibility to provide additional notes while defining a
model element (e.g. the ECU Configuration Parameter
Values). These are not intended as documentation but
are mere design notes.
Tags:xml.sequenceOffset=-25
category CategoryString 0..1 attr The category is a keyword that specializes the semantics
of the Identifiable. It affects the expected existence of
attributes and the applicability of constraints.
Tags:xml.sequenceOffset=-50
desc MultiLanguageOverview 0..1 aggr This represents a general but brief (one paragraph)
Paragraph description what the object in question is about. It is only
one paragraph! Desc is intended to be collected into
overview tables. This property helps a human reader to
identify the object in question.
More elaborate documentation, (in particular how the
object is built or used) should go to "introduction".
Tags:xml.sequenceOffset=-60
introduction DocumentationBlock 0..1 aggr This represents more information about how the object in
question is built or is used. Therefore it is a
DocumentationBlock.
Tags:xml.sequenceOffset=-30
uuid String 0..1 attr The purpose of this attribute is to provide a globally
unique identifier for an instance of a meta-class. The
values of this attribute should be globally unique strings
prefixed by the type of identifier. For example, to include a
DCE UUID as defined by The Open Group, the UUID
would be preceded by "DCE:". The values of this attribute
may be used to support merging of different AUTOSAR
models. The form of the UUID (Universally Unique
Identifier) is taken from a standard defined by the Open
Group (was Open Software Foundation). This standard is
widely used, including by Microsoft for COM (GUIDs) and
by many companies for DCE, which is based on CORBA.
The method for generating these 128-bit IDs is published
5
4
Class Identifiable (abstract)
4
in the standard and the effectiveness and uniqueness of
the IDs is not in practice disputed. If the id namespace is
omitted, DCE is assumed. An example is
"DCE:2fac1234-31f8-11b4-a222-08002b34c003". The
uuid attribute has no semantic meaning for an AUTOSAR
model and there is no requirement for AUTOSAR tools to
manage the timestamp.
Tags:xml.attribute=true
4
Class Implementation (abstract)
requiredArtifact DependencyOnArtifact * aggr Specifies that this Implementation depends on the
existance of another artifact (e.g. a library). This
aggregation of DependencyOnArtifact is subject to
variability with the purpose to support variability in the
implementations. Different algorithms in the
implementation might cause different dependencies, e.g.
the number of used libraries.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
required DependencyOnArtifact * aggr Relates this Implementation to a generator tool in order to
GeneratorTool generate additional artifacts during integration.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
resource ResourceConsumption 0..1 aggr All static and dynamic resources for each implementation
Consumption are described within the ResourceConsumption class.
Stereotypes: atpSplitable
Tags:atp.Splitkey=resourceConsumption.shortName
swcBsw SwcBswMapping 0..1 ref This allows a mapping between an SWC and a BSW
Mapping behavior to be attached to an implementation description
(for AUTOSAR Service, ECU Abstraction and Complex
Driver Components). It is up to the methodology to define
whether this reference has to be set for the Swc- or Bsw
Implementtion or for both.
swVersion RevisionLabelString 0..1 attr Software version of this implementation. The numbering
contains three levels (like major, minor, patch), its values
are vendor specific.
usedCode String 0..1 attr Optional: code generator used.
Generator
vendorId PositiveInteger 0..1 attr Vendor ID of this Implementation according to the
AUTOSAR vendor list
Class ImplementationDataType
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note Describes a reusable data type on the implementation level. This will typically correspond to a typedef in
C-code.
Tags:atp.recommendedPackage=ImplementationDataTypes
Base ARElement, ARObject, AbstractImplementationDataType, AtpBlueprint, AtpBlueprintable, AtpClassifier ,
AtpType, AutosarDataType, CollectableElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Attribute Type Mult. Kind Note
dynamicArray String 0..1 attr Specifies the profile which the array will follow in case this
SizeProfile data type is a variable size array.
isStructWith Boolean 0..1 attr This attribute is only valid if the attribute category is set to
Optional STRUCTURE.
Element
If set to True, this attribute indicates that the
ImplementationDataType has been created with the
intention to define at least one element of the structure as
optional.
5
4
Class ImplementationDataType
subElement ImplementationData * aggr Specifies an element of an array, struct, or union data
(ordered) TypeElement type.
The aggregation of ImplementionDataTypeElement is
subject to variability with the purpose to support the
conditional existence of elements inside a Implementation
DataType representing a structure.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
symbolProps SymbolProps 0..1 aggr This represents the SymbolProps for the Implementation
DataType.
Stereotypes: atpSplitable
Tags:atp.Splitkey=symbolProps.shortName
typeEmitter NameToken 0..1 attr This attribute is used to control which part of the
AUTOSAR toolchain is supposed to trigger data type
definitions.
Table A.19: ImplementationDataType
Class ImplementationDataTypeElement
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note Declares a data object which is locally aggregated. Such an element can only be used within the scope
where it is aggregated.
This element either consists of further subElements or it is further defined via its swDataDefProps.
There are several use cases within the system of ImplementationDataTypes fur such a local declaration:
• It can represent the elements of an array, defining the element type and array size
• It can represent an element of a struct, defining its type
• It can be the local declaration of a debug element.
Base ARObject, AbstractImplementationDataTypeElement, AtpClassifier , AtpFeature, AtpStructureElement,
Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mult. Kind Note
arrayImplPolicy ArrayImplPolicyEnum 0..1 attr This attribute controls the implementation of the payload
of an array. It shall only be used if the enclosing
ImplementationDataType constitutes an array.
arraySize PositiveInteger 0..1 attr The existence of this attributes (if bigger than 0) defines
the size of an array and declares that this Implementation
DataTypeElement represents the type of each single
array element.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
arraySize ArraySizeHandling 0..1 attr The way how the size of the array is handled in case of a
Handling Enum variable size array.
arraySize ArraySizeSemantics 0..1 attr This attribute controls the meaning of the value of the
Semantics Enum array size.
isOptional Boolean 0..1 attr This attribute represents the ability to declare the
enclosing ImplementationDataTypeElement as optional.
This means that, at runtime, the ImplementationDataType
Element may or may not have a valid value and shall
therefore be ignored.
The underlying runtime software provides means to set
the CppImplementationDataTypeElement as not valid at
the sending end of a communication and determine its
validity at the receiving end.
5
4
Class ImplementationDataTypeElement
subElement ImplementationData * aggr Element of an array, struct, or union in case of a nested
(ordered) TypeElement declaration (i.e. without using "typedefs").
The aggregation of ImplementionDataTypeElement is
subject to variability with the purpose to support the
conditional existence of elements inside a Implementation
DataType representing a structure.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
swDataDef SwDataDefProps 0..1 aggr The properties of this ImplementationDataTypeElement.
Props
4
Class InternalBehavior (abstract)
exclusiveArea ExclusiveArea * aggr This specifies an ExclusiveArea for this InternalBehavior.
The exclusiveArea is local to the component resp.
module. The aggregation of ExclusiveAreas is subject to
variability. Note: the number of ExclusiveAreas might vary
due to the conditional existence of RunnableEntities or
BswModuleEntities.
Stereotypes: atpSplitable; atpVariation
Tags:
atp.Splitkey=exclusiveArea.shortName, exclusive
Area.variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
exclusiveArea ExclusiveAreaNesting * aggr This represents the set of ExclusiveAreaNestingOrder
NestingOrder Order owned by the InternalBehavior.
Stereotypes: atpSplitable; atpVariation
Tags:
atp.Splitkey=exclusiveAreaNestingOrder.shortName,
exclusiveAreaNestingOrder.variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
staticMemory VariableDataPrototype * aggr Describes a read and writeable static memory object
representing measurerment variables implemented by
this software component. The term "static" is used in the
meaning of "non-temporary" and does not necessarily
specify a linker encapsulation. This kind of memory is
only supported if supportsMultipleInstantiation is FALSE.
The shortName of the VariableDataPrototype has to be
equal with the ”C’ identifier of the described variable.
The aggregation of staticMemory is subject to variability
with the purpose to support variability in the software
component’s implementations.
Typically different algorithms in the implementation are
requiring different number of memory objects.
Stereotypes: atpSplitable; atpVariation
Tags:
atp.Splitkey=staticMemory.shortName, static
Memory.variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
Class PortAPIOption
Package M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions
Note Options how to generate the signatures of calls for an AtomicSwComponentType in order to
communicate over a PortPrototype (for calls into a RunnableEntity as well as for calls from a Runnable
Entity to the PortPrototype).
Base ARObject
Attribute Type Mult. Kind Note
enableTake Boolean 0..1 attr If set to true, the software-component is able to use the
Address API reference for deriving a pointer to an object.
errorHandling DataTransformation 0..1 attr This specifies whether a RunnableEntity accessing a Port
ErrorHandlingEnum Prototype that is referenced by this PortAPIOption shall
specifically handle transformer errors or not.
5
4
Class PortAPIOption
indirectAPI Boolean 0..1 attr If set to true this attribute specifies an "indirect API" to be
generated for the associated port which means that the
software-component is able to access the actions on a
port via a pointer to an object representing a port. This
allows e.g. iterating over ports in a loop. This option has
no effect for PPortPrototypes of client/server interfaces.
port PortPrototype 0..1 ref The option is valid for generated functions related to
communication over this port
portArgValue PortDefinedArgument * aggr An argument value defined by this port.
(ordered) Value
supported SwcSupportedFeature * aggr This collection specifies which features are supported by
Feature the RunnableEntitys which access a PortPrototype that it
referenced by this PortAPIOption.
transformer DataTransformation 0..1 attr This specifies whether a RunnableEntity accessing a Port
Status StatusForwardingEnum Prototype that is referenced by this PortAPIOption shall
Forwarding be able to forward a status to the transformer chain.
Class PortDefinedArgumentValue
Package M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions
Note A PortDefinedArgumentValue is passed to a RunnableEntity dealing with the ClientServerOperations
provided by a given PortPrototype. Note that this is restricted to PPortPrototypes of a ClientServer
Interface.
Base ARObject
Attribute Type Mult. Kind Note
value ValueSpecification 0..1 aggr Specifies the actual value.
valueType ImplementationData 0..1 tref The implementation type of this argument value. It should
Type not be composite type or a pointer.
Stereotypes: isOfType
Class SOMEIPTransformationProps
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note The class SOMEIPTransformationProps specifies SOME/IP specific configuration properties.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable, TransformationProps
Attribute Type Mult. Kind Note
alignment PositiveInteger 0..1 attr Defines the padding for alignment purposes that will be
added by the SOME/IP transformer after the serialized
data of the variable data length data element. The
alignment shall be specified in Bits.
sizeOfArray PositiveInteger 0..1 attr This attribute describes the size of the length field (in
LengthField Bytes) that will be put in front of the referenced Array in
the SOME/IP message.
sizeOfString PositiveInteger 0..1 attr This attribute describes the size of the length field (in
LengthField Bytes) that will be put in front of the referenced String in
the SOME/IP message.
sizeOfStruct PositiveInteger 0..1 attr This attribute describes the size of the length field (in
LengthField Bytes) that will be put in front of a Structure in the SOME/
IP message.
5
4
Class SOMEIPTransformationProps
sizeOfUnion PositiveInteger 0..1 attr This attribute describes the size of the length field (in
LengthField Bytes) that will be put in front of a Union in the SOME/IP
message.
Enumeration SOMEIPTransformerSessionHandlingEnum
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note Enables or disable session handling for SOME/IP transformer
Literal Description
sessionHandling The SOME/IP Transformer shall use session handling
Active
Tags:atp.EnumerationLiteralIndex=0
sessionHandling The SOME/IP Transformer doesn’t use session handling
Inactive
Tags:atp.EnumerationLiteralIndex=1
Class SenderReceiverInterface
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note A sender/receiver interface declares a number of data elements to be sent and received.
Tags:atp.recommendedPackage=PortInterfaces
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
DataInterface, Identifiable, MultilanguageReferrable, PackageableElement, PortInterface, Referrable
Attribute Type Mult. Kind Note
dataElement VariableDataPrototype * aggr The data elements of this SenderReceiverInterface.
invalidation InvalidationPolicy * aggr InvalidationPolicy for a particular dataElement
Policy
metaDataItem MetaDataItemSet * aggr This aggregation defines fixed sets of meta-data items
Set associated with dataElements of the enclosing Sender
ReceiverInterface
Table A.26: SenderReceiverInterface
Class SenderReceiverToSignalMapping
Package M2::AUTOSARTemplates::SystemTemplate::DataMapping
Note Mapping of a sender receiver communication data element to a signal.
Base ARObject, DataMapping
Attribute Type Mult. Kind Note
dataElement VariableDataPrototype 1 iref Reference to the data element.
InstanceRef implemented by:VariableDataPrototypeIn
SystemInstanceRef
senderToSignal TextTableMapping 0..1 aggr This mapping allows for the text-table translation between
TextTable the sending DataPrototype that is defined in the Port
Mapping Prototype and the physicalProps defined for the System
Signal.
5
4
Class SenderReceiverToSignalMapping
signalTo TextTableMapping 0..1 aggr This mapping allows for the text-table translation between
ReceiverText the physicalProps defined for the SystemSignal and a
TableMapping receiving DataPrototype that is defined in the Port
Prototype.
systemSignal SystemSignal 1 ref Reference to the system signal used to carry the data
element.
Table A.27: SenderReceiverToSignalMapping
Class SwBaseType
Package M2::MSR::AsamHdo::BaseTypes
Note This meta-class represents a base type used within ECU software.
Tags:atp.recommendedPackage=BaseTypes
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, BaseType, CollectableElement, Identifiable,
MultilanguageReferrable, PackageableElement, Referrable
Attribute Type Mult. Kind Note
– – – – –
Table A.28: SwBaseType
4
Class <<atpVariation>> SwDataDefProps
additionalNative NativeDeclarationString 0..1 attr This attribute is used to declare native qualifiers of the
TypeQualifier programming language which can neither be deduced
from the baseType (e.g. because the data object
describes a pointer) nor from other more abstract
attributes. Examples are qualifiers like "volatile", "strict" or
"enum" of the C-language. All such declarations have to
be put into one string.
Tags:xml.sequenceOffset=235
annotation Annotation * aggr This aggregation allows to add annotations (yellow pads
...) related to the current data object.
Tags:
xml.roleElement=true
xml.roleWrapperElement=true
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
baseType SwBaseType 0..1 ref Base type associated with the containing data object.
Tags:xml.sequenceOffset=50
compuMethod CompuMethod 0..1 ref Computation method associated with the semantics of
this data object.
Tags:xml.sequenceOffset=180
dataConstr DataConstr 0..1 ref Data constraint for this data object.
Tags:xml.sequenceOffset=190
displayFormat DisplayFormatString 0..1 attr This property describes how a number is to be rendered
e.g. in documents or in a measurement and calibration
system.
Tags:xml.sequenceOffset=210
display DisplayPresentation 0..1 attr This attribute controls the presentation of the related data
Presentation Enum for measurement and calibration tools.
implementation AbstractImplementation 0..1 ref This association denotes the ImplementationDataType of
DataType DataType a data declaration via its aggregated SwDataDefProps. It
is used whenever a data declaration is not directly
referring to a base type. Especially
• redefinition of an ImplementationDataType via a
"typedef" to another ImplementationDatatype
• the target type of a pointer (see SwPointerTarget
Props), if it does not refer to a base type directly
• the data type of an array or record element within
an ImplementationDataType, if it does not refer to
a base type directly
• the data type of an SwServiceArg, if it does not
refer to a base type directly
Tags:xml.sequenceOffset=215
invalidValue ValueSpecification 0..1 aggr Optional value to express invalidity of the actual data
element.
Tags:xml.sequenceOffset=255
stepSize Float 0..1 attr This attribute can be used to define a value which is
added to or subtracted from the value of a DataPrototype
when using up/down keys while calibrating.
5
4
Class <<atpVariation>> SwDataDefProps
swAddrMethod SwAddrMethod 0..1 ref Addressing method related to this data object. Via an
association to the same SwAddrMethod it can be
specified that several DataPrototypes shall be located in
the same memory without already specifying the memory
section itself.
Tags:xml.sequenceOffset=30
swAlignment AlignmentType 0..1 attr The attribute describes the intended typical alignment of
the DataPrototype. If the attribute is not defined the
alignment is determined by the swBaseType size and the
memoryAllocationKeywordPolicy of the referenced Sw
AddrMethod.
Tags:xml.sequenceOffset=33
swBit SwBitRepresentation 0..1 aggr Description of the binary representation in case of a bit
Representation variable.
Tags:xml.sequenceOffset=60
swCalibration SwCalibrationAccess 0..1 attr Specifies the read or write access by MCD tools for this
Access Enum data object.
Tags:xml.sequenceOffset=70
swCalprmAxis SwCalprmAxisSet 0..1 aggr This specifies the properties of the axes in case of a
Set curve or map etc. This is mainly applicable to calibration
parameters.
Tags:xml.sequenceOffset=90
swComparison SwVariableRefProxy * aggr Variables used for comparison in an MCD process.
Variable
Tags:
xml.sequenceOffset=170
xml.typeElement=false
swData SwDataDependency 0..1 aggr Describes how the value of the data object has to be
Dependency calculated from the value of another data object (by the
MCD system).
Tags:xml.sequenceOffset=200
swHostVariable SwVariableRefProxy 0..1 aggr Contains a reference to a variable which serves as a
host-variable for a bit variable. Only applicable to bit
objects.
Tags:
xml.sequenceOffset=220
xml.typeElement=false
swImplPolicy SwImplPolicyEnum 0..1 attr Implementation policy for this data object.
Tags:xml.sequenceOffset=230
swIntended Numerical 0..1 attr The purpose of this element is to describe the requested
Resolution quantization of data objects early on in the design
process.
The resolution ultimately occurs via the conversion
formula present (compuMethod), which specifies the
transition from the physical world to the standardized
world (and vice-versa) (here, "the slope per bit" is present
implicitly in the conversion formula).
In the case of a development phase without a fixed
conversion formula, a pre-specification can occur through
swIntendedResolution.
The resolution is specified in the physical domain
according to the property "unit".
Tags:xml.sequenceOffset=240
5
4
Class <<atpVariation>> SwDataDefProps
swInterpolation Identifier 0..1 attr This is a keyword identifying the mathematical method to
Method be applied for interpolation. The keyword needs to be
related to the interpolation routine which needs to be
invoked.
Tags:xml.sequenceOffset=250
swIsVirtual Boolean 0..1 attr This element distinguishes virtual objects. Virtual objects
do not appear in the memory, their derivation is much
more dependent on other objects and hence they shall
have a swDataDependency .
Tags:xml.sequenceOffset=260
swPointerTarget SwPointerTargetProps 0..1 aggr Specifies that the containing data object is a pointer to
Props another data object.
Tags:xml.sequenceOffset=280
swRecord SwRecordLayout 0..1 ref Record layout for this data object.
Layout
Tags:xml.sequenceOffset=290
swRefresh MultidimensionalTime 0..1 aggr This element specifies the frequency in which the object
Timing involved shall be or is called or calculated. This timing
can be collected from the task in which write access
processes to the variable run. But this cannot be done by
the MCD system.
So this attribute can be used in an early phase to express
the desired refresh timing and later on to specify the real
refresh timing.
Tags:xml.sequenceOffset=300
swTextProps SwTextProps 0..1 aggr the specific properties if the data object is a text object.
Tags:xml.sequenceOffset=120
swValueBlock Numerical 0..1 attr This represents the size of a Value Block
Size
Stereotypes: atpVariation
Tags:
vh.latestBindingTime=preCompileTime
xml.sequenceOffset=80
swValueBlock Numerical * attr This attribute is used to specify the dimensions of a value
SizeMult block (VAL_BLK) for the case that that value block has
(ordered) more than one dimension.
The dimensions given in this attribute are ordered such
that the first entry represents the first dimension, the
second entry represents the second dimension, and so
on.
For one-dimensional value blocks the attribute swValue
BlockSize shall be used and this attribute shall not exist.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=preCompileTime
unit Unit 0..1 ref Physical unit associated with the semantics of this data
object. This attribute applies if no compuMethod is
specified. If both units (this as well as via compuMethod)
are specified the units shall be compatible.
Tags:xml.sequenceOffset=350
valueAxisData ApplicationPrimitive 0..1 ref The referenced ApplicationPrimitiveDataType represents
Type DataType the primitive data type of the value axis within a
compound primitive (e.g. curve, map). It supersedes
CompuMethod, Unit, and BaseType.
Tags:xml.sequenceOffset=355
Class SwTextProps
Package M2::MSR::DataDictionary::DataDefProperties
Note This meta-class expresses particular properties applicable to strings in variables or calibration
parameters.
Base ARObject
Attribute Type Mult. Kind Note
arraySize ArraySizeSemantics 0..1 attr This attribute controls the semantics of the arraysize for
Semantics Enum the array representing the string in an Implementation
DataType.
It is there to support a safe conversion between
ApplicationDatatype and ImplementationDatatype, even
for variable length strings as required e.g. for Support of
SAE J1939.
baseType SwBaseType 0..1 ref This is the base type of one character in the string. In
particular this baseType denotes the intended encoding of
the characters in the string on level of ApplicationData
Type.
Tags:xml.sequenceOffset=30
swFillCharacter Integer 0..1 attr Filler character for text parameter to pad up to the
maximum length swMaxTextSize.
The value will be interpreted according to the encoding
specified in the associated base type of the data object,
e.g. 0x30 (hex) represents the ASCII character zero as
filler character and 0 (dec) represents an end of string as
filler character.
The usage of the fill character depends on the arraySize
Semantics.
Tags:xml.sequenceOffset=40
swMaxTextSize Integer 0..1 attr Specifies the maximum text size in characters. Note the
size in bytes depends on the encoding in the
corresponding baseType.
Stereotypes: atpVariation
Tags:
vh.latestBindingTime=preCompileTime
xml.sequenceOffset=20
Class SystemSignal
Package M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication
Note The system signal represents the communication system’s view of data exchanged between SW
components which reside on different ECUs. The system signals allow to represent this communication
in a flattened structure, with exactly one system signal defined for each data element prototype sent and
received by connected SW component instances.
Tags:atp.recommendedPackage=SystemSignals
Base ARElement, ARObject, CollectableElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Attribute Type Mult. Kind Note
dynamicLength Boolean 1 attr The length of dynamic length signals is variable in
run-time. Only a maximum length of such a signal is
specified in the configuration (attribute length in ISignal
element).
5
4
Class SystemSignal
physicalProps SwDataDefProps 0..1 aggr Specification of the physical representation.
Class TransformationTechnology
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note A TransformationTechnology is a transformer inside a transformer chain.
Tags:xml.namePlural=TRANSFORMATION-TECHNOLOGIES
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mult. Kind Note
bufferProperties BufferProperties 1 aggr Aggregation of the mandatory BufferProperties.
hasInternal Boolean 0..1 attr This attribute defines whether the Transformer has an
State internal state or not.
needsOriginal Boolean 0..1 attr Specifies whether this transformer gets access to the
Data SWC’s original data.
protocol String 1 attr Specifies the protocol that is implemented by this
transformer.
transformation Transformation 0..1 aggr A transformer can be configured with transformer specific
Description Description parameters which are represented by the Transformer
Description.
Stereotypes: atpVariation
Tags:vh.latestBindingTime=postBuild
transformer TransformerClassEnum 1 attr Specifies to which transformer class this transformer
Class belongs.
version String 1 attr Version of the implemented protocol.
Class TriggerToSignalMapping
Package M2::AUTOSARTemplates::SystemTemplate::DataMapping
Note This meta-class represents the ability to map a trigger to a SystemSignal of size 0. The Trigger does not
transport any other information than its existence, therefore the limitation in terms of signal length.
Base ARObject, DataMapping
Attribute Type Mult. Kind Note
systemSignal SystemSignal 1 ref This is the SystemSignal taken to transport the Trigger
over the network.
Tags:xml.sequenceOffset=20
trigger Trigger 1 iref This represents the Trigger that shall be used to trigger
RunnableEntities deployed to a remote ECU.
Tags:xml.sequenceOffset=10
InstanceRef implemented by:TriggerInSystemInstance
Ref
Table A.34: TriggerToSignalMapping
C Examples
This appendix contains examples which are suitable to help understanding details of
the SOME/IP Transformer.
Name SomeCSInterface
Comment A ClientServerInterface which contains anything needed to show
serialization of ClientServerOperations by SOME/IP Transformer.
IsService false
Variation –
Possible Errors 0 E_OK
1 E_DATA_INCONSISTENT
2 E_UNKNOWN_ERROR
Operations
Name SomeCSOperation
Comments The ClientServerOperation which is used to demonstrate how the SOME/IP
serialization for Client/Sever communication works
Variation –
Parameters inputParam1
C.1.1 Client
The RTE executes for the serialization of the request the SOME/IP Transformer with
the following API which is specified in [SWS_SomeIpXf_00141]:
uint8 SomeIpXf_CSOpSerializer
(const Rte_Cs_TransactionHandleType *TransactionHandle,
uint8 *buffer,
uint16 *bufferLength,
uint8 inputParam1,
uint16 inputParam2,
someStruct biDirectionalParam)
This function will serialize the TransactionHandle and all IN/INOUT parameters for
the request into the following format:
input
SOME/IP Header Param1
inputParam2 biDirectionalParam
C.1.2 Server
For the deserialization of the received request, the SOME/IP Transformer on the server
side, provides according to [SWS_SomeIpXf_00141] this C-API:
uint8 SomeIpXf_Inv_CSOpSerializer
(Rte_Cs_TransactionHandleType *TransactionHandle,
const uint8 *buffer,
uint16 bufferLength,
uint8 *inputParam1,
uint16 *inputParam2,
someStruct *biDirectionalParam)
This function will serialize the TransactionHandle, the returnValue and all IN-
OUT/OUT parameters for the response into the following format: