CN109542720B - Registration mechanism-based on-satellite environment variable unified supervision method - Google Patents
Registration mechanism-based on-satellite environment variable unified supervision method Download PDFInfo
- Publication number
- CN109542720B CN109542720B CN201811270699.8A CN201811270699A CN109542720B CN 109542720 B CN109542720 B CN 109542720B CN 201811270699 A CN201811270699 A CN 201811270699A CN 109542720 B CN109542720 B CN 109542720B
- Authority
- CN
- China
- Prior art keywords
- variable
- variables
- current
- manager
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3013—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
A registration mechanism-based on-satellite environment variable unified supervision method includes the steps of firstly, constructing a variable manager, initializing historical values of variables in the variable manager, binding trigger events, traversing states of each variable unit in the variable manager according to polling periods of the variables, judging the historical values and current values of the variables, calling functions of the variables corresponding to the trigger events, and updating the historical values of the variables until all the variables of the variable manager are completely traversed.
Description
Technical Field
The invention relates to the field of aerospace embedded software, in particular to a registration mechanism-based on-satellite environment variable unified supervision method.
Background
With the requirements on the reliability and the safety of the aerospace embedded software being higher and higher, the satellite-borne software is larger and larger in scale, the importance of the management of various variables in the software is increasingly prominent, and some variables play a vital role in fault-tolerant judgment, component action and the like of key nodes of a control system and directly concern about task success or failure. The scale and the number of variables of satellite-borne software are multiplied due to increasingly diversified task requirements and generalized development requirements, a software architecture is changed from a flat type to a layered type, and in order to ensure the safety and consistency of data of each layer and strengthen the unified supervision of key environment variables from a bottom layer to an application layer, the software architecture is in the forefront.
The conventional variable management method has the following four problems:
(1) for key environment variables, uniform identification of variable changes is critical, and belongs to display switching when the variables are injected or autonomously switched, but is often difficult to identify when the variables are implicitly switched, for example, when the variables are directly modified through memory addresses, and timely protection cannot be performed if some variable is unexpectedly changed. Meanwhile, because a large number of variables to be monitored are respectively defined in different software hierarchical structures according to application scenes, the maintenance of trigger functions and historical values of the variables is more dispersed, the program structure is easy to be disordered, the readability is poor, and the variable protection is incomplete;
(2) for key environment variables, whether triggering of corresponding events is carried out or not when the variables are changed needs to be concerned, the triggering events are called when the variables are switched in the past, the operation is dispersed and easy to leak, and the maintenance is difficult; if the code logic related to variable switching assignment changes, the calling position of the corresponding trigger event needs to be changed along with the change of the code logic, and the change of a large-section program is caused by the change of one variable assignment position frequently, so that the structure is poor, the code overhead and the maintenance cost are increased, and errors are easy to occur.
(3) For the counter variables, it is critical to uniformly identify whether the counter variables do not change, for example, a continuous counter variable needs to focus on whether the false branch is completely cleared, where the continuous counter refers to a counter in which N conditions are self-added when true, and any condition is a counter that must be cleared when false, but there are usually many false branches and the clearing operation is scattered. For a long time, the number of counters of satellite-borne software is huge, the zero clearing correctness of the counters is ensured by manual walk-through, the counters are difficult to maintain, and the risk is high.
Disclosure of Invention
The technical problem solved by the invention is as follows: the method overcomes the defects of the prior art, provides a registration mechanism-based on-satellite environment variable unified supervision method, performs unified registration management and omnibearing activity monitoring on the scattered environment variables and counters, performs unified maintenance on trigger events, ensures the use safety of the environment variables and counters of each layer of the platform, effectively solves the problems of key variable use safety and difficult variable maintenance, and has good expansibility.
The technical solution of the invention is as follows: a registration mechanism-based on-satellite environment variable unified supervision method comprises the following steps:
step 4, setting the number of on-satellite control cycles as C, if C is an integral multiple of variable polling frequency Freq, indicating that the variable polling cycle arrives, entering step 5, otherwise, waiting until C is an integral multiple of variable polling frequency Freq, and entering step 9;
step 5, obtaining a historical value OldValue of the current variable, if the OldValue is equal to a variable value corresponding to the address pVar and indicates that the variable is not changed, entering step 6, and otherwise, entering step 7;
step 6, if the variable type vType of the current variable is equal to 2, the trigger event is indicated when the variable values before and after the variable are not changed, a function of the trigger event corresponding to the current variable is called, and the step 8 is entered;
step 7, if the variable type vType of the current variable is equal to 1, indicating that the current variable is changed, triggering an event, calling a function of the current variable corresponding to the triggering event, and if the current variable is not changed before and after, turning to step 8;
step 8, updating the historical value of the current variable into a current value;
and 9, judging whether the traversal of the variable manager is finished, if so, finishing, and otherwise, turning to the step 3.
The variable manager comprises a variable unit, wherein the variable manager is a two-dimensional vector table and comprises a variable address pVar for registering a variable to be monitored, a variable history value OldValue for recording a previous polling period variable value, a trigger event address pFanc (int old, int pVar) pointing to a trigger event function address after the variable is switched, a variable polling frequency Freq and a variable type vType, when the variable type vType is 1, the variable value changes, when the variable type vType is 2, the front and rear values of the variable do not change, and input parameters of a function corresponding to the trigger event comprise the variable history value old and the variable address pVar.
The variable manager is an array or linked list structure.
Compared with the prior art, the invention has the advantages that:
(1) according to the method, key variables are registered through addresses, and the variables are periodically polled, so that variable modification operation from any channel is identified, even when the variables are unexpectedly changed, a program can trigger events in time to take protective measures, and the risk of serious errors of a system is avoided. The distributed variables are uniformly managed through the address registration variables, and the variables are always registered and supervised by the latest compiled variable addresses no matter how the software structure changes in the later period, so that the use safety of the environment variables is ensured, the problem of difficult maintenance is effectively solved, and the method has good expansibility;
(2) the flexible centralized management of the variables is realized through the configuration of the trigger events, and a user only needs to pay attention to the consistency of the variable use and a scheme when coding, and does not need to pay attention to whether the variables are switched at a certain position or not and whether the trigger events exist. The method of the invention isolates and maintains the application scene and the trigger event of the variable, the variable switching can not cause any program change, the later stage walk-through and unit test work are completely omitted, and the software development efficiency and reliability are greatly improved;
(3) by customizing and monitoring the zero clearing event of the counter variable, each counter is guaranteed to be cleared according to the specified zero clearing frequency when meeting any zero clearing condition. A user only needs to pay attention to whether the counter performs self-adding or self-subtracting operation according to scheme conditions, and does not need to pay attention to the logic of whether the counter performs zero clearing and other operations on a certain branch which does not meet the conditions, so that the development efficiency is improved through convenient operation, and meanwhile, the use robustness of the counter is improved.
Drawings
FIG. 1 is a schematic diagram of a variable manager;
fig. 2 is a flowchart of a registration mechanism-based on-satellite environment variable unified supervision method.
Detailed Description
The main principle of the invention is to design a variable manager, take the address of the variable, the triggering event address of the variable switch, the polling period, the variable type and the like as configurable items, register the key variable to the manager according to each attribute, then carry out activity detection on the variable in the variable manager according to the configured period through a specially developed variable state monitoring program, and when the active variable is found, trigger the corresponding configuration event to complete the corresponding state conversion. The method of the present invention is described in detail below with reference to the accompanying drawings, as shown in fig. 2, the method of the present invention comprises the following steps:
and 2, initializing the history values in the variable manager according to the task requirements, and initializing all the registered variable history values into the current initial values of the variables. In the first beat after power-on, all variables are in an initialized state, no history value exists, the history value is initialized to be consistent with the current value, otherwise, the variables are changed after power-on, so that an event is triggered by mistake, and the step 3 is entered;
step 4, taking an address pVar of a current variable and a trigger event address pFanc, if the two addresses pVar and pFanc are legal and effective addresses, entering step 5, and if not, entering step 12;
step 5, assuming that the number of the current on-satellite control cycles is C, selecting a current variable polling frequency Freq, if C is integral multiple of Freq, indicating that the current variable polling cycle arrives, entering step 6, otherwise, waiting until C is integral multiple of Freq, and entering step 12;
step 6, taking a historical value OldValue and a current value pVar of a current variable, if the OldValue is equal to the pVar, indicating that the variable is not changed, entering step 7, otherwise, indicating that the variable is changed, and entering step 9;
step 7, if the variable type vType of the current variable is equal to 2, it indicates that the trigger event, such as a continuous counter variable, occurs when the value of the variable is unchanged, and if the value of the counter is not continuously increased, it indicates that the counter is a zombie counter, and the self-adding condition is not met, the counter should be cleared to zero for continuous use again, the trigger event pFunc is called, and step 8 is entered, otherwise step 9 is entered;
step 8, taking the zero clearing event of the counter variable as an example, the ClearCounter (int old, int pVar) uses pFunc (int old, int pVar) as an original, registers as a trigger event of the counter variable in the variable management table, clears the current value of the current continuous counter variable, namely pVar, in the function, and enters step 11;
step 9, if the type vType of the current variable is equal to 1, it indicates that a trigger event, such as some environment variables, is changed when the current variable is changed, the system state is updated by the trigger event when switching occurs, the trigger event pFunc is called, and the step 10 is entered;
step 10, taking a trigger function Event (int old, int pVar) of a certain variable as an example, taking pFunc (int old, int pVar) as a prototype, wherein the input parameters are OldValue and pVar, and executing corresponding operations in the function according to a history value and a current value, and entering step 11;
step 11, updating the historical value of the current variable to a current value, OldValue ═ pVar, and entering step 12;
and step 12, judging whether the variable manager is completely traversed or not, if so, ending, otherwise, instructing the state machine to traverse the next one and entering the step 4.
Those skilled in the art will appreciate that those matters not described in detail in the present specification are well known in the art.
Claims (4)
1. A registration mechanism-based on-satellite environment variable unified supervision method is characterized by comprising the following steps:
step 1, constructing a variable manager;
step 2, initializing the historical values of the variables in the variable manager, and initializing the historical values of all the registered variables to the current initial values of the variables;
step 3, traversing the state of each variable unit in the variable manager, if the address pVar of the current variable and the trigger event address pFanc are both legal and effective addresses, turning to step 4, otherwise, turning to step 9;
step 4, setting the number of on-satellite control cycles as C, if C is an integral multiple of variable polling frequency Freq, indicating that the variable polling cycle arrives, entering step 5, otherwise, waiting until C is an integral multiple of variable polling frequency Freq, and entering step 9;
step 5, obtaining a historical value OldValue of the current variable, if the OldValue is equal to a variable value corresponding to the address pVar and indicates that the variable is not changed, entering step 6, and otherwise, entering step 7;
step 6, if the variable type vType of the current variable is equal to 2, the trigger event is indicated when the variable values before and after the variable are not changed, a function of the trigger event corresponding to the current variable is called, and the step 8 is entered;
step 7, if the variable type vType of the current variable is equal to 1, indicating that the current variable is changed to trigger an event, calling a function of the current variable corresponding to the trigger event, and entering step 8;
step 8, updating the historical value of the current variable into a current value;
and 9, judging whether the traversal of the variable manager is finished, if so, finishing, and otherwise, turning to the step 3.
2. The method for uniformly supervising the on-satellite environment variables based on the registration mechanism according to claim 1, wherein the method comprises the following steps: the variable manager comprises a variable unit, wherein the variable manager is a two-dimensional vector table and comprises a variable address pVar for registering a variable to be monitored, a variable history value OldValue for recording a previous polling period variable value, a trigger event address pFanc (int old, int pVar) pointing to a trigger event function address after the variable is switched, a variable polling frequency Freq and a variable type vType, when the variable type vType is 1, the variable value changes, when the variable type vType is 2, the front and rear values of the variable do not change, and input parameters of a function corresponding to the trigger event comprise the variable history value old and the variable address pVar.
3. The method for uniformly supervising the on-satellite environment variables based on the registration mechanism according to claim 2, wherein the method comprises the following steps: the variable manager is an array or linked list structure.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811270699.8A CN109542720B (en) | 2018-10-29 | 2018-10-29 | Registration mechanism-based on-satellite environment variable unified supervision method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811270699.8A CN109542720B (en) | 2018-10-29 | 2018-10-29 | Registration mechanism-based on-satellite environment variable unified supervision method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109542720A CN109542720A (en) | 2019-03-29 |
CN109542720B true CN109542720B (en) | 2022-03-04 |
Family
ID=65845456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811270699.8A Active CN109542720B (en) | 2018-10-29 | 2018-10-29 | Registration mechanism-based on-satellite environment variable unified supervision method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542720B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105144011A (en) * | 2013-03-15 | 2015-12-09 | 费希尔-罗斯蒙特系统公司 | Graphical process variable trend monitoring for a process control system |
CN105190459A (en) * | 2013-03-15 | 2015-12-23 | 费希尔-罗斯蒙特系统公司 | Graphical process variable trend monitoring with zoom features for use in a process control system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160092537A1 (en) * | 2014-09-30 | 2016-03-31 | Alcatel-Lucent Canada, Inc | Polling based synchronization in managed networks |
-
2018
- 2018-10-29 CN CN201811270699.8A patent/CN109542720B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105144011A (en) * | 2013-03-15 | 2015-12-09 | 费希尔-罗斯蒙特系统公司 | Graphical process variable trend monitoring for a process control system |
CN105190459A (en) * | 2013-03-15 | 2015-12-23 | 费希尔-罗斯蒙特系统公司 | Graphical process variable trend monitoring with zoom features for use in a process control system |
Non-Patent Citations (1)
Title |
---|
基于变量访问序模式的中断数据竞争检测方法;陈睿等;《软件学报》;20160105;第547-561页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109542720A (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9275172B2 (en) | Systems and methods for analyzing performance of virtual environments | |
Ciardo et al. | Performability analysis using semi-Markov reward processes | |
Lai et al. | A model for availability analysis of distributed software/hardware systems | |
CN100359481C (en) | Abnormal monitoring equipment and method for multi-task system | |
US20130151907A1 (en) | Operations management apparatus, operations management method and program | |
JP2014507727A (en) | Computer-implemented method, computer-readable storage medium, and system for monitoring performance metrics | |
CN102346671B (en) | Calculation method based on expansible script language | |
CN104239161A (en) | Implementing enhanced error handling of a shared adapter in a virtualized system | |
CN111782147B (en) | Method and device for cluster expansion and contraction capacity | |
CN109800080A (en) | A kind of method for scheduling task based on Quartz frame, system and terminal device | |
Mostarda et al. | Distributed orchestration of pervasive services | |
JP2006277115A (en) | Abnormality detection program and abnormality detection method | |
AU740851B2 (en) | System application management method and system, and storage medium which stores program for executing system application management | |
CN111782341B (en) | Method and device for managing clusters | |
US20210405609A1 (en) | Hybrid internet of things evaluation framework | |
Ezzati-Jivan et al. | Depgraph: Localizing performance bottlenecks in multi-core applications using waiting dependency graphs and software tracing | |
Păun et al. | Sequentiality induced by spike number in SNP systems: small universal machines | |
CN109542720B (en) | Registration mechanism-based on-satellite environment variable unified supervision method | |
CN117332541B (en) | Method, device, equipment and medium for temporal management of power grid data based on graph calculation | |
CN103186435B (en) | System mistake disposal route and the server system using the method | |
CN113656369A (en) | Log distributed streaming acquisition and calculation method in big data scene | |
CN110488714B (en) | Asynchronous state machine control method and device | |
CN117376092A (en) | Fault root cause positioning method, device, equipment and storage medium | |
CN103154919B (en) | Exception control in multicomputer system | |
CN102930046B (en) | Data processing method, computing node and system |
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 |