CN112039850B - Communication protocol configuration method of intelligent display control terminal test equipment - Google Patents
Communication protocol configuration method of intelligent display control terminal test equipment Download PDFInfo
- Publication number
- CN112039850B CN112039850B CN202010786494.6A CN202010786494A CN112039850B CN 112039850 B CN112039850 B CN 112039850B CN 202010786494 A CN202010786494 A CN 202010786494A CN 112039850 B CN112039850 B CN 112039850B
- Authority
- CN
- China
- Prior art keywords
- data
- communication protocol
- function
- file
- protocol
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012360 testing method Methods 0.000 title claims abstract description 10
- 230000008569 process Effects 0.000 claims abstract description 18
- 238000012986 modification Methods 0.000 claims description 5
- 230000004048 modification Effects 0.000 claims description 5
- 238000012858 packaging process Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims description 3
- 238000005538 encapsulation Methods 0.000 claims description 2
- 230000009471 action Effects 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 abstract description 2
- 230000003993 interaction Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 4
- 238000011160 research Methods 0.000 description 2
- RZVHIXYEVGDQDX-UHFFFAOYSA-N 9,10-anthraquinone Chemical compound C1=CC=C2C(=O)C3=CC=CC=C3C(=O)C2=C1 RZVHIXYEVGDQDX-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
The invention relates to the field of intelligent application of information technology, in particular to a communication protocol configuration method of intelligent display control terminal test equipment, which comprises the following steps: step one, a communication data protocol is agreed according to requirements, a protocol list is set according to the content of the communication data protocol, and an xml file of the communication protocol is generated; step two, setting an opposite terminal IP and a port number, judging the function of the generated xml file, and determining to use a corresponding xml file to package a data packet according to the opposite terminal IP and the port number to which data go if the generated xml file is used for sending the data; if the data is used for receiving data, determining to use a corresponding xml file to analyze the data packet according to the opposite terminal IP and the port number of the data source; the data communication protocol between the systems is configured to generate a configuration file, and the configuration file is used for controlling the action logic of the package and the unpacking plug-in, so that the data receiving/sending process is conveniently controlled, and the data communication protocol is conveniently modified and validated.
Description
Technical Field
The invention relates to the field of intelligent application of information technology, in particular to a communication protocol configuration method of intelligent display control terminal test equipment.
Background
The shipboard unmanned aerial vehicle has the characteristics of strong maneuverability, convenience in use and low flying cost, has more and more obvious effects in the fields of sea supervision, marine environment monitoring, resource protection and the like, and becomes one of the current research hotspots in the application of the shipboard unmanned aerial vehicle. The sliding and transferring process of the carrier-borne unmanned aerial vehicle on the ship deck is of great importance to the application of the carrier-borne unmanned aerial vehicle, and becomes a necessary condition and a basic guarantee for safe transfer and reliable obstacle avoidance of the carrier-borne unmanned aerial vehicle. The transfer process of the carrier-based unmanned aerial vehicle is divided into multiple modes such as autonomous guidance and manual guidance, and the carrier-based unmanned aerial vehicle is transferred in an autonomous guidance mode, so that the transfer track of the carrier-based unmanned aerial vehicle needs to be planned in advance, and the planned transfer track is synchronized to a carrier-based unmanned aerial vehicle simulation program, a view animation display program and intelligent display control terminal equipment of the carrier-based unmanned aerial vehicle respectively.
The flight control of the unmanned aerial vehicle is realized based on the ground station, the data interaction requirements between the ground station and the unmanned aerial vehicle are various, a communication protocol needs to be defined according to the requirements, and the communication protocol needs to be adjusted repeatedly in the process of research, development and debugging of equipment, the communication protocol definition and maintenance mode in the current stage are very inconvenient, and a novel communication protocol configuration method needs to be researched and developed for realizing the rapid modification and configuration of the communication protocol. With the increasing demand for miniaturization and portability of user control terminals, it is becoming the best choice to develop a communication protocol configuration method based on a novel intelligent display control terminal test device.
Disclosure of Invention
Based on the problems, the invention provides a communication protocol configuration method of intelligent display control terminal test equipment, which is used for realizing data interaction between a carrier-borne unmanned aerial vehicle and a ground station, mainly configuring an intersystem data interaction protocol in a graphical mode, generating a configuration file, and controlling the action logic of a package and a unpacking plug-in by using the configuration file, thereby realizing convenient control of a data receiving/sending process and convenient modification and effective of a data communication protocol.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a communication protocol configuration method of intelligent display control terminal test equipment comprises the following steps:
step one, a communication data protocol is agreed according to requirements, a protocol list is set according to the content of the communication data protocol, and an xml file of the communication protocol is generated;
step two, setting an opposite terminal IP and a port number, judging the function of the generated xml file, and determining to use a corresponding xml file to package a data packet according to the opposite terminal IP and the port number to which data is destined if the function of the generated xml file is used for sending the data; if the data is used for receiving data, determining to use a corresponding xml file to analyze the data packet according to the opposite terminal IP and the port number of the data source.
Further, in the first step, the process of generating the communication protocol xml file specifically includes:
s1, creating an empty file, and automatically clearing the contents of a protocol list area;
s2, adding a protocol list, and adding a new line of data;
s3, after the protocol list is edited, adjusting the position of a data field in the protocol list;
and S4, acquiring data of the protocol list, transmitting the data into a background for processing through a route, and finally writing the data into a file to generate a new communication protocol configuration file.
Further, in the first step, the process of generating the communication protocol xml file specifically includes:
s11, selecting an existing communication protocol configuration file, reading and converting the content of the communication protocol configuration file into a JSON data structure, and then assigning JSON data to a protocol list, wherein at the moment, the data format and the content of the existing communication protocol are automatically displayed in a protocol list area;
s12, checking and editing a data frame format, and newly adding or transforming the position of a data item in a data frame;
and S13, acquiring data of the protocol list, transmitting the data into a background for processing through a route, and finally writing the data into a file to generate a new communication protocol configuration file.
Furthermore, when the data is newly added, if the data is edited wrongly, a modification function is executed to modify the data.
Further, in the second step, the packaging process specifically includes:
s21, converting the data content of the communication protocol configuration file into a JSON format;
s22, transmitting the buffer data and the corresponding communication protocol configuration file into a packaging function, and simultaneously converting the communication protocol configuration file into a DOM object;
and S23, converting the field data in the corresponding JSON data into buffer data according to the attribute of the field in the DOM object data.
Further, in the second step, the unpacking process specifically includes:
s31, converting the data content of the communication protocol configuration file into a DOM object;
s22, transmitting the data and the DOM object into a unpacking function, analyzing buffer data, and assigning the buffer data according to the field stage of the DOM object;
and S23, returning the JSON format data after assignment.
Compared with the prior art, the invention has the beneficial effects that:
1. the method can support the presetting of data interactive contents based on typical use cases, and generate general data contents and format files.
2. The method can support the introduction of the existing (from other tools) communication protocol configuration file to complete the analysis package of data interaction;
3. the IP and the port number of the input opposite terminal can be flexibly configured according to the operator, and different targets for data transmission are distinguished;
4. the method has the advantages of strong portability, support for switching among different systems or devices, more convenient data interaction, good robustness and capability of ensuring smooth completion of data interaction.
Drawings
FIG. 1 is a flowchart of inventive example 1;
fig. 2 is a flowchart of embodiment 2 of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. Embodiments of the present invention include, but are not limited to, the following examples.
Example 1:
as shown in fig. 1, a communication protocol configuration method for testing equipment of an intelligent display control terminal includes the following steps:
step one, a communication data protocol is agreed according to requirements, a data protocol table is set according to the content of the protocol, and an xml file of the communication protocol is generated, wherein the process of generating the xml file of the communication protocol specifically comprises the following steps:
s1, calling an fs module in nodejs to create an empty file, and automatically clearing the contents of a protocol list area;
s2, adding a protocol list, newly adding a line of data, executing a showEditPage (data, obj) function to edit the data, executing the newly added data of the function tbody, appidHild (tr) after editing is finished, if the editing is wrong, executing a comm _ edit (obj) function, simultaneously executing the showEditPage (data, obj) function to edit the data again, and executing the newly added and modified data of the function tbody, appidHild (tr) after modification is finished;
s3, after the protocol list is edited, adjusting the position of a data field in the protocol list, calling an upward moving function $ (("body"). On ",". Text-up ", function () { } to move the data field upward, and calling a downward moving function $ ((" body "). On", ". Text-down", function () { } to move the data field downward;
s4, acquiring a function: the method comprises the steps of $ ("body"). On ("click", "# text _ createflie", function () { } acquiring data of a protocol list, transferring the data into a background process through a route "/createXML", and finally writing the data into a file through a writeFile () method calling an fs module in a creatxml = function to generate a new communication protocol configuration file.
Step two, setting an opposite terminal IP and a port number, judging the function of the generated xml file, and determining to use a corresponding xml file to package a data packet according to the opposite terminal IP and the port number to which data go if the generated xml file is used for sending the data; if the data is used for receiving data, determining to use a corresponding xml file to analyze the data packet according to the opposite terminal IP and the port number of the data source.
Wherein, the packaging process specifically includes:
s21, converting the data content of the communication protocol configuration file into a JSON format;
s22, transmitting the data and the corresponding communication protocol configuration file into a package (json, len) { } encapsulation function, and simultaneously converting the communication protocol configuration file into a DOM object through a plug-in xmldom;
and S23, converting the field data in the corresponding JSON data into buffer data by adopting function methods of write int8, write int16LE, write int32LE and the like of the buffer in nodejs according to the attribute of the field in the DOM object data.
Wherein, the unpacking process specifically comprises:
s31, converting the data content of the communication protocol configuration file into a DOM object through an plug-in xml2js and fs module;
s22, importing the buffer data and the DOM object into buffer ToObj (), analyzing the buffer data by methods such as readFloatLE (), readInt8 (), readInt16LE (), readInt32LE (), and the like, and assigning the value of the buffer data according to the field stage of the DOM object;
and S23, returning the JSON format data after assignment.
Example 2:
compared with embodiment 1, embodiment 2 is different only in that no new empty document is created in step S1, but an existing communication protocol configuration file is imported, and the specific differences are as follows:
as shown in fig. 2, in the first step, the process of generating the communication protocol xml file specifically includes:
s11, selecting an existing communication protocol configuration file, reading the content of the communication protocol configuration file by an fs module readFile () method, converting the communication protocol configuration file into a JSON data structure by using a plug-in xmldom, and assigning JSON data to a protocol list, wherein at the moment, the data format and the content of the existing communication protocol are automatically displayed in the protocol list area;
s12, viewing and editing a data frame format, newly adding or transforming the position of a data item in a data frame, calling an upward moving function $ ("body"). On ("click", ". Text-up", function () { } to move up a data field, and calling a downward moving function $ ("body"). On ("click", ". Text-down", function () { } to move down the data field;
s13, acquiring a function: the method comprises the steps of $ ("body"). On ("click", "# text _ createflie", function () { } acquiring data of a protocol list, transferring the data into a background process through a route "/createXML", and finally writing the data into a file through a writeFile () method calling an fs module in a creatxml = function to generate a new communication protocol configuration file.
The above is the embodiment of the present invention. The specific parameters in the above embodiments and examples are only for the purpose of clearly illustrating the invention verification process of the inventor and are not intended to limit the scope of the invention, which is defined by the claims, and all equivalent structural changes made by using the contents of the specification and the drawings of the present invention should be covered by the scope of the present invention.
Claims (2)
1. A communication protocol configuration method of intelligent display control terminal test equipment is characterized by comprising the following steps:
step one, a communication data protocol is agreed according to requirements, a protocol list is set according to the content of the communication data protocol, and an xml file of the communication protocol is generated;
step two, setting an opposite terminal IP and a port number, judging the function of the generated xml file, and determining to use a corresponding xml file to package a data packet according to the opposite terminal IP and the port number to which data go if the generated xml file is used for sending the data; if the data is used for receiving data, determining to use a corresponding xml file to analyze the data packet according to the opposite terminal IP and the port number of the data source;
in the first step, the process of generating the communication protocol xml file specifically includes:
s11, selecting an existing communication protocol configuration file, reading the content of the communication protocol configuration file by an fs module readFile () method, converting xmldom into a JSON data structure by using a plug-in, and assigning JSON data to a protocol list, wherein at the moment, the data format and the content of the existing communication protocol are automatically displayed in the protocol list area;
s12, checking and editing a data frame format, adding or transforming positions of data items in a data frame, calling a move-up function $ ("body"). On ("click", ". Text-up", function () { } to move up a data field, and calling a move-down function $ ("body"). On ("click", ". Text-down", function () { } to move down the data field;
s13, acquiring a function: acquiring data of a protocol list by using a 'click', 'text _ createflie', transmitting the data to a background process through a route '/createXML', and finally writing the data into a file by using a writeFile () method for calling an fs module in a creatxml = function (req, res) { } function to generate a new communication protocol configuration file;
when the data is newly added, if the data is edited wrongly, executing a modification function to modify the data;
wherein, the packaging process specifically includes:
s21, converting the data content of the communication protocol configuration file into a JSON format;
s22, transmitting the data and the corresponding communication protocol configuration file into a package (json, len) { } encapsulation function, and simultaneously converting the communication protocol configuration file into a DOM object through a plug-in xmldom;
s23, converting the field data in the corresponding JSON data into buffer data by adopting a function method of write element 8, write element 16LE or write element 32LE of the buffer in nodejs according to the attribute of the field in the DOM object data;
wherein, the unpacking process specifically comprises:
s31, converting the data content of the communication protocol configuration file into a DOM object through an plug-in xml2js and fs module;
s22, importing the buffer data and the DOM object into buffer ToObj (), analyzing the buffer data by a readFloatLE (), readInt8 (), readInt16LE () or readInt32LE () method, and assigning the value of the buffer data according to the field phase of the DOM object;
and S23, returning the JSON format data after assignment.
2. The communication protocol configuration method of the intelligent display control terminal test equipment according to claim 1, characterized in that:
in the first step, the process of generating the communication protocol xml file specifically includes:
s1, creating an empty file, and automatically clearing the contents of a protocol list area;
s2, adding a protocol list, and adding a new line of data;
s3, after the protocol list is edited, adjusting the position of a data field in the protocol list;
and S4, acquiring data of the protocol list, transmitting the data into a background for processing through a route, and finally writing the data into a file to generate a new communication protocol configuration file.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010786494.6A CN112039850B (en) | 2020-08-07 | 2020-08-07 | Communication protocol configuration method of intelligent display control terminal test equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010786494.6A CN112039850B (en) | 2020-08-07 | 2020-08-07 | Communication protocol configuration method of intelligent display control terminal test equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112039850A CN112039850A (en) | 2020-12-04 |
| CN112039850B true CN112039850B (en) | 2022-10-18 |
Family
ID=73582584
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010786494.6A Active CN112039850B (en) | 2020-08-07 | 2020-08-07 | Communication protocol configuration method of intelligent display control terminal test equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112039850B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112883691A (en) * | 2021-02-19 | 2021-06-01 | 四川腾盾科技有限公司 | Unmanned aerial vehicle telemetry data protocol conversion method and system and data use method |
| CN114741562A (en) * | 2022-04-24 | 2022-07-12 | 国网福建省电力有限公司电力科学研究院 | IEC61850 GOOSE protocol dictionary and protocol feature library construction method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103166927A (en) * | 2011-12-14 | 2013-06-19 | 航天信息股份有限公司 | Extensible markup language (XML) communication protocol dynamic management method |
| CN104660547A (en) * | 2013-11-18 | 2015-05-27 | 北京四维图新科技股份有限公司 | Service platform for realizing telecommunications |
| CN105577463A (en) * | 2014-10-13 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Testing method and testing device based on communication protocol |
| CN109729072A (en) * | 2018-11-29 | 2019-05-07 | 沈阳无距科技有限公司 | Communication protocol information processing method, device and electronic equipment |
| CN109857452A (en) * | 2019-02-26 | 2019-06-07 | 重庆零壹空间航天科技有限公司 | A kind of configuration method and device of the rocket launch vehicle measurement based on XML |
| CN110839022A (en) * | 2019-10-31 | 2020-02-25 | 四川航天系统工程研究所 | Vehicle-mounted control software communication protocol analysis method based on xml language |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9628992B2 (en) * | 2015-07-31 | 2017-04-18 | Wyfi, Inc. | WiFi access management system and methods of operation thereof |
-
2020
- 2020-08-07 CN CN202010786494.6A patent/CN112039850B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103166927A (en) * | 2011-12-14 | 2013-06-19 | 航天信息股份有限公司 | Extensible markup language (XML) communication protocol dynamic management method |
| CN104660547A (en) * | 2013-11-18 | 2015-05-27 | 北京四维图新科技股份有限公司 | Service platform for realizing telecommunications |
| CN105577463A (en) * | 2014-10-13 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Testing method and testing device based on communication protocol |
| CN109729072A (en) * | 2018-11-29 | 2019-05-07 | 沈阳无距科技有限公司 | Communication protocol information processing method, device and electronic equipment |
| CN109857452A (en) * | 2019-02-26 | 2019-06-07 | 重庆零壹空间航天科技有限公司 | A kind of configuration method and device of the rocket launch vehicle measurement based on XML |
| CN110839022A (en) * | 2019-10-31 | 2020-02-25 | 四川航天系统工程研究所 | Vehicle-mounted control software communication protocol analysis method based on xml language |
Non-Patent Citations (1)
| Title |
|---|
| "使用dom将xml转化为json";开源博客;《https://my.oschina.net/u/3959547/blog/1981229》;20180917;第1页到第4页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112039850A (en) | 2020-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Sachs et al. | Adaptive 5G low-latency communication for tactile internet services | |
| CN112039850B (en) | Communication protocol configuration method of intelligent display control terminal test equipment | |
| CN110587601B (en) | Control system applied to intelligent inspection robot | |
| US20070135967A1 (en) | Apparatus and method of controlling network-based robot | |
| CN109729072A (en) | Communication protocol information processing method, device and electronic equipment | |
| CN109347884B (en) | Method and device for converting real-time Ethernet to field bus and storage medium | |
| CN113612654B (en) | Vehicle-mounted gateway function test method based on database | |
| CN109408064A (en) | A kind of visual micro services system automation dispositions method of layout and system | |
| CN109635216B (en) | Method for annotating pictures of mobile terminal and browser on same screen | |
| US20240022620A1 (en) | System and method of communications using parallel data paths | |
| CN106357617A (en) | Adaptive method, device, elevator communication system of the communication protocol | |
| CN109545214A (en) | Message distributing method and device based on voice interactive system | |
| CN108959294A (en) | A kind of method and apparatus accessing search engine | |
| US10324772B2 (en) | Method and system for data instance-based automatic message map construction | |
| JP2016532190A (en) | Document format conversion apparatus and method | |
| CN110263251A (en) | A kind of O&M knowledge method for pushing and device based on context model | |
| CN110177030A (en) | Industrial gateway controls test method | |
| CN101409655A (en) | Message-driven automation test system and implementing method | |
| CN106130829B (en) | Bus test method and device | |
| CN113242244A (en) | Data transmission method, device and system | |
| CN106598599B (en) | A kind of execution method and apparatus of program | |
| CN106302125B (en) | The method, apparatus and system that a kind of pair of solicited message is responded | |
| Liu et al. | Robokube: Establishing a new foundation for the cloud native evolution in robotics | |
| CN105225035B (en) | A kind of robot realizing that E-Government is unified | |
| CN108153597B (en) | LINUX equipment management device and method |
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 |