In Autosar network management, if the node is a gateway node, it is not a small challenge for development and testing. If the interpretation of the requirements is not in place, the development architecture design is wrong, and the later testing will be bug bug bug…
This article interprets routing requirements and development considerations for gateway nodes (including PNC functions). The content discussed in this article involves the PN (Partial Network) function. This article originates from engineering practice and can still give you some inspiration.
hint: Discussion based on can bus
1. Clear requirements: An ECU contains two nodes: Node1 and Node2, both of which are gateway nodes and both contain PNC functions. The routing time of network management packets is required to be less than 15ms.
Node1 and Node2 are active active nodes, that is, both Nodes have fast-moving mode;
PNC1 and PNC2Both are associated with Can1 and Can2。
2 Description of requirements
Here we analyze how the requirements should be tested from the perspective of testing.
Example analysis: The host computer (Tester) simulates sending a frame of network management message 0x5xx (valid range of network management message: 0x500~0x53F) to Can1 Bus, after Can1 Node receives this frame of network management message, it forwards it internally to Can2 Node (actually The ComM judges the PNC, and then decides which Node network state to switch). In Normal Mode, Node1 will send network management message 0x502 to Can1 Bus, and Node2 will send network management message 0x503 to Can2 Bus.
Test key steps:
Tester sendcontains onlyThe network management packet of PNC1 is 0x5xx;
After 5s, Node1 and Node2 enter the NOS (Normal Operation State) state, and both send out their own network management packets in a 1s cycle;
At this time, the host computer simulates sending a frame of network management message (Including PNC1, PNC2) to Node1, both Node1 and Node2 enter the fast sending mode, on the Can1 busthe first timePNC2 set appearsSimulate network management messagesThe time is recorded as T1;
Node2 also enters fast send mode, when Node2 sends outThe first frame contains the network management packet 0x503 of PNC2The time is recorded as T2 (Node2 is in fast mode at this time), if T2-T1 < 15ms+(15*0.01)ms=””>
The test analysis diagram is as follows:
3 Development Notes
After understanding the requirements, developers need to pay attention to the following points in the implementation process:
The network management packet received by Node1 is a range, not a frame of network management packets. For example, the range of network management packets in this example is 0x500~0x53F. If any frame of network management packets in this range is associated with the PNC Node2, should make Node2 enter the fast mode, and vice versa;
The wake-up of Node1 and Node2 is related to the PNC and should not be confused with the routing of application packets. Which Nodes are associated with the PNC, and which Nodes will be requested by the ComM to switch the network status, and the routing of application packets can be performed at the PDR level through the PDUR or the signal routing at the Com layer;
The configuration parameter CanNmPnHandleMulti is checked;
When the network management has the PN function, the ComM is responsible for calling the CanNm_NetworkRequest() interface.
pit: Node1 and Node2 both have the Pn function. The configuration parameter CanNmPnHandleMultipleNetworkRequests needs to be checked. When the state is switched from NOS->RMS (Repeat Message State), Node enters the fast sending mode.
Reviewing Editor: Liu Qing