General processing method for communication interface of measurement and control software equipment
The general processing of the communication interface of aerospace measurement and control software equipment is achieved through configuration files, solving the problems of many interface types, large numbers and complex operations, realizing the flexible configuration and management of equipment communication information, uniformly handling the communication operations of all interface devices, and improving development efficiency and design uniformity.
Patent Information
- Application Number
- CN202510194162.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-13
AI Technical Summary
When aerospace measurement and control software deals with multiple external interface devices, there are problems such as many interface types, large numbers, complex operations and many changes, which leads to a lot of time spent on equipment communication design and debugging during the development process, and it is difficult to achieve unified design.
The configuration file realizes the general processing of the device communication interface, adopts the general and modular design idea, creates device management objects and initializes communication parameters through the configuration file, and uniformly handles the communication operations of all interface devices.
It realizes flexible configuration and management of device communication information, uniformly handles communication operations of all interface devices, simplifies the debugging process, improves development efficiency, eliminates interface differences, and supports unified design.
Smart Images

Figure CN120144201A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aerospace measurement and control, and particularly to a general processing method for communication interfaces of measurement and control software devices. Background Art
[0002] The interfaces of aerospace measurement and control software have the following characteristics:
[0003] (1) There are many types of external interfaces, including serial ports, PCI bus interfaces, network interfaces, etc.;
[0004] (2) The number of external interface devices connected by the measurement and control software is large;
[0005] (3) The communication and data processing requirements and processes of each interface device have commonalities and differences, which are not conducive to the unified design of measurement and control software device management, measurement and control management, and automated operation.
[0006] The main function of the measurement and control software is to monitor each sub-device of the measurement and control system, including orderly controlling the working parameters of each sub-device and receiving in real time the measurement and control data reported by each sub-device and performing subsequent data processing. Currently, the device management category of aerospace measurement and control software is formed by adding the unique data processing part of each sub-device on the basis of this general method. The measurement and control software needs to perform data interaction with various hardware sub-devices such as the data transmission sub-system, ACU sub-system, safety control console, monitoring sub-system, and telemetry, intermediate frequency modulation, remote control, time frequency, etc. through serial ports, PCI bus interfaces, network interfaces, etc. The types of interaction devices are diverse and the forms are complex. In the current measurement and control system software, device communication processing is the main content of the entire development process, and a large amount of time is often spent on device communication design and debugging. In addition, due to the large differences in the attributes and methods provided by various communication modules, when integrating device management, measurement and control management, and automatic operation, it is necessary to process the device interface differences separately, which is not conducive to the unified design of measurement and control software. Summary of the Invention
[0007] The present invention proposes a general processing method for communication interfaces of measurement and control software devices to solve the above technical problems. The present invention realizes the processing of communication interfaces of devices that conforms to the general and modular design ideas based on configuration files, and well solves the difficulties brought by the large number of interface types, large quantity, complex operations, and many changes in the software development process of the measurement and control system to the software development and implementation process of the measurement and control system.
[0008] The technical solution adopted by the present invention is as follows:
[0009] A general processing method for communication interfaces of measurement and control software devices includes the following steps:
[0010] (1) Configure the device communication parameters to generate a *.config configuration file. Describe the instance name of the extension, the log mode used, and the communication mode in the configuration file. For different types of extensions, add the specific server name, IP address, or extension ID, and PCI address.
[0011] (2) Create a device management class object. The attributes in the device management class include the extension name, the configuration information in the configuration file, the communication interface processing class, the connection status of the communication link, and the extension device ID. The methods include the initialization configuration file function, the source code display function for receiving data, the source code display function for sending data, the function for initializing the extension parameters, the function for starting the data reception and transmission of the extension class, and the termination function. The attributes in the communication interface processing class include the device ID, the link status, whether the initialization is completed, the data reception thread, and the data transmission thread. The methods include the function for sending data, the function for starting the data transmission thread, and the function for starting the data reception thread.
[0012] (3) Call the initialization configuration file function to read and initialize the configuration file.
[0013] (4) Call the function for initializing the extension parameters to initialize the parameters of the extension and related delegates.
[0014] (5) Use the link connection status, the device ID of the extension, and the extension name to identify the extension information.
[0015] (6) Record the extension logs and display the source code of the received and sent data to implement the functions of sending and receiving data.
[0016] Further, in the configuration file of step 1, network communication is implemented by configuring the communication method, local IP, peer IP, local multicast address, peer multicast address, local port number, and peer port number. PCI communication is implemented by configuring the device name, device ID, command communication address, and board-level software loading file. Serial communication is implemented by configuring the serial port name, baud rate, data bits, stop bits, and parity method.
[0017] Further, when adding a new extension, create a new device management class object and write the corresponding configuration file to implement the extension communication function.
[0018] The beneficial effects of the present invention compared with the prior art are as follows:
[0019] (1) The present invention configures the interface information between the measurement and control software and each external interface through a configuration file. When the extension address or other interface information changes, only the configuration file needs to be maintained, with flexible design, easy to change and maintain later.
[0020] (2) The present invention can uniformly handle all interface device communication processing operations, such as initializing connections, sending and receiving data packets, thread management, etc., which is convenient for debugging and reduces the error probability of separate encoding;
[0021] (3) The present invention provides public interface delegation functions such as source code display, information output, and log recording for the communication interface processing class, which greatly reduces the workload of software design coding and improves the development efficiency of measurement and control software;
[0022] (4) The present invention eliminates the interface differences among various devices and is the basis for the unified design of equipment management, measurement and control management, and automated operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is the UML diagram of the configuration file;
[0024] Figure 2 It is the class view of IBBEDataCollect;
[0025] Figure 3 It is a class in the class library that is open to external use;
[0026] Figure 4 This is a code example that needs to be added when generating a configuration file for the current device class;
[0027] Figure 5 This is an example of the fields added to the config file when using network communication;
[0028] Figure 6 This is an example of the fields added to the config file when using PCI communication;
[0029] Figure 7 Is the class view of the DeviceBase class. DETAILED DESCRIPTION
[0030] The present invention is further described below in conjunction with the accompanying drawings.
[0031] A universal processing method for the communication interface of measurement and control software equipment, by unifying the base class of all extension classes, standardizes, simplifies and increases the reliability of the development process of the measurement and control system software extension class, eliminates the differences in the communication methods of various devices, and provides a unified design basis for subsequent equipment management, measurement and control management, and automatic operation management. Specifically, the method includes the following steps:
[0032] (1) Configure the device communication parameters to generate a *.config configuration file. In the configuration file, describe the instance name of the extension, the log mode used, and the communication mode. For different extension types, add the specific server name, IP address, or extension ID, and PCI address. The configuration information includes the following:
[0033] For network communication, it is necessary to configure the communication method, local IP, peer IP, local multicast address, peer multicast address, local port number, peer port number, etc.
[0034] When performing PCI communication, it is necessary to configure the device name, device ID, command communication address, and board-level software loading file, etc.
[0035] When performing serial communication, it is necessary to configure the serial port name, baud rate, data bits, stop bits, and parity method, etc.
[0036] (2) Create a device management class object.
[0037] The device management class DeviceBase
[0038] Main attributes:
[0039] public string Name; Extension name
[0040] public IConfig Config; Configuration information in the configuration file
[0041] public ICommunicate CommunicateServer; Device communication interface processing class
[0042] public bool bLinkValid; Connection status of the communication link
[0043] UInt32 dwDeviceID; Extension device ID
[0044] ILogger Logger Log processing class
[0045] Main methods:
[0046] InitConfig Initialize the configuration file
[0047] InsertRecvDataToSourceView Implement the source code display of received data
[0048] InsertSendDataToSourceView Implement the source code display of sent data
[0049] Setup Initialize the parameters of the extension
[0050] Start Initiate data reception and transmission for extension devices
[0051] Stop Terminate operation and destroy resources
[0052] Device communication interface processing class ICommunicate
[0053] Main attributes:
[0054] UInt32 DeviceID Device ID
[0055] uint uLinkState Link state
[0056] bool bInitState Whether initialization is complete
[0057] ILogger Logger Log processing class
[0058] IBBEDataCollect m_dataCollect Data collection processing class
[0059] Thread recvThread; Data receiving thread
[0060] Thread sendThread; Data sending thread
[0061] Main methods:
[0062] public UInt32 Send(IBBEData cmd); Used to send data
[0063] public bool StartSend(); Used to start the data sending thread
[0064] public void StartReceive(); Used to start the data receiving thread
[0065] (3) Call the InitConfig function to read and initialize the configuration file;
[0066] (4) Call the Setup function to initialize the parameters of the extension device and related delegates;
[0067] (5) Use the attributes such as the link connection state, device ID of the extension device, and extension device name provided by the communication interface processing class to identify the extension device information;
[0068] (6) Use the methods provided by the communication interface processing class to implement functions such as extension device log recording, source code display, data sending, and data receiving.
[0069] When adding a new extension, simply inherit the communication interface processing class of this device and write the corresponding configuration file to implement the communication function of the extension, without the need to repeatedly add software code.
[0070] The following is a more specific example:
[0071] A general method for processing the communication interface of a measurement and control software device includes the following steps:
[0072] (1) Generate a *.config file as the configuration file for the current device class. After creating the file, add fields to the file, such as Figure 4 shown; describe the communication information such as the instance name of the extension, the log mode used, and the communication mode in the configuration file. For different types of extensions, add specific configuration information such as the server name, IP address, or extension ID, and PCI address. When using network communication, refer to the configuration as Figure 5 shown. When using PCI communication, refer to the configuration as Figure 6 shown;
[0073] (2) Generate a specific extension class based on the DeivceBase base class;
[0074] (3) Call the initialization configuration file function to read and initialize the configuration file;
[0075] (4) Use the configuration file and data processing delegate initialization method to initialize the parameters of the extension and related delegates by calling the Setup function. The Setup() method has 7 overloaded forms. The first 3 are applicable to ordinary extension device classes, and the last 4 are applicable to PCI type extension device classes. The delegate types and other parameters used are briefly introduced as follows:
[0076] IConfig: Configuration file interface, including configuration interface files for three communication modes. The UML is as Figure 1 ;
[0077] IDeviceManage: Baseband device management interface, used for the initialization and management of digital baseband boards, etc. Here, a specific baseband board instance is passed in.
[0078] IBBEDataCollect: General data collection interface based on the general data interface IBBEData. Its class view is as Figure 2 ;
[0079] ReceiveDataEventHandler: Receive data processing delegate;
[0080] PublicDelegate.BBESourceInHandler: Based on the PublicDelegate class, source data input delegate;
[0081] PublicDelegate.BBESourceOutHandler: Based on the PublicDelegate class, source data output delegate;
[0082] PublicDelegate.BBEExceptionInfoHandler: Based on the PublicDelegate class, exception information processing delegate;
[0083] PublicDelegate.BBEErrorInfoHandler: error information handling delegate based on the PublicDelegate class;
[0084] PublicDelegate.BBEMissionInfoHandler: Based on the PublicDelegate class, task information processing delegate;
[0085] The classes in the class library that are open to external use are as follows Figure 3 shown.
[0086] (5) Use the provided link connection status, extension device ID, extension name and other attributes to identify the extension information. The attributes provided by BBE.Device include:
[0087] bLinkValid: The connection status of the communication link.
[0088] DeviceID: The device ID of the extension.
[0089] Logger: An instance of the log class BBE.Log, used to generate logs.
[0090] Name: The name of the extension.
[0091] (6) Use the methods provided by the device communication interface processing class to implement extension log recording, source code display, data sending, data receiving and other functions. For a list of functions, see Figure 7 , the specific description is as follows:
[0092] InitConfig: Initialize the configuration file.
[0093] InsertRecvDataToSourceView: Implements source code display of received data.
[0094] InsertSendDataToSourceView: Implement the source code display for sending data.
[0095] Setup: Initialize the parameters and related delegates of the extension. This function has 7 overloaded forms.
[0096] Start: Start the data reception and transmission of the extension class.
[0097] Stop: Terminate the operation and destroy the resources.
[0098] Add other operations such as data comparison and conversion to the corresponding extension class.
[0099] When adding a new extension, simply inherit from this communication interface processing class for measurement and control software devices. There is no need to repeat adding the software code for the common function part.
[0100] This method abstracts common properties and methods as the base class for each device management class, uniformly processes all communication operations, and thus becomes a general method applicable to all external interface devices in the measurement and control system. This method has the advantages of a short development process and high reliability. It is especially suitable for the characteristics of a large number and various types of software interfaces in the current measurement and control system. It can quickly realize the design and development of the software device management class, and has a significant improvement in efficiency and accuracy compared with the previous development process of separately processing each interface device.
[0101] In summary, in view of the characteristics of multiple types, large quantity, and diverse communication methods of the software interface devices in space measurement and control, the present invention proposes a configurable and easily modifiable general communication processing method for space measurement and control software based on a configuration file. The present invention well solves the difficulties brought by the large number, various types, and complex communication processing procedures of the extension in space measurement and control software to the development and implementation of the software. By using the BBE.Device communication interface processing class for measurement and control software devices, it can achieve the characteristics of convenient and flexible modification of communication configuration information, simple implementation of functions such as log recording and source code display, simple debugging, and high reliability.
[0102] The present invention has the advantages of strong generality, short development process, high reliability, and high maintainability. It can greatly shorten the development and implementation process of the extension class in space measurement and control software, and at the same time greatly enhance the generality and maintainability of the space measurement and control software code.
Claims
1. A general processing method for the communication interface of measurement and control software equipment, characterized in that: The following steps are involved: (1) Configure the device communication parameters and generate a *.config configuration file. In the configuration file, describe the instance name of the extension, the log mode used, and the communication mode. For different extension types, add specific server names, IP addresses or extension IDs, and PCI addresses; (2) Create a device management class object. The attributes in the device management class include the extension name, configuration information in the configuration file, communication interface processing class, connection status of the communication link, and extension device ID. The methods include a configuration file initialization function, a source code display function for receiving data, a source code display function for sending data, a function for initializing extension parameters, a function for starting extension class data reception and transmission, and a function for terminating operation. The attributes in the communication interface processing class include device ID, link status, whether initialization is complete, receiving thread, and sending thread. The methods include a function for sending data, a function for starting a sending data thread, and a function for starting a receiving data thread. (3) Call the configuration file initialization function to read and initialize the configuration file; (4) Call the function to initialize the extension parameters, initialize the extension parameters and related delegations; (5) Use link connection status, extension device ID, and extension name to identify extension information; (6) Record the extension log and display the source code of receiving and sending data to realize the functions of sending and receiving data.
2. A general processing method for communication interface of measurement and control software equipment according to claim 1, characterized in that: In the configuration file of step 1, network communication is achieved by configuring the communication mode, local IP, peer IP, local multicast address, peer multicast address, local port number, and peer port number. PCI communication is achieved by configuring the device name, device ID, command communication address, and board-level software loading file. Serial communication is achieved by configuring the serial port name, baud rate, data bit, stop bit, and check mode.
3. A general processing method for communication interface of measurement and control software equipment according to claim 1, characterized in that: When adding a new extension, create a new device management class object and write the corresponding configuration file to implement the extension communication function.