SOME/IP-Return Code

Return Code返回代码

  • The Error Handling is based on an 8 Bit Std_returnType of AUTOSAR. The two most significant bits are reserved and shall be set to 0. The receiver of a return code shall ignore the values of the two most significant bits.
    错误处理基于AUTOSAR的8位Std_returnType。两个最高有效位保留,并应设置为0.接收返回代码时应忽略两个最高有效位的值。

  • The system shall not return an error message for events/notifications.
    系统不应针对events/notification返回错误消息。

  • The system shall not return an error message for fire&forget methods.
    系统不应针对fire&forget method返回错误消息。

  • The system shall not return an error message for events/notifications and fire&forget methods if the Message Type is set incorrectly to Request or Response.
    如果消息类型被不正确地设置为Request or Response ,则系统也不应返回错误消息给events/notification 和 fire&forget method。

  • For request/response methods the error message shall copy over the fields of the SOME/IP header (i.e. Message ID, Request ID, and Interface Version) but not the payload. In addition Message Type and Return Code have to be set to the appropriate values.
    对于Request/Response method, error消息应复制SOME / IP header(比如消息ID,请求ID和接口版本),但不包括payload。此外,必须将Message Type 和Return Code设置为适当的值。
    在这里插入图片描述

  • The SOME/IP implementation shall not use an unknown protocol version but write a supported protocol version in the header.
    实施SOME / IP不应使用未知protocol version ,而是在header中写入支持的协议版本。

  • Generation and handling of return codes shall be configurable.
    返回码的生成和处理应该是可配置的。

  • Implementations shall not answer with errors to SOME/IP message already carrying an error (i.e. return code 0x01 - 0x1f).
    在实现上,不应用含有error的SOME/IP消息去回复已经携带了error的消息(比如. 返回码 0x01 - 0x1f)。

  • The following Return Codes are currently defined and shall be implemented as described:
    目前定义了以下返回代码,应按如下描述进行实施:

IDNameDescription
0x00E_OKNo error occurred
0x01E_NOT_OKAn unspecified error occurred
0x02E_UNKNOWN_SERVICEThe requested Service ID is unknown.
0x03E_UNKNOWN_METHODThe requested Method ID is unknown. Service ID is known.
0x04E_NOT_READYService ID and Method ID are known. Application not running.
0x05E_NOT_REACHABLESystem running the service is not reachable (internal error code only).
0x06E_TIMEOUTA timeout occurred (internal error code only).
0x07E_WRONG_PROTOCOL_ VERSIONVersionofSOME/IPprotocolnotsupported
0x08E_WRONG_INTERFACE_ VERSIONInterface version mismatch
0x09E_MALFORMED_MESSAGEDeserialization error, so that payload cannot be deserialized.
0x0aE_WRONG_MESSAGE_TYPEAn unexpected message type was received (e.g. REQUEST_NO_RETURN for a method defined as REQUEST.)
0x0b - 0x1fRESERVEDReserved for generic SOME/IP errors. These errors will be specified in future versions of this document.
0x20 - 0x3fRESERVEDReservedforspecificerrorsofservicesand methods. These errors are specified by the interface specification.

Error Message Format错误消息格式

  • For a more flexible error handling, SOME/IP allows the user to specify a message layout specific for errors instead of using the message layout for response messages. This is defined by the interface specification and can be used to transport exceptions of higher level programming languages.
    为了实现更灵活的error处理,SOME / IP允许用户指定专门的error message布局,而不是沿用response message的布局。 这由接口规范定义,可用于传输更高级编程语言的异常。
  • The recommended layout for the exception message is the following:
    异常消息的推荐布局如下:
    -Union of specific exceptions. At least a generic exception without fields needs to exist.
    特定异常的union。至少存在一个没有字段的通用异常。
    -Dynamic Length String for exception description.
    动态长度字符串用于异常描述。
  • The union gives the flexibility to add new exceptions in the future in a type-safe manner. The string is used to transport human readable exception descriptions to ease testing and debugging.
    union提供了以type-safe方式在将来添加新异常的灵活性。 该字符串用于传输具有可读性的异常描述,以便于测试和调试。
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值