Multi-protocol, multi-port data receiving method, device and power module
By using a two-way registration mechanism, the port and email address for receiving protocols are registered in the first list, while the ID number and parsing function are registered in the second list. This solves the problem of code modification when power modules are facing different manufacturers' receiving protocols, and realizes the power module's flexible adaptation and code reusability.
Patent Information
- Application Number
- CN202310179986.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-02-28
AI Technical Summary
Existing power modules lack the ability to automatically allocate and process different receiving protocols from different manufacturers, resulting in frequent code modifications and poor code reusability.
A two-way registration mechanism is adopted, which registers the port and email address of the receiving protocol in the first list, and the ID number and parsing function of the receiving protocol in the second list, so as to achieve orderly and accurate data allocation.
It enables automatic allocation of receiving protocols from different manufacturers for power modules, reducing code modifications and improving code reusability.
Smart Images

Figure CN116260897B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power electronics technology, and in particular relates to a multi-protocol, multi-port data receiving method, device and power module. Background Technology
[0002] Whether it's the power modules used in charging piles at charging stations, or vehicle-mounted power modules and military-grade power modules, they typically use CAN communication for protocol interaction. For power modules, different receiving protocols need to be designed to meet the requirements of different manufacturers. Furthermore, power modules may have front-end and back-end stages that need to exchange information. If multiple manufacturers use different receiving protocols—that is, different manufacturers may require multiple receiving protocols such as A, B, C, and D—the receiving protocols of the front-end and back-end stages of the power module may differ from the manufacturer's receiving protocol. Currently, there is a lack of an architecture that can automatically allocate and process receiving protocols, leading to repeated code modifications based on different customer needs and poor code reusability. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a multi-protocol, multi-port data receiving method, apparatus and power module, so as to realize the orderly and accurate distribution of data received from each port to each receiving protocol, unify the receiving process and reduce code modification.
[0004] A first aspect of this invention provides a multi-protocol, multi-port data reception method, the method comprising:
[0005] Register at least one receiving protocol to the power module; wherein, registration includes downward registration and self-registration, downward registration is to register the port used by each receiving protocol and the receiving mailbox under that port to a first list, and self-registration is to register the ID number and parsing function of each receiving protocol to a second list;
[0006] Data reception and processing are performed according to the registered reception protocol.
[0007] In conjunction with the first aspect, in one possible implementation of the first aspect, data reception processing is performed according to a registered reception protocol, including:
[0008] Determine whether the power module has received data;
[0009] If the power module receives data, it iterates through all the receiving mailboxes under the registered ports according to the first list, and extracts the data and protocol ID from each receiving mailbox into the preset buffer.
[0010] Based on the second list, the data in the buffer is received and processed one by one.
[0011] In conjunction with the first aspect, in one possible implementation of the first aspect, the power module also registers a common detection flag for all receiving protocols; if any of the receiving mailboxes under any registered port receives data, the common detection flag is set; if none of the receiving mailboxes under any of the registered ports receive data, the common detection flag remains set and remains in the initial state.
[0012] Accordingly, determining whether the power module has received data includes:
[0013] If the public detection flag is set, it indicates that the power module has received data;
[0014] If the public detection flag remains in the initial state, it means that the power module has not received any data.
[0015] In conjunction with the first aspect, in one possible implementation of the first aspect, the data in the buffer is received and processed one by one according to the second list, including:
[0016] Extract data and protocol IDs from the cache one by one;
[0017] Based on the protocol ID, retrieve the parsing function corresponding to the current data from the second list;
[0018] The current data is received and processed based on the parsing function.
[0019] Furthermore, after receiving and processing the current data based on the parsing function, it also includes:
[0020] Determine whether the current data needs to be forwarded;
[0021] If so, the external forwarding module will be called to forward the current data.
[0022] In conjunction with the first aspect, in one possible implementation of the first aspect, multiple ports of the power module are CAN ports, and each CAN port has multiple receiver mailboxes.
[0023] A second aspect of the present invention provides a multi-protocol multi-port data receiving apparatus, the apparatus comprising:
[0024] The protocol registration module is used to register at least one receiving protocol to the power module. The registration includes downward registration and self-registration. Downward registration involves registering the port used by each receiving protocol and the receiving mailbox under that port to a first list. Self-registration involves registering the ID number and parsing function of each receiving protocol to a second list.
[0025] The receiving and processing module is used to receive and process data according to the registered receiving protocol.
[0026] In conjunction with the second aspect, in one possible implementation of the second aspect, the receiving and processing module is specifically used for:
[0027] Determine whether the power module has received data;
[0028] If the power module receives data, it iterates through all the receiving mailboxes under the registered ports according to the first list, and extracts the data and protocol ID from each receiving mailbox into the preset buffer.
[0029] Based on the second list, the data in the buffer is received and processed one by one.
[0030] A third aspect of the present invention provides a power module including an electronic device. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-protocol multi-port data receiving method as described in the first aspect and any possible implementation thereof.
[0031] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the multi-protocol multi-port data receiving method as described in the first aspect and any possible implementation thereof.
[0032] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0033] This invention employs a "two-way registration" method, which includes downward registration and self-registration. Downward registration involves registering the port used by each receiving protocol and the receiving mailbox under that port to a first list to enable the mailbox function of the underlying driver port. Self-registration involves registering the ID number and parsing function of each receiving protocol to a second list so that data reception and processing operations can be performed after receiving notifications from the underlying driver. Based on the first and second lists, data received from different ports can be orderly and accurately allocated to each receiving protocol, enabling the power module to be compatible with different manufacturers. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the multi-protocol, multi-port data receiving method provided by the present invention. Figure 1 ;
[0036] Figure 2 This is a flowchart illustrating the multi-protocol, multi-port data receiving method provided by the present invention. Figure 2 ;
[0037] Figure 3 This is a schematic diagram of the structure of the multi-protocol multi-port data receiving device provided by the present invention;
[0038] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0039] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0040] To illustrate the technical solution described in this invention, specific embodiments are described below.
[0041] This invention aims to design an architecture capable of automatically allocating and processing receiving protocols to meet the needs of different data reception interactions within a power module. The problems to be solved include:
[0042] (1) This receiving protocol is received through which CAN communication port.
[0043] (2) Which mailbox of the CAN communication port this receiving protocol uses to receive.
[0044] (3) What is the receive ID of this receiving protocol?
[0045] (4) Which parsing function is used to parse this receiving protocol.
[0046] Figure 1 This is a schematic diagram illustrating the implementation flow of the multi-protocol, multi-port data receiving method provided in an embodiment of the present invention. See also... Figure 1 As shown, the method includes:
[0047] Step S101: Register at least one receiving protocol to the power module. Registration includes downward registration and self-registration. Downward registration involves registering the port used by each receiving protocol and the receiving mailbox under that port to a first list. Self-registration involves registering the ID number and parsing function of each receiving protocol to a second list.
[0048] In this embodiment, see Figure 2As shown, the power module includes n ports. As one possible implementation, each port can be a CAN port, and each CAN port has n receiving mailboxes. After a data frame is received in a mailbox on a CAN port, to ensure orderly and accurate allocation to the corresponding receiving protocol, the user needs to register the information of each newly added receiving protocol. Each CAN receiving protocol needs to register two types of information: one is downward registration, i.e., registering the receiving mailbox information of this protocol; the other is self-registration, i.e., registering the receiving processing information of this protocol.
[0049] Downward Registration: The underlying layer has n ports, each with 32 mailboxes. It's unnecessary to check whether data frames are received from all 32*n mailboxes; only a few user-specified receiving mailboxes need to be checked. These user-specified receiving mailboxes are the "detection targets," such as mailbox 3 in CAN0, mailbox 5 in CAN1, mailbox 8 in CAN5, mailbox 8 in CAN0, etc. Mailbox x in CANx is registered to the underlying driver through downward registration. Downward registration means that the receiving mailbox information needs to be registered with the receiving mailbox node, i.e., registered to the underlying layer. The registration information includes the receiving mailbox for this protocol and the name of the underlying driver device (port) required by this protocol. The above registration information varies depending on each protocol; therefore, users need to register for each protocol individually according to their needs. It is important to note here that if multiple receiving mailboxes are registered on the same CAN port, the mask of the receiving mailbox with higher priority must be set correctly. That is, the mask must be able to block the ID number with lower priority. If it cannot be blocked, the receiving mailbox with lower priority ID number will be received by the receiving mailbox with higher priority, and the receiving mailbox with lower priority will never receive the information. Since the protocol parsing needs to check whether the ID matches before it can parse the data, the information received by the receiving mailbox with lower priority ID will never match successfully. As a result, the protocol corresponding to that ID will be discarded and cannot be processed normally.
[0050] Self-registration: After receiving a data frame, the "detection object" needs to specify the parsing method according to the user's choice. This method is implemented through self-registration. Self-registration involves registering the protocol's receiving and processing information into the receiving linked list node, that is, registering it into the receiving and processing unit node. The registration information includes the protocol's receiving ID number and the protocol's parsing function (receiving and processing callback function), so that it can perform receiving data processing operations after receiving notification from the underlying driver.
[0051] Step S102: Perform data reception processing according to the registered reception protocol.
[0052] In this embodiment, if any of the activated mailboxes in the underlying driver port receives a data frame, a notification will be sent. Then, each registered mailbox will be traversed to check if data has been received. If data is received, it will be extracted and distributed to the corresponding receiving protocol for processing.
[0053] As can be seen, this embodiment of the invention adopts a "two-way registration" method, which includes downward registration and self-registration. Downward registration involves registering the port used by each receiving protocol and the receiving mailbox under that port to a first list to enable the mailbox function of the underlying driver port; self-registration involves registering the ID number and parsing function of each receiving protocol to a second list so that data receiving and processing operations can be performed after receiving notifications from the underlying driver. Based on the first and second lists, data received from different ports can be allocated to each receiving protocol in an orderly and accurate manner, making the power module suitable for different manufacturers.
[0054] In one possible implementation, the data reception processing according to the registered reception protocol described in step S102 above can be detailed as follows:
[0055] Determine whether the power module has received data;
[0056] If the power module receives data, it iterates through all the receiving mailboxes under the registered ports according to the first list, and extracts the data and protocol ID from each receiving mailbox into the preset buffer.
[0057] Based on the second list, the data in the buffer is received and processed one by one.
[0058] As one possible implementation, the power module also registers a common detection flag for all receiving protocols; if any of the receiving mailboxes under any registered port receives data, the common detection flag is set to 1; if none of the receiving mailboxes under any of the registered ports receive data, the common detection flag remains in the initialized state.
[0059] Accordingly, determining whether the power module has received data can be detailed as follows:
[0060] If the public detection flag is set, it indicates that the power module has received data;
[0061] If the public detection flag remains in the initial state, it means that the power module has not received any data.
[0062] As one possible implementation, the data in the buffer is received and processed one by one according to the second list, which can be described in detail as follows:
[0063] Extract data and protocol IDs from the cache one by one;
[0064] Based on the protocol ID, retrieve the parsing function corresponding to the current data from the second list;
[0065] The current data is received and processed based on the parsing function.
[0066] In this embodiment, see Figure 2 As shown, during downward registration, a common detection flag for all receiving protocols is also registered. That is, all registered email addresses use a common observable notification callback function. This function primarily sets a notification variable. When any of the registered email addresses receives data, this notification variable is set to 1. Then, each registered email address is iterated through to check if data has been received. If data is received, it is extracted and processed. After all data processing is complete, the common detection flag is reset to 0.
[0067] Combination Figure 2 As shown, in one embodiment, the data receiving method is as follows:
[0068] By using the underlying driver device name to receive email information according to this protocol, the device driver for this protocol is located, and then the receiving email address for this protocol is specified, thus activating "a specific receiving email address for a specific port of CAN" and implementing "selective registration". If a data frame is received in the detected object, the CAN receiving processing unit is notified for processing. Simultaneously, to facilitate notification of the CAN receiving processing unit by the "detected object", the common detection flag notification callback function for all protocols is registered to the underlying layer. As soon as a message is received by a specified email address on any CAN port, the common detection flag is set to 1, notifying the CAN receiving processing unit to perform data reception processing. The detailed data reception processing flow is as follows:
[0069] Step 1: Iterate through all the "detection objects" in all device drivers according to the first list and check whether the "detection objects" have received data.
[0070] The second step is to copy the data received from the "detection object" and the corresponding protocol ID to the cache one by one, and at the same time reset the common detection flag to 0.
[0071] The third step is to traverse the second list to parse the data. Based on the protocol ID, query the parsing function corresponding to the current data from the second list, and process the current data based on the parsing function.
[0072] As one possible implementation, after receiving and processing the current data based on the parsing function, it also includes:
[0073] Determine whether the current data needs to be forwarded;
[0074] If so, the external forwarding module will be called to forward the current data.
[0075] In this embodiment, considering that the data frames received by CAN may not need to be parsed by this module, but need to be forwarded by other peripherals, when parsing each receiving protocol, it is necessary to determine whether the current protocol needs to request forwarding. If forwarding is required, then forwarding processing is performed.
[0076] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0077] This invention provides a multi-protocol, multi-port data receiving device, see [link to documentation]. Figure 3 As shown, the device 30 includes:
[0078] Protocol registration module 31 is used to register at least one receiving protocol to the power module; wherein, registration includes downward registration and self-registration, downward registration is to register the port used by each receiving protocol and the receiving mailbox under that port to a first list, and self-registration is to register the ID number and parsing function of each receiving protocol to a second list.
[0079] The receiving and processing module 32 is used to receive and process data according to the registered receiving protocol.
[0080] As one possible implementation, the receiving and processing module 32 is specifically used for:
[0081] Determine whether the power module has received data;
[0082] If the power module receives data, it iterates through all the receiving mailboxes under the registered ports according to the first list, and extracts the data and protocol ID from each receiving mailbox into the preset buffer.
[0083] Based on the second list, the data in the buffer is received and processed one by one.
[0084] As one possible implementation, the power module also registers a common detection flag for all receiving protocols; if any registered port's receiving mailbox receives data, the common detection flag is set; if none of the registered ports' receiving mailboxes receive data, the common detection flag remains initialized. Correspondingly, the receiving processing module 32 is specifically used for:
[0085] If the public detection flag is set, it indicates that the power module has received data;
[0086] If the public detection flag remains in the initial state, it means that the power module has not received any data.
[0087] As one possible implementation, the receiving and processing module 32 is specifically used for:
[0088] Extract data and protocol IDs from the cache one by one;
[0089] Based on the protocol ID, retrieve the parsing function corresponding to the current data from the second list;
[0090] The current data is received and processed based on the parsing function.
[0091] Furthermore, after processing the current data based on the parsing function, the receiving and processing module 32 is also used for:
[0092] Determine whether the current data needs to be forwarded;
[0093] If so, the external forwarding module will be called to forward the current data.
[0094] As one possible implementation, multiple ports of the power module are CAN ports, and each CAN port has multiple receiver mailboxes.
[0095] This invention provides a power module, including an electronic device. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-protocol multi-port data receiving method described above.
[0096] Figure 4 This is a schematic diagram of the electronic device 40 provided in an embodiment of the present invention. Figure 4 As shown, the electronic device 40 includes a processor 41, a memory 42, and a computer program 43 stored in the memory 42 and executable on the processor 41, such as a multi-protocol multi-port data receiving program. When the processor 41 executes the computer program 43, it implements the steps in the various multi-protocol multi-port data receiving method embodiments described above, for example... Figure 1 The steps S101 to S102 are shown. Alternatively, when the processor 41 executes the computer program 43, it implements the functions of each module in the above-described device embodiments, for example... Figure 3 The functions of modules 31 and 32 are shown.
[0097] For example, computer program 43 may be divided into one or more modules / units, one or more of which are stored in memory 42 and executed by processor 41 to complete the present invention. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 43 in electronic device 40.
[0098] Electronic device 40 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Electronic device 40 may include, but is not limited to, a processor 41 and a memory 42. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 40 and does not constitute a limitation on electronic device 40. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 40 may also include input / output devices, network access devices, buses, etc.
[0099] The processor 41 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0100] The memory 42 can be an internal storage unit of the electronic device 40, such as a hard disk or RAM of the electronic device 40. The memory 42 can also be an external storage device of the electronic device 40, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the electronic device 40. Furthermore, the memory 42 can include both internal and external storage units of the electronic device 40. The memory 42 is used to store computer programs and other programs and data required by the electronic device 40. The memory 42 can also be used to temporarily store data that has been output or will be output.
[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0102] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0103] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0104] In the embodiments provided by this invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0108] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A multi-protocol multi-port data receiving method, characterized by, The method comprises the following steps: registering at least one receiving protocol to the power module; wherein the registration comprises downward registration and self-registration, the downward registration is registering the port used by each receiving protocol and the receiving mailbox under the port to a first list, and the self-registration is registering the ID number and the parsing function of each receiving protocol to a second list; performing receiving processing of data according to the registered receiving protocol; performing receiving processing of data according to the registered receiving protocol, comprising: judging whether the power module receives data; if the power module receives data, traversing all registered receiving mailboxes under the port according to the first list, and extracting the data and the protocol ID in each receiving mailbox to a preset cache area; performing receiving processing of the data in the cache area according to the second list; performing receiving processing of the data in the cache area according to the second list, comprising: extracting the data and the protocol ID in the cache area one by one; inquiring the parsing function corresponding to the current data from the second list according to the protocol ID; performing receiving processing of the current data based on the parsing function.
2. The multi-protocol multi-port data receiving method of claim 1, wherein, The power module also registers a common detection flag of all receiving protocols; if any receiving mailbox under an arbitrary registered port receives data, the common detection flag is set; if all registered receiving mailboxes do not receive data, the common detection flag remains in an initialization state; correspondingly, judging whether the power module receives data, comprising: if the common detection flag is set, it indicates that the power module receives data; if the common detection flag remains in the initialization state, it indicates that the power module does not receive data.
3. The multi-protocol multi-port data receiving method of claim 1, wherein, After performing receiving processing of the current data based on the parsing function, the method further comprises: judging whether the current data needs to be forwarded; if yes, calling an external forwarding module to forward the current data.
4. The multi-protocol multi-port data receiving method of claim 1, wherein, The plurality of ports of the power module are CAN ports, and each CAN port has a plurality of receiving mailboxes.
5. A multi-protocol multi-port data receiving device, characterized by, The method comprises the following steps: a protocol registration module is configured to register at least one receiving protocol to the power module; wherein the registration comprises downward registration and self-registration, the downward registration is registering the port used by each receiving protocol and the receiving mailbox under the port to a first list, and the self-registration is registering the ID number and the parsing function of each receiving protocol to a second list; a receiving processing module is configured to perform receiving processing of data according to the registered receiving protocol; performing receiving processing of data according to the registered receiving protocol, comprising: judging whether the power module receives data; if the power module receives data, traversing all registered receiving mailboxes under the port according to the first list, and extracting the data and the protocol ID in each receiving mailbox to a preset cache area; performing receiving processing of the data in the cache area according to the second list; performing receiving processing of the data in the cache area according to the second list, comprising: extracting the data and the protocol ID in the cache area one by one; inquiring the parsing function corresponding to the current data from the second list according to the protocol ID; performing receiving processing of the current data based on the parsing function.
6. The multi-protocol multi-port data receiving device of claim 5, wherein, The receiving processing module is specifically configured to: judge whether the power module receives data; If the power module receives data, all registered receiving mailboxes under the first list are traversed, and the data and protocol ID in each receiving mailbox are extracted to a preset cache area; According to the second list, the data in the cache area are processed one by one.
7. A power module comprising an electronic device, the electronic device comprising a memory, a processor, and a computer program stored in the memory and loadable into the processor, characterized in that The processor executes the computer program to realize the steps of the method in any one of claims 1 to 4.
8. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7. The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 4.
Citation Information
Patent Citations
CAN bus control method and device, vehicle control unit, storage medium and automobile
CN111650915A
Data forwarding method and power supply module
CN114466046A