CN112039850A - 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 PDF

Info

Publication number
CN112039850A
CN112039850A CN202010786494.6A CN202010786494A CN112039850A CN 112039850 A CN112039850 A CN 112039850A CN 202010786494 A CN202010786494 A CN 202010786494A CN 112039850 A CN112039850 A CN 112039850A
Authority
CN
China
Prior art keywords
data
communication protocol
file
protocol configuration
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.)
Granted
Application number
CN202010786494.6A
Other languages
Chinese (zh)
Other versions
CN112039850B (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.)
Xian Lingkong Electronic Technology Co Ltd
Original Assignee
Xian Lingkong Electronic 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 Xian Lingkong Electronic Technology Co Ltd filed Critical Xian Lingkong Electronic Technology Co Ltd
Priority to CN202010786494.6A priority Critical patent/CN112039850B/en
Publication of CN112039850A publication Critical patent/CN112039850A/en
Application granted granted Critical
Publication of CN112039850B publication Critical patent/CN112039850B/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/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/22Parsing 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

Communication protocol configuration method of intelligent display control terminal test equipment
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, the carrier-based unmanned aerial vehicle is transferred in an autonomous guidance mode, 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 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.
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 the 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 the data field in the protocol list;
and S4, acquiring the data of the protocol list, transmitting the data to 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 the 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 into 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 the format of the data frame, and adding or transforming the position of the data item in the data frame;
and S13, acquiring the data of the protocol list, transmitting the data to 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 an unpacking function, analyzing buffer data, and assigning values to 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 communication protocol configuration file (from other tools) 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 will be further described 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 the fs module in nodejs to create an empty file, and automatically clearing the contents of the protocol list area;
s2, adding a protocol list, adding a line of data, executing a showEditPlay (data, obj) function to edit data, executing a tbody. appidCHild (tr) new data after editing is finished, if the editing is wrong, executing a comm _ edge (obj) function, executing the showEditPlay (data, obj) function to edit data again, and executing a tbody. appidCHild (tr) function new modified data after modification is finished;
s3, after editing the protocol list, adjusting the position of the data field in the protocol list, calling the function $ ("body"). on ("click", ". text-up", function () { } to move up the data field, and calling the function $ ("body"). on ("click", ". text-down", function () { } to move down the data field;
s4, obtaining 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 for calling an fs module in a creatxml ═ function, and generating 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;
s23, according to the attributes of the fields in the DOM object data, 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.
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 an 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 assigning 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 in step S1, a new empty document is not created, 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 through 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, checking and editing the format of the data frame, adding or transforming the position of the data item in the data frame, calling the function $ ("body"). on ("click", ". text-up", function () { } to move up the data field, calling the function $ ("body"). on ("click", ". text-down", function () { } to move down the data field;
s13, obtaining 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 for calling an fs module in a creatxml ═ function, and generating a new communication protocol configuration file.
The above is an 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 (6)

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.
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 the 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 the data field in the protocol list;
and S4, acquiring the data of the protocol list, transmitting the data to a background for processing through a route, and finally writing the data into a file to generate a new communication protocol configuration file.
3. 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:
s11, selecting the 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 into 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 the format of the data frame, and adding or transforming the position of the data item in the data frame;
and S13, acquiring the data of the protocol list, transmitting the data to a background for processing through a route, and finally writing the data into a file to generate a new communication protocol configuration file.
4. The communication protocol configuration method of the intelligent display control terminal test equipment according to any one of claims 2 or 3, characterized in that: and when the data is newly added, if the editing is wrong, executing a modification function to modify the data.
5. The communication protocol configuration method of the intelligent display control terminal test equipment according to claim 4, characterized in that: 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 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.
6. The communication protocol configuration method of the intelligent display control terminal test equipment according to claim 4, characterized in that: 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 buffer data and the DOM object into an unpacking function, analyzing the 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.
CN202010786494.6A 2020-08-07 2020-08-07 Communication protocol configuration method of intelligent display control terminal test equipment Active CN112039850B (en)

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 true CN112039850A (en) 2020-12-04
CN112039850B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
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

Citations (7)

* Cited by examiner, † Cited by third party
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
US20170034703A1 (en) * 2015-07-31 2017-02-02 Wyfi, Inc. Wifi access management system and methods of operation thereof
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
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
US20170034703A1 (en) * 2015-07-31 2017-02-02 Wyfi, Inc. Wifi access management system and methods of operation thereof
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 (2)

* Cited by examiner, † Cited by third party
Title
开源博客: ""使用dom将xml转化为json"", 《HTTPS://MY.OSCHINA.NET/U/3959547/BLOG/1981229》 *
汉龙: "《Flash MX 2004基础与实例快学教程》", 30 October 2004 *

Cited By (1)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN112039850B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN100385864C (en) Protocol conformance measuring device and method
CN101957745B (en) Method for converting ladder diagram language into structure text language
JPH08329012A (en) Computer network system, computer system, group editor and clip-board control method
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
CN110587601B (en) Control system applied to intelligent inspection robot
CN109240688A (en) Interface development method, electronic device and readable storage medium storing program for executing
CN103744787A (en) Cellphone automated testing method
CN112039850B (en) Communication protocol configuration method of intelligent display control terminal test equipment
CN106357617A (en) Adaptive method, device, elevator communication system of the communication protocol
CN111881044B (en) Automatic test case matching system according to configuration files
CN109901830B (en) Signal configuration method and system for scada system development
CN213213488U (en) Automatic test system
CN113382012A (en) Internal and external network data exchange method, device, equipment and storage medium
CN113760730A (en) Automatic testing method and device
CN115509607A (en) Method for transmitting instructions from iOS-end packaging project to packaging script across environments
CN106130829B (en) Bus test method and device
CN108289165A (en) A kind of implementation method, device and terminal device controlling camera based on mobile phone
CN115384526A (en) Debugging system and debugging method
CN103870533A (en) On-line and offline mixed retrieval method for navigation equipment
CN113885753A (en) Information input method and device, terminal equipment and storage medium
CN113641814A (en) Intelligent robot communication system, method and device based on 5G message
CN103428397A (en) Image information processing method and device
CN107991904B (en) Simulated wireless block center message generator
CN110263251A (en) A kind of O&M knowledge method for pushing and device based on context model

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