Implement large-scale real-time monitoring applications with UML models □ Ji Meng Lop-Lee (Beijing Tracking and Communication Technology Research Institute · 100094) 1. Overview Real-Time Monitoring Application Software (CTS) Development In the past, the structured method is used, and the programming language used Structured programming languages such as assembly language, Fortran, C, ADA. There have also been analyzed and designing a structured method, and programming implements an attempt to use object-oriented language. It is the first attempt to achieve the first attempt to achieve the first attempt to achieve the first attempt. UML (Unified Modeling Language) is a common, unified graphical model language, an object-oriented development created by the US Rational Corporation. It was approved by the US OMG team in November 1997 to become an industry-oriented industry standard language. The UML standard has unified the object-oriented modeling method, eliminating the difference between object construction. Rational Rose, one of Rational's flagship products, provides full support for this industry standard language. Rose is an object-oriented software analysis design modeling tool that creates a UML standard model, graphically describes and defines the software system structure, and directly generates a code framework through the created model. At the same time, it is also possible to directly reverse generation models from the developer compiled application. The following will be made on how the real-time monitoring application is implemented. It is a brief introduction to the use of Rational Rose. Measurement results and also have functions such as display, printing, recording. The relationship between it and the measuring device is shown in Figure 1. Real-time application exchange information through packets and measuring devices. The software real-time requirements are high, and within each sampling cycle, the data processing of this cycle must be completed, and there must be certain artificial intervention capabilities. Real-time application software models are used to describe all aspects of the software levels, including the USE CASE diagram, class diagram, sequence diagram, state diagram, distribution map, and component diagram. 2.1 Use Case Diagram Use Case is also known as the use case, usage, which is the relationship between system functions, functions between system analysts, and the relationship between users and functions from the viewpoint of user use. It is the association between system functions and user and features, and uses the USE Case system analyst to describe the functionality and behavior of the system. The USE CASE diagram of the CTS is shown in Figure 2. The CCP is a front-end communication processor, Operator as an operator, and Interrupt is an interrupt generated by the work desk command. Simulation: Simulated Status for software debugging and operator training. Task: actual combat status for actual tasks. Abnomity: abnormal processing, emergency state. SIMPLESERVER: Print, Corrugation and other services. CommuniciateProcess: Unpacking from the packet received from the CCP, then unpacking the multi-frame data into one frame as required to forward to the CCP. DataProcess: Picking the data received by CommuniciateProcess based on processing requirements, using the CommuniciateProcess unpacking data calculation track, smooth outsourcing and forecasting. DisplayProcess: Displayed the data after the specified data is displayed in different display servers in different display servers. Display the processing of DataProcess at the specified display server. All USE CASE work must be completed within the specified time period. 2.2 Class Diagraphs are the logical structure of the system, which is the core part of the model. It describes the relationship between classes and classes in the system, and class diagrams describe the static structure of the system. The class package is a collection of related classes in the subsystem, which is similar to the key words in the Peter / Coord method. Figure 3 depicts a class package of CTS.
The class package DisplayProcess, DataProcess, Cabnormity and CommunicateProcess are our own development, the core of the system, and the rest of the class package is provided by Microsoft. The DisplayProcess class package contains all the desired classes related to the MFC. The classes in the DisplayProcess package are derived from the MFC, generally added the features required by the CTS system. The relationship between classes and classes in the DISPLAYPROCESS package is shown in Figure 4. Figure 4 The relationship between classes and classes in the DisplayProcess package The CommunicateProcess class package contains the relationship between the classes and classes required by the communication process, as shown in Figure 5. The CFRAMEFORMAT class is the parent class of all frame format classes, which has two subclasses: CRECVFrameformat and CsendFrameFormat. The CRECVFrame-Format class (a frame format received from CCP) is a gathering of CRECVHEAD classes (receiving frame headers) and CDEvice-Format classes (device data format). The data area of the CSENDFrameFormat class (the frame format sent to CCP) includes content in the device1 ~ Device3 frame format. The CReceive class is a receiving class, and the CSendTo class is to send a data class to the CCP. Figure 5 The relationship between classes and classes in the CommunicateProcess package DataProcess class package is the core part of the CTS class package includes all classes required for data processing. This class is more complicated here to give only partial class maps, as shown 6 shown. The CGDFeature class is the class of the data processing section. It has two most important operations: rail integral and coordinate conversion, CTHEORYGD (theoretical track), CPracticegd (actual track), ccoordinatePoint, CRATE (Target speed). The partial class and its relationship in the 6 DataProcess package, the Cabnormity class package contains exception handling and the class required by the console emergency treatment. 2.3 Dynamic Characteristics of CTS Dynamic Features Distraits, the sequence diagram is used to describe the operation order (scene) of a software, and a USE CASE contains a plurality of software operating scenarios. The sequence diagram is used to portray the USE CASE diagram, and a USE CASE can have multiple sequence diagrams, each with a sequence diagram. The cooperation map and sequence diagram equivalent can be converted from the sequence diagram, and the two have advantages and disadvantages. The sequence diagram is very good for the time required for the real-time system, but the structure is not obvious; the relationship between cooperation maps is obvious, but it expresses time with message sequence numbers, time means unclear, not suitable for real-time systems. The sequence diagram of CommuniciateProcess is shown in Figure 7. Figure 7 Sequence Figure 2.4 Dynamic structure of the state diagram CTS is primarily used to describe the dynamic characteristics of the living class, and describe the state of the Rational Rose. STATEDIAGRAM. Behavior results in the state of migration, the status map is used to display a given class, a given event status. Each state diagram is associated with a class or a USE case. Status The behavioral viewpoint of the software system, which is based on the illustration of a poor state automaton. A state diagram includes a state transition and description of a class in the life cycle. Limited to the state diagram of the CGDFeature class for the CTS, as shown in Figure 8.
Figure 8 CGDFeature class state Figure 2.5 Component diagram logic model represents the logical structure of the system, each logical model should have one or more mappings to the physical implementation-component diagram. The component diagram shows the dependencies between physical components (main programs, packets, and tasks) and mapping relationships between logic models. Component design and system operating environment and the structure of the logical model. If it is developed in phaedments, the component design should be detailed. 2.6 Software Distribution Software System needs to work with the hardware environment, and the software distribution also represents hardware devices and their interfaces, and hard and software synergy. The software profile of CTS represents the layout of executing programs, computer nodes, and devices. The distribution map of the CTS is shown in Figure 9. In the figure, Main and Backup represent the main and standby computers, respectively, only the main computer outputs to the CCP, but both the host receiving the data of the CCP. Figure 9 CTS Software Distribution Figure 3 Implementation After the system's logic design (model) and component design (model) are completed, you can enter programming. CTS programming implements Microsoft's VC language, Rational Rose C has specialized support for VC . Programming is mainly to be done using ROSE's generation and reverse generation tools according to the design model of the system. It consists of three major steps, each step further includes multiple processes. 3.1 System Setup System Settings Mainly to set ROSE features and directories, which include four steps, which is not detailed here. 3.2 Start a new VC project When you start VC , you first create a VC application, at which point the following steps should be followed: Use VC Application Wizards to generate a framework
Create a project under the Rose Analyzer Analyzer, add the file created by VC
Positioning header files, the shutdown does not include the regenerate attribute of the analyzer to generate and regenerate the file, and output the initial model to the ROSE.
Open .red file under ROSE
Reversely generated models without characteristics, select Rosevcpp.pty files as a new feature file, and finally save the model as .mdl file.
3.3 Adding class, data members, and member functions can be divided into two cases in the ROSE model to the VC application: one is a class that does not use the Class Wizard support mechanism of VC (such as information mapping), one is Use this mechanism. The previous situation is relatively simple, it is generating code in ROSE, and then adds these files to the VC project. For the latter case, its steps are approximately as follows:
Create a new class in VC , then add the new class's files to ROSE's Analyzer
Project.
Feature settings in Analyzer Analyzer to reflect the current changes.
Output files in Analyzer Analyzer.