SOME/IP报文格式-Message Type

在这里插入图片描述
Message Type [8 Bit]

  • The Message Type field is used to differentiate different types of messages and shall contain the following values:
    Message Type用来区别不同类型的message,且应当包含如下的值:
NumberValueDescription
0x00REQUESTA request expecting a response (even void)
0x01REQUEST_NO_RETURNA fire&forget request
0x02NOTIFICATIONA request of a notification/event callback expecting no response
0x40REQUEST_ACKAcknowledgment for REQUEST (optional)
0x41REQUEST_NO_RETURN_ACKAcknowledgment for REQUEST_NO_RETURN (informational)
0x42NOTIFICATION_ACKAcknowledgment for NOTIFICATION (informational)
0x80RESPONSEThe response message
0x81ERRORThe response containing an error
0xC0RESPONSE_ACKThe Acknowledgment for RESPONSE (informational)
0xC1ERROR_ACAcknowledgment for ERROR (informational)
  • Regular request (message type 0x00) will be answered by a response (message type 0x80), when no error occurred. If errors occur an error message (message type 0x81) will be sent. It is also possible to send a request that does not have a response message(message type 0x01). For updating values through notification a callback interface exists (message type 0x02).
    常规request(消息类型0x00)将在未发生错误时由response(消息类型0x80)应答。如果发生错误,则会发送error消息(消息类型0x81)。 也可以发送不需要响应消息的请求(消息类型0x01)。为了通过notification更新值,存在一个callback接口(消息类型0x02)。

  • For all messages an optional acknowledgment (ACK) exists. These care is defined for transport protocols (i.e. UDP) that do not acknowledge a received message. ACKs are only transported when the interface specification requires it. Only the usage of the REQUEST_ACK is currently specified in this document. All other ACKs are currently informational and do not need to be implemented.
    对于所有消息,存在可选的acknowledgment 报文(ACK) 。 这是为那些并不告知收到消息的某些传输层协议(如UDP)而定义的。 ACK只在interface specification要求时才被传输。 本文档中仅规定了REQUEST_ACK的用法。 所有其他ACK现在都是信息性的,不需要实施。

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SOME/IP(Scalable service-Oriented MiddlewarE over IP)协议是一种用于汽车领域通信的协议,它使用了UDP协议进行通信。SOME/IP报文格式如下: ``` +--------+--------+--------+--------+ | Message ID (16 bit) | +--------+--------+--------+--------+ | Message Type (8 bit) | +--------+--------+--------+--------+ | Return Code (8 bit) | +--------+--------+--------+--------+ | Payload Length (16 bit) | +--------+--------+--------+--------+ | Client ID (16 bit) | +--------+--------+--------+--------+ | Session ID (16 bit) | +--------+--------+--------+--------+ | Protocol Version (8 bit) | +--------+--------+--------+--------+ | Interface Version (8 bit) | +--------+--------+--------+--------+ | Message Type Info (8 bit) | +--------+--------+--------+--------+ | Method ID (16 bit) | +--------+--------+--------+--------+ | Client Reserved (16 bit) | +--------+--------+--------+--------+ | Data | | (variable length, optional) | +--------+--------+--------+--------+ ``` 以上是SOME/IP报文的基本格式,各字段含义如下: - Message ID:消息ID,由发送方分配,用于标识消息。 - Message Type:消息类型,用于描述消息的类型,如请求、响应、通知等。 - Return Code:返回码,用于标识请求是否成功执行。 - Payload Length:负载长度,表示消息体的长度。 - Client ID:客户端ID,用于标识客户端。 - Session ID:会话ID,用于标识会话。 - Protocol Version:协议版本,用于标识SOME/IP协议的版本。 - Interface Version:接口版本,用于标识服务接口的版本。 - Message Type Info:消息类型信息,用于描述消息的详细类型。 - Method ID:方法ID,用于标识服务接口中的方法。 - Client Reserved:客户端保留字段,用于标识客户端特殊需求。 - Data:数据部分,实际传输的数据。 需要注意的是,SOME/IP的消息头部是固定长度的,而消息体部分是可变长度的,根据不同的服务接口和方法,消息体部分的内容也会有所不同。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值