CN104820615B - A kind of emulation mode and system - Google Patents

A kind of emulation mode and system Download PDF

Info

Publication number
CN104820615B
CN104820615B CN201510252529.7A CN201510252529A CN104820615B CN 104820615 B CN104820615 B CN 104820615B CN 201510252529 A CN201510252529 A CN 201510252529A CN 104820615 B CN104820615 B CN 104820615B
Authority
CN
China
Prior art keywords
instruction
pattern
parameter
mode
factory
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
CN201510252529.7A
Other languages
Chinese (zh)
Other versions
CN104820615A (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.)
Beijing Runke General Technology Co Ltd
Original Assignee
Beijing Runke General Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Runke General Technology Co Ltd filed Critical Beijing Runke General Technology Co Ltd
Priority to CN201510252529.7A priority Critical patent/CN104820615B/en
Publication of CN104820615A publication Critical patent/CN104820615A/en
Application granted granted Critical
Publication of CN104820615B publication Critical patent/CN104820615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of emulation modes, receive the simulation request that user sends, and the simulation request includes order parameter and mode parameter;By instructing the corresponding instruction of factory's determine instruction parameter, and create the corresponding Command Example of described instruction;The instruction functions for being used to perform described instruction in call instruction example;Function is executed instruction, wherein, it is further included during function is executed instruction:Mode parameter is transferred to pattern factory;The corresponding pattern of mode parameter, and the corresponding schema instance of creation mode are determined by pattern factory;The mode function for being used to perform the described instruction under the pattern in invocation pattern example, performs the mode function to complete simulation operations of the described instruction under the pattern.The above method employs double-deck factory mode, meets " exploitation closing " principle, i.e., extension is opened, modification is closed, well ensures the realization of the copying of multi signal radar echo simulator.The invention also discloses a kind of analogue systems.

Description

A kind of emulation mode and system
Technical field
The present invention relates to radar simulator Simulation Control field, more specifically, being to be related to a kind of emulation mode and system.
Background technology
Multi signal radar echo simulator is as a kind of test equipment of complete function, design, development in radar system Highly important effect is played with test phase, major function is different to radar system according to different signal datas Operating mode (for example, meteorology/turbulent flow, wind shear, beacon, map etc.) is emulated.
In order to ensure that the function of multi signal radar echo simulator is realized, it is necessary to control class software accordingly to multi signal thunder It is controlled up to echo simulator, for example, in a simulation process, control class software needs what each operating mode was shared Flow instruction (i.e. " parameter bookbinding " → " beginning " → " stopping ") is controlled, but each instruction in flow instruction is to different works It is differed for operation mode, this undoubtedly adds the complexity of control.
Control class software commonly used in the prior art, mostly distinguishes different work using branched structure (switch ... case) Pattern according to the operating mode that user selects, selects corresponding branch to be instantiated, still, multi signal radar echo simulation The operating mode of device include it is a variety of, differed for more kinds from 10 to 20, when operating mode reaches more than 20 kinds, it is envisaged that in code " switch " branch by huge to which kind of stage, when increasing a kind of operating mode newly, also need to increase " case " branch condition, need It to modify on original code, although opening extension, cause also to open modification, run counter to the exploitation envelope of object-oriented The encapsulation principle closed, the source code in " switch " branch easily corresponding to other operating modes cause maloperation, therefore, also It cannot ensure that the function of multi signal radar echo simulator is realized well.
The content of the invention
In view of this, the present invention provides a kind of emulation mode and system, to overcome in the prior art due to common control Class software processed also opens modification, the encapsulation principle of the exploitation closing of object-oriented has been run counter to, easily to other operating modes pair Source code in " switch " branch answered causes maloperation, therefore cannot ensure the work(of multi signal radar echo simulator well The problem of realizing.
To achieve the above object, the present invention provides following technical solution:
A kind of emulation mode, including:
The simulation request that user sends is received, the simulation request includes order parameter and mode parameter;
By the way that factory is instructed to determine the corresponding instruction of described instruction parameter, and create the corresponding Command Example of described instruction;
Call the instruction functions for being used to perform described instruction in described instruction example;
Perform described instruction function;
Wherein, further included during described instruction function is performed:
The mode parameter is transferred to pattern factory;
The corresponding pattern of the mode parameter is determined by the pattern factory, and it is real to create the corresponding pattern of the pattern Example;
Call the mode function for being used to perform the described instruction under the pattern in the schema instance;
The mode function is performed to complete simulation operations of the described instruction under the pattern.
Preferably, the method further includes:
The corresponding instruction enumerated value of pre-defined different instruction, and set the corresponding instruction processing of each instruction enumerated value Class;
And the corresponding pattern enumerated value of pre-defined different mode, and set the corresponding pattern of each pattern enumerated value Handle class.
Preferably, it is described by the way that factory is instructed to determine the corresponding instruction of described instruction parameter, and create described instruction correspondence Command Example, including:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
Determine that described instruction enumerated value is corresponding with the correspondence of instruction processing class according to pre-defined instruction enumerated value Instruction processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
Preferably, it is described that the corresponding pattern of the mode parameter is determined by the pattern factory, and create the pattern Corresponding schema instance, including:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
Determine that the pattern enumerated value is corresponding with the correspondence of mode treatment class according to pre-defined pattern enumerated value Mode treatment class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
Preferably, it is described by the way that factory is instructed to determine the corresponding instruction of described instruction parameter, including:
By the way that factory is instructed to determine the corresponding parameter binding instructio of parameter binding instructio parameter;
Or, by the way that factory is instructed to determine the corresponding sign on of sign on parameter;
Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
A kind of analogue system, including:
Receiving unit, for receiving the simulation request of user's transmission, the simulation request includes order parameter and pattern is joined Number;
Command Example creating unit instructs factory to determine the corresponding instruction of described instruction parameter, and creates institute for passing through State the corresponding Command Example of instruction;
Instruction functions call unit, for calling the instruction functions for being used to perform described instruction in described instruction example;
Instruction functions execution unit, for performing described instruction function;
Wherein, described instruction function execution unit includes:
Parameter transfers subelement, for the mode parameter to be transferred to pattern factory;
Schema instance creates subelement, for determining the corresponding pattern of the mode parameter by the pattern factory, and Create the corresponding schema instance of the pattern;
Mode function calls subelement, for call in the schema instance for performing the finger under the pattern The mode function of order;
Simulation operations perform subelement, imitative under the pattern to complete described instruction for performing the mode function True operation.
Preferably, the system also includes:
Setup unit for pre-defining the corresponding instruction enumerated value of different instruction, and sets each enumerated value and corresponds to Instruction processing class;And the corresponding pattern enumerated value of pre-defined different mode, and set the corresponding pattern of each enumerated value Handle class.
Preferably, described instruction example creating unit is specifically used for:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
Determine that described instruction enumerated value is corresponding with the correspondence of instruction processing class according to pre-defined instruction enumerated value Instruction processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
Preferably, the schema instance creates subelement and is specifically used for:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
Determine that the pattern enumerated value is corresponding with the correspondence of mode treatment class according to pre-defined pattern enumerated value Mode treatment class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
Preferably, described instruction example creating unit is by instructing factory to determine the corresponding instruction of described instruction parameter When, it is specifically used for:
By the way that factory is instructed to determine the corresponding parameter binding instructio of parameter binding instructio parameter;
Or, by the way that factory is instructed to determine the corresponding sign on of sign on parameter;
Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
It can be seen via above technical scheme that compared with prior art, the invention discloses a kind of emulation modes, receive and use The simulation request that family is sent, the simulation request include order parameter and mode parameter;By instructing factory's determine instruction parameter Corresponding instruction, and create the corresponding Command Example of described instruction;The finger for being used to perform described instruction in call instruction example Make function;Function is executed instruction, wherein, it is further included during described instruction function is performed:Mode parameter is transferred to mould Formula factory;The corresponding pattern of mode parameter, and the corresponding schema instance of creation mode are determined by pattern factory;Invocation pattern is real The mode function for being used to perform the described instruction under the pattern in example;Execution pattern function is to complete described instruction described Simulation operations under pattern.The above method employs double-deck factory mode, meets " exploitation closing " principle, i.e., extension is opened, Modification is closed, well ensures the realization of the copying of multi signal radar echo simulator.The invention also discloses one Kind analogue system.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is traditional " three-tier architecture " schematic diagram disclosed by the embodiments of the present invention;
Fig. 2 is " double-deck factory " configuration diagram disclosed by the embodiments of the present invention;
Fig. 3 is a kind of emulation mode flow diagram disclosed by the embodiments of the present invention;
Fig. 4 is a kind of analogue system structure diagram disclosed by the embodiments of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment belongs to the scope of protection of the invention.
Term " comprising " and " having " in description and claims of this specification and above-mentioned attached drawing and they Any deformation, it is intended that cover it is non-exclusive include, so as to a series of process comprising units, method, system, product or set It is standby to be not necessarily limited to those units, but may include not list clearly or consolidate for these processes, method, product or equipment The other units having.
From background technology, control class software commonly used in the prior art opens modification, has run counter to object-oriented The encapsulation principle of closing is developed, the source code in " switch " branch easily corresponding to other operating modes causes maloperation, because This cannot ensure that the function of more radar echo simulators is realized well.
Therefore, the present invention combines factory mode on the basis of traditional " three-tier architecture " design and reflex mechanism constructs A kind of emulation mode, applied to multi signal radar echo simulator, specifically, the simulation request that user sends is received, it is described imitative True request includes order parameter and mode parameter;By instructing the corresponding instruction of factory's determine instruction parameter, and create the finger Make corresponding Command Example;The instruction functions for being used to perform described instruction in call instruction example;Function is executed instruction, In, it is further included during described instruction function is performed:Mode parameter is transferred to pattern factory;By pattern, factory determines The corresponding pattern of mode parameter, and the corresponding schema instance of creation mode;In invocation pattern example for performing the pattern Under described instruction mode function;Execution pattern function has completed simulation operations of the described instruction under the pattern.It is above-mentioned Method employs double-deck factory mode, meets " exploitation closing " principle, i.e., extension is opened, modification is closed, is ensured well The realization of the copying of multi signal radar echo simulator.
The invention also discloses a kind of analogue systems.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, first the present invention is used below " three-tier architecture ", factory mode and reflex mechanism are simply introduced.
Traditional " three-tier architecture " pattern is from top to bottom followed successively by as shown in attached drawing Fig. 1:Presentation layer (UI), service logic Layer (BLL) and data access layer (DAL), the with different levels purpose in area are the thought of " high cohesion, lower coupling ", wherein, presentation layer (UI) it is the interface that is presented to user, i.e., obtained by finding of the user when using a system;Business Logic (BLL) is to be directed to The operation of particular problem, to data business logic processing;Data access layer (DAL) is the direct operation to data.
Factory mode is one kind of design pattern, is responsible for the class instantiated specially by one to obtain specific object, Usually such is known as " factory ", factory class encapsulates the constitutive logic of related object, has separated subclass object construction and definition, So that the maintainability of software product greatly enhances.
Reflex mechanism (Reflection) is the important mechanisms in .NET, allows application developer during program performs It checks the metadata of procedure set, explores class content, carries out late binding, dynamic creation type etc..
The actual demand for controlling class software according to multi signal radar echo simulator describes, and main there are two need to initialize The place of more example, first, instruction set, including parameter bookbinding, beginning, stopping, self-test, reset, the erasing of memory plane, under Carry, upload etc., the execution each operated is entirely different to call, it is necessary to construct different instance differentiations;Second is that set of modes, bag Point target, one-dimensional distance are included to pattern, meteorological turbulent model etc..Two set connect each other, i.e., parameter is bound, starts, stopped Only operation needs to distinguish operating mode, other instructions then need not distinguish between pattern, and therefore, the application is proposed on Business Logic (BLL) multi signal radar echo simulator control class software is designed using double-deck factory configuration.
As shown in illustrations 2, double-deck factory includes《Instruct factory》With《Pattern factory》Two factory class, wherein, 《Specific instruction product》It realizes public《Instruct abstract good》, should《Instruct abstract good》Class provides unified interface function, Such as instruction sending method,《Instruct factory》The example of specific instruction can be dynamically generated,《Pattern factory》It is specific for generating The example of pattern,《Specific Model Products》It realizes public《Schema abstraction product》, should《Schema abstraction product》Class includes all The public method realized needed for pattern, such as parameter bookbinding, beginning and stopping.In double-deck factory configuration, instruction factory is core The heart is that the extraneous interface of connection calls and trigger the bridge of pattern factory.
Based on the above-mentioned control class software using double-deck factory configuration design, multi signal radar echo simulator can be controlled Various copyings are realized, it is necessary to which explanation, for the instruction for the pattern that do not differentiate between, directly generates corresponding according to instruction factory Example in this regard, the application will not be described in detail, will need to instruct factory and pattern factory phase for the instruction for distinguishing pattern Mutually cooperation is completed, this kind of situation is described in further detail with reference to the accompanying drawings and detailed description.
Attached drawing 3 is referred to, is a kind of flow diagram of emulation mode disclosed by the invention, this method is applied to above-mentioned adopt With the Business Logic (BLL) of double-deck factory configuration, this method specifically includes:
S101:The simulation request that user sends is received, the simulation request includes order parameter and mode parameter.
The simulation request of user calls the unified external interface provided by Business Logic (BLL) by expression layer (UI) (i.e. in Fig. 2《Call class》) it is sent to Business Logic (BLL).
S102:By the way that factory is instructed to determine the corresponding instruction of described instruction parameter, and create the corresponding instruction of described instruction Example.
It should be noted that it is described by the way that factory is instructed to determine the corresponding instruction of described instruction parameter, including:Pass through instruction Factory determines the corresponding parameter binding instructio of parameter binding instructio parameter;Or, by the way that factory is instructed to determine sign on parameter pair The sign on answered;Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
The order parameter that the user received by unified external interface sends is sent to instruction factory, and instruction factory can be true The corresponding instruction of the fixed order parameter, and the instruction is instantiated, create the corresponding Command Example of the instruction.Described instruction Example includes performing the instruction functions of described instruction.
S103:Call the instruction functions for being used to perform described instruction in described instruction example.
S104:Described instruction function is performed, and transfers the mode parameter during described instruction function is performed To pattern factory.
It should be noted that when function is executed instruction, the user by unified external interface reception can be called to send out The mode parameter sent, and the mode parameter is transferred to pattern factory.
S105:The corresponding pattern of the mode parameter is determined by the pattern factory, and it is corresponding to create the pattern Schema instance.
For radar simulation, the pattern includes meteorological turbulent model, beacon patterns etc..Other multi signals are emulated Field, the pattern can also include other content, in this regard, the application is not limited in any way.
The mode parameter that the user received by unified external interface sends is sent to pattern factory, and pattern factory can be true The corresponding pattern of the fixed mode parameter, and the pattern is instantiated, create the corresponding schema instance of the pattern.The pattern Example includes the mode function for performing the described instruction under the pattern.
S106:Call the mode function for being used to perform the described instruction under the pattern in the schema instance.
It should be noted that for same instruction, under different patterns, realized not by different mode function control Same operation, in the present embodiment, different mode functions is nested in instruction functions, so as to the mistake performed in instruction functions Cheng Zhong after the corresponding pattern of determine instruction, creates corresponding schema instance, and corresponding pattern letter is called in slave pattern example Number.
S107:The mode function is performed to complete simulation operations of the described instruction under the pattern.
At this point, Business Logic (BLL) needs to access data Layer (DAL), it is real that data access layer (DAL) provides specific pattern Power function during now, it is imitative under the pattern to complete described instruction including file interface, hardware board interface etc. True operation.
It should be noted that in the present embodiment, since mode function is nested in instruction functions, then step S104 ~S107 is also believed to the specific steps included during function is executed instruction.
Present embodiment discloses a kind of emulation modes, receive the simulation request that user sends, and the simulation request includes referring to Make parameter and mode parameter;By instructing the corresponding instruction of factory's determine instruction parameter, and create the corresponding instruction of described instruction Example;The instruction functions for being used to perform described instruction in call instruction example;Function is executed instruction, is performing described instruction letter It is further included in several processes:Mode parameter is transferred to pattern factory;The corresponding pattern of mode parameter is determined by pattern factory, And the corresponding schema instance of creation mode;The pattern letter for being used to perform the described instruction under the pattern in invocation pattern example Number;Execution pattern function is to complete simulation operations of the described instruction under the pattern.The above method employs double-deck factory's mould Formula meets " exploitation closing " principle, i.e., extension is opened, modification is closed, well ensures multi signal radar echo simulation The realization of the copying of device.
On the basis of the above disclosed embodiments of the present invention, the present invention has also carried out in detail the concrete mode for creating example Describe in detail it is bright, it is specific as follows:
The corresponding instruction enumerated value of pre-defined different instruction, and set the corresponding instruction processing of each instruction enumerated value Class;And the corresponding pattern enumerated value of pre-defined different mode, and set the corresponding mode treatment of each pattern enumerated value Class.
Specifically, assuming that certain project needs to create the example of multiple patterns, specific practice is, in advance by multiple operating modes (such as meteorological turbulent flow, beacon, wind shear) is claimed as enumeration type (Enum), in each attribute (Description) enumerated The corresponding mode treatment class of middle increase pattern (i.e. in Fig. 2 "《Specific Model Products》Mode "), the corresponding pattern of each pattern Processing class realizes specific Simulation Control operation under the pattern, such as the operations such as parameter bookbinding, beginning, stopping.It is of the invention specific The code of the enumerated value for the pattern of being defined as below is given to elaborate.
public enum EnumMode
{
LocalCtrlWeatherTurbulence
[Description("LocalCtrlWeatherTurbulence"]
WeatherTurbulence, // meteorology turbulent model
LocalCtrlWindShear
[Description("LocalCtrlWindShear"]
WindShear, // wind shear pattern
LocalCtrlMarker
[Description("LocalCtrlMarker")]
Marker, // beacon patterns
LocalCtrlTerrainObstacles
[Description("LocalCtrlTerrainObstacles"]
TerrainObstacles, // terrain obstacle detection mode
MappingPoint LocalCtrlMappingPoint
[Description("LocalCtrlMappingPoint")]
MappingPoint, // true wave beam mapping pattern
}
By taking beacon patterns as an example, program process is:
The corresponding processing class name (" LocalCtrlMarker ") of beacon patterns is got first;
Then by reflex mechanism dynamic lookup into procedure set this processing class, i.e. LocalCtrlMarker, and giving birth to automatically Into such object instance;
Finally, the correlation technique of the example, such as parameter bookbinding, beginning, stopping etc. according to circumstances arbitrarily being called.Utilize this Kind mode, can effectively avoid the situation for multiple branches occur.
It is based on aforesaid way, then, described by the way that factory is instructed to determine the corresponding instruction of described instruction parameter, and described in establishment Corresponding Command Example is instructed, including:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
Determine that described instruction enumerated value is corresponding with the correspondence of instruction processing class according to pre-defined instruction enumerated value Instruction processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
It is described that the corresponding pattern of the mode parameter is determined by the pattern factory, and create the corresponding mould of the pattern Formula example, including:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
Determine that the pattern enumerated value is corresponding with the correspondence of mode treatment class according to pre-defined pattern enumerated value Mode treatment class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
If it should be noted that increase new pattern, it need to only increase the pattern enumerated value for defining the pattern, and increase Corresponding mode treatment class, greatly enhances the scalability of system, and meets the principle of exploitation closing, and will not be right Other patterns cause maloperation, and the function of well ensuring multi signal radar echo simulator is realized.
Method is described in detail in the invention described above disclosed embodiment, diversified forms can be used for the method for the present invention System realize, therefore the invention also discloses a kind of system, specific embodiment is given below and is described in detail.
Attached drawing 4 is referred to, is a kind of structure diagram of analogue system disclosed by the invention, which is applied to above-mentioned adopt With the Business Logic (BLL) of double-deck factory configuration, which specifically includes:
Receiving unit 11, for receiving the simulation request of user's transmission, the simulation request includes order parameter and pattern Parameter;
Command Example creating unit 12 instructs factory to determine the corresponding instruction of described instruction parameter, and creates for passing through The corresponding Command Example of described instruction;
It should be noted that described instruction example creating unit is by instructing factory to determine that described instruction parameter is corresponding During instruction, it is specifically used for:
By the way that factory is instructed to determine the corresponding parameter binding instructio of parameter binding instructio parameter;
Or, by the way that factory is instructed to determine the corresponding sign on of sign on parameter;
Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
Instruction functions call unit 13, for calling the instruction letter for being used to perform described instruction in described instruction example Number;
Instruction functions execution unit 14, for performing described instruction function.
Specifically, described instruction function execution unit 14 includes following subelement:
Parameter transfers subelement 15, for the mode parameter to be transferred to pattern factory;
Schema instance creates subelement 16, for determining the corresponding pattern of the mode parameter by the pattern factory, And create the corresponding schema instance of the pattern;
Mode function calls subelement 17, for call in the schema instance for described in performing under the pattern The mode function of instruction;
Simulation operations perform subelement 18, for performing the mode function to complete described instruction under the pattern Simulation operations.
It should be noted that the system also includes:
Setup unit for pre-defining the corresponding instruction enumerated value of different instruction, and sets each instruction enumerated value Corresponding instruction processing class;And the corresponding pattern enumerated value of pre-defined different mode, and set each pattern enumerated value pair The mode treatment class answered.
Then, described instruction example creating unit is specifically used for:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
Determine that described instruction enumerated value is corresponding with the correspondence of instruction processing class according to pre-defined instruction enumerated value Instruction processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
The schema instance creates subelement and is specifically used for:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
Determine that the pattern enumerated value is corresponding with the correspondence of mode treatment class according to pre-defined pattern enumerated value Mode treatment class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
It should be noted that the concrete function realization of above-mentioned unit is described in detail in embodiment of the method, this reality It applies example to repeat no more, specifically refers to the associated description in embodiment of the method.
In summary:
The invention discloses a kind of emulation modes, receive the simulation request that user sends, and the simulation request includes instruction Parameter and mode parameter;By instructing the corresponding instruction of factory's determine instruction parameter, and it is real to create the corresponding instruction of described instruction Example;The instruction functions for being used to perform described instruction in call instruction example;Function is executed instruction, wherein, performing the finger It is further included during making function:Mode parameter is transferred to pattern factory;Determine that mode parameter is corresponding by pattern factory Pattern, and the corresponding schema instance of creation mode;In invocation pattern example for performing described instruction under the pattern Mode function;Execution pattern function is to complete simulation operations of the described instruction under the pattern.The above method employs bilayer Factory mode meets " exploitation closing " principle, i.e., extension is opened, modification is closed, well ensured multi signal radar and return The realization of the copying of wave simulation device.
The invention also discloses a kind of analogue systems.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other The difference of embodiment, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is said referring to method part It is bright.
In addition it should be noted that, the apparatus embodiments described above are merely exemplary, wherein described as separation The unit of part description may or may not be it is physically separate, the component shown as unit can be or It can not be physical location, you can be located at a place or can also be distributed in multiple network element.It can be according to reality Border needs to select some or all of module therein to realize the purpose of this embodiment scheme.It is in addition, provided by the invention In device embodiment attached drawing, the connection relation between module represents there is communication connection between them, specifically can be implemented as one Item or a plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, you can with Understand and implement.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow Help software that the mode of required common hardware is added to realize, naturally it is also possible to include application-specific integrated circuit, specially by specialized hardware It is realized with CPU, private memory, special components and parts etc..Under normal circumstances, all functions of being completed by computer program can It is easily realized with corresponding hardware, moreover, for realizing that the particular hardware structure of same function can also be a variety of more Sample, such as analog circuit, digital circuit or special circuit etc..But it is more for the purpose of the present invention in the case of software program it is real It is now more preferably embodiment.Based on such understanding, technical scheme substantially in other words makes the prior art The part of contribution can be embodied in the form of software product, which is stored in the storage medium that can be read In, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), magnetic disc or CD etc., including some instructions with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) performs the method described in each embodiment of the present invention.
In conclusion the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to upper Embodiment is stated the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to upper The technical solution recorded in each embodiment is stated to modify or carry out equivalent substitution to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is not made to depart from the spirit and scope of various embodiments of the present invention technical solution.

Claims (8)

1. a kind of emulation mode, which is characterized in that including:
The simulation request that user sends is received, the simulation request includes order parameter and mode parameter;
By the way that factory is instructed to determine the corresponding instruction of described instruction parameter, and create the corresponding Command Example of described instruction;
Call the instruction functions for being used to perform described instruction in described instruction example;
Perform described instruction function;
Wherein, further included during described instruction function is performed:
The mode parameter is transferred to pattern factory;
The corresponding pattern of the mode parameter is determined by the pattern factory, and creates the corresponding schema instance of the pattern;
Call the mode function for being used to perform the described instruction under the pattern in the schema instance;
The mode function is performed to complete simulation operations of the described instruction under the pattern;
Wherein, it is described by the way that factory is instructed to determine the corresponding instruction of described instruction parameter, including:
By the way that factory is instructed to determine the corresponding parameter binding instructio of parameter binding instructio parameter;
Or, by the way that factory is instructed to determine the corresponding sign on of sign on parameter;
Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
The corresponding instruction enumerated value of pre-defined different instruction, and set the corresponding instruction processing class of each instruction enumerated value;
And the corresponding pattern enumerated value of pre-defined different mode, and set the corresponding mode treatment of each pattern enumerated value Class.
3. emulation mode according to claim 2, which is characterized in that described by the way that factory is instructed to determine described instruction parameter Corresponding instruction, and the corresponding Command Example of described instruction is created, including:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
The corresponding finger of described instruction enumerated value is determined with the correspondence of instruction processing class according to pre-defined instruction enumerated value Order processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
4. emulation mode according to claim 2, which is characterized in that described that the pattern is determined by the pattern factory The corresponding pattern of parameter, and the corresponding schema instance of the pattern is created, including:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
The corresponding mould of the pattern enumerated value is determined according to pre-defined pattern enumerated value and the correspondence of mode treatment class Formula handles class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
5. a kind of analogue system, which is characterized in that including:
Receiving unit, for receiving the simulation request of user's transmission, the simulation request includes order parameter and mode parameter;
Command Example creating unit instructs factory to determine the corresponding instruction of described instruction parameter, and creates the finger for passing through Make corresponding Command Example;
Instruction functions call unit, for calling the instruction functions for being used to perform described instruction in described instruction example;
Instruction functions execution unit, for performing described instruction function;
Wherein, described instruction function execution unit includes:
Parameter transfers subelement, for the mode parameter to be transferred to pattern factory;
Schema instance creates subelement, for determining the corresponding pattern of the mode parameter by the pattern factory, and creates The corresponding schema instance of the pattern;
Mode function calls subelement, for calling the described instruction being used to perform under the pattern in the schema instance Mode function;
Simulation operations perform subelement, are grasped for performing the mode function with completing emulation of the described instruction under the pattern Make;
Described instruction example creating unit is specifically used for when determining the corresponding instruction of described instruction parameter by instructing factory:
By the way that factory is instructed to determine the corresponding parameter binding instructio of parameter binding instructio parameter;
Or, by the way that factory is instructed to determine the corresponding sign on of sign on parameter;
Or, by the way that factory is instructed to determine the corresponding END instruction of END instruction parameter.
6. system according to claim 5, which is characterized in that the system also includes:
Setup unit for pre-defining the corresponding instruction enumerated value of different instruction, and sets the corresponding finger of each enumerated value Order processing class;And the corresponding pattern enumerated value of pre-defined different mode, and set the corresponding mode treatment of each enumerated value Class.
7. system according to claim 6, which is characterized in that described instruction example creating unit is specifically used for:
Determine the corresponding instruction of described instruction parameter;
Inquire about the corresponding instruction enumerated value of described instruction;
The corresponding finger of described instruction enumerated value is determined with the correspondence of instruction processing class according to pre-defined instruction enumerated value Order processing class;
The corresponding instruction processing class of described instruction enumerated value is called to create the corresponding Command Example of described instruction.
8. system according to claim 6, which is characterized in that the schema instance creates subelement and is specifically used for:
Determine the corresponding pattern of the mode parameter;
Inquire about the corresponding pattern enumerated value of the pattern;
The corresponding mould of the pattern enumerated value is determined according to pre-defined pattern enumerated value and the correspondence of mode treatment class Formula handles class;
The corresponding mode treatment class of the pattern enumerated value is called to create the corresponding schema instance of the pattern.
CN201510252529.7A 2015-05-18 2015-05-18 A kind of emulation mode and system Active CN104820615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510252529.7A CN104820615B (en) 2015-05-18 2015-05-18 A kind of emulation mode and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510252529.7A CN104820615B (en) 2015-05-18 2015-05-18 A kind of emulation mode and system

Publications (2)

Publication Number Publication Date
CN104820615A CN104820615A (en) 2015-08-05
CN104820615B true CN104820615B (en) 2018-05-18

Family

ID=53730917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510252529.7A Active CN104820615B (en) 2015-05-18 2015-05-18 A kind of emulation mode and system

Country Status (1)

Country Link
CN (1) CN104820615B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114294A (en) * 2020-09-24 2020-12-22 北京无线电测量研究所 Control method and system of radar target simulator
CN114051053A (en) * 2021-11-16 2022-02-15 深圳依时货拉拉科技有限公司 iOS push message processing method, device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110951A (en) * 2007-08-08 2008-01-23 南京联创网络科技有限公司 Method for dynamically loading communication plug-in unit in video monitoring system
CN102037446A (en) * 2008-05-21 2011-04-27 奥普塔姆软件股份有限公司 Dynamic collection attribute-based computer programming language methods
CN102043616A (en) * 2009-10-22 2011-05-04 上海杉达学院 Factory pattern-based information system architecture and architecture method
CN102054241A (en) * 2009-10-27 2011-05-11 上海杉达学院 Product information control system and method based on factory pattern

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9026989B2 (en) * 2012-06-07 2015-05-05 Microsoft Technology Licensing Llc Object extensions using attributes to decouple base classes from derived classes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110951A (en) * 2007-08-08 2008-01-23 南京联创网络科技有限公司 Method for dynamically loading communication plug-in unit in video monitoring system
CN102037446A (en) * 2008-05-21 2011-04-27 奥普塔姆软件股份有限公司 Dynamic collection attribute-based computer programming language methods
CN102043616A (en) * 2009-10-22 2011-05-04 上海杉达学院 Factory pattern-based information system architecture and architecture method
CN102054241A (en) * 2009-10-27 2011-05-11 上海杉达学院 Product information control system and method based on factory pattern

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
在无线传感网络环境下的移动RFID中间件研究与实现;马诗琦;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110715;I138-887 第60页 *

Also Published As

Publication number Publication date
CN104820615A (en) 2015-08-05

Similar Documents

Publication Publication Date Title
CN101517536B (en) With the function level instant translation engine of Multiple Optimization
US9838294B2 (en) Network development and testing as a cloud service
US6857124B1 (en) Method and system for hypermedia browser API simulation to enable use of browser plug-ins and applets as embedded widgets in script-language-based interactive programs
JP5595490B2 (en) Implementation method, operation method, and system for data card driver without installation
CN105824755B (en) A kind of automated testing method, device and mobile terminal
US20130219090A1 (en) System and method for virtualizing the peripherals in a terminal device to enable remote management via removable portable media with processing capability
JP2022141917A (en) Analysis system, method, and program
WO2016029792A1 (en) Hardware device debugging method, device and system
CN108614767A (en) A kind of remote debugging method and device
CN105955888A (en) Page debugging and previewing method and system
CN104820615B (en) A kind of emulation mode and system
CN104991862B (en) FPGA remote online adjusting, measuring methods based on JTAG virtual technologies
CN110321192A (en) A kind of method and apparatus that boarding program is presented
CN105653338B (en) A kind of update method and device of application
CN105867754A (en) Application interface processing method and device
CN106066809A (en) A kind of emulation debugging method based on ARM kernel 51 emulator and system
US7469359B2 (en) Method and apparatus for testing communication software
CN109299011A (en) A kind of test method and system of application program
US20010021985A1 (en) Software Debugging
CN103514074A (en) MVB network card development method and platform
CN105573816A (en) Virtual input method, device and system
CN105550017A (en) Method, apparatus and system for performing virtual input control for application
CN113032267B (en) Intelligent scene test method and device, electronic equipment and storage medium
CN110430253A (en) It is a kind of that the method and apparatus of novel update notification information is provided
CN110459260A (en) Automatic test switching device, method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant