SNIP_CLASSIC_STD_SECTION_8_3_1_SomeIpXf_ExtractProtocolHeaderFields
Wortlaut
8.3.1 SomeIpXf_ExtractProtocolHeaderFields
[SWS_SomeIpXf_91001] Definition of API function SomeIpXf_ExtractProtocol
HeaderFields ⌈
Service Name
SomeIpXf_ExtractProtocolHeaderFields
Syntax
Std_ReturnType SomeIpXf_ExtractProtocolHeaderFields (
const uint8* buffer,
uint32 bufferLength,
Std_MessageTypeType* messageType,
Std_MessageResultType* messageResult
)
Service ID [hex]
0x05
Sync/Async
Synchronous
Reentrancy
Reentrant
buffer
Buffer allocated by the RTE, where the transformed data has to
be stored by the transformer.
Parameters (in)
bufferLength
Length of the buffer
Parameters (inout)
None
messageType
Canonical representation of the message type (extracted from the
transformers protocol header).
Parameters (out)
messageResult
Canonical representation of the message result type (extracted
from the transformers protocol header).
Return value
Std_ReturnType
E_OK: Relevant protocol header fields have been extracted
successfully.
E_NOT_OK: An error occurred during parsing of the SOME/IP
protocol header (e.g., incorrect protocol version or insufficient
buffer length (bufferLength smaller than minimal SOME/IPheader
length))
Description
Function to extract the relevant SOME/IP protocol header fields of the message and the type of
the message result. - At the time being, this is limited to the types used for C/S communication
(i.e., REQUEST and RESPONSE and OK and ERROR).
Available via
SomeIpXf.h
⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00296] ⌈The function SomeIpXf_ExtractProtocolHeaderFields 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 information in a canonical representation via its output arguments.⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00297] ⌈The function SomeIpXf_ExtractProtocolHeaderFields 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.⌋
(SRS_Xfrm_00002)
[SWS_SomeIpXf_00298] ⌈The function SomeIpXf_ExtractProtocolHeaderFields 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. Neither messageType nor messageResult shall be modified in this case.⌋(SRS_Xfrm_-
00002)
[SWS_SomeIpXf_00299] ⌈The function SomeIpXf_ExtractProtocolHeaderFields specified in [SWS_SomeIpXf_91001] shall check whether the value of the
Message Type field (see [PRS_SOMEIP_00055]) is equal REQUEST, RESPONSE, or
ERROR. – If this is not the case, E_NOT_OK shall be returned. Neither messageType
nor messageResult shall be modified in this case.⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00301] ⌈The function SomeIpXf_ExtractProtocolHeaderFields specified in [SWS_SomeIpXf_91001] shall return E_OK in all other cases.⌋
(SRS_Xfrm_00002)
[SWS_SomeIpXf_00302]
⌈The
function
SomeIpXf_ExtractProtocolHeaderFields
specified
in
[SWS_SomeIpXf_91001]
shall
set
messageType
to
STD_MESSAGETYPE_REQUEST in case the value of the Message Type field (see
[PRS_SOMEIP_00055]) is equal REQUEST.⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00303]
⌈The
function
SomeIpXf_ExtractProtocolHeaderFields
specified
in
[SWS_SomeIpXf_91001]
shall
set
messageType
to
STD_MESSAGETYPE_RESPONSE in case the value of the Message Type field
(see [PRS_SOMEIP_00055]) is equal RESULT or ERROR.⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00304] ⌈The function SomeIpXf_ExtractProtocolHeaderFields
specified
in
[SWS_SomeIpXf_91001]
shall
set
messageResult
to
STD_MESSAGERESULT_ERROR in case the value of the Message Type field (see
[PRS_SOMEIP_00055]) is equal to ERROR or if the value of the Return Code field
(see [PRS_SOMEIP_00058]) is different from 0.⌋(SRS_Xfrm_00002)
[SWS_SomeIpXf_00305] ⌈The function SomeIpXf_ExtractProtocolHeaderFields
specified
in
[SWS_SomeIpXf_91001]
shall
set
messageResult
to
STD_MESSAGERESULT_OK otherwise (i.e., in case the value of the Message Type field
(see [PRS_SOMEIP_00055]) is different from ERROR and if the value of the Return
Code field (see [PRS_SOMEIP_00058]) is 0.⌋(SRS_Xfrm_00002)
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Generic transformer header extraction specification
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_SOMEIPTransformer.pdf |
|---|---|
| Dokumentseite | Seite 61 |
| Ziel-Modul | std (classic) |
| Ziel-Anforderung | SWS_Xfrm_91002 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.80 |