Autosar udp网络管理的翻译

文件名是:AUTOSAR_PRS_UDPNetworkManagementProtocol.pdf

1 Introduction and overview

本篇说明主要详细说明了Autosar UDP网络(UdpNm)的operational states, message format and semantics。

UdpNm可以与TCP/IP协议栈完美结合,也就是说不考虑同TCP/IP协议栈分离的物理层。

UdpNm是同硬件无关的协议,它可以在基于TCP/IP的系统上运行。UdpNm的主要目的是协调网络的normal operation and bus-sleep mode之间的通信。

而且它提供了一种可以检测当前所有节点的状态或者说是检测节点是否进入sleep状态的服务,该服务包含了一些核心并可供选择的特性。

在这里插入图片描述

1.1 Limitations

  1. 在NM-Cluster中,一个UdpNm对应一个NM-Cluster,一个节点对应一个UdpNm。
  2. UdpNm只能应用在基于TCP/IP的系统中。

1.2 Dependencies to other protocol layers

UdpNm使用TCP/IP去发送和接收NM messages。

1.3 Dependencies to the upper layers

Upper layer使用UdpNm服务控制发送和接收NM messages功能的开关。

此外,upper layers利用这些接口可以知道UdpNm operational modes的变化。

2 Use Cases

No use case in UdpNm_PRS document.

3 Requirements Traceability

pass

4 Definition of terms and acronyms

在这里插入图片描述

5 Protocol specification

5.1 Network management algorithm

AUTOSAR UdpNm是去中心化的,所以每一个网络节点是同等的。

AUTOSAR UdpNm algorithm主要基于周期性发送NM packets。NM packets是广播发送的,所以每个节点都能监听到。只要有节点发送NM packets就说明NM-cluster目前是wake态,或者说不让它进入sleep状态。如果有节点想要进入sleep,则需要停止发送NM packets。但是如果收到了其他节点发来的NM packets,必须推迟进入sleep。最后,如果经过一段时间,节点没有收到NM packets,所有的节点从transmition进入到sleep modes。

如果有节点需要进行bus-communication,它可以通过发送NM packets保持NM-cluster awake状态。

对于每一个节点,只要需要进行bus-communication,都得周期性发送NM messages。除了需要进行bus-communication之外,其他的情况都不要发送NM messages。

5.2 Network states

AUTOSAR UdpNm的Network states类似于状态机。包括requested和released。

ECU在网络进入Bus-Sleep Mode之前都需要持续通信。

理由:也许有其他的ECU一直在request。

[PRS_UdpNm_00104] If the network is requested, the UdpNm module shall change network state to ‘requested’. (RS_Nm_00047)
[PRS_UdpNm_00105] If the network is released, the UdpNm module shall change network state to ‘released’. (RS_Nm_00047)

5.3 Operational Modes

下面讲AUTOSAR UdpNm的operational modes。

[PRS_UdpNm_00092] The AUTOSAR UdpNm shall contain three operational modes
visible at the modules interface:
Network Mode
Prepare Bus-Sleep Mode
Bus-Sleep Mode
()

下图是UML状态图。绿色表示Mode变化过程,红色表示 error handling,蓝色表示optional node detection。
在这里插入图片描述

5.3.1 Network Mode

[PRS_UdpNm_00094] The Network Mode shall consist of three internal states:
Repeat Message State
Normal Operation State
Ready Sleep State
()

[PRS_UdpNm_00095] When the Network Mode is entered from Bus-Sleep Mode or Prepare Bus-Sleep Mode, the Repeat Message State shall be entered. ()

[PRS_UdpNm_00096] When the Network Mode is entered, the NM-Timeout Timer UdpNmTimeoutTime shall be started. (RS_Nm_00149)

[PRS_UdpNm_00098] Upon successful reception of an NM message in Network Mode, the NM-Timeout Timer shall be restarted. (RS_Nm_00149)

[PRS_UdpNm_00099] Upon transmission of an NM message in Network Mode, the NM-Timeout Timer shall be restarted. (RS_Nm_00149)

5.3.1.1 Repeat Message State

对于未处于passive mode且启用了NM message transmission的节点,Repeat Message State确保从Bus-Sleep或Prepare Bus-Sleep到Network Mode的转换对于网络上的其他节点变得可见。此外,它还可确保任何节点在最短的时间内变成活动状态。它也可以用于检测当前节点的状态。

在这里插入图片描述

在这里插入图片描述

5.3.1.2 Normal Operation State

Normal Operation State确保只要需要网络功能,任何节点都可以使NM-Cluster保持唤醒状态。

在这里插入图片描述

5.3.1.3 Ready Sleep State

只要还有节点在保持NM-Cluster awake,Ready Sleep State确保NM-Cluster中的任何节点等待转换到Prepare Bus-Sleep Mode。

在这里插入图片描述

5.3.2 Prepare Bus-Sleep Mode

Prepare Bus Sleep state的目的是确保所有节点都能够在进入Bus Sleep state之前停止其网络活动。 总线
活动慢慢减少,最后在Prepare Bus-Sleep Mode下总线上没有任何活动。

在这里插入图片描述

在这里插入图片描述

5.3.3 Bus-Sleep Mode

Bus-Sleep Mode的目的是在不交换消息时降低节点的功耗。

通信控制器切换到睡眠模式,相应的唤醒机制被激活,最后功耗在Bus-Sleep Mode下降低到适当的水平。

如果由(UdpNmTimeoutTime + UdpNmWaitBusSleepTime)确定的可配置时间量相同地配置为网络管理集群中的所有节点,则使用AUTOSAR NM算法协调的网络管理集群中的所有节点大约在同一时间进入Bus-Sleep Mode。

Note: The parameters UdpNmTimeoutTime and UdpNmWaitBusSleepTime should have the same values within all network nodes of the NM-cluster.

根据具体实施和其他因素,过渡到Bus-Sleep Mode大约同时发生。 经历的时间抖动大小取决于以下因素:

  • internal clock precision (oscillator’s drift),
  • NM-task cycle time (if tasks are not synchronized with a global time),
  • NM messages waiting time in the Tx-queue (if transmission confirmation is made
    immediately after transmit request).

在这里插入图片描述

5.4 Message format

在这里插入图片描述

5.4.1 Source Node Identifier

在这里插入图片描述

5.4.2 Control Bit Vector

在这里插入图片描述

在这里插入图片描述

5.4.3 User Data

在这里插入图片描述

5.4.3.1 Car Wakeup

在这里插入图片描述

5.5 NM Transmission

5.5.1 Transmission Communication Control

[PRS_UdpNm_00168] d It shall be possible to enable or disable the communication control. ()

Note: The NM coordination algorithm cannot work correctly if NM message transmission ability is disabled. Therefore, it has to be ensured that the ECU is not shutdown as long as the NM message transmission ability is disabled.

If communication release is requested and NM message transmission ability has been disabled, ECU will shut down. This ensures that ECU can shut down also in case of race conditions (e.g. diagnostic session left shortly before enabling communication) or a wrong usage of communication control.

在这里插入图片描述

5.5.2 Transmission Scheduling

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

5.6 Partial Networking

5.6.1 Rx Handling of NM messages

[PRS_UdpNm_00328] If the PN support is disabled, the UdpNm shall perform the normal Rx Indication handling and the partial networking extensions shall be disabled. (RS_Nm_00150, RS_Nm_02517, RS_Nm_02518)

[PRS_UdpNm_00460] If no relevant PN is requested in the received NM message and UdpNmAllNmMessagesKeepAwake is FALSE the message shall be dropped from further processing. (RS_Nm_02518, RS_Nm_02520)

[PRS_UdpNm_00461] If no relevant PN is requested in the received NM message and UdpNmAllNmMessagesKeepAwake is TRUE the message shall not be dropped from further Rx Indication handling. (RS_Nm_02518, RS_Nm_02520)

[PRS_UdpNm_00329] If the PN support is enabled and the PNI bit in the received NM message is 0 and UdpNmAllNmMessagesKeepAwake is TRUE, the UdpNm module shall perform the normal Rx Indication handling omitting the extensions for partial networking. (RS_Nm_02518, RS_Nm_02520)

[PRS_UdpNm_00462] If the PN support is enabled and the PNI bit in the received NM message is 0 and UdpNmAllNmMessagesKeepAwake is FALSE, the UdpNm module shall ignore the received NM message. (RS_Nm_02518, RS_Nm_02520)

[PRS_UdpNm_00331] If the PN support is enabled and the PNI bit in the received NM message is 1, UdpNm module shall process the Partial Networking Information of the NM message. (RS_Nm_02518, RS_Nm_02520)

5.6.2 Tx Handling of NM messages

[PRS_UdpNm_00332] If the PN support is enabled, the UdpNm module shall set the value of the transmitted PNI bit in the CBV to 1. (RS_Nm_02517, RS_Nm_02521)

[PRS_UdpNm_00333] If the PN support is disabled, the UdpNm module shall set the value of the transmitted PNI bit in the CBV always to 0. (RS_Nm_02517, RS_Nm_02521)

Constraint: The usage of the CBV is mandatory in case Partial Networking is used.
This has to be ensured by configuration in the respective platform.

5.6.3 NM message Filter Algorithm

[PRS_UdpNm_00335] The range (in bytes) that contains the PN request information (PN Info Range) in the received NM message shall be defined by PN Info Offset (in bytes) starting from byte 0 and PN Info Length (in bytes). (RS_Nm_02520)

Example:
PN Info Offset = 3
PN Info Length = 2
Only Byte 3 and Byte 4 of the NM message contain PN request information.

Note: every bit of the PN Info Range represents one Partial Network. If the bit is set to 1 the Partial Network is requested. If the bit is set to 0 there is no request for this PN.

[PRS_UdpNm_00337] By means of PN Filter Mask Byte the UdpNm shall detect which PN is relevant for the ECU and which not.

Each bit of the PN Filter Mask Byte has the following meaning:
0 The PN request is irrelevant for the ECU
1 The PN request is relevant for the ECU
(RS_Nm_02520)

[PRS_UdpNm_00338] d Each PN Filter Mask Byte shall be mapped (bitwise AND) to the corresponding byte in the PN Info Range of the NM message. c(RS_Nm_02520)

Note: If at least one bit within the PN Info Range of the received NM message matches with a bit in the NM filter mask, the PN request information is relevant for the ECU.

5.7 Additional Features

5.7.1 Passive Mode

在Passive Mode下,节点仅接收NM messages,但不发送任何NM messages。

[PRS_UdpNm_00161] d It shall be possible to enable or disable the support of the Passive Mode. c(RS_Nm_00150, RS_Nm_02511)

[PRS_UdpNm_00162] Passive Mode shall be configured consistent for all UdpNm instances within one NM node. (RS_Nm_02511)

[PRS_UdpNm_00163] If Passive Mode is enabled, the following options shall not be used:
Bus Synchronisation
Remote Sleep Indication
Node Detection
(RS_Nm_02511)

5.7.2 Detection of Remote Sleep Indication

“Remote Sleep Indication”是指处于Normal Operation State的节点可以发现在NM-Cluster中处于ready to sleep的节点。 处于Normal Operation State的节点使NM-Cluster处于bus awake。

[PRS_UdpNm_00149] It shall be possible to enable or disable the detection of Remote Sleep Indication. (RS_Nm_00150)

[PRS_UdpNm_00150] If no NM messages are received in the Normal Operation State for a configurable amount of time determined by UdpNmRemoteSleepIndTime, the UdpNm shall detect that all other nodes in the cluster are ready to sleep (the so-called ‘Remote Sleep Indication’). (RS_Nm_00052)

[PRS_UdpNm_00151] If Remote Sleep Indication has been previously acknowledged and if a NM message is received in the Normal Operation State or Ready Sleep State again, the UdpNm shall detect that some nodes in the cluster are not ready to sleep anymore (the so-called ‘Remote Sleep Cancellation’). (RS_Nm_02509)

[PRS_UdpNm_00152] If Remote Sleep Indication has been previously acknowledged and if Repeat Message State is entered from Normal Operation State, the UdpNm shall detect that some nodes in the cluster are not ready to sleep anymore (the so-called ‘Remote Sleep Cancellation’). (RS_Nm_02509)

[PRS_UdpNm_00154] The NM shall reject a check of Remote Sleep Indication in Bus-Sleep Mode, Prepare Bus-Sleep Mode and Repeat Message State. ()

5.7.3 Active Wakeup Bit handling

[PRS_UdpNm_00366] If the UdpNm performs a state change from BusSleep state or PrepareBusSleep state to NetworkMode due to an internal communication request and support of Active Wakeup Bit is enabled, the UdpNm shall set the Active Wakeup Bit to 1. ()

[PRS_UdpNm_00367] If the UdpNm module leaves the NetworkMode and support of Active Wakeup Bit is enabled, the UdpNm module shall set the Active Wakeup Bit to 0. ()

6 Configuration parameters

The following chapter summarizes the configuration parameters referred in this specification.

在这里插入图片描述

  • 5
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值