CN106603581B - Test method and device supporting multiple communication protocols - Google Patents

Test method and device supporting multiple communication protocols Download PDF

Info

Publication number
CN106603581B
CN106603581B CN201710097679.4A CN201710097679A CN106603581B CN 106603581 B CN106603581 B CN 106603581B CN 201710097679 A CN201710097679 A CN 201710097679A CN 106603581 B CN106603581 B CN 106603581B
Authority
CN
China
Prior art keywords
protocol
instruction
analysis
protocols
test
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.)
Active
Application number
CN201710097679.4A
Other languages
Chinese (zh)
Other versions
CN106603581A (en
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.)
Xinwangda Power Technology Co ltd
Original Assignee
Sunwoda Electronic 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 Sunwoda Electronic Co Ltd filed Critical Sunwoda Electronic Co Ltd
Priority to CN201710097679.4A priority Critical patent/CN106603581B/en
Publication of CN106603581A publication Critical patent/CN106603581A/en
Application granted granted Critical
Publication of CN106603581B publication Critical patent/CN106603581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a test method and a test device for supporting multiple communication protocols, wherein the method comprises the following steps: the upper computer receives a test instruction; according to the protocol analysis packet, carrying out instruction analysis on the test instruction, converting the test instruction into a specified lower protocol instruction and sending the specified lower protocol instruction to a specified lower computer; and receiving a lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing. According to the testing method and device supporting multiple communication protocols, the upper protocol is additionally arranged before the lower protocol, so that a single testing system can be connected with multiple testing lower computers, redundant manpower for controlling the lower computers by multiple users is saved, the labor cost is reduced, the operation steps are simplified, the users only need to master the upper computers, the operation method of the upper protocol can control multiple devices applying different communication protocols, and the personnel training time is reduced.

Description

Test method and device supporting multiple communication protocols
Technical Field
The present invention relates to the field of communication transmission, and in particular, to a test method and apparatus for supporting multiple communication protocols.
Background
The communication protocol is also called communication protocol, and refers to an agreement of two communication parties for data transmission control. The agreement includes making unified regulations on data format, synchronization mode, transmission speed, transmission step, error detection and correction mode, control character definition, etc. both parties must comply together, which is also called link control procedure.
The ModBus protocol and the Can protocol are commonly adopted in the industry nowadays, and the ModBus protocol is a bus protocol of an industrial field and is formed by connecting a programmable controller with an intelligent terminal and a computer through a public line or a special line. The system structure includes both hardware and software. It can be applied to various data acquisition and process monitoring.
The CAN protocol bus is an internationally standardized serial communication protocol. Is one of the most widely used field buses internationally, the high performance and reliability of the CAN protocol has been agreed and is widely used in industrial automation, ships, medical equipment, industrial equipment, and the like.
Because two kinds of bus protocol structures of CAN agreement and ModBus agreement are very common in the industry, and these two kinds of communication agreements CAN not supported simultaneously to corresponding test system, need switch different test systems and test, this not only inconvenient operation, need also waste time and energy according to different communication protocol development test software moreover, and the cost increases.
Disclosure of Invention
The present invention provides a testing method and device supporting multiple communication protocols, so as to solve the problem that the conventional single testing system cannot perform testing communication on the conventional systems with different communication modes.
The invention provides a test method supporting multiple communication protocols, which comprises the following steps:
the upper computer receives a test instruction;
according to the protocol analysis packet, performing instruction analysis on the test instruction, converting the test instruction into a specified lower protocol instruction, and sending the specified lower protocol instruction to a specified lower computer;
and receiving a lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing.
Further, the test method supporting multiple communication protocols further includes, before the test instruction is input according to the upper protocol:
loading the upper protocol and a plurality of lower protocols;
loading the upper protocol analysis packet and a plurality of corresponding lower protocol analysis packets, and forming the protocol analysis packet;
analyzing the upper protocol, and designing an instruction list according to analysis content;
and setting a preset value and selecting a lower protocol.
Further, in the test method supporting multiple communication protocols, the step of converting into the upper feedback instruction for processing further includes:
and comparing the data in the upper feedback instruction with the preset value to obtain a comparison value, and converting a test result.
Further, in the test method supporting multiple communication protocols, the upper protocol is a ModBus protocol.
Further, in the test method supporting multiple communication protocols, the lower level protocol includes a ModBus protocol, a Can protocol, a BACnet protocol, and a LonWorks protocol.
The invention provides a testing device supporting multiple communication protocols, comprising:
the receiving module is used for receiving the test instruction by the upper computer;
the first analysis module is used for analyzing the test instruction according to the protocol analysis packet, converting the test instruction into a specified lower protocol instruction and sending the specified lower protocol instruction to a specified lower computer;
and the second analysis module is used for receiving the lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing.
Further, the above test apparatus supporting multiple communication protocols further includes:
the first loading module is used for loading the upper protocol and the plurality of lower protocols;
a second loading module, configured to load the upper protocol analysis packet and the corresponding multiple lower protocol analysis packets, and compose the protocol analysis packet;
the third analysis module is used for analyzing the upper protocol and designing an instruction list according to analysis contents;
and the selection module is used for setting a preset value and selecting the lower protocol.
Furthermore, in the testing apparatus supporting multiple communication protocols, the second parsing module further includes a processing module,
and the processing module is used for comparing the data in the upper feedback instruction with a preset value to obtain a comparison value and converting a test result.
Further, in the above test apparatus supporting multiple communication protocols, the upper protocol loaded by the processing module is a ModBus protocol.
Further, in the test apparatus supporting multiple communication protocols, the lower level protocol loaded by the processing module includes: ModBus protocol, Can protocol, BACnet protocol, and LonWorks protocol.
According to the testing method and device supporting multiple communication protocols, the upper protocol is added in front of the lower protocol, so that a single testing system can be connected with multiple testing lower computers, redundant manpower for controlling the lower computers by multiple users is saved, labor cost is reduced, operation steps are simplified, the users only need to master the upper computer, the operation method of the upper protocol can control multiple devices applying different communication protocols, and personnel training time is reduced.
Drawings
FIG. 1 is a flow chart of a test method supporting multiple communication protocols according to an embodiment of the invention;
FIG. 2 is a flowchart of a test method supporting multiple communication protocols according to an embodiment of the present invention;
FIG. 3 is a flow chart of a testing method supporting multiple communication protocols according to an embodiment of the invention;
FIG. 4 is a flowchart of a test method supporting multiple communication protocols according to an embodiment of the present invention;
FIG. 5 is a flow chart of a test method supporting multiple communication protocols according to an embodiment of the invention;
FIG. 6 is a block diagram of a test apparatus supporting multiple communication protocols according to an embodiment of the present invention;
fig. 7 is a block diagram of a test apparatus supporting multiple communication protocols according to an embodiment of the present invention.
100. A receiving module; 200. a first parsing module; 300. a second parsing module; 400. a first loading module; 500. a second load module; 600. a third parsing module; 700. a selection module; 800. and a processing module.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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 addition, the descriptions related to "first", "second", etc. in the present invention are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a test method for supporting multiple communication protocols, including the following steps:
s10, the upper computer receives a test instruction;
s20, analyzing the test instruction according to the protocol analysis packet, converting the test instruction into a specified lower protocol instruction, and sending the specified lower protocol instruction to a specified lower computer;
and S30, receiving the lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing.
In step S10, the upper computer receives a specified test command according to the command list generated by the upper protocol loaded in the test method supporting multiple communication protocols.
As the above step S20, according to the upper protocol analysis packet in the protocol analysis packet, analyzing the input test instruction, encrypting the analyzed content according to the specified lower protocol to generate a lower protocol instruction, and sending the lower protocol instruction to the specified lower computer, where the same lower protocol instruction may be sent to multiple lower computers, each lower computer may receive only one lower protocol command, where the specified lower protocol may be a single lower protocol or multiple lower protocols, and when multiple lower protocols are selected, multiple lower protocol instructions corresponding to the lower protocol instructions one to one are generated, and each lower protocol instruction corresponds to only one lower protocol; the upper protocol and the lower protocol may be the same communication protocol.
Referring to fig. 1-2, in an embodiment, when the selected lower protocol is the same as the upper protocol in use, the step S20 is stopped, and the step S21 is executed instead, where the step S21 specifically includes: in the test method supporting multiple communication protocols, the upper computer directly adopts the test command input in the step S10 as the lower protocol command, and sends the lower protocol command to a designated lower computer.
In step S30, after the test is completed, the lower protocol feedback command fed back from each lower computer is received, the lower protocol feedback command is subjected to command analysis based on a plurality of lower protocol analysis packets in the protocol analysis packets, and the analyzed content is encrypted according to a specified upper protocol, so as to generate an upper feedback command.
Referring to fig. 1-2, in an embodiment, when the selected lower protocol is the same as the upper protocol in use, the step S30 is stopped, and the step S31 is executed instead, where the step S31 specifically includes: in the test method supporting multiple communication protocols, the upper computer directly takes the lower protocol feedback instruction fed back by the lower computer as the upper feedback instruction and processes the upper feedback instruction.
Referring to fig. 3, in this embodiment, before the test instruction is input according to the upper protocol, the test method supporting multiple communication protocols further includes:
s1, loading the upper protocol and a plurality of lower protocols;
s2, loading the upper protocol analysis packet and a plurality of corresponding lower protocol analysis packets to form the protocol analysis packet;
s3, analyzing the upper protocol, and designing an instruction list according to the analysis content;
and S4, setting a preset value and selecting a lower protocol.
In the step S1, the upper protocol and the plurality of lower protocols are loaded, the loaded upper protocol and the loaded plurality of lower protocols are temporarily stored after the loading is completed, the user can select to store the upper protocol and the plurality of lower protocols for a long time after the testing process is completed, and if the user selects not to store the upper protocol and the plurality of lower protocols for a long time or does not select the upper protocol and the plurality of lower protocols for a limited time, the system defaults to delete the upper protocol and the plurality of lower protocols loaded in the step S1, the limited time is generally defined to be 10 to 50 seconds, preferably 30 seconds, wherein the types of the loaded plurality of lower protocols may include the same type of communication protocol as the upper protocol.
Referring to fig. 3-4, in an embodiment, when the plurality of lower protocols loaded in the step S1 include the same kind of communication protocol as the upper protocol, before the step S2, a step S5 is additionally performed, where the step S5 is specifically: the test method for supporting multiple communication protocols gives a prompt of a prompt window or a flashing signal indicator lamp displayed in a voice or a display screen, reminds a user that the multiple lower level protocols comprise communication protocols of the same type as the upper level protocol, marks the lower level protocols, and needs to perform corresponding feedback operations according to the prompt, for example, clicking a confirmation or cancellation button in the prompt window or pressing a confirmation or cancellation button of an operation table, if cancellation is selected or not selected within a limited time, the system deletes the communication protocols of the same type as the upper level protocol in the multiple lower level protocols, so as to prevent the situation that the system runs for a long time and the like when the user loads the communication protocols by mistake when the user loads the communication protocols, wherein the limited time is generally defined as 10-50 seconds, and the preferred limited time is 10 seconds.
In step S2, the upper protocol analysis packet corresponding to the communication protocol loaded in step S1 and the plurality of lower protocol analysis packets corresponding to the communication protocol are loaded, and compose the protocol analysis packet, temporarily store the loaded upper protocol analysis packet and a plurality of lower protocol analysis packets after the loading is completed, after the test process is completed, the user may select to store the upper protocol analysis package and the plurality of lower protocol analysis packages for a long time, and if the user selects not to store the upper protocol analysis package and the plurality of lower protocol analysis packages for a long time or does not select within a limited time, the system may delete the upper protocol analysis package and the plurality of lower protocol analysis packages loaded in the step S2 by default, the limited time is generally defined as 10 to 50 seconds, and preferably 30 seconds, the type of the loaded lower protocol analysis packets may include a communication protocol analysis packet of the same type as the upper protocol analysis packet.
Referring to fig. 3-4, in an embodiment, when the plurality of lower protocol analysis packets loaded in the step S2 include a communication protocol analysis packet of the same type as the upper protocol analysis packet, before the step S3, the step S6 is additionally performed, and the step S6 is specifically: the test method for supporting multiple communication protocols gives a prompt of a prompt window or a flashing signal indicator lamp displayed in a voice or a display screen to remind a user that the multiple lower protocol analysis packets include the communication protocol analysis packets of the same type as the upper protocol analysis packet and label the lower protocol analysis packets, the user needs to perform corresponding feedback operation according to the prompt, for example, click a confirmation or cancellation button in the prompt window or press a confirmation or cancellation button of an operation console, if the user selects to cancel or does not select within a limited time, the system deletes the communication protocol analysis packets of the same type as the upper protocol analysis packet in the multiple lower protocol analysis packets by default so as to prevent the user from mistakenly loading the communication protocol analysis packets when loading the communication protocol analysis packets, thereby causing the system to have the situations of crash and the like in the analysis process, wherein, the limited time is generally defined to be 10 to 50 seconds, and the preferred limited time is 10 seconds.
In the step S3, the upper protocol loaded in the step S1 is analyzed according to the upper protocol analysis package loaded in the step S2, and a command list is designed according to the analysis content, wherein the storage state of the command list is generally divided into temporary storage and long-term storage, and the preferred default storage state of the test method supporting multiple communication protocols is temporary storage, and the storage state of the command list is identical to the storage state of the communication protocol loaded in the step S1.
In step S4, a preset value is set according to the condition of the test target, and the corresponding lower protocol corresponding to the test lower computer is selected from the plurality of lower protocols loaded in step S1.
Referring to fig. 5, in the test method supporting multiple communication protocols according to this embodiment, the step of converting into the upper feedback command for processing further includes:
and S40, comparing the data in the upper feedback instruction with the preset value to obtain a comparison value, and converting a test result.
As the above step S40, according to the upper protocol analysis packet in the protocol analysis packet, the upper feedback instruction is analyzed to obtain the feedback data, and according to the comparison between the feedback data and the preset value, the comparison value is obtained, and the test result is converted, and the result data is output in the form of a list.
In this embodiment, in the test method supporting multiple communication protocols, the upper protocol is a ModBus protocol.
The upper protocol is generally one of communication protocols such as ModBus protocol, Can protocol, BACnet protocol, and LonWorks protocol, and preferably ModBus protocol.
In this embodiment, the test method supporting multiple communication protocols includes communication protocols such as ModBus protocol, Can protocol, BACnet protocol, and LonWorks protocol.
The ModBus protocol is an industrial field bus protocol; the Can protocol is a controller area network bus protocol; the BACnet protocol is a building automatic control network data communication protocol; the LonWorks protocol is a field bus protocol, replaces the traditional transmission of 4-20mA analog signals and common switching value signals by digital communication, and is a full-digital, bidirectional and multi-station communication system for connecting intelligent field equipment and an automatic system.
In another specific embodiment, in the testing device supporting multiple communication protocols, the upper protocol and the lower protocol may further include wireless communication protocols such as ieee802.15.4 protocol and 802.11ac protocol.
Referring to fig. 6, an embodiment of the present invention further provides a testing apparatus supporting multiple communication protocols, including:
the receiving module 100 is used for receiving a test instruction by an upper computer;
the first analysis module 200 is configured to perform instruction analysis on the test instruction according to the protocol analysis packet, convert the test instruction into a specified lower-level protocol instruction, and send the specified lower-level protocol instruction to a specified lower-level computer;
the second parsing module 300 is configured to receive the lower protocol feedback instruction sent by the lower computer, perform instruction parsing on the lower protocol feedback instruction according to the protocol parsing packet, and convert the lower protocol feedback instruction into an upper feedback instruction for processing.
The receiving module 100 is configured to receive a specified test instruction by an upper computer according to an instruction list generated by an upper protocol loaded in the test method supporting multiple communication protocols.
The first parsing module 200 is configured to parse an input test instruction according to an upper protocol parsing packet in a protocol parsing packet, encrypt parsed content according to a known and specified lower protocol, generate a lower protocol instruction, and send the lower protocol instruction to a specified lower computer, where a same lower protocol instruction may be sent to multiple lower computers, and each lower computer receives only one lower protocol command, where the specified lower protocol may be a single lower protocol or multiple lower protocols, and when multiple lower protocols are selected, multiple lower protocol instructions corresponding to the lower protocol instructions one to one are generated, and each lower protocol instruction corresponds to only one lower protocol; the upper protocol and the lower protocol may be the same communication protocol.
In an embodiment, when the selected lower protocol is the same as the upper protocol in use, the first parsing module 200 stops performing the step S20, and instead performs the step S21, where the step S21 specifically includes: the test method supporting multiple communication protocols directly adopts the test command input in the step S10 as the lower protocol command.
The second parsing module 300 is configured to receive the lower protocol feedback instruction fed back by each lower computer after the test is completed, perform instruction parsing on the lower protocol feedback instruction according to a plurality of lower protocol parsing packets in the protocol parsing packets, and encrypt parsed contents according to a specified upper protocol to generate an upper feedback instruction, where the upper protocol and the lower protocol may be the same communication protocol.
In an embodiment, when the selected lower protocol is the same as the upper protocol in use, the second parsing module 300 stops performing the step S30, and instead performs the step S31, where the step S31 specifically includes: in the test method supporting multiple communication protocols, the lower protocol feedback instruction is directly used as the upper feedback instruction.
Referring to fig. 7, in this embodiment, the test apparatus supporting multiple communication protocols further includes:
a first loading module 400, configured to load the upper protocol and the plurality of lower protocols;
a second loading module 500, configured to load the upper protocol analysis packet and the corresponding multiple lower protocol analysis packets, and compose the protocol analysis packet;
a third parsing module 600, configured to parse the upper protocol and design an instruction list according to parsing content;
the selecting module 700 is used for setting a preset value and selecting a lower protocol.
The first loading module 400 is configured to load the upper protocol and the plurality of lower protocols, temporarily store the loaded upper protocol and the loaded plurality of lower protocols after the loading is completed, and after the testing process is completed, a user may select to store the upper protocol and the plurality of lower protocols for a long time, and if the user selects not to store the upper protocol and the plurality of lower protocols for a long time or does not select the upper protocol and the plurality of lower protocols for a limited time, the first loading module 400 defaults to delete the upper protocol and the plurality of lower protocols loaded by the first loading module 400, where the limited time is generally defined as 10 to 50 seconds, and preferably defined as 30 seconds, and a type of the loaded plurality of lower protocols may include a communication protocol of the same type as the upper protocol.
In an embodiment, when the first loading module 400 loads the plurality of lower protocols including the same type of communication protocol as the upper protocol, the first loading module 400 additionally performs step S5 before performing step S2, where step S5 specifically includes: the testing method supporting multiple communication protocols sends a prompt signal through the first loading module 400, prompts a user through operations such as displaying a prompt window or flashing signal indicator lights in a voice or a display screen, reminds the user that the multiple lower protocols include the communication protocols of the same type as the upper protocol, marks the lower protocols, and the user needs to perform corresponding feedback operations according to the prompt, for example, clicking a confirmation or cancellation button in the prompt window or pressing a confirmation or cancellation button of an operating console, if the user selects to cancel or does not select within a limited time, the processing module 300 deletes the communication protocols of the same type as the upper protocol in the multiple lower protocols, so as to prevent the user from mistakenly loading the communication protocols when loading the communication protocols, which results in the situation that the system runs during sending, and the like, the limited time is generally defined to be 10 to 50 seconds, and the preferred limited time is 10 seconds.
The second loading module 500 is configured to load the upper protocol analysis packet corresponding to the communication protocol loaded in the step S1 and the plurality of corresponding lower protocol analysis packets, and compose the protocol analysis packet, temporarily store the loaded upper protocol analysis packet and a plurality of lower protocol analysis packets after the loading is completed, after the testing procedure is completed, the user can choose to store the upper protocol analysis packet and the plurality of lower protocol analysis packets for a long time, if the user chooses not to store the upper protocol analysis packets for a long time or choose not to store the upper protocol analysis packets and the plurality of lower protocol analysis packets within a limited time, the second loader module 500 deletes the upper protocol analysis packet and the plurality of lower protocol analysis packets loaded by the second loader module 500 by default, and the limited time is generally 10 to 50 seconds, preferably 30 seconds, the type of the loaded lower protocol analysis packets may include a communication protocol analysis packet of the same type as the upper protocol analysis packet.
In an embodiment, when the second loading module 500 loads the plurality of lower protocol analysis packets including the communication protocol analysis packet of the same type as the upper protocol analysis packet, the second loading module 500 additionally performs step S6, where the step S6 is specifically: the testing method supporting multiple communication protocols sends a prompt signal through the second loading module 500, prompts a user through operations such as displaying a prompt window or flashing signal indicator lights in a voice or display screen, reminds the user that the plurality of lower protocol analysis packets include the communication protocol analysis packets of the same type as the upper protocol analysis packet, marks the lower protocol analysis packets, and the user needs to perform corresponding feedback operations according to the prompt, for example, clicking a confirmation or cancellation button in the prompt window or pressing a confirmation or cancellation button of an operating console, if the user selects to cancel or does not select within a limited time, the second loading module 500 defaults to delete the communication protocol analysis packets of the same type as the upper protocol analysis packet in the plurality of lower protocol analysis packets, so as to prevent the user from mistakenly loading the communication protocol analysis packets when the communication protocol analysis packets are loaded, the system is rushed during the analysis process, wherein the limited time is generally defined as 10-50 seconds, and the preferred limited time is 10 seconds.
The third parsing module 600 is configured to parse the upper protocol loaded by the third parsing module 600 according to the upper protocol parsing packet loaded by the third parsing module 600, and design a command list according to parsing contents, where a storage state of the command list is consistent with a storage state of the communication protocol loaded by the third parsing module 600, the storage state is generally divided into temporary storage and long-term storage, and a preferred default storage state of the test method supporting multiple communication protocols is temporary storage.
The selection module 700 is configured to set a preset value according to a condition of a test target, and select the corresponding lower protocol corresponding to the test lower computer from the plurality of lower protocols loaded by the selection module 700.
In this embodiment, in the testing apparatus supporting multiple communication protocols, the second parsing module 300 further includes a processing module 800,
and the processing module 800 is configured to compare the data in the upper feedback instruction with the preset value to obtain a comparison value, and convert the comparison value into a test result.
The processing module 800 is configured to analyze the upper feedback instruction according to an upper protocol analysis packet in the protocol analysis packet to obtain feedback data, compare the feedback data with a preset value to obtain a comparison value, convert the comparison value into a test result, and output the result data in a list form.
In the embodiment, in the testing apparatus supporting multiple communication protocols, the upper protocol loaded by the processing module 800 is a ModBus protocol.
The upper protocol loaded by the processing module 800 is generally one of communication protocols such as ModBus protocol, Can protocol, BACnet protocol, LonWorks protocol, and the like, and preferably the ModBus protocol.
In this embodiment, in the test apparatus supporting multiple communication protocols, the lower level protocol loaded by the processing module 800 includes: communication protocols such as ModBus protocol, Can protocol, BACnet protocol and LonWorks protocol.
The ModBus protocol is an industrial field bus protocol; the Can protocol is a controller area network bus protocol; the BACnet protocol is a building automatic control network data communication protocol; the LonWorks protocol is a field bus protocol, replaces the traditional transmission of 4-20mA analog signals and common switching value signals by digital communication, and is a full-digital, bidirectional and multi-station communication system for connecting intelligent field equipment and an automatic system.
In another specific embodiment, the test apparatus supporting multiple communication protocols, the upper protocol and the lower protocol loaded by the processing module may further include wireless communication protocols such as an ieee802.15.4 protocol and an 802.11ac protocol.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A test method supporting multiple communication protocols, comprising the steps of:
the upper computer receives a test instruction;
according to the protocol analysis packet, carrying out instruction analysis on the test instruction, converting the test instruction into a specified lower protocol instruction and sending the specified lower protocol instruction to a specified lower computer;
receiving a lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing;
wherein before host computer receives the test instruction, still include:
loading an upper protocol and a plurality of lower protocols, wherein the loaded upper protocol and the loaded lower protocols are temporarily stored after the loading is finished, after a testing procedure is finished, a user can select to store the upper protocol and the lower protocols for a long time, and if the upper protocol and the lower protocols are not selected for the long time or are not selected within a limited time, the system defaults to delete the loaded upper protocol and the loaded lower protocols;
loading the upper protocol analysis packet and a plurality of corresponding lower protocol analysis packets, and forming the protocol analysis packet;
analyzing the upper protocol, and designing an instruction list according to analysis content;
and setting a preset value and selecting a lower protocol.
2. The method according to claim 1, wherein the step of converting the feedback command into the upper feedback command for processing further comprises:
and comparing the data in the upper feedback instruction with the preset value to obtain a comparison value, and converting a test result.
3. The method according to claim 1, wherein the higher protocol is a ModBus protocol.
4. A test method supporting multiple communication protocols according to any one of claims 1 to 3, wherein the lower level protocols include ModBus protocol, Can protocol, BACnet protocol and LonWorks protocol.
5. A test apparatus supporting a plurality of communication protocols, comprising:
the receiving module is used for receiving the test instruction by the upper computer;
the first analysis module is used for carrying out instruction analysis on the test instruction according to the protocol analysis packet, converting the test instruction into a specified lower protocol instruction and sending the specified lower protocol instruction to a specified lower computer;
the second analysis module is used for receiving a lower protocol feedback instruction sent by the lower computer, performing instruction analysis on the lower protocol feedback instruction according to the protocol analysis packet, and converting the lower protocol feedback instruction into an upper feedback instruction for processing;
the testing device supporting multiple communication protocols further comprises:
the first loading module is used for loading an upper protocol and a plurality of lower protocols, wherein the loaded upper protocol and the loaded lower protocols are temporarily stored after the loading is finished, a user can select to store the upper protocol and the plurality of lower protocols for a long time after a testing procedure is finished, and if the upper protocol and the plurality of lower protocols are not selected for the long time or are not selected within a limited time, the first loading module defaults to delete the upper protocol and the plurality of lower protocols loaded by the first loading module;
the second loading module is used for loading the upper protocol analysis packet and the corresponding plurality of lower protocol analysis packets and forming the protocol analysis packet;
the third analysis module is used for analyzing the upper protocol and designing an instruction list according to analysis contents;
and the selection module is used for setting a preset value and selecting the lower protocol.
6. The testing device supporting multiple communication protocols according to claim 5, wherein the second parsing module further comprises a processing module,
and the processing module is used for comparing the data in the upper feedback instruction with a preset value to obtain a comparison value and converting a test result.
7. The apparatus according to claim 5, wherein the higher protocol loaded by the processing module is ModBus protocol.
8. The testing device supporting multiple communication protocols according to any one of claims 5 to 7, wherein the lower level protocol loaded by the processing module comprises: ModBus protocol, Can protocol, BACnet protocol, and LonWorks protocol.
CN201710097679.4A 2017-02-22 2017-02-22 Test method and device supporting multiple communication protocols Active CN106603581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710097679.4A CN106603581B (en) 2017-02-22 2017-02-22 Test method and device supporting multiple communication protocols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710097679.4A CN106603581B (en) 2017-02-22 2017-02-22 Test method and device supporting multiple communication protocols

Publications (2)

Publication Number Publication Date
CN106603581A CN106603581A (en) 2017-04-26
CN106603581B true CN106603581B (en) 2020-04-07

Family

ID=58587905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710097679.4A Active CN106603581B (en) 2017-02-22 2017-02-22 Test method and device supporting multiple communication protocols

Country Status (1)

Country Link
CN (1) CN106603581B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770181B (en) * 2017-10-26 2020-10-30 南京诚思机器人科技有限公司 Interaction method, interaction processing device and system of robot system
CN108965053B (en) * 2018-07-02 2021-09-17 山东鲁软数字科技有限公司智慧能源分公司 Method, device and system for testing software pressure of upper computer
CN110545376B (en) * 2019-08-29 2021-06-25 上海商汤智能科技有限公司 Communication method and apparatus, electronic device, and storage medium
CN111555941B (en) * 2020-04-30 2021-12-17 中国科学院长春光学精密机械与物理研究所 Automatic generation method of communication protocol test driving data
CN113009248A (en) * 2021-02-08 2021-06-22 天津云遥宇航科技有限公司 Test method, test equipment and test system
CN113268052B (en) * 2021-05-31 2022-04-08 国网陕西省电力公司电力科学研究院 Multi-protocol conversion based stability control device detection debugging system and method
CN113438565B (en) * 2021-06-25 2023-04-07 上海飞奥燃气设备有限公司 Gas meter handheld terminal and operation method thereof
CN114553977B (en) * 2022-04-25 2023-06-20 同日云联信息技术(苏州)有限公司 Communication system of production equipment and upper system based on socket communication

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201589978U (en) * 2010-01-29 2010-09-22 许勇 Computer room centralized monitoring equipment based on BAC net field bus
CN102694695A (en) * 2012-04-27 2012-09-26 南大傲拓科技江苏有限公司 Serial communication configuration and debugging method based on Ethernet communication protocol
CN102857375A (en) * 2012-09-08 2013-01-02 中色科技股份有限公司 Method for managing and explaining communication protocols
CN104901877A (en) * 2015-06-17 2015-09-09 燕山大学 Multi-interface self-adaptive wireless heterogeneous network protocol conversion method and communication device
CN105610876A (en) * 2016-04-01 2016-05-25 江苏科技大学 Industrial control type automatic network communication protocol converter and communication protocol conversion method
CN106330593A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 Protocol detection method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR112013026307B1 (en) * 2011-04-15 2021-09-21 Abb Schweiz Ag DYNAMIC EVALUATION SYSTEM FOR MONITORING HIGH VOLTAGE ELECTRICAL COMPONENTS AND METHOD FOR EVALUATION OF AT LEAST ONE HIGH VOLTAGE ELECTRICAL COMPONENT
CA2980321C (en) * 2015-03-17 2023-07-25 Open Access Technology International, Inc. Systems and methods for local demand optimization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201589978U (en) * 2010-01-29 2010-09-22 许勇 Computer room centralized monitoring equipment based on BAC net field bus
CN102694695A (en) * 2012-04-27 2012-09-26 南大傲拓科技江苏有限公司 Serial communication configuration and debugging method based on Ethernet communication protocol
CN102857375A (en) * 2012-09-08 2013-01-02 中色科技股份有限公司 Method for managing and explaining communication protocols
CN104901877A (en) * 2015-06-17 2015-09-09 燕山大学 Multi-interface self-adaptive wireless heterogeneous network protocol conversion method and communication device
CN106330593A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 Protocol detection method and device
CN105610876A (en) * 2016-04-01 2016-05-25 江苏科技大学 Industrial control type automatic network communication protocol converter and communication protocol conversion method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于多总线融合的分布式测试系统的设计;薛佳艺;《中国博士学位论文全文数据库(电子期刊) 信工程科技Ⅱ辑》;20160331(第3期);C031-47 *

Also Published As

Publication number Publication date
CN106603581A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106603581B (en) Test method and device supporting multiple communication protocols
EP3197237A1 (en) Intelligent home terminal and control method therefor
JPS6015739A (en) Interactive type code conversion controller
CN104734911A (en) CAN bus network management test system and method
CN108965293B (en) Message analysis method and device and electronic equipment
CN114089713A (en) Communication method based on UDS, ECU and upper computer
CN112953774A (en) Network topology generation method, system, equipment and computer storage medium
CN110943894A (en) Message testing method and device
CN108052094A (en) A kind of extension card identification method, device and frequency converter
EP3171524A1 (en) Method and apparatus for interconnecting intelligent terminal and vehicle terminal
US7124051B2 (en) Data link tester
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN113407469B (en) Parameter configuration method and device, storage medium and electronic device
CN115967660A (en) Method and device for testing CAN protocol conversion, terminal equipment and storage medium
CN116225804A (en) PCIe link detection method, system, equipment and storage medium
CN109634203B (en) Control system for controlling IO terminal based on numerical control controller and corresponding method
CN108494628B (en) Automated test tool for assisting switch to verify compliance with IEEE802.3 standard specification
CN112380096A (en) Serial port communication monitoring system method based on virtual serial port
CN105306302A (en) Method and system for automatically testing Qinq function
CN111585792B (en) Data port configuration method and data port configuration device
CN111008144B (en) Software performance detection method, terminal equipment and computer readable storage medium
CN108063695B (en) Communication instruction configuration method and device and data acquisition method and device
CN106789399B (en) Test method, device and system
CN106452913B (en) Method for multiplexing and fast switching terminal network equipment
CN115167363A (en) Electronic control unit testing method, device and system

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230607

Address after: 518000 1-2 Floor, Building A, Xinwangda Industrial Park, No. 18 Tangjianan Road, Gongming Street, Guangming New District, Shenzhen City, Guangdong Province

Patentee after: SUNWODA ELECTRIC VEHICLE BATTERY Co.,Ltd.

Address before: 518000, 1st floor, 2nd floor, A-B area, 2nd floor, D area-9th floor, Yihe Road, Shiyan Street, Baoan District, Shenzhen City, Guangdong Province

Patentee before: SUNWODA ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 518000 1-2 Floor, Building A, Xinwangda Industrial Park, No. 18 Tangjianan Road, Gongming Street, Guangming New District, Shenzhen City, Guangdong Province

Patentee after: Xinwangda Power Technology Co.,Ltd.

Address before: 518000 1-2 Floor, Building A, Xinwangda Industrial Park, No. 18 Tangjianan Road, Gongming Street, Guangming New District, Shenzhen City, Guangdong Province

Patentee before: SUNWODA ELECTRIC VEHICLE BATTERY Co.,Ltd.

CP01 Change in the name or title of a patent holder