CN115118758A - Module communication method, master communication module, slave communication module and electronic equipment - Google Patents

Module communication method, master communication module, slave communication module and electronic equipment Download PDF

Info

Publication number
CN115118758A
CN115118758A CN202210557310.8A CN202210557310A CN115118758A CN 115118758 A CN115118758 A CN 115118758A CN 202210557310 A CN202210557310 A CN 202210557310A CN 115118758 A CN115118758 A CN 115118758A
Authority
CN
China
Prior art keywords
communication
instruction
communication module
module
slave
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
Application number
CN202210557310.8A
Other languages
Chinese (zh)
Inventor
赵烽
李飞
李超超
钱建安
江涛
张瑛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Xiaoan Information Technology Co ltd
Original Assignee
Wuhan Xiaoan Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Xiaoan Information Technology Co ltd filed Critical Wuhan Xiaoan Information Technology Co ltd
Priority to CN202210557310.8A priority Critical patent/CN115118758A/en
Publication of CN115118758A publication Critical patent/CN115118758A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a module communication method, a master communication module, a slave communication module and electronic equipment, wherein the method is applied to the slave communication module and comprises the following steps: receiving a communication instruction sent by a main communication module; generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; the method comprises the steps of receiving a communication confirmation instruction sent by a main communication module, replying a communication confirmation reply instruction generated by the main communication module based on the communication confirmation instruction, and requesting the main communication module to establish communication connection with a slave communication module after receiving the communication confirmation reply instruction.

Description

Module communication method, master communication module, slave communication module and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a module communication method, a master communication module, a slave communication module, and an electronic device.
Background
In a conventional communication process, a serial bus has significant advantages over a parallel bus, such as simpler structure, fewer pins, lower cost, etc. Common Serial buses include usb (universal Serial bus), spi (Serial Peripheral interface), I2C (Inter-Integrated Circuit), and the like; the SPI bus and the I2C bus are widely applied to electronic products such as a single chip microcomputer, a serial Erasable Programmable read only memory (EEPROM), a Liquid Crystal Display (LCD), and the like.
However, in the conventional communication flow in the communication field, most of the chips used do not have the same communication function as the I2C bus, that is, the communication address of the communication module to be performed can be known, but the communication address of the communication module is unknown, which causes the communication flow to be very disordered, that is, normal communication cannot be performed.
Disclosure of Invention
The invention provides a module communication method, a master communication module, a slave communication module and electronic equipment, which are used for solving the defect that communication cannot be normally carried out due to unknown communication addresses of the communication modules in the prior art.
The invention provides a module communication method, which is applied to a slave communication module and comprises the following steps:
receiving a communication instruction sent by a main communication module;
generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
and receiving the communication confirmation instruction sent by the master communication module, and replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction so as to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
The module communication method provided by the invention further comprises the following steps:
receiving a communication ending instruction sent by the main communication module;
generating a communication ending reply instruction based on the communication ending instruction, sending the communication ending reply instruction to the main communication module, and controlling the communication connection to be disconnected in advance;
under the condition that the communication connection is disconnected in advance, if the communication ending instruction sent again by the main communication module is not received within first preset time, the communication connection is determined to be disconnected;
and the main communication module is used for sending the communication ending instruction again after receiving the communication ending reply instruction.
The module communication method provided by the invention further comprises the following steps:
receiving a data interaction instruction sent by the main communication module;
under the condition of establishing communication connection, performing data interaction with the main communication module based on the data interaction instruction;
the data interaction instruction comprises a data migration instruction and/or a data synchronization instruction.
The invention also provides a module communication method, which is applied to the main communication module and comprises the following steps:
sending a communication instruction to request a slave communication module to generate a communication reply instruction based on the communication instruction after receiving the communication instruction, and returning the communication reply instruction;
under the condition that the communication reply instruction returned by the slave communication module is received, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction;
and receiving the communication confirmation reply instruction returned by the slave communication module, and establishing communication connection with the slave communication module based on the communication confirmation reply instruction.
The module communication method provided by the invention further comprises the following steps:
sending a communication ending instruction to the slave communication module to request the slave communication module to generate a communication ending reply instruction based on the communication ending instruction after receiving the communication ending instruction, returning the communication ending reply instruction and controlling the communication connection to be disconnected in advance;
and under the condition that the communication ending reply instruction returned by the slave communication module is received, the communication ending instruction is sent again, and if the communication ending reply instruction returned by the slave communication module based on the communication ending instruction sent again is not received within a second preset time, the communication connection is determined to be disconnected.
The module communication method provided by the invention further comprises the following steps:
stopping sending the communication instruction under the condition of establishing the communication connection;
if the communication connection is disconnected, the communication command is retransmitted.
The present invention also provides a slave communication module comprising:
the communication instruction receiving unit is used for receiving a communication instruction sent by the main communication module;
a reply instruction sending unit, configured to generate a communication reply instruction based on the communication instruction, and send the communication reply instruction to the master communication module, so as to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
and the confirmation instruction receiving unit is used for receiving the communication confirmation instruction sent by the master communication module, replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction, and requesting the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
The present invention also provides a master communication module comprising:
the communication instruction sending unit is used for sending a communication instruction to request that a slave communication module generates a communication reply instruction based on the communication instruction after receiving the communication instruction, and returns the communication reply instruction;
a confirmation instruction sending unit, configured to, in a case where the communication reply instruction returned from the communication module is received, generate a communication confirmation instruction and send the communication confirmation instruction to the slave communication module, so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and return the communication confirmation reply instruction;
and the communication connection establishing unit is used for receiving the communication confirmation reply instruction returned by the slave communication module and establishing communication connection with the slave communication module based on the communication confirmation reply instruction.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the module communication method.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a modular communication method as described in any of the above.
The module communication method, the master communication module, the slave communication module and the electronic equipment receive the communication instruction sent by the master communication module, generate a communication reply instruction according to the communication instruction, send the communication reply instruction to the master communication module, and request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; the communication confirmation method comprises the steps of receiving a communication confirmation instruction sent by a main communication module, replying a communication confirmation reply instruction generated by the main communication module based on the communication confirmation instruction, requesting the main communication module to establish communication connection with a slave communication module after receiving the communication confirmation reply instruction, overcoming the defect that communication cannot be normally carried out due to the fact that a communication address of the communication module is unknown in the traditional scheme, distinguishing communication sequences between a plurality of slave communication modules and the main communication module under the condition that hardware resources are urgent, ensuring stable operation of communication on a bus, and simultaneously improving communication efficiency to a great extent by a non-interrupted communication mode.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a module communication method provided by the present invention;
FIG. 2 is one of the general flow diagrams of the module communication method provided by the present invention;
FIG. 3 is a second flowchart of a module communication method provided by the present invention;
FIG. 4 is a second general flow chart of the module communication method provided by the present invention;
fig. 5 is a schematic structural diagram of a slave communication module provided by the present invention;
FIG. 6 is a schematic structural diagram of a main communication module provided in the present invention;
fig. 7 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the field of communication, most of chips used in a conventional communication flow do not have a communication function like an I2C bus, that is, a communication address of a module to be communicated can be known, but a communication address of a communication module is unknown, so that communication cannot be normally performed, for example, in the case that only one 485 interface is provided but two identical modules need to be connected, if the communication addresses of the two modules are unknown, that is, the two modules cannot be distinguished by addresses, the two communicating modules can be distinguished by means of related technical means, so that communication can be normally performed.
The invention provides a module communication method, which is applied to a slave communication module, and aims to distinguish a plurality of slave communication modules to be communicated with a master communication module under the condition of relatively deficient hardware resources, so that only two communication modules are communicated with the same bus at the same time, and the stable communication work is ensured, wherein FIG. 1 is one of the flow schematic diagrams of the module communication method provided by the invention, and as shown in FIG. 1, the method comprises the following steps:
step 110, receiving a communication instruction sent by a main communication module;
specifically, in the case where the master communication module does not establish a communication connection with any slave communication module, if communication with a slave communication module is required, a communication instruction may be sent through the communication interface to communicate with the slave communication module that has received and responded to the communication instruction.
The slave communication module may receive the communication instruction sent by the master communication module, and may respond to the received communication instruction, that is, generate a communication reply instruction corresponding to the communication instruction, and return the communication reply instruction to the master communication module that sent the communication instruction, where the communication reply instruction is intended to indicate that the slave communication module responds to a communication request sent by the master communication module, that is, the communication request of the master communication module should be allowed.
It should be noted that the master communication module only sends the communication command to the communication interface when the master communication module does not establish a communication connection with any slave communication module, that is, when the master communication module does not normally communicate with any slave communication module, and once the master communication module establishes a communication connection with any slave communication module, that is, when the master communication module enters a normal communication flow with the slave communication module, the master communication module stops sending the communication command until the communication connection is disconnected.
Step 120, generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the master communication module to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
specifically, in step 110, in the case that a communication instruction sent by the master communication module has been received, step 120 may be executed, that is, a communication reply instruction is generated according to the communication instruction and sent to the master communication module, so that the master communication module can generate and send a communication confirmation instruction after receiving the communication reply instruction, and this process specifically includes the following steps:
under the condition of receiving a communication instruction sent by the master communication module, firstly, the slave communication module can respond to the communication instruction, namely, a communication reply instruction corresponding to the communication instruction can be generated by taking the communication instruction as a reference, and the communication reply instruction is intended to indicate that the slave communication module responds to a communication request sent by the master communication module, namely, the communication request of the master communication module is allowed;
subsequently, the slave communication module returns the generated communication reply instruction corresponding to the communication instruction to the master communication module which sends the communication instruction, that is, the communication reply instruction is sent to the master communication module, and the master communication module can receive the communication reply instruction returned by the slave communication module based on the communication instruction and generate a communication confirmation instruction after receiving the communication reply instruction, wherein the communication confirmation instruction is intended to confirm whether to respond to the communication request with the slave communication module which returns the communication reply instruction;
after that, the master communication module can send the communication confirmation instruction to the slave communication module returning the communication reply instruction to request that the slave communication module can respond to the communication confirmation instruction after receiving the communication confirmation instruction, and accordingly respond to the establishment of the communication connection between the two modules.
Step 130, receiving a communication confirmation instruction sent by the master communication module, and replying to a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
Specifically, in step 120, the master communication module generates and sends a communication confirmation instruction when receiving a communication reply instruction returned by the slave communication module based on the communication instruction, at this time, step 130 may be executed, that is, the slave communication module may receive the communication confirmation instruction sent by the master communication module and may reply the communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction, so that the master communication module establishes a communication connection with the slave communication module after receiving the communication confirmation reply instruction, and the specific process includes the following steps:
firstly, the slave communication module may receive a communication confirmation instruction sent by the master communication module, and may respond to the communication confirmation instruction, that is, confirm that the communication request of the master communication module should be granted, and the specific process may be, with the communication confirmation instruction as a reference, generating a communication confirmation reply instruction corresponding thereto, and returning the communication confirmation reply instruction to the master communication module that sent the communication confirmation instruction;
then, the master communication module receives a communication confirmation reply instruction returned by the slave communication module based on the communication confirmation instruction, namely the master communication module receives a confirmation compliant reply of the slave communication module to the communication request sent by the master communication module, and then the communication confirmation reply instruction can be used for establishing communication connection between the master communication module and the slave communication module, so that the master communication module and the slave communication module can normally communicate.
In addition, it should be noted that after the communication between the master communication module and the slave communication module is completed, the communication connection can be directly disconnected, and the communication is switched to the next slave communication module which needs to communicate with the master communication module, and then the above processes are repeated, so that only two communication modules on the same bus communicate at the same time, and the communication between the master communication module and a plurality of slave communication modules can be ensured to be stably performed.
The module communication method provided by the invention comprises the steps of receiving a communication instruction sent by a main communication module, generating a communication reply instruction according to the communication instruction, sending the communication reply instruction to the main communication module, and requesting the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; the communication confirmation method comprises the steps of receiving a communication confirmation instruction sent by a main communication module, replying a communication confirmation reply instruction generated by the main communication module based on the communication confirmation instruction, requesting the main communication module to establish communication connection with a slave communication module after receiving the communication confirmation reply instruction, overcoming the defect that communication cannot be normally carried out due to the fact that a communication address of the communication module is unknown in the traditional scheme, distinguishing communication sequences between a plurality of slave communication modules and the main communication module under the condition that hardware resources are urgent, ensuring stable operation of communication on a bus, and simultaneously improving communication efficiency to a great extent by a non-interrupted communication mode.
Based on the above embodiment, the method further comprises:
receiving a communication ending instruction sent by a main communication module;
generating a communication ending reply instruction based on the communication ending instruction, sending the communication ending reply instruction to the main communication module, and controlling the communication connection to be disconnected in advance;
under the condition that the communication connection is disconnected in advance, if a communication ending instruction sent again by the main communication module is not received within first preset time, the communication connection is determined to be disconnected;
and the main communication module is used for sending the communication ending instruction again after receiving the communication ending reply instruction.
Specifically, when the communication is completed, the master communication module may further send a communication end instruction to the slave communication module that establishes the communication connection through the communication interface, which is intended to end the communication with the slave communication module, and the slave communication module may receive the communication end instruction sent by the master communication module, and may respond to the received communication end instruction, that is, may generate a communication end reply instruction corresponding to the communication end instruction sent by the master communication module, which indicates that the communication end request of the master communication module should be granted;
then, the slave communication module needs to return a communication end reply instruction to the master communication module which sends the communication end instruction, and at the same time, the slave communication module starts a timeout management mechanism, namely, starts a pre-disconnection mode, in other words, the slave communication module can control the communication connection between the master communication module and the slave communication module to be pre-disconnected under the condition that the communication end reply instruction is sent to the master communication module;
correspondingly, the main communication module can send the communication ending instruction again after receiving the communication ending reply instruction of the communication ending instruction sent by the slave communication module;
further, under the condition that the communication connection between the master communication module and the slave communication module is disconnected in advance, if the slave communication module fails to receive a communication ending instruction sent again by the master communication module within a first preset time, the communication connection between the master communication module and the slave communication module is determined to be disconnected; correspondingly, under the condition that the communication connection between the master communication module and the slave communication module is disconnected in advance, if the slave communication module receives a communication ending instruction sent again by the master communication module within the first preset time, it is determined that the communication connection between the master communication module and the slave communication module is not disconnected temporarily, at this time, a communication ending reply instruction can be generated according to the received communication ending instruction and sent to the master communication module, the above process is repeated until the slave communication module fails to receive the communication ending instruction sent latest by the master communication module within the first preset time, and at this time, it is determined that the communication connection between the slave communication module and the master communication module is disconnected.
It should be noted that the first preset time here may be set according to actual requirements, and it needs to be smaller than a time interval from sending the communication end instruction to sending the communication end instruction again by the main communication module, and in an embodiment of the present invention, the first preset time is determined to be 1 second.
In addition, in the case that the communication connection between the master communication module and the slave communication module is disconnected, the master communication module sends a new communication instruction through the communication interface, that is, steps 110 to 130 are executed, to communicate with the next slave communication module, and when the communication is finished, the above process is repeated until there is no next slave communication module, that is, the master communication module and several slave communication modules complete the communication.
Based on the above embodiment, the method further comprises:
receiving a data interaction instruction sent by a main communication module;
under the condition of establishing communication connection, performing data interaction with the main communication module based on the data interaction instruction;
the data interaction instructions include data migration instructions and/or data synchronization instructions.
Specifically, the slave communication module may receive, in addition to the communication instruction, the communication confirmation instruction, and the communication end instruction sent by the master communication module, a data interaction instruction sent by the master communication module, where the data interaction instruction may be an instruction for requesting data synchronization, that is, a data synchronization instruction, an instruction for indicating data migration, that is, a data migration instruction, and a data synchronization instruction and a data migration instruction, which is not specifically limited in this embodiment of the present invention.
Further, under the condition that the communication connection is established between the master communication module and the slave communication module, the slave communication module can respond to the received data interaction instruction, that is, can perform data interaction with the master communication module according to the data interaction instruction, and specifically, can perform data synchronization with the master communication module according to a data synchronization instruction in the data interaction instruction; or carrying out data migration with the main communication module according to a data migration instruction in the data interaction instruction; or the data interaction module and the main communication module respectively carry out data synchronization and data migration according to a data synchronization instruction and a data migration instruction in the data interaction instruction.
Correspondingly, under the condition that the communication connection between the master communication module and the slave communication module is not established, the slave communication module does not respond to the received data interaction instruction sent by the master communication module, namely does not respond to the data interaction request of the master communication module until the master communication module and the slave communication module establish communication connection, so that only two communication modules can be ensured to communicate on the same bus at the same time, and key benefits are provided for the stable communication operation.
Based on the above embodiments, the general flow of the module communication method can be divided into the following processes, fig. 2 is one of the general flow charts of the module communication method provided by the present invention, as shown in fig. 2, the method includes the following steps:
firstly, the slave communication module can receive a communication instruction sent by the master communication module, generate a communication reply instruction according to the communication instruction under the condition of receiving the communication instruction, and send the communication reply instruction to the master communication module so as to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
then, a communication confirmation instruction sent by the master communication module may be received, and in a case that the communication confirmation instruction is received, a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction is replied to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
Correspondingly, when the communication is finished, the slave communication module can receive a communication ending instruction sent by the master communication module, generate a communication ending reply instruction according to the communication ending instruction under the condition that the communication ending instruction is received, send the communication ending reply instruction to the master communication module, and meanwhile, the slave communication module controls the communication connection to be disconnected in advance;
further, under the condition that the communication connection is disconnected in advance, if a communication ending instruction sent again by the main communication module is not received within a first preset time, the communication connection is determined to be disconnected;
correspondingly, under the condition that the communication connection is disconnected in advance, if a communication ending instruction sent again by the main communication module is received within a first preset time, it is determined that the communication connection is not disconnected temporarily, at this time, a communication ending reply instruction can be generated according to the received communication ending instruction and sent to the main communication module, the above process is repeated until a communication ending instruction sent by the main communication module most recently is not received within the first preset time, and at this time, it is determined that the communication connection is disconnected.
The method provided by the embodiment of the invention comprises the steps of receiving a communication instruction sent by a main communication module, generating a communication reply instruction according to the communication instruction, sending the communication reply instruction to the main communication module, and requesting the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; the communication confirmation method comprises the steps of receiving a communication confirmation instruction sent by a main communication module, replying a communication confirmation reply instruction generated by the main communication module based on the communication confirmation instruction, requesting the main communication module to establish communication connection with a slave communication module after receiving the communication confirmation reply instruction, overcoming the defect that communication cannot be normally carried out due to the fact that a communication address of the communication module is unknown in the traditional scheme, distinguishing communication sequences between a plurality of slave communication modules and the main communication module under the condition that hardware resources are urgent, ensuring stable operation of communication on a bus, and simultaneously improving communication efficiency to a great extent by a non-interrupted communication mode.
The present invention further provides a module communication method, which is applied to a master communication module, and aims to distinguish a plurality of slave communication modules to be communicated with the master communication module under the condition of relatively deficient hardware resources, so that only two communication modules communicate with one bus at the same time, and the stable communication operation is ensured, fig. 3 is a second flow diagram of the module communication method provided by the present invention, as shown in fig. 3, the method includes:
step 310, sending a communication instruction to request the slave communication module to generate a communication reply instruction based on the communication instruction after receiving the communication instruction, and returning the communication reply instruction;
specifically, in the case where the master communication module does not establish a communication connection with any slave communication module, if communication with a slave communication module is required, a communication instruction may be sent through the communication interface to communicate with the slave communication module that has received and responded to the communication instruction.
The slave communication module can receive the communication instruction sent by the master communication module, respond to the received communication instruction, namely generate a communication reply instruction corresponding to the communication instruction, and return the communication reply instruction to the master communication module sending the communication instruction, wherein the communication reply instruction is intended to indicate that the slave communication module responds to the communication request sent by the master communication module, namely, the communication request of the master communication module is allowed.
It should be noted that the master communication module only sends the communication command to the communication interface when the master communication module does not establish a communication connection with any slave communication module, that is, when the master communication module does not normally communicate with any slave communication module, and once the master communication module establishes a communication connection with any slave communication module, that is, when the master communication module enters a normal communication flow with the slave communication module, the master communication module stops sending the communication command until the communication connection is disconnected.
Step 320, in the case of receiving the communication reply instruction returned from the communication module, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction;
specifically, in step 310, on the basis that the slave communication module returns the communication reply instruction generated according to the communication instruction to the master communication module, step 320 may be executed, and in the case that the communication reply instruction returned from the slave communication module is received, a communication confirmation instruction is generated and sent to the slave communication module, so that the slave communication module generates the communication confirmation reply instruction according to the communication confirmation instruction and returns the communication confirmation reply instruction, and the specific process includes the following steps:
first, the master communication module may receive a communication reply instruction returned by the slave communication module based on the communication instruction, and in a case where the communication reply instruction is received, generate a communication confirmation instruction intended to confirm with the slave communication module whether or not to respond to the communication request issued by the master communication module, and transmit the communication confirmation instruction to the slave communication module;
the slave communication module may receive the communication confirmation instruction sent by the master communication module, and may respond to the communication confirmation instruction to confirm that the communication request of the master communication module is allowed, where a specific process may be to generate a communication confirmation reply instruction corresponding to the communication confirmation instruction based on the communication confirmation instruction, and return the communication confirmation reply instruction to the master communication module that sent the communication confirmation instruction.
And step 330, receiving a communication confirmation reply instruction returned by the slave communication module, and establishing communication connection with the slave communication module based on the communication confirmation reply instruction.
Specifically, in step 320, in the case that the slave communication module has returned the communication confirmation reply instruction generated according to the communication confirmation instruction to the master communication module, step 330 may be executed to receive the communication confirmation reply instruction returned from the slave communication module, and establish a communication connection with the slave communication module according to the communication confirmation reply instruction, where the master communication module receives the communication confirmation reply instruction returned by the slave communication module based on the communication confirmation instruction, and in the case that the communication confirmation reply instruction is received, that is, in the case that the master communication module receives a confirmation response that the slave communication module is allowed to send a communication request to the master communication module, establish a communication connection with the slave communication module according to the communication confirmation reply instruction, so as to ensure that the communication between the master communication module and the slave communication module can be performed normally.
In addition, it should be noted that after the communication between the master communication module and the slave communication module is completed, the communication connection can be directly disconnected, and the communication is switched to the next slave communication module which needs to communicate with the master communication module, and then the above processes are repeated, so that only two communication modules on the same bus communicate at the same time, and the communication between the master communication module and a plurality of slave communication modules can be ensured to be stably performed.
The module communication method provided by the invention comprises the steps of sending a communication instruction to request a slave communication module to generate a communication reply instruction according to the communication instruction after receiving the communication instruction, and returning the communication reply instruction; under the condition of receiving a communication reply instruction returned from the communication module, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction according to the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction; the communication confirmation reply instruction returned by the slave communication module is received, and the communication connection with the slave communication module is established according to the communication confirmation reply instruction, so that the defect that the communication cannot be normally carried out due to the fact that the communication address of the communication module is unknown in the traditional scheme is overcome, the communication sequence between a plurality of slave communication modules and the master communication module can be distinguished under the condition that hardware resources are urgent, the stable operation of communication on a bus is guaranteed, and meanwhile, the communication efficiency is improved to the greatest extent by a non-interrupted communication mode.
Based on the above embodiment, the method further comprises:
sending a communication ending instruction to the slave communication module to request the slave communication module to generate a communication ending reply instruction based on the communication ending instruction after receiving the communication ending instruction, returning the communication ending reply instruction and controlling the communication connection to be disconnected in advance;
and under the condition that a communication ending reply instruction returned from the communication module is received, the communication ending instruction is sent again, and if the communication ending reply instruction returned from the communication module based on the communication ending instruction sent again is not received within a second preset time, the communication connection is determined to be disconnected.
Specifically, when the communication is completed, the master communication module may further send a communication end instruction to the slave communication module that establishes the communication connection through the communication interface, which is intended to end the communication with the slave communication module, and the slave communication module may receive the communication end instruction sent by the master communication module, and may respond to the received communication end instruction, that is, may generate a communication end reply instruction corresponding to the communication end instruction sent by the master communication module, which indicates that the communication end request of the master communication module should be granted;
then, the slave communication module needs to return a communication end reply instruction to the master communication module which sends the communication end instruction, and at the same time, the slave communication module starts a timeout management mechanism, namely, starts a pre-disconnection mode, which can also be understood as that the slave communication module can control the communication connection between the master communication module and the slave communication module to be pre-disconnected under the condition that the communication end reply instruction is sent to the master communication module;
subsequently, the master communication module may receive a communication end reply instruction returned by the slave communication module based on the communication end instruction, and after receiving the communication end reply instruction, send the communication end instruction again;
further, in the case that the communication connection between the master communication module and the slave communication module is pre-disconnected, if the master communication module fails to receive a communication end reply instruction returned by the slave communication module based on the re-sent communication end instruction within the second preset time, in other words, if the slave communication module fails to receive the communication end instruction sent again by the master communication module within the first preset time, it is determined that the communication connection between the master communication module and the slave communication module is disconnected.
Accordingly, in the case that the communication connection between the master communication module and the slave communication module is pre-disconnected, if the master communication module receives a communication end reply instruction returned by the slave communication module based on the re-sent communication end instruction within a second preset time, in other words, if the slave communication module receives the communication end instruction re-sent by the master communication module within a first preset time, it is determined that the communication connection between the master communication module and the slave communication module is not disconnected temporarily, at this time, the slave communication module may generate a communication end reply instruction according to the received communication end instruction and send it to the master communication module, and repeat the above process until the master communication module fails to receive the communication end reply instruction returned by the slave communication module based on the re-sent communication end instruction within the second preset time or the slave communication module fails to receive the communication end instruction sent by the master communication module within the first preset time, at which point it can be determined that the communication connection between the two is broken.
It should be noted that, the first preset time and the second preset time are set correspondingly, and the specific setting condition can be adjusted correspondingly according to the actual requirement; preferably, in the embodiment of the present invention, the first preset time is determined to be 1 second, and the second preset time may be set according to the first preset time.
In addition, in the case that the communication connection between the master communication module and the slave communication module is disconnected, the master communication module sends a new communication instruction through the communication interface, that is, steps 310 to 330 are executed to communicate with the next slave communication module, and when the communication is finished, the above process is repeated until there is no next slave communication module, that is, the master communication module and several slave communication modules complete the communication.
Based on the above embodiment, the method further comprises:
stopping sending the communication instruction under the condition of establishing the communication connection;
if the communication connection is disconnected, the communication command is retransmitted.
Specifically, when the master communication module establishes communication connection with any slave communication module, the master communication module and the slave communication module enter normal communication, and at this time, the master communication module stops sending the communication instruction.
Correspondingly, when the master communication module does not establish a communication connection with any slave communication module, it can also be understood that, when the communication connection between the master communication module and any slave communication module is disconnected, the master communication module sends a communication instruction through the communication interface, and then performs steps 310 to 330 to establish a communication connection with the slave communication module.
Based on the above embodiments, the general flow of the module communication method can be divided into the following processes, fig. 4 is a second general flow chart of the module communication method provided by the present invention, as shown in fig. 4, the method includes the following steps:
firstly, the master communication module sends a communication instruction to request the slave communication module to generate a communication reply instruction based on the communication instruction after receiving the communication instruction, and returns the communication reply instruction;
then, the master communication module can receive a communication reply instruction returned by the slave communication module, generate a communication confirmation instruction under the condition of receiving the communication reply instruction, and send the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and return the communication confirmation reply instruction;
thereafter, the master communication module may receive a communication confirmation reply instruction returned from the slave communication module, and establish a communication connection with the slave communication module in a case where the communication confirmation reply instruction is received.
Correspondingly, when the communication is finished, the master communication module sends a communication ending instruction to the slave communication module to request the slave communication module to generate a communication ending reply instruction based on the communication ending instruction after receiving the communication ending instruction, and returns the communication ending reply instruction, and meanwhile, the communication connection is controlled to be disconnected in advance;
the master communication module can receive a communication ending reply instruction returned by the slave communication module based on the communication ending instruction, and after receiving the communication ending reply instruction, the master communication module sends the communication ending instruction again;
further, in the case of pre-disconnection of the communication connection, if the master communication module fails to receive a communication end reply instruction returned by the slave communication module based on the retransmitted communication end instruction within a second preset time, in other words, if the slave communication module fails to receive the communication end instruction retransmitted by the master communication module within a first preset time, it is determined that the communication connection is disconnected.
Accordingly, in the case of pre-disconnection of communication connection, if the master communication module receives a communication end reply instruction returned by the slave communication module based on the re-sent communication end instruction within a second preset time, in other words, if the slave communication module receives the communication end instruction re-sent by the master communication module within a first preset time, determining that the communication connection is not disconnected temporarily, at this time, the slave communication module may generate a communication end reply instruction according to the received communication end instruction, and transmits it to the master communication module, repeats the above process until the master communication module fails to receive a communication end reply instruction returned from the slave communication module based on the retransmitted communication end instruction within a second preset time, or the slave communication module fails to receive the communication ending instruction sent by the master communication module within the first preset time, and the disconnection of the communication connection between the slave communication module and the master communication module can be determined.
The method provided by the embodiment of the invention comprises the steps of sending a communication instruction to request that a slave communication module generates a communication reply instruction according to the communication instruction after receiving the communication instruction, and returning the communication reply instruction; under the condition of receiving a communication reply instruction returned from the communication module, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction according to the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction; the communication confirmation reply instruction returned by the slave communication module is received, and the communication connection with the slave communication module is established according to the communication confirmation reply instruction, so that the defect that the communication cannot be normally carried out due to the fact that the communication address of the communication module is unknown in the traditional scheme is overcome, the communication sequence between a plurality of slave communication modules and the master communication module can be distinguished under the condition that hardware resources are urgent, the stable operation of communication on a bus is guaranteed, and meanwhile, the communication efficiency is improved to the greatest extent by a non-interrupted communication mode.
The following describes the slave communication module provided by the present invention, and the slave communication module described below and the module communication method described above may be referred to correspondingly to each other.
Fig. 5 is a schematic structural diagram of a slave communication module provided in the present invention, and as shown in fig. 5, the slave communication module includes:
a communication instruction receiving unit 510, configured to receive a communication instruction sent by a main communication module;
a reply instruction sending unit 520, configured to generate a communication reply instruction based on the communication instruction, and send the communication reply instruction to the master communication module, so as to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
a confirmation instruction receiving unit 530, configured to receive the communication confirmation instruction sent by the master communication module, and reply to a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction, so as to request the master communication module to establish a communication connection with the slave communication module after receiving the communication confirmation reply instruction.
The slave communication module receives the communication instruction sent by the master communication module, generates a communication reply instruction according to the communication instruction, and sends the communication reply instruction to the master communication module so as to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; the communication confirmation method comprises the steps of receiving a communication confirmation instruction sent by a main communication module, replying a communication confirmation reply instruction generated by the main communication module based on the communication confirmation instruction, requesting the main communication module to establish communication connection with a slave communication module after receiving the communication confirmation reply instruction, overcoming the defect that communication cannot be normally carried out due to the fact that a communication address of the communication module is unknown in the traditional scheme, distinguishing communication sequences between a plurality of slave communication modules and the main communication module under the condition that hardware resources are urgent, ensuring stable operation of communication on a bus, and simultaneously improving communication efficiency to a great extent by a non-interrupted communication mode.
Based on the above embodiment, the slave communication module further includes a communication ending unit configured to:
receiving a communication ending instruction sent by the main communication module;
generating a communication ending reply instruction based on the communication ending instruction, sending the communication ending reply instruction to the main communication module, and controlling the communication connection to be disconnected in advance;
under the condition that the communication connection is disconnected in advance, if the communication ending instruction sent again by the main communication module is not received within first preset time, the communication connection is determined to be disconnected;
and the main communication module is used for sending the communication ending instruction again after receiving the communication ending reply instruction.
Based on the above embodiment, the slave communication module further includes a data interaction unit, configured to:
receiving a data interaction instruction sent by the main communication module;
under the condition of establishing communication connection, performing data interaction with the main communication module based on the data interaction instruction;
the data interaction instruction comprises a data migration instruction and/or a data synchronization instruction.
The following describes the main communication module provided by the present invention, and the main communication module described below and the module communication method described above may be referred to correspondingly.
Fig. 6 is a schematic structural diagram of a main communication module provided in the present invention, and as shown in fig. 6, the main communication module includes:
a communication instruction sending unit 610, configured to send a communication instruction to request a slave communication module to generate a communication reply instruction based on the communication instruction after receiving the communication instruction, and return the communication reply instruction;
a confirmation instruction sending unit 620, configured to, in a case where the communication reply instruction returned by the slave communication module is received, generate a communication confirmation instruction and send the communication confirmation instruction to the slave communication module, so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and return the communication confirmation reply instruction;
a communication connection establishing unit 630, configured to receive the communication confirmation reply instruction returned by the slave communication module, and establish a communication connection with the slave communication module based on the communication confirmation reply instruction.
The master communication module sends a communication instruction to request the slave communication module to generate a communication reply instruction according to the communication instruction after receiving the communication instruction, and returns the communication reply instruction; under the condition of receiving a communication reply instruction returned from the communication module, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction according to the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction; the communication confirmation reply instruction returned by the slave communication module is received, and the communication connection with the slave communication module is established according to the communication confirmation reply instruction, so that the defect that the communication cannot be normally carried out due to the fact that the communication address of the communication module is unknown in the traditional scheme is overcome, the communication sequence between a plurality of slave communication modules and the master communication module can be distinguished under the condition that hardware resources are urgent, the stable operation of communication on a bus is guaranteed, and meanwhile, the communication efficiency is improved to the greatest extent by a non-interrupted communication mode.
Based on the above embodiment, the main communication module further includes a communication ending unit, configured to:
sending a communication ending instruction to the slave communication module to request the slave communication module to generate a communication ending reply instruction based on the communication ending instruction after receiving the communication ending instruction, returning the communication ending reply instruction and controlling the communication connection to be disconnected in advance;
and under the condition that the communication ending reply instruction returned by the slave communication module is received, the communication ending instruction is sent again, and if the communication ending reply instruction returned by the slave communication module based on the communication ending instruction sent again is not received within a second preset time, the communication connection is determined to be disconnected.
Based on the above embodiment, the master communication module further includes a communication instruction stop sending unit, configured to:
stopping sending the communication instruction under the condition of establishing the communication connection;
if the communication connection is disconnected, the communication command is retransmitted.
Fig. 7 illustrates a physical structure diagram of an electronic device, and as shown in fig. 7, the electronic device may include: a processor (processor)710, a communication Interface (Communications Interface)720, a memory (memory)730, and a communication bus 740, wherein the processor 710, the communication Interface 720, and the memory 730 communicate with each other via the communication bus 740. Processor 710 may invoke logic instructions in memory 730 to perform a modular communication method comprising: receiving a communication instruction sent by a main communication module; generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; and receiving the communication confirmation instruction sent by the master communication module, and replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction so as to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
In addition, the logic instructions in the memory 730 can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the modular communication method provided by the above methods, the method comprising: receiving a communication instruction sent by a main communication module; generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; and receiving the communication confirmation instruction sent by the master communication module, and replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction so as to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a modular communication method provided for performing the above methods, the method comprising: receiving a communication instruction sent by a main communication module; generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction; and receiving the communication confirmation instruction sent by the master communication module, and replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
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.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
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 module communication method applied to a slave communication module includes:
receiving a communication instruction sent by a main communication module;
generating a communication reply instruction based on the communication instruction, and sending the communication reply instruction to the main communication module to request the main communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
and receiving the communication confirmation instruction sent by the master communication module, and replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction so as to request the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
2. The module communication method according to claim 1, further comprising:
receiving a communication ending instruction sent by the main communication module;
generating a communication ending reply instruction based on the communication ending instruction, sending the communication ending reply instruction to the main communication module, and controlling the communication connection to be disconnected in advance;
under the condition that the communication connection is disconnected in advance, if the communication ending instruction sent again by the main communication module is not received within first preset time, the communication connection is determined to be disconnected;
and the main communication module is used for sending the communication ending instruction again after receiving the communication ending reply instruction.
3. The module communication method according to claim 1, further comprising:
receiving a data interaction instruction sent by the main communication module;
under the condition of establishing communication connection, performing data interaction with the main communication module based on the data interaction instruction;
the data interaction instruction comprises a data migration instruction and/or a data synchronization instruction.
4. A module communication method, applied to a master communication module, includes:
sending a communication instruction to request a slave communication module to generate a communication reply instruction based on the communication instruction after receiving the communication instruction, and returning the communication reply instruction;
under the condition that the communication reply instruction returned by the slave communication module is received, generating a communication confirmation instruction, and sending the communication confirmation instruction to the slave communication module so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and returning the communication confirmation reply instruction;
and receiving the communication confirmation reply instruction returned by the slave communication module, and establishing communication connection with the slave communication module based on the communication confirmation reply instruction.
5. The module communication method of claim 4, further comprising:
sending a communication ending instruction to the slave communication module to request the slave communication module to generate a communication ending reply instruction based on the communication ending instruction after receiving the communication ending instruction, returning the communication ending reply instruction and controlling the communication connection to be disconnected in advance;
and under the condition that the communication ending reply instruction returned by the slave communication module is received, the communication ending instruction is sent again, and if the communication ending reply instruction returned by the slave communication module based on the communication ending instruction sent again is not received within a second preset time, the communication connection is determined to be disconnected.
6. The module communication method according to claim 4 or 5, further comprising:
stopping sending the communication instruction under the condition of establishing the communication connection;
if the communication connection is disconnected, the communication command is retransmitted.
7. A slave communications module, comprising:
the communication instruction receiving unit is used for receiving a communication instruction sent by the main communication module;
a reply instruction sending unit, configured to generate a communication reply instruction based on the communication instruction, and send the communication reply instruction to the master communication module, so as to request the master communication module to generate and send a communication confirmation instruction after receiving the communication reply instruction;
and the confirmation instruction receiving unit is used for receiving the communication confirmation instruction sent by the master communication module, replying a communication confirmation reply instruction generated by the master communication module based on the communication confirmation instruction, and requesting the master communication module to establish communication connection with the slave communication module after receiving the communication confirmation reply instruction.
8. A primary communication module, comprising:
the communication instruction sending unit is used for sending a communication instruction to request that a slave communication module generates a communication reply instruction based on the communication instruction after receiving the communication instruction, and returns the communication reply instruction;
a confirmation instruction sending unit, configured to, in a case where the communication reply instruction returned from the communication module is received, generate a communication confirmation instruction and send the communication confirmation instruction to the slave communication module, so as to request the slave communication module to generate a communication confirmation reply instruction based on the communication confirmation instruction after receiving the communication confirmation instruction, and return the communication confirmation reply instruction;
and the communication connection establishing unit is used for receiving the communication confirmation reply instruction returned by the slave communication module and establishing communication connection with the slave communication module based on the communication confirmation reply instruction.
9. 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 module communication method according to any one of claims 1 to 6 when executing the program.
10. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the module communication method according to any one of claims 1 to 6.
CN202210557310.8A 2022-05-20 2022-05-20 Module communication method, master communication module, slave communication module and electronic equipment Pending CN115118758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210557310.8A CN115118758A (en) 2022-05-20 2022-05-20 Module communication method, master communication module, slave communication module and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210557310.8A CN115118758A (en) 2022-05-20 2022-05-20 Module communication method, master communication module, slave communication module and electronic equipment

Publications (1)

Publication Number Publication Date
CN115118758A true CN115118758A (en) 2022-09-27

Family

ID=83326786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210557310.8A Pending CN115118758A (en) 2022-05-20 2022-05-20 Module communication method, master communication module, slave communication module and electronic equipment

Country Status (1)

Country Link
CN (1) CN115118758A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070186021A1 (en) * 2006-02-03 2007-08-09 Standard Microsystems Corporation Method for a slave device to convey an interrupt and interrupt source information to a master device
CN101309192A (en) * 2007-05-18 2008-11-19 青岛海信电器股份有限公司 Bus communication method
CN201341158Y (en) * 2008-12-17 2009-11-04 Tcl集团股份有限公司 Stateful inspection circuit for RS485 network
CN103166821A (en) * 2011-12-12 2013-06-19 深圳市华为安捷信电气有限公司 Method, device and system capable of achieving serial port communication
CN108628796A (en) * 2018-04-13 2018-10-09 深圳市科陆电子科技股份有限公司 A kind of serial communication method and system
CN112948299A (en) * 2021-02-01 2021-06-11 浙江中拓合控科技有限公司 Serial port communication system and communication method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070186021A1 (en) * 2006-02-03 2007-08-09 Standard Microsystems Corporation Method for a slave device to convey an interrupt and interrupt source information to a master device
CN101309192A (en) * 2007-05-18 2008-11-19 青岛海信电器股份有限公司 Bus communication method
CN201341158Y (en) * 2008-12-17 2009-11-04 Tcl集团股份有限公司 Stateful inspection circuit for RS485 network
CN103166821A (en) * 2011-12-12 2013-06-19 深圳市华为安捷信电气有限公司 Method, device and system capable of achieving serial port communication
CN108628796A (en) * 2018-04-13 2018-10-09 深圳市科陆电子科技股份有限公司 A kind of serial communication method and system
CN112948299A (en) * 2021-02-01 2021-06-11 浙江中拓合控科技有限公司 Serial port communication system and communication method

Similar Documents

Publication Publication Date Title
CN104253880A (en) Address assignment for safe users of a field bus
JP2008099482A (en) Battery pack block, battery pack system, and address setting method for battery pack system
CN106200454A (en) The communication system of a kind of many MCU and method
CN108475241B (en) SPI-based data transmission method and device
CN110896372B (en) I2C link switching method, terminal and storage medium
US9779037B2 (en) Establishing connectivity of modular nodes in a pre-boot environment
US10659536B2 (en) Method of controlling inverters
CN110958139B (en) Network control method, orchestrator, controller, and computer-readable storage medium
CN110809002A (en) Method for protocol conversion between robot and welding equipment and protocol conversion module
CN114285695A (en) Communication method, device, equipment, system and storage medium
CN106850554B (en) Method and device for dual-system directional connection
CN115118758A (en) Module communication method, master communication module, slave communication module and electronic equipment
CN112003723A (en) Method and system for realizing firmware batch upgrading of Expander chip
CN115657646B (en) Test method and device of CAN controller
CN107968718B (en) Method, device and equipment for confirming main standby state
US10417156B2 (en) Hardware resource sharing within peripheral component interconnect express (PCIE) environment capable of assigning hardware resource dynamically
CN111431668B (en) Baud rate switching method based on multi-node UART communication, air conditioning system and processor
CN110572440B (en) Method and device for data transmission, household appliance and storage medium
CN112241279B (en) Self-adaptive electronic control unit software upgrading method and system and automobile
CN113849354A (en) Connection checking method, connection checking device, server and storage medium
CN113250944A (en) Control method based on master-slave control system and water pump control system
CN103370906A (en) Communication system
CN114500566B (en) Communication method and interface device
CN115865866B (en) Address allocation method and device
CN112235173B (en) Communication control method, communication control device, terminal device 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