A test method, system and device based on AUTOSAR network management and a storage medium
By using a network management coordinator and state machine control, the problem of coordinating the sleep and wake-up of ECU nodes in AUTOSAR network management was solved, enabling correct and timely communication between ECUs on the bus and reducing power consumption.
Patent Information
- Application Number
- CN202410526879.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-04-29
AI Technical Summary
In existing technologies, how to effectively coordinate the sleep and wake-up of various ECU nodes in the automotive electronic and electrical architecture has become an urgent problem to be solved, especially in AUTOSAR network management, how to unify and coordinate the sleep and wake-up of various nodes on the bus to ensure correct and timely CAN communication.
The network management coordinator monitors the ECU status, initiates the coordination algorithm, sets a shutdown delay timer, coordinates the hibernation and wake-up of each ECU on the bus, uses the network management state machine to control state transitions, and sets relevant time parameters to achieve unified hibernation and wake-up of the bus.
It enables correct and timely communication between the ECUs on the bus, reduces power consumption, and improves the efficiency and reliability of network management.
Smart Images

Figure CN118432970B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of automotive electronic architecture technology, specifically to a test method, system, device, and storage medium based on AUTOSAR network management. Background Technology
[0002] AUTOSAR (Automotive Open System Architecture) establishes a framework and industry standards specifically for openness in the automotive industry, serving as the fundamental infrastructure for managing functionality in future applications and standard software modules. It improves the management of complex automotive electrical and electronic architectures by enhancing the reusability and interchangeability of software modules between OEMs (Original Equipment Manufacturers) and suppliers. AUTOSAR CAN network management primarily coordinates the transition between normal network operation and bus sleep modes. In addition to core functions, it provides configurable features, such as implementing a service to detect all current nodes or detect the readiness of all other nodes. The CAN (Controller Area Network) network management (CAN NM) function provides adaptation between the network management interface and CAN interface modules. AUTOSAR network management is a multi-master direct network management strategy based on CAN networks. In AUTOSAR, state transitions are managed based on the transmission and reception of NMMsg (Network Management Messages). It is mainly achieved by sending and receiving periodic network management messages. Each node sends network management messages to indicate its own status and checks whether other nodes need to maintain their own status. If it does not need to maintain its status, it enters a pre-sleep state. Once all nodes have entered sleep state, they can enter the sleep state uniformly.
[0003] Current vehicles are composed of a large number of ECU (Electronic Control Unit) nodes. In order for each ECU to communicate correctly and in a timely manner via CAN, how to provide a mechanism to coordinate the sleep and wake-up of each node on the bus has become an urgent problem to be solved. Summary of the Invention
[0004] This disclosure provides a testing method, system, device, and storage medium based on AUTOSAR network management to solve or alleviate one or more of the above-mentioned technical problems in the prior art.
[0005] According to one aspect of this disclosure, a testing method for AUTOSAR-based network management is provided, comprising:
[0006] When each ECU is awake and not in bus sleep mode, the network is monitored through the network management coordinator;
[0007] When a bus in the network is active, the network management coordinator is controlled to keep the network active and start the coordination algorithm.
[0008] When the coordination algorithm starts, a shutdown delay timer is started for the active bus;
[0009] When the shutdown delay timer times out, the active bus is released until all networks are in bus sleep mode.
[0010] One possible implementation includes:
[0011] The state transitions of the network management state machine of each controller are controlled by network management messages on the bus. The network management state machine includes bus sleep mode, pre-sleep mode and network mode. The network mode includes repeat message state, normal operation state and ready-to-sleep state.
[0012] One possible implementation includes:
[0013] When preparing for hibernation, the ECU prepares for hibernation and no network management messages are transmitted. When a network management message is received, the timeout timer is restarted.
[0014] During normal operation, the network management message transmission and message transmission and reception timeout timers are restarted.
[0015] When repeating message states, switching from bus sleep mode or pre-sleep mode to network mode makes the message visible to other nodes on the network.
[0016] In one possible implementation, the timing of transitions between network management state machines and the mode in which the controller is located are defined, including:
[0017] Set a network management timeout period. When a single ECU jumps to the ready state and the network management timeout period is reached, if no target wake-up source or network management frame is received, the ECU will be controlled to enter the standby state.
[0018] Set the repeat message mode time, which is the dwell time after jumping from the BUS SLEEP state to the repeat state;
[0019] Set a waiting sleep time, which is the time from switching out of network mode to the ECU entering bus sleep state;
[0020] Set the quick-release network management cycle, which is the time during which the event pulls the network into a repeating state.
[0021] Set the network management cycle, which is the normal network management outgoing cycle;
[0022] Set the number of times the fast-send network management is activated, where the number of times the external network management is pulled into a repeat state by a local event;
[0023] Set the gateway message transmission time, which is the time when the first network management message is sent after being woken up;
[0024] Set the application message transmission time, where the network management transmission time is the time when the first frame of all application messages is sent after being woken up;
[0025] Set a network management wake-up timeout, which is the time interval between the sending of the first frame message and the second frame network management message;
[0026] Set the hibernation time, which is the time to re-enter BUSSLEEP after no target wake-up source is detected.
[0027] According to one aspect of this disclosure, a test system based on AUTOSAR network management is provided, comprising:
[0028] The network management coordinator is used to monitor the network when each ECU is awake and not in bus sleep mode;
[0029] The control unit is used to control the network management coordinator to keep the network active and start the coordination algorithm when a bus in the network is active.
[0030] The startup unit is used to start a shutdown delay timer for the bus that is in an active state when the coordination algorithm starts.
[0031] The release unit is used to release the active bus when the shutdown delay timer times out, until all networks are in bus sleep mode.
[0032] One possible implementation includes:
[0033] The state transitions of the network management state machine of each controller are controlled by network management messages on the bus. The network management state machine includes bus sleep mode, pre-sleep mode and network mode. The network mode includes repeat message state, normal operation state and ready-to-sleep state.
[0034] One possible implementation includes:
[0035] When preparing for hibernation, the ECU prepares for hibernation and no network management messages are transmitted. When a network management message is received, the timeout timer is restarted.
[0036] During normal operation, the network management message transmission and message transmission and reception timeout timers are restarted.
[0037] When repeating message states, switching from bus sleep mode or pre-sleep mode to network mode makes the message visible to other nodes on the network.
[0038] In one possible implementation, a setting unit is included for setting the transition time between network management state machines and the mode in which the controller is located, including:
[0039] Set a network management timeout period. When a single ECU jumps to the ready state and the network management timeout period is reached, if no target wake-up source or network management frame is received, the ECU will be controlled to enter the standby state.
[0040] Set the repeat message mode time, which is the dwell time after jumping from the BUS SLEEP state to the repeat state;
[0041] Set a waiting sleep time, which is the time from switching out of network mode to the ECU entering bus sleep state;
[0042] Set the quick-release network management cycle, which is the time during which the event pulls the network into a repeating state.
[0043] Set the network management cycle, which is the normal network management outgoing cycle;
[0044] Set the number of times the fast-send network management is activated, where the number of times the external network management is pulled into a repeat state by a local event;
[0045] Set the gateway message transmission time, which is the time when the first network management message is sent after being woken up;
[0046] Set the application message transmission time, where the network management transmission time is the time when the first frame of all application messages is sent after being woken up;
[0047] Set a network management wake-up timeout, which is the time interval between the sending of the first frame message and the second frame network management message;
[0048] Set the hibernation time, which is the time to re-enter BUSSLEEP after no target wake-up source is detected.
[0049] One possible implementation includes: testing network management state machine transition status via a CANOE device, including ACK responses, controller communication message types, and timing parameters.
[0050] According to one aspect of this disclosure, a test device for AUTOSAR-based network management is provided, comprising:
[0051] Processor and memory;
[0052] The memory is used to store computer programs, and the processor calls the computer programs stored in the memory to execute the AUTOSAR-based network management test method described above.
[0053] According to one aspect of this disclosure, a computer-readable storage medium is provided, wherein a computer program is stored therein, which, when executed by a processor, enables the processor to perform the AUTOSAR-based network management test method described in any of the preceding claims.
[0054] The exemplary embodiments of this disclosure have the following beneficial effects: In the exemplary embodiments of this disclosure, when each ECU is in a wake-up state and not in "bus sleep mode," a network management algorithm is run to coordinate the shutdown of each ECU on the bus. The NM Coordinator monitors the network to be in "bus sleep mode," and as long as one bus in the coordination cluster is in a wake-up state, the NM Coordinator should still maintain network activity. When the coordination algorithm starts, a shutdown delay timer is started for the currently active channel in the coordination network. When the shutdown delay timer expires, the network is released. When all networks are released and all networks are in "bus sleep mode," each ECU shuts down, completing the coordination. In summary, this embodiment can uniformly coordinate the sleep and wake-up of each node on the bus, enabling each ECU to perform CAN communication correctly and in a timely manner.
[0055] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the accompanying drawings. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit this disclosure. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0057] Figure 1 This is a flowchart of a test method for AUTOSAR-based network management in this exemplary embodiment;
[0058] Figure 2This is a schematic diagram of the CAN communication model of this exemplary embodiment;
[0059] Figure 3 This is a schematic diagram of the network management state machine of this exemplary embodiment;
[0060] Figure 4 This is a schematic diagram of the time parameters of the CANOE test interface in this exemplary embodiment. Detailed Implementation
[0061] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0062] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware units or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0063] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0064] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0065] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or device that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules that are explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to such process, method, product, or device.
[0066] Figure 1 This is a flowchart of a testing method for AUTOSAR-based network management in this exemplary embodiment, as shown below. Figure 1 As shown, an exemplary embodiment of this disclosure provides a testing method based on AUTOSAR network management, including:
[0067] S1 monitors the network through the network management coordinator when each ECU is in the wake-up state and not in the bus sleep mode.
[0068] S2 When a bus in the network is active, control the network management coordinator to keep the network active and start the coordination algorithm;
[0069] When the coordination algorithm starts, S3 starts a shutdown delay timer for the active bus.
[0070] When the S4 disables the delay timer and the timer expires, it releases the active bus until all networks are in bus sleep mode.
[0071] This embodiment provides a testing method for AUTOSAR NM network management of a single ECU controller. Based on the AUTOSAR network management specification, communication tests of network management state machine parameters are performed on the vehicle-level and component-level CAN controllers via VECTOR's CANOE.
[0072] It is worth noting that, compared to the ISO / OSI reference model, the CAN communication model is based on a layer model (such as...). Figure 2 As shown, Figure 2In this context, the Application Layer, Interaction Layer, Transport Layer, Data Link Layer, Physical Layer, Network Management, and CAN Communication Layer comprise the Physical Layer, Data Link Layer, Transport Layer, Interaction Layer, and Network Management Layer. The Network Management Interface (NMI) is a module situated between the ComM (Communication Manager) and the Bus Specific NM (Bus Specific Management) module.
[0073] The NM (Network Management) interface of a single ECU controller has two basic functions: 1. Acting as an adapter module between bus-specific NM modules and ComM modules. The communication interface between the NM interface and the ComM module is independent of the underlying bus-specific module; 2. NM Coordinator: The gateway ECU uses it to synchronously shut down the communication bus. It uses the NM coordination algorithm to shut down the bus connecting each ECU. The ECU that uses the NM Coordinator function is called an NMCoordinator.
[0074] In this embodiment, when each ECU is awake and not in "bus sleep mode," the network management algorithm is run to coordinate the shutdown of each ECU on the bus. The NM Coordinator monitors the network to be in "bus sleep mode," and as long as one bus in the coordination cluster (NM cluster – a group of NM nodes coordinated using the NM algorithm) is awake, the NM coordinator should maintain network activity. When the coordination algorithm starts, a shutdown delay timer is started for the currently active channel in the coordination network. When the Shutdown Delay timer expires, the NM should release the network. When all networks are released and all networks are in "bus sleep mode," the algorithm for coordinating the shutdown of each ECU is complete.
[0075] All network nodes on the CAN bus switch between sleep and wake-up states through their respective network management messages. Each controller's network management state is independent and follows the AUTOSAR network management state specification. When each controller switches to the bus sleep mode, no messages are sent on the CAN bus, thus enabling all controllers on the bus to enter sleep mode.
[0076] The CAN network management state machine exists in the following states:
[0077] Bus sleep mode: Bus sleep mode ensures that nodes jump to sleep mode, their respective wake-up mechanisms are activated, and ultimately reduce power consumption.
[0078] In bus sleep mode: no network management messages and application messages are sent; no ACK response should be given for application messages; an ACK response should be given for network management messages; if a valid network management message is received, the network node is woken up; if an application message is received, the network node should not be woken up.
[0079] Pre-sleep mode: Ensures all nodes have time to cease their network activity before entering bus sleep mode. In pre-sleep mode, bus activity stops (note: messages in the queue will be sent to clear all transmit buffers), and the bus eventually becomes inactive, ceasing all message transmission. In pre-sleep mode: no network management or application messages are sent. ACK responses should be provided for network management and application messages.
[0080] The network mode should include three states: repeating message state, normal operation state, and preparing to sleep state.
[0081] Specifically, the state transitions of the network management state machine of each controller are controlled by network management messages on the bus. The network management state machine includes a ready-to-sleep state, a normal working state, a repeating message state, a pre-sleep mode, and a bus sleep mode.
[0082] Specifically, when preparing for hibernation, the ECU prepares for hibernation and there is no network management message transmission. When a network management message is received, the timeout timer is restarted.
[0083] During normal operation, the network management message transmission and message transmission and reception timeout timers are restarted.
[0084] The repeated message status ensures that the transition from bus sleep mode or pre-sleep mode to network mode is visible to other nodes on the network.
[0085] It is worth noting that when performing AUTOSAR network management tests on a single ECU node, it is necessary to pay attention to the transition time between the three state machines and the mode in which the controller itself is. This involves the overall vehicle network architecture and the overall sleep / wake-up of the actual vehicle, including which event wakes the controller and which state machine it is in. Therefore, this embodiment sets the time parameters as shown in Table 1 (Network Management Time Parameter Table):
[0086] Table 1
[0087]
[0088] Specifically, this includes setting the transition time between network management state machines and the mode in which the controller itself is in.
[0089] Specifically, setting the transition time between network management state machines and the mode in which the controller itself is located includes:
[0090] A network management timeout (NM TIMEOUT) is set. When a single ECU jumps to the READY state, if no target wake-up source or network management frame is received within the network management timeout period, the ECU will be controlled to enter the PREPARE state. The NM TIMEOUT time is 2.5 seconds, which is used to implement a timer of 2.5 seconds after a single ECU jumps to the READY state. That is, if there is no valid wake-up source or network management frame, the ECU will time out and enter the PREPARE state.
[0091] Set the REPEAT MESSAGE time, which is the dwell time after jumping from BUSSLEEP (bus sleep) state to REPEAT state (repeated state); for example, set the REPEAT MESSAGE time to 3S, that is, network management and application messages will be sent within three seconds.
[0092] Set the WAIT BUS SLEEP (wait for sleep) time, which is the time from switching out of network mode to the ECU entering BUS SLEEP (bus sleep) state. For example, the WAIT BUS SLEEP time is 1.5 seconds, meaning that within 1.5 seconds, the device can be pulled back to the REPEAT MESSAGE by network management and diagnostic messages, and can respond to the APP PDU (APP message) with an ACK (acknowledgment character). After sleep mode, it cannot be woken up or responded to by the APP PDU.
[0093] Set IMMEDIATE NM CYCLE (fast transmission network management cycle), which is the time when the local event pulls the network into REPEAT; for example, the IMMEDIATE NM CYCLE is set to 20MS, which means entering the fast transmission mechanism and quickly waking up the entire vehicle network.
[0094] Set the NM CYCLE (network management cycle), which is the normal network management outgoing cycle; for example, NMCYCLE is set to 1000MS, which has little impact on the load and can achieve normal sleep and wake-up;
[0095] Set IMMEDIATE NM TIMES (number of times the fast-send network manager is activated), where the number of times the external network manager is pulled into REPEAT by a local event is used; for example, IMMEDIATE NM TIMES is set to 10 times, that is, the complete fast-send mechanism is 200MS.
[0096] Set the NM PDU START TX (network management external transmission) time, which is the time when the first network management message is sent after being woken up; for example, the NM PDU START TX time is no later than 100MS;
[0097] Set the APP PDU START TX (network management external transmission) time, which is the time when the first frame of all application packets is sent after being woken up; for example, the APP PDU START TX time is no later than 300ms;
[0098] Set the TIMEOUT WAKEUP (network management wake-up timeout) time, which is the time interval between the sending of the first frame message and the second frame network management message. For example, the TIMEOUT WAKEUP time is 3000MS to 4000MS.
[0099] Set the GOING TO SLEEP time, which is the time to re-enter BUS SLEEP after no target wake-up source is detected. For example, the GOING TO SLEEP time is set to 0MS to 3000MS.
[0100] The network's sleep / wake-up mechanism is uniformly managed through network management messages, and the arrangement of network management messages is shown in Table 2 (Network Management Message Arrangement Table):
[0101] Table 2
[0102]
[0103] For frames between 600 and 67F, defined as valid network management frames, taking 600 as an example, the LAYOUT (network management message layout) is shown in Table 2. The SOURCE NOED ID (source node number) is required to be 00, and the entire CBV (Control Bit Vector) byte is set to 0. In actual testing, USER DATE1 (user date 1) is used, with all other bits set to 00, and user-defined bits set to 1. In BIT0-BIT3, the bit setting methods for waking up in BUS SLEEP, PREPARE, and READY modes are defined. In BIT4-BIT7, the bit setting methods for waking up the source in the REPEAT and NORMAL state machines are defined. See Table 3 (Table 3 is the bit setting table for wake-up and maintenance sources):
[0104] Table 3
[0105]
[0106]
[0107] When a network node wakes up from bus sleep mode, it sets the corresponding bit in the NMS flag according to Table 3 based on different wake-up sources such as KL15, reset, network management messages, and local wake-up. Network message reset is only performed when the network node transitions from bus sleep mode to repeat message state, and the bit is set only according to the first wake-up source that caused the state transition.
[0108] After a network node is woken up, if network persistence is required, the corresponding bit in the network management flag should be set according to Table 3, based on different persistence sources such as network management messages, KL15, diagnostic messages, and local wake-up. If a persistence source exists, set it to 1. If the persistence source disappears, set it to 0. If multiple persistence sources exist, set the bits for all persistence sources to 1.
[0109] Figure 3 This is a state diagram of the ECU for in-vehicle use, drawn based on the actual architecture and the vehicle's sleep / wake-up logic. Figure 3 The circuit diagrams for all ECU jumps are recorded in detail, including passive wake-up and active requests. The scheme of NORMAL state and REPAET state jumping back to REPEAT state has been removed from the standard AUTOSAR specification. According to the actual needs of the vehicle, it is not necessary to set RMR to 1.
[0110] like Figure 3As shown: Bus sleep mode ensures that nodes switch to sleep mode, their respective wake-up mechanisms are activated, ultimately reducing power consumption. Bus sleep mode: No NM PDU or APP PDU is sent. APP PDU should not have an ACK response, while NM PDU should have an ACK response. If a valid NM PDU is received, the network node is woken up. If an APP PDU is received, the network node is not woken up.
[0111] Pre-sleep mode ensures that all nodes have time to cease their network activity before entering bus sleep mode. In pre-sleep mode, bus activity calms down (note: to clear all tx buffers, queued messages are transmitted), and finally, there is no activity on the bus. Pre-sleep mode: No NM PDUs or APP PDUs are sent. ACK responses should be given to NM PDUs and APP PDUs.
[0112] Network Mode comprises three states: Repeat Message State, Normal Operation State, and Ready Sleep State. When Network Mode transitions from Bus Sleep Mode or PrepareBus Sleep Mode, it enters Repeat Message State and starts the NM Timeout Timer. The NM Timeout Timer restarts when Network Mode successfully receives an NM PDU. Similarly, the NM Timeout Timer restarts after successfully sending an NM PDU in Network Mode.
[0113] For nodes on the network, the Repeat Message State ensures that any transition from bus sleep mode or prepare for bus sleep mode to network mode is visible to other nodes on the network. In the Repeat Message State: NM PDUs and APP PDUs are sent; NM PDUs are sent cyclically by the Repeat NM Cycle Timer.
[0114] Normal operation ensures that any node remains active on the network whenever a request is made. Normal operation involves sending NM PDUs and APP PDUs; NM PDUs are sent cyclically by the NM Cycle Timer.
[0115] The Ready Sleep state ensures that any node in the network is waiting to transition to Ready Bus Sleep mode, as long as any other node keeps the network awake. Ready Sleep state: No NM PDU sent; APP PDU sent.
[0116] State machine transition mechanism: When requesting network access in bus sleep mode, the system should enter the repeat message state. When requested by the network in pre-sleep mode, the system should transition to the repeat message state. When the repeat message timer expires and the network has been requested, the system should enter the normal operation state. When a repeat message request bit is received in the normal operation state, the system should enter the repeat message state. When the repeat message timer expires and there is no network request, the system should enter the ready-to-sleep state. When a repeat message request bit is received in the ready-to-sleep state, the system should enter the repeat message state. When the network is released and the current state is normal operation, the system enters the ready-to-sleep state. When the network is requested and the current state is ready-to-sleep, the system enters the normal operation state. In the ready-to-sleep state, after the network management timeout timer expires, the system will enter pre-sleep mode. After the waiting bus sleep timer expires, the system should enter bus sleep mode.
[0117] During the testing of network management state machine transitions, CANOE devices can be tested using network management time parameters and network management message content.
[0118] like Figure 4 As shown, during the test, the device is woken up by two network management messages. The NM PDU TX is required to be sent within 100ms, with the interval between the two frames between 3000ms and 4000ms. If the timeout occurs, it will return to the BUS SLEEP state. If both network management messages are valid, all APP PDUs will be sent out within 300ms. Based on this, APP PDU START TX, NM PDU START TX, and TIMEOUT WAKEUP can be quickly tested. The frame count of the NM messages sent in the REPEAT MESSAGE can be used to determine if the 3000ms timeout meets the specifications. If it jumps to the READY state, network management frames will stop being sent. If there is a local event, it will jump to NORMAL (both application messages and network management messages will be sent out). If there is no wake-up source, network release will occur. The network management timeout timer is set to 2.5 seconds. During the test, the last application message frame minus the last network management message frame is used to determine if the timeout is 2.5 seconds, thus detecting the NM timeout. After jumping to PREPARE at TIMEOUT, the application message is continuously sent out until the controller does not respond to the ACK of the APP PDU, and the message on the bus becomes an error frame. The complete time is 1.5 seconds, thus testing the WAIT BUSSLEEP waiting time for sleep.
[0119] The above are merely preferred embodiments of this disclosure. The scope of protection of this disclosure is not limited to the above embodiments. All technical solutions falling within the scope of this disclosure are protected. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of this disclosure should be considered within the scope of protection of this disclosure.
Claims
1. A test method based on AUTOSAR network management, characterized in that, The method comprises the following steps: monitoring the network by the network management coordinator when each ECU is in the wake-up state and is not in the bus sleep mode; controlling the network management coordinator to keep the network active and starting the coordination algorithm when there is a bus in the active state in the network; starting the closing delay timer for the bus in the active state when the coordination algorithm is started; releasing the bus in the active state when the closing delay timer is timed out until all networks are in the bus sleep mode.
2. The test method based on AUTOSAR network management according to claim 1, characterized in that, The method comprises the following steps: controlling the state transition of the network management state machine of each controller by the network management message on the bus, wherein the network management state machine comprises the bus sleep mode, the pre-sleep mode and the network mode, and the network mode comprises the repeated message state, the normal working state and the preparation sleep state.
3. The test method based on AUTOSAR network management according to claim 2, characterized in that, The method comprises the following steps: preparing the ECU to sleep in the preparation sleep state, and no network management message is transmitted, and the timeout timer is restarted when the network management message is received; transmitting the network management message and restarting the message transmission and reception timeout timer in the normal working state; jumping from the bus sleep mode or the pre-sleep mode to the network mode, which is visible to other nodes on the network.
4. The test method based on AUTOSAR network management according to claim 1, characterized in that, Setting the time for jumping between the network management state machines and the mode of the controller, comprising the following steps: setting the network management timeout time, and controlling the ECU to enter the preparation state when the network management timeout time is reached after the single ECU jumps to the preparation state and no target wake-up source and network management frame are received; setting the repeated message mode time, which is the staying time after jumping from the BUS SLEEP state to the repeated state; setting the sleep waiting time, which is the time from jumping out of the network mode to the ECU entering the bus sleep state; setting the fast network management cycle, which is the time of the network management frame transmitted in the repeated state due to the local event; setting the network management cycle, which is the cycle of the network management frame transmitted normally; setting the number of fast network management, which is the number of the network management frames transmitted in the repeated state due to the local event; setting the gateway message transmission time, which is the time of the first network management frame transmitted after being woken up; setting the application message transmission time, which is the time of the first application frame transmitted after being woken up; setting the network management wake-up timeout time, which is the time interval between the first frame and the second network management frame; setting the sleep entering time, which is the time of re-entering the BUS SLEEP state after no target wake-up source is detected.
5. A test system based on AUTOSAR network management, characterized in that The method comprises the following steps: monitoring the network by the network management coordinator when each ECU is in the wake-up state and is not in the bus sleep mode; controlling the network management coordinator to keep the network active and starting the coordination algorithm when there is a bus in the active state in the network; starting the closing delay timer for the bus in the active state when the coordination algorithm is started; releasing the bus in the active state when the closing delay timer is timed out until all networks are in the bus sleep mode.
6. The AUTOSAR network management based test system of claim 5, wherein, The method comprises the following steps: The state transition of the network management state machine of each controller is controlled by network management messages on the bus, the network management state machine including a bus sleep mode, a pre-sleep mode and a network mode, the network mode including a repeat message state, a normal working state and a preparation sleep state.
7. The AUTOSAR network management based test system of claim 6, wherein, The method comprises: In the preparation sleep state, the ECU prepares to sleep, no network management message is transmitted, and the timeout timer is restarted when a network management message is received; In the normal working state, network management messages are transmitted and the message transmission and reception timeout timer is restarted; In the repeat message state, the jump from the bus sleep mode or the pre-sleep mode to the network mode is visible to other nodes on the network.
8. The AUTOSAR network management based testing system of claim 5, wherein, The method comprises setting a time for jumping between network management state machines and a mode in which the controller is located, comprising: Setting a network management timeout time, when a single ECU jumps to the preparation state, the network management timeout time is reached, no target wake-up source and network management frame are received, and the control ECU enters the preparation state; Setting a repeat message mode time, the repeat message mode time being a stay time after jumping from the BUS SLEEP state to the repeat state; Setting a sleep waiting time, the sleep waiting time being a time from jumping out of the network mode to the ECU entering the bus sleep state; Setting a fast network management cycle, the fast network management cycle being a time of being pulled into the repeat state by a local event; Setting a network management cycle, the network management cycle being a cycle of normal network management transmission; Setting a fast network management number, the fast network management number being a number of transmitted network management frames of being pulled into the repeat state by a local event; Setting a gateway message transmission time, the network management transmission time being a time of transmitting the first frame of network management messages after being woken up; Setting an application message transmission time, the network management transmission time being a time of transmitting the first frame of all application messages after being woken up; Setting a network management wake-up timeout time, the network management wake-up timeout time being a time interval between the transmission of the first frame of messages and the second frame of network management messages; Setting an entering sleep time, the entering sleep time being a time of re-entering the BUS SLEEP state after no target wake-up source is detected.
9. A test device based on AUTOSAR network management, characterized in that The method comprises: A processor and a memory; The memory is used to store a computer program, and the processor invokes the computer program stored in the memory to execute the test method based on the AUTOSAR network management according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the processor can execute the test method based on the AUTOSAR network management according to any one of claims 1 to 4.
Citation Information
Patent Citations
Network state management method and device
CN109547313A
Sleep and wake-up method for in-vehicle hybrid network including vehicle-mounted Ethernet
CN110758289A