CN116582387A - Message sending method, device and equipment - Google Patents
Message sending method, device and equipment Download PDFInfo
- Publication number
- CN116582387A CN116582387A CN202310563263.2A CN202310563263A CN116582387A CN 116582387 A CN116582387 A CN 116582387A CN 202310563263 A CN202310563263 A CN 202310563263A CN 116582387 A CN116582387 A CN 116582387A
- Authority
- CN
- China
- Prior art keywords
- message
- periodic
- sending
- layer
- periodic message
- 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 58
- 230000000737 periodic effect Effects 0.000 claims abstract description 138
- 230000005540 biological transmission Effects 0.000 claims abstract description 17
- 238000004590 computer program Methods 0.000 claims description 12
- 230000000977 initiatory effect Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 101150008122 Bcan gene Proteins 0.000 description 5
- 210000003050 axon Anatomy 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
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
- H04L12/40026—Details regarding a bus guardian
-
- 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
-
- 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/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure provides a message sending method, device and equipment, relates to the technical field of unmanned driving, and particularly relates to the technical field of message transmission. One embodiment of the method comprises the following steps: writing the periodic message into a programmable logic memory when receiving a request for sending the periodic message, wherein the periodic message is a baud rate variable controller area network (CAN FD) message; configuring a programmable logic configuration table based on the information of the periodic message, and configuring periodic parameters in the programmable logic configuration table to a timer; starting a timer, and acquiring a periodic message from a programmable logic memory based on a storage index address in a programmable logic configuration table when the timer alarms; and writing the periodic message into a hardware layer cache, and then sending the periodic message from the hardware layer cache to a Controller Area Network (CAN) bus. The implementation improves the efficiency and accuracy of the CAN FD message transmission process.
Description
Technical Field
The present disclosure relates to the field of unmanned technology, and in particular, to the field of message transmission technology.
Background
In an unmanned computing system, the lidar is synchronized to the system by a CAN FD (Controller Area Network Flexible Data-Rate, variable-baud Rate controller area network) message. Tasks running on the system software will send CAN FD messages of different IDs to the radar. Since the CPU schedules between different tasks, the cycle accuracy cannot be guaranteed. If the period jitter exceeds the threshold, an error case is reported.
Disclosure of Invention
The embodiment of the disclosure provides a message sending method, a message sending device, a message sending equipment, a message storage medium and a program product.
In a first aspect, an embodiment of the present disclosure provides a method for sending a message, including: writing the periodic message into a programmable logic memory when receiving a request for sending the periodic message, wherein the periodic message is a baud rate variable controller area network (CAN FD) message; configuring a programmable logic configuration table based on the information of the periodic message, and configuring periodic parameters in the programmable logic configuration table to a timer; starting a timer, and acquiring a periodic message from a programmable logic memory based on a storage index address in a programmable logic configuration table when the timer alarms; and writing the periodic message into a hardware layer cache, and then sending the periodic message from the hardware layer cache to a Controller Area Network (CAN) bus.
In a second aspect, an embodiment of the present disclosure provides a message sending apparatus, including: the first writing module is configured to write the periodic message into the programmable logic memory when receiving a sending request of the periodic message, wherein the periodic message is a baud rate variable controller area network (CAN FD) message; a configuration module configured to configure a programmable logic configuration table based on the information of the periodic message, and to configure periodic parameters in the programmable logic configuration table to the timer; the acquisition module is configured to start a timer and acquire a periodic message from the programmable logic memory based on a storage index address in the programmable logic configuration table when the timer alarms; the first sending module is configured to write the periodic message into the hardware layer cache and then send the periodic message from the hardware layer cache to the controller area network CAN bus.
In a third aspect, an embodiment of the present disclosure proposes an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method as described in any one of the implementations of the first aspect.
In a fifth aspect, embodiments of the present disclosure propose a computer program product comprising a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the message sending method provided by the embodiment of the disclosure, the periodic message is written into the FPGA PL memory, the information of the periodic message is configured into the FPGA PL configuration table, and meanwhile, the periodic parameters in the FPGA PL configuration table are transmitted to the timer. And when the timer alarms, acquiring a periodic message from the FPGA PL memory and sending the periodic message. The use of FPGA PL CAN speed up the sending process of CAN FD messages. The timer is utilized to ensure that the periodic message is sent according to the preset periodic time, so that the efficiency and accuracy of the CAN FD message sending process are greatly improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of one embodiment of a messaging method according to the present disclosure;
FIG. 2 is a flow chart of yet another embodiment of a messaging method according to the present disclosure;
FIG. 3 is a flow chart of another embodiment of a messaging method according to the present disclosure;
FIG. 4 is a data flow diagram of a messaging;
FIG. 5 is a block diagram of a message transmission;
fig. 6 is a schematic diagram of the structure of one embodiment of a messaging device according to the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing a messaging method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates a flow 100 of one embodiment of a messaging method according to the present disclosure. The message sending method comprises the following steps:
step 101, when receiving a request for sending a periodic message, writing the periodic message into a programmable logic memory.
In this embodiment, when a request for sending a periodic message is received, the periodic message may be written into a PL (Progarmmable Logic, programmable logic) memory for temporary storage.
The periodic message may be a CAN FD message that is periodically sent. In an unmanned computing system, the lidar is synchronized to the system by CAN FD messages. Tasks running on the system software will send CAN FD messages of different IDs to the radar. CAN FD refers to a modern CAN (Controller Area Network ) bus protocol that allows for higher data transfer rates and payload sizes. CAN FD messages are data frames transmitted according to CAN FD protocol, and CAN be communicated at high speed and reliably over CAN FD bus.
The PL may be an FPGA (Field Programmable Gate Array Progarmmable Logic, field programmable gate array) PL, which may be used to accelerate the sending process of CAN FD messages.
Step 102, configuring a programmable logic configuration table based on the information of the periodic message, and configuring the periodic parameters in the programmable logic configuration table to the timer.
In this embodiment, the PL configuration table may be configured based on the information of the period message, and the period parameter in the PL configuration table is configured to the timer.
The PL configuration table may be an FPGA PL configuration table, where information of a periodic packet may be configured in the FPGA PL configuration table, including but not limited to: the parameters of the periodic message such as period, identification, data length, enabling and storing index address. Meanwhile, the period parameter in the FPGAPL configuration table may be configured to a timer.
Step 103, starting a timer, and acquiring a periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table when the timer alarms.
In this embodiment, a timer is started, and when the timer alarms, a periodic message can be found in the PL memory based on the storage index address in the PL configuration table.
Here, after the timer is started, if the count value is equal to the period parameter, the timer alarms to prompt the sending time of the current arrival period message.
And 104, writing the periodic message into a hardware layer cache, and then sending the periodic message from the hardware layer cache to a controller area network CAN bus.
In this embodiment, when the timer alarms, the periodic message may be written into the hardware layer buffer first, and then sent from the hardware layer buffer to the CAN bus, so as to ensure that the periodic message is sent according to a predetermined period time, and greatly improve the efficiency and accuracy of the CAN FD message sending process.
According to the message sending method provided by the embodiment of the disclosure, the periodic message is written into the FPGA PL memory, the information of the periodic message is configured into the FPGAPL configuration table, and meanwhile, the periodic parameters in the FPGA PL configuration table are transmitted to the timer. And when the timer alarms, acquiring a periodic message from the FPGAPL memory for sending. The use of FPGA PL CAN speed up the sending process of CAN FD messages. The timer is utilized to ensure that the periodic message is sent according to the preset periodic time, so that the efficiency and accuracy of the CAN FD message sending process are greatly improved.
With continued reference to fig. 2, a flow 200 of yet another embodiment of a messaging method in accordance with the present disclosure is shown. The message sending method comprises the following steps:
step 201, when receiving a request for sending a periodic message, writing the periodic message into a programmable logic memory.
Step 202, configuring a programmable logic configuration table based on the information of the periodic message, and configuring the periodic parameters in the programmable logic configuration table to a timer.
Step 203, starting a timer, and acquiring a periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table when the timer alarms.
Step 204, the periodic message is written into the hardware layer buffer memory, and then sent from the hardware layer buffer memory to the controller area network CAN bus.
In this embodiment, the specific operations of steps 201 to 204 are described in detail in steps 101 to 104 in the embodiment shown in fig. 1, and are not described herein.
In step 205, when a request for sending an aperiodic packet is received, the aperiodic packet is written into the hardware cache.
In this embodiment, when a transmission request of an aperiodic packet is received, the aperiodic packet may be written into the hardware cache.
Wherein, the non-periodic message may be a CAN FD message.
Step 206, the aperiodic message is read from the hardware buffer and sent to the CAN bus.
In this embodiment, the aperiodic packet is read from the hardware cache and sent to the CAN bus.
It should be noted that, the sending process of the non-periodic message is similar to the sending process of the periodic message when the timer alarms, and specifically, refer to step 104 shown in fig. 1, which is not repeated here.
As can be seen from fig. 2, compared with the embodiment corresponding to fig. 1, the flow 200 of the message sending method in this embodiment adds a step of sending an aperiodic message. Therefore, the scheme described in the embodiment not only can send periodic messages, but also can send non-periodic messages, and the application scene is wider.
With further reference to fig. 3, a flow 300 of another embodiment of a messaging method in accordance with the present disclosure is shown. The message sending method comprises the following steps:
step 301, a request for sending a periodic message is initiated by a radar service layer.
In this embodiment, the radar (radar) service layer may initiate a request to send a periodic message.
Step 302, calling the middle layer to transmit a sending request of the periodic message from the radar service layer to the CAN FD driving layer.
In this embodiment, the intermediate layer may transmit a transmission request of the periodic packet from the radar service layer to the CAN FD driving layer. The intermediate layer CAN be bcan, and is positioned between the radar service layer and the CAN FD driving layer.
And step 303, writing the periodic message into a first base address register by the CAN FD driving layer.
In this embodiment, the CAN FD driving layer may write the periodic packet into the first base address register. Typically, the periodic message may be sent to bar4 by reading a message instruction stored by the OCM MEM. Wherein the OCM MEM may be an on-chip memory of the FPGA and bar4 may be a first base address register.
And step 304, the CAN FD driving layer writes the information of the periodic message into a second base address register.
In this embodiment, the CAN FD driving layer may write the information of the periodic packet into the second base address register. Wherein the second base address register may be bar0.
Step 305, the period parameter in the programmable logic configuration table is configured to the timer.
Step 306, starting a timer, and acquiring a periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table when the timer alarms.
Step 307, the periodic message is written into the hardware layer buffer memory, and then sent from the hardware layer buffer memory to the controller area network CAN bus.
In this embodiment, the specific operations of steps 305-307 are described in detail in steps 202-204 in the embodiment shown in fig. 2, and are not described herein.
Step 308, initiate a request for sending an aperiodic message through the radar service layer.
In this embodiment, the radar service layer may initiate a request for sending an aperiodic packet.
Step 309, call middle layer to transmit the sending request of non-periodic message from radar service layer to CAN FD driving layer.
In this embodiment, the intermediate layer may transmit a transmission request of the aperiodic packet from the radar service layer to the CAN FD driving layer. The intermediate layer CAN be bcan, and is positioned between the radar service layer and the CAN FD driving layer.
And 310, writing the periodic message into a hardware layer cache by the CAN FD driving layer.
In this embodiment, the CAN FD driving layer may write the periodic packet into the hardware layer cache. Wherein the hardware layer cache may be bar2.
Step 311, call the CAN FD protocol stack to send an aperiodic message.
In this embodiment, the CAN FD driving layer may call the CAN FD protocol stack to send an aperiodic packet.
The CAN FD protocol stack is a new standard based on a CAN communication protocol, and improves the capabilities of data rate, frame payload and the like. The CAN FD protocol stack is a software implementation for realizing the communication protocol and comprises different parts such as an application layer, a transmission layer, a data link layer, a physical layer and the like.
In particular, the CAN FD protocol stack employs some new techniques to achieve more efficient data communication and more flexible configuration options. The method mainly comprises the following steps:
1. the hardware communication interface supports CAN FD protocol, so that it CAN reach 2Mbit/s data transmission rate without changing original physical connection mode;
2. the new data format allows for greater data frame loading and retains the data frame format of classical CAN, thereby ensuring backward compatibility;
3. the protocol stack supports a self-adaptive bit timer, and the bit rate on the CAN bus CAN be dynamically adjusted within a specified range according to the conditions of the length of a communication cable, the data transmission rate and the like, so that the problems of baud rate error, clock jitter and the like caused by the change of the length of the line are avoided;
4. and the enhanced security mechanisms such as information filtering and authentication functions are supported to protect sensitive information in the CAN FD protocol stack from being illegally received and tampered.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the message sending method in this embodiment highlights the periodic message storing step and the non-periodic message sending step. Therefore, the scheme described in the embodiment describes the processing process of the periodic message and the non-periodic message in each network layer in detail, so that the scheme is clearer and more complete, and is easy to implement.
For ease of understanding, fig. 4 shows a data flow diagram of messaging.
The data flow of the aperiodic message is as follows:
(1) The radar service layer initiates a request for sending the aperiodic message.
(2) Invoking the bcan device of the middle tier.
Wherein, bcan is an intermediate layer between the radar service layer and the axon driver layer. The axon driver layer is a CAN FD driver layer.
(3) The axon driver layer starts to access the pc ie bar2 space of the hardware and write data into the CAN FIFO.
Wherein the CAN FIFO is a hardware layer cache.
(4) The hardware layer starts to call the CAN FD protocol stack to send the aperiodic message.
Wherein the Xilinx CAN IP is a hardware CAN FD protocol stack.
The data flow of the periodic message is as follows:
(1) The radar service layer initiates a request for sending periodic messages.
(2) Invoking the bcan device of the middle tier.
(3) The axon driver layer starts writing data into the bar4 space for temporary storage, then configures the bar0 space and starts a timer for counting.
Where bar is the space of the hardware device pcie.
(4) The FPGAPL sends periodic messages to the CAN bus on time according to the ringing of the timer.
For ease of understanding, fig. 5 shows a block diagram of messaging.
The sending flow of the periodic message is as follows:
(1) After the driver layer receives the transmission request of the periodic message of the upper layer service, the driver layer configures a periodic parameter configuration table (bar 0), writes parameters such as a period, a transmission enable, an ID, a storage index address and the like into the table, and then writes the periodic message to be transmitted into an OCM MEM (bar 4) for temporary storage.
Wherein the OCM MEM is an on-chip memory of the FPGA, referring to the above mentioned memory table of bar4.
(2) The cycan_tab can continuously scan the tab ram to detect whether a message needs to be sent. If so, the cycle parameters are written to the timer ram and then the timer ram count is started.
The cycan_tab is used for polling tab_ram to see whether a periodic message to be sent exists. And configures the period parameter to the timer ram. tab ram is a periodic message store table. the timer ram is a timer table.
(3) The cylcan_robin_timer will constantly monitor the timer ram to see if there is a ringing. If so, a request for sending a periodic message is sent to the cycan_tx module.
The cylcan_robin_timer is used for polling the timer ram, searching the alarm mark, and applying for sending a message to cylcan_tx. cylcan_timer is used to poll the timer ram, update the time stamp in the timer table, and place the alarm flag.
(4) After the cycan_tx receives a sending request of the periodic message, the tab ram is read to read the corresponding storage index address, and then the periodic message to be sent is read into the OCM MEM according to the storage index address. While the alarm flag is cleared.
The cycan_tx is used for receiving a sending request, reading a message command stored in the OCM MEM, and sending the message command to can axi fifo. can axififo is a hardware layer cache.
(5) The periodic message to be sent is written into can axi fifo and then sent to canfd bus.
Where bus_arb is RAM (Random Access Memory ) interface bus arbitration.
The sending flow of the non-periodic message is as follows:
(1) And directly writing can axi fifo for transmission.
Wherein can axififo is a hardware layer cache.
With further reference to fig. 6, as an implementation of the method shown in the foregoing drawings, the disclosure provides an embodiment of a packet sending device, where an embodiment of the device corresponds to the embodiment of the method shown in fig. 1, and the device may be specifically applied to various electronic devices.
As shown in fig. 6, the message sending apparatus 600 of the present embodiment may include: a first writing module 601, a configuration module 602, an acquisition module 603 and a first sending module 604. The first writing module 601 is configured to write a periodic message into the programmable logic memory when receiving a transmission request of the periodic message, where the periodic message is a baud rate variable controller area network CAN FD message; a configuration module 602 configured to configure a programmable logic configuration table based on the information of the periodic message, and to configure the periodic parameters in the programmable logic configuration table to the timer; an obtaining module 603 configured to start a timer and obtain a periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table when the timer alarms; the first sending module 604 is configured to write the periodic message into the hardware layer cache, and then send the periodic message from the hardware layer cache to the controller area network CAN bus.
In this embodiment, in the packet sending apparatus 600: the specific processing and technical effects of the first writing module 601, the configuration module 602, the obtaining module 603, and the first sending module 604 may refer to the description of steps 101 to 104 in the corresponding embodiment of fig. 1, and are not described herein.
In some alternative implementations of the present embodiment, the first writing module 601 is further configured to: initiating a request for sending a periodic message through a radar service layer; calling an intermediate layer to transmit a sending request of the periodic message from the radar service layer to the CAN FD driving layer; and writing the periodic message into the first base address register by the CAN FD driving layer.
In some alternative implementations of the present embodiment, the configuration module 602 is further configured to: and writing the information of the periodic message into a second base address register by the CAN FD driving layer.
In some optional implementations of the present embodiment, the packet sending apparatus 600 further includes: the second writing module is configured to write the aperiodic message into the hardware cache when receiving a sending request of the aperiodic message, wherein the aperiodic message is a CAN FD message; and the second sending module is configured to read the aperiodic message from the hardware cache and send the aperiodic message to the CAN bus.
In some optional implementations of the present embodiment, the second writing module is further configured to: initiating a request for sending an aperiodic message through a radar service layer; calling an intermediate layer to transmit a sending request of the non-periodic message from the radar service layer to the CAN FD driving layer; and writing the periodic message into a hardware layer cache by the CAN FD driving layer.
In some optional implementations of this embodiment, the second transmitting module is further configured to: and calling the CAN FD protocol stack to send an aperiodic message.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as a messaging method. For example, in some embodiments, the messaging method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When a computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the messaging method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the messaging method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (15)
1. A message sending method comprises the following steps:
writing the periodic message into a programmable logic memory when receiving a sending request of the periodic message, wherein the periodic message is a baud rate variable controller area network (CAN FD) message;
configuring a programmable logic configuration table based on the information of the periodic message, and configuring periodic parameters in the programmable logic configuration table to a timer;
starting the timer, and acquiring the periodic message from the programmable logic memory based on a storage index address in the programmable logic configuration table when the timer alarms;
and writing the periodic message into a hardware layer cache, and then sending the periodic message from the hardware layer cache to a Controller Area Network (CAN) bus.
2. The method of claim 1, wherein the writing the periodic message into the programmable logic memory when the request to send the periodic message is received comprises:
initiating a request for sending the periodic message through a radar service layer;
calling an intermediate layer to transmit a transmission request of the periodic message from the radar service layer to a CAN FD driving layer;
and writing the periodic message into a first base address register by the CAN FD driving layer.
3. The method of claim 2, wherein the configuring the programmable logic configuration table based on the information of the periodic message comprises:
and writing the information of the periodic message into a second base address register by the CAN FD driving layer.
4. A method according to any one of claims 1-3, wherein the method further comprises:
when receiving a sending request of an aperiodic message, writing the aperiodic message into the hardware cache, wherein the aperiodic message is a CAN FD message;
and reading the aperiodic message from the hardware cache and sending the aperiodic message to the CAN bus.
5. The method of claim 4, wherein the writing the aperiodic message into the hardware cache upon receiving a request to send the aperiodic message comprises:
initiating a request for sending the aperiodic message through a radar service layer;
calling an intermediate layer to transmit a sending request of the aperiodic message from the radar service layer to a CAN FD driving layer;
and writing the periodic message into the hardware layer cache by the CAN FD driving layer.
6. The method of claim 5, wherein the reading the aperiodic message from the hardware cache and sending it onto the CAN bus comprises:
and calling a CAN FD protocol stack to send the aperiodic message.
7. A message transmitting apparatus, comprising:
the first writing module is configured to write the periodic message into the programmable logic memory when receiving a sending request of the periodic message, wherein the periodic message is a baud rate variable controller area network (CAN FD) message;
a configuration module configured to configure a programmable logic configuration table based on the information of the periodic message, and configure periodic parameters in the programmable logic configuration table to a timer;
the acquisition module is configured to start the timer and acquire the periodic message from the programmable logic memory based on a storage index address in the programmable logic configuration table when the timer alarms;
the first sending module is configured to write the periodic message into a hardware layer cache and then send the periodic message from the hardware layer cache to a controller area network CAN bus.
8. The apparatus of claim 7, wherein the first writing module is further configured to:
initiating a request for sending the periodic message through a radar service layer;
calling an intermediate layer to transmit a transmission request of the periodic message from the radar service layer to a CAN FD driving layer;
and writing the periodic message into a first base address register by the CAN FD driving layer.
9. The apparatus of claim 8, wherein the configuration module is further configured to:
and writing the information of the periodic message into a second base address register by the CAN FD driving layer.
10. The apparatus of any of claims 7-9, wherein the apparatus further comprises:
the second writing module is configured to write the aperiodic message into the hardware cache when receiving a sending request of the aperiodic message, wherein the aperiodic message is a CAN FD message;
and the second sending module is configured to read the aperiodic message from the hardware cache and send the aperiodic message to the CAN bus.
11. The apparatus of claim 10, wherein the second writing module is further configured to:
initiating a request for sending the aperiodic message through a radar service layer;
calling an intermediate layer to transmit a sending request of the aperiodic message from the radar service layer to a CAN FD driving layer;
and writing the periodic message into the hardware layer cache by the CAN FD driving layer.
12. The apparatus of claim 11, wherein the second transmission module is further configured to:
and calling a CAN FD protocol stack to send the aperiodic message.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310563263.2A CN116582387A (en) | 2023-05-18 | 2023-05-18 | Message sending method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310563263.2A CN116582387A (en) | 2023-05-18 | 2023-05-18 | Message sending method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116582387A true CN116582387A (en) | 2023-08-11 |
Family
ID=87544896
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310563263.2A Pending CN116582387A (en) | 2023-05-18 | 2023-05-18 | Message sending method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116582387A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117997673A (en) * | 2024-03-29 | 2024-05-07 | 昆易电子科技(上海)有限公司 | Bus testing device and bus testing method |
-
2023
- 2023-05-18 CN CN202310563263.2A patent/CN116582387A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117997673A (en) * | 2024-03-29 | 2024-05-07 | 昆易电子科技(上海)有限公司 | Bus testing device and bus testing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11243595B2 (en) | Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker | |
US20240349068A1 (en) | Method, apparatus, electronic device and storage medium for establishing a mobile data network | |
CN116582387A (en) | Message sending method, device and equipment | |
CN114205762A (en) | Short message flow control method, equipment and storage medium | |
CN107509160B (en) | Data transmission method, electronic device, and storage medium | |
CN112291325A (en) | Message processing method and device and computer system | |
CN115866156B (en) | Data processing method, device, electronic equipment and storage medium | |
CN112860431A (en) | Connection method, system, equipment and storage medium of micro service node | |
CN112422485B (en) | Communication method and device of transmission control protocol | |
CN115514718B (en) | Data interaction method, control layer and equipment based on data transmission system | |
CN113010285B (en) | Method, apparatus, device, medium, and article for processing data | |
CN107729136B (en) | Processing priority configuration method and device based on FPGA | |
CN113326192B (en) | Application testing method, device, equipment and storage medium for mobile terminal | |
CN112910910B (en) | Method, device, equipment and storage medium for processing OPCDA protocol message | |
CN113901066A (en) | Method for updating state after instance operation | |
CN113726883A (en) | Cloud data processing method, related device and computer program product | |
CN112084099A (en) | Method, device and equipment for obtaining alarm state value based on host and storage medium | |
CN113810889B (en) | Information interaction method, device, equipment and storage medium | |
CN115037802B (en) | Request processing method and device, electronic equipment and storage medium | |
CN116662276B (en) | Data processing method, device, electronic equipment and storage medium | |
CN117675720B (en) | Message transmission method and device, electronic equipment and storage medium | |
CN116743587B (en) | Virtual network interface implementation method and device based on heterogeneous computing accelerator card | |
CN113032040B (en) | Method, apparatus, device, medium, and article for processing tasks | |
CN117651078A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN117440064A (en) | Data transmission method, device, equipment and medium based on function code |
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 |