CN112714170B - General ground software framework system capable of configuring communication protocol and application - Google Patents

General ground software framework system capable of configuring communication protocol and application Download PDF

Info

Publication number
CN112714170B
CN112714170B CN202011536099.9A CN202011536099A CN112714170B CN 112714170 B CN112714170 B CN 112714170B CN 202011536099 A CN202011536099 A CN 202011536099A CN 112714170 B CN112714170 B CN 112714170B
Authority
CN
China
Prior art keywords
data
communication
protocol
data packet
interface
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
CN202011536099.9A
Other languages
Chinese (zh)
Other versions
CN112714170A (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.)
Casco Signal Ltd
Original Assignee
Casco Signal 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 Casco Signal Ltd filed Critical Casco Signal Ltd
Priority to CN202011536099.9A priority Critical patent/CN112714170B/en
Publication of CN112714170A publication Critical patent/CN112714170A/en
Application granted granted Critical
Publication of CN112714170B publication Critical patent/CN112714170B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a general ground software frame system capable of configuring a communication protocol and application thereof, wherein the system comprises: the communication layer is composed of a TCP communication module, a UDP communication module and a Commsvr communication module and is used for realizing the communication of TCP, UDP and Commsvr respectively; the interface layer is used for realizing the management function of the protocol; the message layer is used for realizing the functions of management of a specific protocol, matching of the protocol and a data packet and data packaging; and the message agent layer is used for providing a service of reading data for the user. Compared with the prior art, the method has the advantages of greatly improving the speed of developing the new ground software, improving the efficiency of system development and the like.

Description

General ground software framework system capable of configuring communication protocol and application
Technical Field
The invention relates to a state railway system, in particular to a general ground software framework system capable of configuring a communication protocol and application thereof.
Background
In the development of a national railway system integration project, ground software is often required to be developed for function adaptation, the functions of the ground software are different, and the communication protocols of the ground software and an external interface are also different, so that coding is required from bottom layer communication to upper layer business processing when one ground software is developed, the workload is large, and a lot of repeated work is caused due to the fact that frames are basically similar.
The existing system generally has the problems of complex data packet disassembly and assembly, error in protocol analysis development by a user, and the like, so how to solve the problems is to improve the development speed of new ground software, and the system becomes a technical problem to be solved at present.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a general ground software framework system capable of configuring a communication protocol and application thereof, which can greatly improve the speed of developing new ground software, thereby improving the efficiency of system development.
The purpose of the invention can be realized by the following technical scheme:
according to one aspect of the present invention, there is provided a generic surface software framework system for configurable communication protocols, the system comprising:
the communication layer is composed of a TCP communication module, a UDP communication module and a Commsvr communication module and is used for realizing the communication of TCP, UDP and Commsvr respectively;
the interface layer is used for realizing the management function of the protocol;
the message layer is used for realizing the functions of management of a specific protocol, matching of the protocol and a data packet and data packaging;
and the message agent layer is used for providing a service of reading data for the user.
As a preferred technical solution, the Interface layer includes Interface modules, each of which manages an external Interface and a plurality of communication protocols corresponding to the Interface.
As a preferred technical solution, the Message layer includes a Message module, which provides data filling, data sending, and packet processing function registration services for the user.
As a preferred technical solution, the message proxy layer includes a MessageProxy module.
The system framework simultaneously supports three communication modes of TCP, UDP and Commsvr;
the system supports automatic identification of data packets based on the communication protocol, and is used for realizing communication of various protocols only by text description and processing function registration of the communication protocol;
the user side can configure the protocol with variable parameters, structured data and a circular structure in the protocol text, and the framework system can automatically match and package the data packets based on the complex protocol.
As a preferred technical solution, the system framework simultaneously supports three communication modes of TCP, UDP, and Commsvr, specifically:
1) the user side indicates that the communication mode is TCP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal are required to be written, and the frame can open the corresponding TCP service for communication; if the client is used as the client, the IP and the port number of the opposite terminal are required to be written, and the frame can open the corresponding TCP client service for communication;
2) the user side indicates that the communication mode is UDP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal need to be written, and the frame can start the corresponding UDP service for communication; if the client is used as the client, the IP and the port number of the opposite terminal need to be written, and the frame can start the corresponding UDP client service for communication;
3) the user side writes a communication mode of Commsvr and a local terminal entity number in a protocol configuration file; if the frame is the server, the frame can start the corresponding receiving service to communicate; if the client is clearly written, the framework can start corresponding sending service for communication;
4) the framework system supports multiple communication modes to be used simultaneously and repeatedly, and can meet the requirement of simultaneously carrying out communication in different modes with a plurality of external software.
As a preferred technical solution, the communication that can realize multiple protocols only by text description and processing function registration of a communication protocol specifically includes:
1) for a service end of TCP, UDP and Commsvr communication, a client needs to register a corresponding processing function for each protocol when using a frame, a frame system can call back a correct data packet to the processing function, and the client performs service processing in the processing function;
2) for the communication of a TCP server, after receiving an information packet, a frame stores the data packet into a ring queue according to data flow; in addition, the background service can regularly perform sub-packet processing on the data in the annular queue according to the packet head and the packet tail which are written in the configuration protocol; then, the background service carries out protocol matching on the successfully packetized data packet based on the protocol content in the configuration protocol one by one, and the data packet is handed to a processing function registered by a user for processing after the matching is successful; if all protocols do not match, discarding the data packet;
3) for the communication between the UDP server and the Commsvr server, after receiving a packet of data packet, the frame system immediately performs protocol matching on the data packet based on the protocol content in the configuration protocol one by one, and after the matching is successful, the frame system delivers the data packet to a processing function registered by a user for processing; if all protocols do not match, discarding the data packet;
4) for the communication of TCP, UDP and Commsvr clients, a frame system provides a uniform data filling interface and a uniform data sending interface; when a user calls a data filling interface, the frame caches data into corresponding information; when the user calls the sending interface, the framework system carries out stream processing on the data in the information based on the corresponding configuration protocol, and then sends out the data according to the corresponding communication mode.
According to another aspect of the present invention, there is provided an application of a generic terrestrial software framework system for the configurable communication protocol, the application comprising the steps of:
step 1), a processing flow of receiving data by a framework system;
and 2) a processing flow of sending data by the framework system.
As a preferred technical solution, the processing flow of the framework system receiving data in step 1) is specifically:
step 101, receiving data from external software, and executing step 102;
step 102, judging the connection mode of the data source, if the data source is from TCP connection, entering step 103, otherwise, entering step 105;
step 103, storing the received data into an internal ring queue, performing data serialization processing, and executing step 104;
104, the Interface module extracts a complete data packet from the ring queue according to the head and tail identification in the protocol, and executes step 105;
105, the Interface module judges whether all protocols managed by the Interface module are matched with the data packet, and if the protocols are not matched with the data packet, the Interface module executes step 106; if all the protocols are subjected to matching judgment, all the protocols managed by the module are not matched with the data packet, the data is considered unidentifiable, and the data receiving process is finished;
step 106, the Message module firstly judges whether the length of the data packet is matched with the protocol according to the protocol content managed by the Message module, then judges whether the content of the data packet is matched with the protocol according to the protocol sequence, and executes step 107;
step 107, judging whether the communication protocol is matched with the data packet, and if the communication protocol is matched with the data packet successfully, executing step 108; if the matching is not successful, executing step 105;
step 108, calling a callback function registered by the user, wherein the parameter is an object of the MessageProxy module, the user side acquires data of a corresponding protocol in the data packet through the object, performs service processing, and executes step 109;
in step 109, the data reception process is completed.
As a preferred technical solution, the processing flow of the framework system sending data in step 2) is specifically:
step 201, the user end fills data into the Message module through a data filling interface provided by the Message layer, and executes step 202;
step 202, the message layer obtains the corresponding protocol content through the internal logic and executes step 203;
step 203, the message layer carries out streaming processing on the data filled in the message layer through the protocol content, and finally forms a data packet to be sent, and step 204 is executed;
step 204, acquiring a corresponding interface layer module through a message layer, thereby judging a communication mode corresponding to the interface; if the communication mode is TCP, go to step 205; if the communication mode is UDP, go to step 206; if the communication mode is Commsvr, executing step 207;
step 205, calling a sending interface of the TCP communication module, sending out the data packet, and ending the sending process;
step 206, calling a sending interface of the UDP communication module, sending out the data packet, and ending the sending process;
step 207, calling the sending interface of the Commsvr communication module, sending out the data packet, and ending the sending process.
Compared with the prior art, the invention has the following advantages:
1) the invention simultaneously supports the server/client communication modes of TCP, UDP and Commsvr, does not need to develop various communication modes, and saves great development work; moreover, as repeated development is not needed, the stability and the correctness of communication are ensured;
2) the invention supports the communication of an open protocol, and the user can realize the correct identification of the received data and the automatic packaging of the sent data only by compiling the protocol text without matching the data packet and the protocol, thereby saving the heavy workload of protocol matching and protocol packaging and improving the efficiency of software development;
3) the invention supports more complex communication protocols, and users can realize the communication function with more complex contents based on the capability, so that the framework has the capability of protocol development.
Drawings
FIG. 1 is a block diagram of the framework system of the present invention;
FIG. 2 is a flow chart of received data;
FIG. 3 is a flow chart of sending data;
FIG. 4 is an example protocol file screenshot.
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 some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
The invention is a universal ground software framework, the bottom layer supports TCP, UDP and Commsvr communication, and the requirement of ground software on the communication mode in the national iron system integration project is met; meanwhile, the scheme supports an open protocol, and after the scheme is applied, when a user develops ground software, the user only needs to describe the communication protocol in a text form to complete the processing of the protocol, so that the complex work of disassembling and assembling data packets is saved, and only the development of service processing is focused; in addition, because the framework carries out unified processing on the protocol, the problem of error when a user develops protocol analysis by himself is also avoided.
An implementation process of a general ground software framework capable of configuring a communication protocol comprises the following steps:
step 1) the framework simultaneously supports three communication modes of TCP, UDP and Commsvr, and meets the communication mode requirements in the integrated development of the state iron system;
and 2) the framework supports automatic identification of data packets based on the communication protocol, and a user can realize communication of multiple protocols only by performing text description and processing function registration of the communication protocol without processing analysis and package of the data packets.
Step 3) the framework supports more complex communication protocols, and users can carry out communication in a complex data form based on the capability.
The step 1) is specifically as follows:
1) the user can write that the communication mode is TCP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal need to be written, and the frame can open the corresponding TCP service for communication; if the client is used as the client, the IP and the port number of the opposite terminal need to be written, and the framework can open the corresponding TCP client service for communication.
2) The user can write that the communication mode is UDP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal need to be written, and the frame can start the corresponding UDP service for communication; if the client is used as the client, the IP and the port number of the opposite terminal need to be written, and the framework can start the corresponding UDP client service for communication.
3) The user can write the communication mode as Commsvr and the entity number of the local terminal in the protocol configuration file; if the frame is the server, the frame can start the corresponding receiving service to communicate; if the client is clearly written, the framework can start the corresponding sending service for communication.
4) The framework supports simultaneous use and multiple use of multiple communication modes, and can meet the requirement of simultaneously carrying out communication in different modes with a plurality of external software.
The step 2) is specifically as follows:
1) for a service end of TCP, UDP, and Commsvr communication, when a client uses a framework, a client needs to register a corresponding processing function for each protocol, the framework will call back a correct data packet to the processing function, and a user performs service processing in the processing function.
2) For the communication of a TCP server, after receiving an information packet, a frame stores the data packet into a ring queue according to data flow; in addition, the background service can regularly perform sub-packet processing on the data in the annular queue according to the packet head and the packet tail which are written in the configuration protocol; then, the background service carries out protocol matching on the successfully packetized data packet based on the protocol content in the configuration protocol one by one, and the data packet is handed to a processing function registered by a user for processing after the matching is successful; if all protocols do not match, the packet is discarded.
3) For the communication between the UDP server and the Commsvr server, after the frame receives a packet of data packets, the frame immediately carries out protocol matching on the data packets based on the protocol content item by item in the configuration protocol, and the data packets are handed to the processing function registered by the user for processing after the matching is successful; if all protocols do not match, the packet is discarded.
4) For the communication of TCP, UDP and Commsvr client terminals, the framework provides a uniform data filling interface and a uniform data sending interface; when a user calls a data filling interface, the frame caches data into corresponding information; when the user calls the sending interface, the framework carries out stream processing on the data in the information based on the corresponding configuration protocol, and then sends out the data according to the corresponding communication mode.
The step 3) is specifically as follows:
1) the user can configure the protocol with variable parameters, structured data and a circular structure in the protocol text, and the framework can automatically match and package the data packets based on the complex protocol, thereby helping the user to realize the communication capability of complex functions.
As shown in fig. 1, the framework system is composed of 6 modules with 4 layers, and the modules together implement the function of receiving and transmitting data. The specific modules are described as follows:
the communication layer is composed of a module 1, a module 2 and a module 3, realizes the specific function of communicating with external software, respectively realizes the communication of TCP, UDP and Commsvr, and provides the service of receiving and transmitting data for the upper module 4;
the Interface layer is realized by a module 4, mainly realizes the management function of the protocol, and each Interface manages an external Interface (a TCP server/client, a UDP server/client and a Commsvr communication end) and a plurality of communication protocols corresponding to the Interface;
the message layer is realized by a module 5, mainly realizes the functions of management of a specific protocol, matching of the protocol and a data packet and data packet packaging, and provides data filling, data sending and data packet processing function registration services for a user;
the message agent layer is realized by a module 6, and realizes an agent function through the encapsulation module 6, thereby providing a service for reading data for a user.
Finally, the user performs function registration through the packet processing function registration service of the protocol message proxy layer, so as to receive data and perform service data processing, and the function of sending data is realized through the data filling and data sending service provided by the module 5.
As shown in fig. 2, the framework receives the processing flow of the data. The method comprises the following steps:
step 101, receiving data from external software, and executing step 102;
step 102, judging the connection mode of the data source, if the data source is from TCP connection, entering step 103, otherwise, entering step 105;
step 103, storing the received data into an internal ring queue, performing data serialization processing, and executing step 104;
step 104, the Interface module extracts a complete data packet from the annular queue according to the head and tail identification in the protocol, and executes step 105;
105, the Interface module judges whether all protocols managed by the Interface module are matched with the data packet, and if the protocols are not matched with the data packet, the Interface module executes step 106; if all the protocols are subjected to matching judgment, all the protocols managed by the module are not matched with the data packet, the data is considered unidentifiable, and the data receiving process is finished;
step 106, the Message module firstly judges whether the length of the data packet is matched with the protocol according to the protocol content managed by the Message module, then judges whether the content of the data packet is matched with the protocol according to the protocol sequence, and executes step 107;
step 107, judging whether the communication protocol is matched with the data packet, and if the communication protocol is matched with the data packet successfully, executing step 108; if the matching is not successful, executing step 105;
step 108, calling a callback function registered by the user, wherein the parameter is an object of the MessageProxy module, the user side acquires data of a corresponding protocol in the data packet through the object, performs service processing, and executes step 109;
in step 109, the data reception process is completed.
As shown in fig. 3, the framework sends data. The method comprises the following steps:
step 201, the user end fills data into the Message module through a data filling interface provided by the Message layer, and executes step 202;
step 202, the message layer obtains the corresponding protocol content through the internal logic, and executes step 203;
step 203, the message layer carries out streaming processing on the data filled in the message layer through the protocol content, and finally forms a data packet to be sent, and step 204 is executed;
step 204, acquiring a corresponding interface layer module through a message layer, thereby judging a communication mode corresponding to the interface; if the communication mode is TCP, go to step 205; if the communication mode is UDP, go to step 206; if the communication mode is Commsvr, executing step 207;
step 205, calling a sending interface of the TCP communication module, sending out the data packet, and ending the sending process;
step 206, calling a sending interface of the UDP communication module, sending out the data packet, and ending the sending process;
step 207, calling the sending interface of the Commsvr communication module, sending out the data packet, and ending the sending process.
As shown in fig. 4, an interface protocol definition file. The method mainly comprises the following steps:
content 1, interface definition, which mainly defines the communication mode, server/client, IP and port of the interface;
content 2, a list of protocols that can be processed, the specific definition being defined in content 3;
content 3, protocol definition block, which defines the concrete content of each protocol and describes in sequence;
content 4, a data structure definition block, where a relatively independent data structure in a protocol may be defined, and the protocol may refer to the name of the data structure, as shown in content 6;
content 5, the content cycle number in the protocol can be constant;
content 6, the content in the protocol is a data structure, and the name of the structure is referred;
content 7, the number of content cycles in the protocol can be a variable, and the variable is the name of other fields in the protocol;
content 8, data structure name, referenced by other protocol content;
while the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A generic terrestrial software framework system capable of configuring communication protocols, the system comprising:
the communication layer is composed of a TCP communication module, a UDP communication module and a Commsvr communication module and is used for realizing the communication of TCP, UDP and Commsvr respectively;
the interface layer is used for realizing the management function of the protocol;
the message layer is used for realizing the functions of management of a specific protocol, matching of the protocol and a data packet and data packaging;
the message agent layer is used for providing a service for reading data for a user;
the system framework simultaneously supports three communication modes of TCP, UDP and Commsvr;
the system supports automatic identification of data packets based on the communication protocol, and is used for realizing communication of various protocols only by text description and processing function registration of the communication protocol;
the client can configure a protocol with variable parameters, structured data and a circular structure in a protocol text, and the framework system can automatically match and package data packets based on a complex protocol;
the communication of various protocols can be realized only by text description and processing function registration of the communication protocol is specifically as follows:
1) for a service end of TCP, UDP and Commsvr communication, a client needs to register a corresponding processing function for each protocol when using a frame, a frame system can call back a correct data packet to the processing function, and the client performs service processing in the processing function;
2) for the communication of a TCP server, after receiving an information packet, a frame stores the data packet into a ring queue according to data flow; in addition, the background service can regularly perform sub-packet processing on the data in the annular queue according to the packet head and the packet tail which are written in the configuration protocol; then, the background service carries out protocol matching on the successfully packetized data packet based on the protocol content in the configuration protocol one by one, and the data packet is handed to a processing function registered by a user for processing after the matching is successful; if all protocols do not match, discarding the data packet;
3) for the communication between the UDP server and the Commsvr server, after receiving a packet of data packet, the frame system immediately performs protocol matching on the data packet based on the protocol content in the configuration protocol one by one, and after the matching is successful, the frame system delivers the data packet to a processing function registered by a user for processing; if all protocols do not match, discarding the data packet;
4) for the communication of TCP, UDP and Commsvr client terminals, the frame system provides a uniform data filling interface and a uniform data sending interface; when a user calls a data filling interface, the frame caches data into corresponding information; when the user calls the sending interface, the framework system carries out stream processing on the data in the information based on the corresponding configuration protocol, and then sends out the data according to the corresponding communication mode.
2. The framework system of claim 1, wherein the Interface layer comprises Interface modules, each Interface module manages an external Interface and manages a plurality of communication protocols corresponding to the Interface.
3. The framework system of claim 1, wherein the messaging layer comprises a Message module for providing data stuffing, data forwarding, and packet handling function registration services to the user.
4. The system of claim 1, wherein the message broker layer comprises a MessageProxy module.
5. The system of claim 2, wherein the system framework simultaneously supports three communication modes, namely TCP, UDP and Commsvr, specifically:
1) the user side indicates that the communication mode is TCP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal need to be written, and the frame can open the corresponding TCP service for communication; if the client is used, the IP and the port number of the opposite terminal need to be written, and the framework can open the corresponding TCP client service for communication;
2) the user side indicates that the communication mode is UDP in the protocol configuration file; if the terminal is used as a server, the IP and the monitoring port number of the terminal need to be written, and the frame can start the corresponding UDP service for communication; if the client is used as the client, the IP and the port number of the opposite terminal need to be written, and the frame can start the corresponding UDP client service for communication;
3) the user side writes that the communication mode is Commsvr and the entity number of the local side in the protocol configuration file; if the frame is the server, the frame can start the corresponding receiving service to communicate; if the client is clearly written, the framework can start corresponding sending service for communication;
4) the framework system supports multiple communication modes to be used simultaneously and repeatedly, and can meet the requirement of simultaneously carrying out communication in different modes with a plurality of external software.
6. An application for the generic terrestrial software framework for configurable communication protocols according to claim 1, the application comprising the steps of:
step 1), a processing flow of receiving data by a framework system;
step 2) a processing flow of sending data by the framework system;
the processing flow of the frame system receiving data in the step 1) is specifically as follows:
step 101, receiving data from external software, and executing step 102;
step 102, judging the connection mode of the data source, if the data source is from TCP connection, entering step 103, otherwise, entering step 105;
step 103, storing the received data into an internal ring queue, performing data serialization processing, and executing step 104;
104, the Interface module extracts a complete data packet from the ring queue according to the head and tail identification in the protocol, and executes step 105;
105, the Interface module judges whether all protocols managed by the Interface module are matched with the data packet, and if the protocols are not matched with the data packet, the Interface module executes step 106; if all the protocols are subjected to matching judgment, all the protocols managed by the module are not matched with the data packet, the data is considered unidentifiable, and the data receiving process is finished;
step 106, the Message module firstly judges whether the length of the data packet is matched with the protocol according to the protocol content managed by the Message module, then judges whether the content of the data packet is matched with the protocol according to the protocol sequence, and executes step 107;
step 107, judging whether the communication protocol is matched with the data packet, and if the communication protocol is matched with the data packet successfully, executing step 108; if the matching is not successful, executing step 105;
step 108, calling a callback function registered by the user, wherein the parameter is an object of the MessageProxy module, the user side acquires data of a corresponding protocol in the data packet through the object, performs service processing, and executes step 109;
step 109, completing data receiving processing;
the processing flow of the frame system sending data in the step 2) is specifically as follows:
step 201, the user end fills the data into the Message module through the data filling interface provided by the Message layer, and executes step 202;
step 202, the message layer obtains the corresponding protocol content through the internal logic and executes step 203;
step 203, the message layer carries out streaming processing on the data filled in the message layer through the protocol content, and finally forms a data packet to be sent, and step 204 is executed;
step 204, acquiring a corresponding interface layer module through a message layer, thereby judging a communication mode corresponding to the interface; if the communication mode is TCP, go to step 205; if the communication mode is UDP, go to step 206; if the communication mode is Commsvr, executing step 207;
step 205, calling a sending interface of the TCP communication module, sending out the data packet, and ending the sending process;
step 206, calling a sending interface of the UDP communication module, sending out the data packet, and ending the sending process;
step 207, calling the sending interface of the Commsvr communication module, sending out the data packet, and ending the sending process.
CN202011536099.9A 2020-12-23 2020-12-23 General ground software framework system capable of configuring communication protocol and application Active CN112714170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011536099.9A CN112714170B (en) 2020-12-23 2020-12-23 General ground software framework system capable of configuring communication protocol and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011536099.9A CN112714170B (en) 2020-12-23 2020-12-23 General ground software framework system capable of configuring communication protocol and application

Publications (2)

Publication Number Publication Date
CN112714170A CN112714170A (en) 2021-04-27
CN112714170B true CN112714170B (en) 2022-08-16

Family

ID=75543608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011536099.9A Active CN112714170B (en) 2020-12-23 2020-12-23 General ground software framework system capable of configuring communication protocol and application

Country Status (1)

Country Link
CN (1) CN112714170B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117749615A (en) * 2024-02-19 2024-03-22 成都九洲电子信息系统股份有限公司 Method, system and device for constructing mining management and control communication link based on object combination

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928608A (en) * 2019-12-30 2020-03-27 上海御渡半导体科技有限公司 Extensible communication framework supporting multiple communication protocols and communication method
CN111885004A (en) * 2020-06-28 2020-11-03 通号城市轨道交通技术有限公司 Application layer message transmission method and communication interface platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928608A (en) * 2019-12-30 2020-03-27 上海御渡半导体科技有限公司 Extensible communication framework supporting multiple communication protocols and communication method
CN111885004A (en) * 2020-06-28 2020-11-03 通号城市轨道交通技术有限公司 Application layer message transmission method and communication interface platform

Also Published As

Publication number Publication date
CN112714170A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN112769938B (en) Kubernets cloud side communication system and method based on QUIC
CN108494817B (en) Data transmission method, related device and system
WO2018059137A1 (en) Internet of things terminal access device and method, and computer storage medium
CN109815025B (en) Service model calling method, device and storage medium
CN108199865A (en) A kind of route service implementation method based on distribution subscription
WO2012152132A1 (en) Method and system for realizing application platform adaptation
US10834033B2 (en) Method and system for transferring messages between messaging systems
US11709722B2 (en) Extensible communication framework and communication method supporting multiple communication protocols
CN112714170B (en) General ground software framework system capable of configuring communication protocol and application
WO2014139270A1 (en) Business implementation method and apparatus for intelligent business system, and intelligent business system
CN107528923A (en) The data transmission method and network adapter of a kind of network adapter
CN116319953B (en) Semiconductor device data acquisition method
CN112039746B (en) Industrial control network system
RU2604983C2 (en) Service parsing method flexibly adapted to ims system service tag
WO2012010002A1 (en) Apparatus and method for service debugging for java applications in machine to machine terminal
CN107888622B (en) Information processing method and mobile management entity
CN113973105A (en) System and method for simplifying SOAP message on service bus
CN109451362A (en) RapidIO network interface under VxWorks and implementation method
CN102325187A (en) System and method for integrating multiple function services
US20160149855A1 (en) Service processing method, system, and relevant device
CN110502418B (en) Method for realizing remote debugging
JP6971118B2 (en) Devices, methods and programs for sending and receiving data to and from IoT devices
CN115801629B (en) Bidirectional forwarding detection method and device, electronic equipment and readable storage medium
CN111935135B (en) AMQP protocol proxy method based on CMSP
CN108123974B (en) Network calling method and device

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