CN111106987A - CAN message sending method, device, storage medium and electronic equipment - Google Patents
CAN message sending method, device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN111106987A CN111106987A CN201911184256.1A CN201911184256A CN111106987A CN 111106987 A CN111106987 A CN 111106987A CN 201911184256 A CN201911184256 A CN 201911184256A CN 111106987 A CN111106987 A CN 111106987A
- Authority
- CN
- China
- Prior art keywords
- node
- message sending
- message
- period
- synchronous
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000001360 synchronised effect Effects 0.000 claims abstract description 69
- 230000005540 biological transmission Effects 0.000 claims abstract description 19
- 238000004590 computer program Methods 0.000 claims description 19
- 230000006870 function Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 3
- 230000006854 communication Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention provides a CAN message sending method, a device, a storage medium and electronic equipment, wherein the method comprises the following steps: configuring a message sending period of each node according to the priority of each node on the CAN bus; determining a synchronous message sending period of the CAN bus according to the message sending period of each node; distributing the sending authority of the synchronous message to a first node with the highest priority level so that the first node sends the synchronous message according to the synchronous message sending period; and configuring corresponding message sending time points of the nodes in the same synchronous message sending period according to the message sending period of the nodes and the synchronous message sending period, so that the nodes send messages according to the corresponding message sending time points, wherein the message sending time points of the nodes are not overlapped. The invention CAN avoid CAN network bus competition, solve the problem of CAN message delay and improve the CAN bus transmission efficiency.
Description
Technical Field
The invention relates to the technical field of bus communication, in particular to a CAN message sending method, a CAN message sending device, a CAN message storage medium and electronic equipment.
Background
With the continuous development of electric vehicle technology, more and more electronic units are applied to an automobile system, a large number of CAN nodes including a vehicle controller, a motor controller, a battery management system and the like are connected to a CAN bus, and in the communication process, because each node CAN send communication data at any time without dividing into a master node and a slave node, the effective transmission of the data on the bus must be realized by means of a strict arbitration mechanism. However, when two or more nodes have transmission requests at the same time, it is difficult for a node with a low priority to always obtain the right of ownership of the bus, and if a plurality of nodes with a high priority transmit messages successively at this time, the message of the node with a low priority will not be transmitted in a delayed manner, which will face a serious transmission delay problem and even cause message transmission failure.
In summary, it is necessary to provide a new method for solving the problem of packet delay caused by bus contention among CAN nodes in the existing packet transmission method, especially the problem of packet delay faced by low-priority nodes.
Disclosure of Invention
The invention provides a CAN message sending method, a CAN message sending device, a storage medium and electronic equipment, which solve the problem of message sending delay caused by CAN bus contention in the prior art and improve the CAN bus transmission efficiency.
In one aspect of the present invention, a method for sending a CAN packet is provided, where the method includes:
configuring a message sending period of each node according to the priority of each node on the CAN bus;
determining a synchronous message sending period of the CAN bus according to the message sending period of each node;
distributing the sending authority of the synchronous message to a first node with the highest priority level so that the first node sends the synchronous message according to the synchronous message sending period;
and configuring corresponding message sending time points of the nodes in the same synchronous message sending period according to the message sending period of the nodes and the synchronous message sending period, so that the nodes send messages according to the corresponding message sending time points, wherein the message sending time points of the nodes are not overlapped.
Optionally, the configuring, according to the priority of each node on the CAN bus, a packet sending cycle of each node specifically includes:
and sequentially configuring the time length of the message sending period of each node according to the priority level of each node from high to low, wherein the higher the priority level of each node is, the shorter the time length of the corresponding message sending period is.
Optionally, the determining a synchronous packet sending period of the CAN bus according to the packet sending period of each node specifically includes:
calculating the least common multiple of the message sending period of each node;
and determining the calculated minimum common multiple as a synchronous message sending period of the CAN bus.
Optionally, the method further comprises:
in a synchronous message sending period, the message sending time point of each node is not coincident with the sending time point of the synchronous message.
In another aspect of the present invention, a CAN packet sending apparatus is further provided, where the apparatus includes:
the first configuration module is used for configuring the message sending period of each node according to the priority of each node on the CAN bus;
the determining module is used for determining the synchronous message sending period of the CAN bus according to the message sending period of each node;
the second configuration module is used for distributing the sending authority of the synchronous message to a first node with the highest priority level so that the first node sends the synchronous message according to the synchronous message sending period;
and a third configuration module, configured to configure, according to the packet sending period of each node and the synchronous packet sending period, a packet sending time point corresponding to each node in the same synchronous packet sending period, so that each node sends a packet according to the corresponding packet sending time point, where the packet sending time points of each node do not coincide with each other.
Optionally, the first configuration module is specifically configured to sequentially configure the duration of the packet sending period of each node according to the priority level of each node from high to low, where the higher the priority level of a node is, the shorter the duration of the corresponding packet sending period is.
Optionally, the determining module specifically includes:
the computing unit is used for computing the least common multiple of the message sending period of each node;
and the determining unit is used for determining the calculated minimum common multiple as the synchronous message sending period of the CAN bus.
Optionally, in a synchronization packet sending period, the packet sending time point of each node does not coincide with the sending time point of the synchronization packet.
Furthermore, the invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
Furthermore, the present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the program.
The embodiment of the invention provides a CAN message sending method, a device, a storage medium and electronic equipment, which comprises the steps of firstly configuring the message sending period of each node according to the priority of each node on a CAN bus, then determining the synchronous message sending period of the CAN bus according to the message sending period of each node, sending a synchronous message according to the synchronous message sending period through a first node with the highest priority level to ensure the time base synchronization among the nodes, and further configuring the corresponding message sending time point of each node in the same synchronous message sending period according to the message sending period and the synchronous message sending period of each node to enable each node to send messages according to the corresponding message sending time point, wherein the message sending time points of each node are not overlapped. According to the CAN message sending method provided by the embodiment of the invention, the message sending period and the message sending time points which are not overlapped with each other are configured for each node of the CAN bus according to the priority level, so that bus contention among the nodes CAN be avoided, and the time synchronization of each node is kept through the synchronous messages, so that each node CAN be further ensured to accurately and unmistakably send messages according to the respective message sending period and the respective message sending time point, the message delay problem caused by CAN bus contention CAN be effectively solved, and the data transmission efficiency of the CAN bus is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart of a method for sending a CAN message according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a message sending cycle and a message sending time point of each node in a CAN message sending method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a CAN message transmitting apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 schematically shows a flowchart of a CAN message sending method according to an embodiment of the present invention. Referring to fig. 1, the CAN packet sending method provided in the embodiment of the present invention specifically includes steps S11 to S14, as follows:
and S11, configuring the message sending period of each node according to the priority of each node on the CAN bus.
Specifically, the higher the priority of a node on the CAN bus is, the greater the importance of the node is, which should ensure that the message of the node CAN be sent in time. Therefore, the message sending period of each node CAN be configured according to the priority of each node on the CAN bus, so that the node with higher priority CAN have higher message sending frequency.
Specifically, the time length of the message sending period of each node CAN be configured in sequence from short to long according to the sequence from high to low of the priority level of each node on the CAN bus. Therefore, in the same time period, nodes with higher priority levels have more message sending opportunities.
For example, in an automobile network system, the priority level of an anti-lock system node for guaranteeing the safety of the emergency braking of a vehicle is higher than that of an airbag node, and in order to prevent driving accidents, a shorter message sending period can be configured for the anti-lock system node, so that the anti-lock system node has more message sending opportunities, and an automobile control system can rapidly respond to the message request.
And S12, determining the synchronous message sending period of the CAN bus according to the message sending period of each node.
Specifically, to ensure time synchronization of the network system, synchronization messages are periodically sent, so that each node on the CAN bus keeps time synchronization with the synchronization messages as a reference, and the messages are sent according to respective message sending periods.
S13, distributing the sending authority of the synchronous message to the first node with the highest priority level, so that the first node sends the synchronous message according to the synchronous message sending cycle.
Specifically, the synchronization packet directly affects whether the network system can maintain time synchronization, so that the node responsible for sending the synchronization packet should have the highest priority level to ensure that the synchronization packet can be sent periodically in time and accurately.
S14, configuring the corresponding message sending time points of each node in the same synchronous message sending period according to the message sending period of each node and the synchronous message sending period, so that each node sends messages according to the corresponding message sending time points, wherein the message sending time points of each node are not overlapped.
Specifically, in a synchronization period, it should be ensured that each node can complete at least one message sending period respectively.
Further, according to the configured message sending period duration and the configured synchronous message sending period duration of each node, the message sending time points corresponding to each node in one synchronous period are configured on the principle that the message sending time points corresponding to each node do not coincide with each other, so that the problem of bus contention does not occur when each node sends the message, and the message sent by each node including the synchronous message can be sent in time.
According to the CAN message sending method provided by the embodiment of the invention, the message sending period and the message sending time points which are not overlapped with each other are configured for each node of the CAN bus according to the priority level, so that bus contention among the nodes CAN be avoided, and the time synchronization of each node is kept through the synchronous messages, so that each node CAN be further ensured to accurately and unmistakably send messages according to the respective message sending period and the respective message sending time point, the message delay problem caused by CAN bus contention CAN be effectively solved, and the data transmission efficiency of the CAN bus is improved.
In an embodiment of the present invention, the determining, in step S12, a synchronous packet transmission period of the CAN bus according to the packet transmission period of each node specifically includes the following steps:
calculating the least common multiple of the message sending period of each node;
and determining the calculated minimum common multiple as a synchronous message sending period of the CAN bus.
Specifically, the least common multiple of the message sending cycle duration of each node on the CAN bus is taken as the duration of the synchronous message sending cycle.
Fig. 2 schematically shows a message sending cycle and a message sending time point of each node in the CAN message sending method according to an embodiment of the present invention.
Referring to fig. 2, in an embodiment of the present invention, a node 1, a node 2, a node 3, and a node 4 are provided on a CAN bus, where priority levels of the nodes are, from high to low, node 1 > node 2 > node 3 > node 4, and message sending periods are configured for 4 nodes respectively according to the priority levels of the nodes in sequence: t1 is 5ms, T2 is 10ms, T3 is 20ms, T4 is 30ms, and the sync message period T is 60 ms.
In this embodiment, the node 1 has the highest priority level, and the node 1 transmits the synchronization packet. As shown in fig. 2, in a synchronization period, 4 nodes each have a message sending opportunity. Specifically, the first time message sending time point of the node 1 in the synchronization period is 1 st ms, the first time message sending time point of the node 2 in the synchronization period is 8 th ms, the first time message sending time point of the node 3 in the synchronization period is 12 th ms, and the first time message sending time point of the node 4 in the synchronization period is 29 th ms. Therefore, in the current synchronization period, any message sending time point of each node is not overlapped pairwise, and the message sent by each node CAN be prevented from being contended for the CAN bus by the messages of other nodes with higher priority levels, so that the message is sent on time.
In this embodiment, each time a synchronization packet cycle duration is reached, the node 1 sends a synchronization packet, and after receiving the synchronization packet, other nodes continue to send packets according to the configured packet sending cycle and packet sending time point, with the current time as the reference synchronization time. It can be understood that, because the synchronization packet cycle is the least common multiple of the packet transmission cycle of each node, the packet transmission time point distribution conditions corresponding to each node in each synchronization cycle are the same.
In another embodiment of the present invention, in a synchronization period, the sending time point of the synchronization packet does not coincide with the sending time point of the packet of any node.
It should be noted that the message sent by each node occupies a fixed time length from the beginning to the end of sending, so that when configuring the message sending time point corresponding to each node in a synchronization period, the sending time point of any message of each node should not fall into the sending process of any message of other nodes, and the principle is also applicable to the first node sending the synchronization message.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 3 schematically shows a structural diagram of a CAN message transmitting apparatus according to an embodiment of the present invention. Referring to fig. 3, the CAN packet sending apparatus in the embodiment of the present invention specifically includes a first configuration module 201, a determination module 202, a second configuration module 203, and a third configuration module 204, where:
a first configuration module 201, configured to configure a message sending period of each node according to a priority of each node on the CAN bus;
a determining module 202, configured to determine a synchronous packet sending period of the CAN bus according to the packet sending period of each node;
a second configuration module 203, configured to allocate the sending authority of the synchronization packet to a first node with a highest priority level, so that the first node sends the synchronization packet according to the synchronization packet sending cycle;
a third configuration module 204, configured to configure, according to the packet sending period of each node and the synchronous packet sending period, a packet sending time point corresponding to each node in the same synchronous packet sending period, so that each node sends a packet according to the corresponding packet sending time point, where the packet sending time points of each node do not overlap with each other.
In an embodiment of the present invention, the first configuration module 201 is specifically configured to sequentially configure the duration of the message sending cycle of each node according to the priority level of each node from high to low, where the higher the priority level of a node is, the shorter the duration of the corresponding message sending cycle is.
In an embodiment of the present invention, the determining module 202 specifically includes a calculating unit and a determining unit which are not shown in the drawings, wherein:
the computing unit is used for computing the least common multiple of the message sending period of each node;
and the determining unit is used for determining the calculated minimum common multiple as a synchronous message sending period of the CAN bus.
In an embodiment of the present invention, in a synchronization packet transmission period, a packet transmission time point of each node does not coincide with a transmission time point of the synchronization packet.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiment of the invention provides a CAN message sending method and a device, firstly configuring the message sending period of each node according to the priority of each node on a CAN bus, then determining the synchronous message sending period of the CAN bus according to the message sending period of each node, sending a synchronous message according to the synchronous message sending period through a first node with the highest priority level to ensure the time base synchronization among the nodes, further configuring the corresponding message sending time point of each node in the same synchronous message sending period according to the message sending period and the synchronous message sending period of each node, and enabling each node to send messages according to the corresponding message sending time point, wherein the message sending time points of each node are not overlapped. According to the CAN message sending method provided by the embodiment of the invention, the message sending period and the message sending time points which are not overlapped with each other are configured for each node of the CAN bus according to the priority level, so that bus contention among the nodes CAN be avoided, and the time synchronization of each node is kept through the synchronous messages, so that each node CAN be further ensured to accurately and unmistakably send messages according to the respective message sending period and the respective message sending time point, the message delay problem caused by CAN bus contention CAN be effectively solved, and the data transmission efficiency of the CAN bus is improved.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method as described above.
In this embodiment, if the module/unit integrated with the CAN message sending apparatus is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The electronic device provided by the embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps in the above embodiments of CAN message sending methods are implemented, for example, steps S11 to S14 shown in fig. 1. Alternatively, the processor implements the functions of the modules/units in the above embodiments of the CAN message sending apparatus when executing the computer program, for example, the first configuration module 201, the determination module 202, the second configuration module 203, and the third configuration module 204 shown in fig. 3.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the CAN messaging device. For example, the computer program may be partitioned into a first configuration module 201, a determination module 202, a second configuration module 203, and a third configuration module 204.
The electronic device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the electronic device in this embodiment may include more or fewer components, or combine certain components, or different components, for example, the electronic device may also include an input-output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the electronic device and that connects the various parts of the overall electronic device using various interfaces and wires.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the electronic device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A CAN message sending method is characterized by comprising the following steps:
configuring a message sending period of each node according to the priority of each node on the CAN bus;
determining a synchronous message sending period of the CAN bus according to the message sending period of each node;
distributing the sending authority of the synchronous message to a first node with the highest priority level so that the first node sends the synchronous message according to the synchronous message sending period;
and configuring corresponding message sending time points of the nodes in the same synchronous message sending period according to the message sending period of the nodes and the synchronous message sending period, so that the nodes send messages according to the corresponding message sending time points, wherein the message sending time points of the nodes are not overlapped.
2. The method according to claim 1, wherein the configuring the message sending cycle of each node according to the priority of each node on the CAN bus specifically comprises:
and sequentially configuring the time length of the message sending period of each node according to the priority level of each node from high to low, wherein the higher the priority level of each node is, the shorter the time length of the corresponding message sending period is.
3. The method according to claim 1, wherein the determining a synchronous packet transmission period of the CAN bus according to the packet transmission period of each node specifically comprises:
calculating the least common multiple of the message sending period of each node;
and determining the calculated minimum common multiple as a synchronous message sending period of the CAN bus.
4. The method of claim 1, further comprising:
in a synchronous message sending period, the message sending time point of each node is not coincident with the sending time point of the synchronous message.
5. A CAN message transmitting apparatus, the apparatus comprising:
the first configuration module is used for configuring the message sending period of each node according to the priority of each node on the CAN bus;
the determining module is used for determining the synchronous message sending period of the CAN bus according to the message sending period of each node;
the second configuration module is used for distributing the sending authority of the synchronous message to a first node with the highest priority level so that the first node sends the synchronous message according to the synchronous message sending period;
and a third configuration module, configured to configure, according to the packet sending period of each node and the synchronous packet sending period, a packet sending time point corresponding to each node in the same synchronous packet sending period, so that each node sends a packet according to the corresponding packet sending time point, where the packet sending time points of each node do not coincide with each other.
6. The apparatus of claim 5,
the first configuration module is specifically configured to sequentially configure the duration of the message sending cycle of each node according to the priority level of each node from high to low, where the higher the priority level of a node is, the shorter the duration of the corresponding message sending cycle is.
7. The apparatus according to claim 5, wherein the determining module specifically includes:
the computing unit is used for computing the least common multiple of the message sending period of each node;
and the determining unit is used for determining the calculated minimum common multiple as the synchronous message sending period of the CAN bus.
8. The apparatus of claim 5, wherein the message sending time point of each node is not coincident with the sending time point of the sync message in one sync message sending period.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-4 are implemented when the processor executes the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911184256.1A CN111106987A (en) | 2019-11-27 | 2019-11-27 | CAN message sending method, device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911184256.1A CN111106987A (en) | 2019-11-27 | 2019-11-27 | CAN message sending method, device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111106987A true CN111106987A (en) | 2020-05-05 |
Family
ID=70421681
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911184256.1A Pending CN111106987A (en) | 2019-11-27 | 2019-11-27 | CAN message sending method, device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111106987A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671512A (en) * | 2020-12-29 | 2021-04-16 | 江苏徐工工程机械研究院有限公司 | CAN message sending method, control unit, CAN node and network thereof |
CN113225151A (en) * | 2021-04-19 | 2021-08-06 | 杭州康吉森自动化科技有限公司 | Clock synchronization system, method and device based on CAN bus |
CN115145210A (en) * | 2022-09-02 | 2022-10-04 | 小米汽车科技有限公司 | Method and device for controlling control signal of vehicle, medium and chip |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090122812A1 (en) * | 2005-06-28 | 2009-05-14 | Tttech Computertechnik Aktiengesellschaft | Safe start-up of a network |
US20150215960A1 (en) * | 2012-08-28 | 2015-07-30 | Koc Universitesi | Method for generating a time table for sensors |
CN105721268A (en) * | 2016-01-29 | 2016-06-29 | 北京汽车研究总院有限公司 | Method and device for sending controller area network (CAN) bus message |
CN106453115A (en) * | 2016-10-18 | 2017-02-22 | 北京汽车研究总院有限公司 | Transmission method and device for CAN (Controller Area Network) network messages |
KR20170054013A (en) * | 2015-11-09 | 2017-05-17 | 현대자동차주식회사 | Synchronization method of can communication and computer-readable medium storing program for executing the same |
-
2019
- 2019-11-27 CN CN201911184256.1A patent/CN111106987A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090122812A1 (en) * | 2005-06-28 | 2009-05-14 | Tttech Computertechnik Aktiengesellschaft | Safe start-up of a network |
US20150215960A1 (en) * | 2012-08-28 | 2015-07-30 | Koc Universitesi | Method for generating a time table for sensors |
KR20170054013A (en) * | 2015-11-09 | 2017-05-17 | 현대자동차주식회사 | Synchronization method of can communication and computer-readable medium storing program for executing the same |
CN105721268A (en) * | 2016-01-29 | 2016-06-29 | 北京汽车研究总院有限公司 | Method and device for sending controller area network (CAN) bus message |
CN106453115A (en) * | 2016-10-18 | 2017-02-22 | 北京汽车研究总院有限公司 | Transmission method and device for CAN (Controller Area Network) network messages |
Non-Patent Citations (2)
Title |
---|
夏泽中;谭杰;杨浩;: "基于时间触发的CAN通信控制及其应用", 电气自动化, no. 06 * |
纪宏岩;: "一种基于时间触发的CAN发送机制", 汽车电器, no. 10 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671512A (en) * | 2020-12-29 | 2021-04-16 | 江苏徐工工程机械研究院有限公司 | CAN message sending method, control unit, CAN node and network thereof |
CN112671512B (en) * | 2020-12-29 | 2022-06-07 | 江苏徐工工程机械研究院有限公司 | CAN message sending method, control unit, CAN node and network thereof |
CN113225151A (en) * | 2021-04-19 | 2021-08-06 | 杭州康吉森自动化科技有限公司 | Clock synchronization system, method and device based on CAN bus |
CN113225151B (en) * | 2021-04-19 | 2023-08-25 | 杭州康吉森自动化科技有限公司 | Clock synchronization system, method and device based on CAN bus |
CN115145210A (en) * | 2022-09-02 | 2022-10-04 | 小米汽车科技有限公司 | Method and device for controlling control signal of vehicle, medium and chip |
CN115145210B (en) * | 2022-09-02 | 2022-12-09 | 小米汽车科技有限公司 | Method and device for controlling control signal of vehicle, medium and chip |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111106987A (en) | CAN message sending method, device, storage medium and electronic equipment | |
JP7003222B2 (en) | Random access response method, device, base station and terminal | |
CN110750341B (en) | Task scheduling method, device, system, terminal equipment and storage medium | |
US10342031B2 (en) | Data transmission method and device | |
CN111683118B (en) | Block chain-based consensus method and device, master node equipment and slave node equipment | |
EP3829236A1 (en) | Downlink detection and transmission method and device, communication system, terminal and base station | |
JP2014053741A (en) | Communication system | |
WO2020077568A1 (en) | Time-frequency resource contention method, apparatus, device and system for direct-connection communication | |
JP2017506842A (en) | Resource allocation method and user equipment | |
JP2021516884A (en) | How to send and receive paging messages, network devices, and user devices | |
JP2009081563A (en) | Car communication system and car related communication device | |
AU2019267894B2 (en) | Resource determination method, receiving method, device, network device and terminal | |
CN106488563B (en) | Resource selection method and device | |
JP7286761B2 (en) | Downlink control channel transmission method, downlink control channel reception method, terminal and network side equipment | |
CN109582626B (en) | Method, device and equipment for accessing bus and readable storage medium | |
US10742265B2 (en) | Method for access to a shared communication medium | |
US10904846B2 (en) | Synchronization method and device | |
CN112671512B (en) | CAN message sending method, control unit, CAN node and network thereof | |
US8489752B2 (en) | Method and system for controlling bus access | |
CN110545163B (en) | Message processing method, message processing device and vehicle-mounted control system | |
CN111813795A (en) | Method and apparatus for confirming transactions in a blockchain network | |
JP2020120352A (en) | On-vehicle communication system | |
CN115733710B (en) | Message sending method, target node, non-target node and message transmission system | |
CN111338680B (en) | Firmware upgrading method, firmware upgrading device and terminal of slave station | |
CN114760161B (en) | LIN bus scheduling method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200505 |