CN104820615A - Simulation method and system - Google Patents

Simulation method and system Download PDF

Info

Publication number
CN104820615A
CN104820615A CN201510252529.7A CN201510252529A CN104820615A CN 104820615 A CN104820615 A CN 104820615A CN 201510252529 A CN201510252529 A CN 201510252529A CN 104820615 A CN104820615 A CN 104820615A
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.)
Granted
Application number
CN201510252529.7A
Other languages
Chinese (zh)
Other versions
CN104820615B (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

Abstract

The invention discloses a simulation method. The method comprises the following steps: receiving a simulation request sent by a user, wherein the simulation request comprises an instruction parameter and a pattern parameter; determining an instruction corresponding to the instruction parameter through an instruction factory, and creating an instruction example corresponding to the instruction; calling an instruction function for executing the instruction in the instruction example; executing the instruction function, wherein the process of executing the instruction function further comprises the following steps: transmitting the pattern parameter to a pattern factory; determining a pattern corresponding to the pattern parameter through the pattern factory, and creating a pattern example corresponding to the pattern; calling a pattern function for executing the instruction under the pattern in the pattern example, and executing the pattern function to finish the simulation operation of the instruction under the pattern. Through the adoption of a dual-layer factory pattern, an open-close principle of opening for extension and closing for modification is satisfied, the realization of the simulation function of a multi-signal radar echo simulator is well guaranteed. The invention further discloses a simulation system.

Description

A kind of emulation mode and system
Technical field
The present invention relates to radar simulator Simulation Control field, in particular, relate to a kind of emulation mode and system.
Background technology
Multi signal radar echo simulator is as a kind of testing apparatus of complete function, very important effect is played at the design of radar system, development and test phase, its major function is that the mode of operation (such as, meteorology/turbulent flow, wind shear, beacon, map etc.) different to radar system according to different signal datas emulates.
In order to ensure the functional realiey of multi signal radar echo simulator, the corresponding class software that controls is needed to control multi signal radar echo simulator, such as, in a simulation process, controlling class software needs the flow process instruction (i.e. " parameter bookbinding " → " beginning " → " stopping ") total to often kind of mode of operation to control, but each instruction in flow process instruction is not concerning all identical different working modes, and this adds the complicacy of control undoubtedly.
Control class software conventional in prior art, adopt branched structure (switch more ... case) different mode of operations is distinguished, according to the mode of operation that user selects, corresponding branch is selected to carry out instantiation, but, the mode of operation of multi signal radar echo simulator comprises multiple, from more than 10 to 20 kinds not etc., when mode of operation reaches more than 20 kind, can imagine, which kind of stage " switch " branch in code arrives by huge, when newly-increased a kind of mode of operation, also need to increase " case " branch condition, need to modify on primary code, although open to expansion, but cause revising also opening, run counter to the encapsulation principle that OO exploitation is closed, very easily maloperation is caused to the source code in " switch " branch corresponding to other mode of operations, therefore, also the functional realiey of multi signal radar echo simulator can not just be ensured well.
Summary of the invention
In view of this, the invention provides a kind of emulation mode and system, to overcome in prior art because conventional control class software is to revising also opening, run counter to the encapsulation principle that OO exploitation is closed, very easily maloperation is caused to the source code in " switch " branch corresponding to other mode of operations, therefore can not ensure the problem of the functional realiey of multi signal radar echo simulator well.
For achieving the above object, the invention provides following technical scheme:
A kind of emulation mode, comprising:
Receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter;
Determine by instruction factory the instruction that described order parameter is corresponding, and create Command Example corresponding to described instruction;
Call the instruction functions for performing described instruction in described Command Example;
Perform described instruction functions;
Wherein, also comprise in the process performing described instruction functions:
Described mode parameter is passed to pattern factory;
Determine by described pattern factory the pattern that described mode parameter is corresponding, and create schema instance corresponding to described pattern;
Call the mode function for performing the described instruction under described pattern in described schema instance;
Perform described mode function to complete the simulation operations of described instruction under described pattern.
Preferably, described method also comprises:
The instruction enumerated value of the correspondence of pre-defined different instruction, and set instruction process class corresponding to each instruction enumerated value;
And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each pattern enumerated value.
Preferably, describedly determine by instruction factory the instruction that described order parameter is corresponding, and create Command Example corresponding to described instruction, comprising:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
Preferably, describedly determine by described pattern factory the pattern that described mode parameter is corresponding, and create schema instance corresponding to described pattern, comprising:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
Preferably, describedly determine to comprise the instruction that described order parameter is corresponding by instruction factory:
The parameter binding instructio that parameter binding instructio parameter is corresponding is determined by instruction factory;
Or, determine by instruction factory the sign on that sign on parameter is corresponding;
Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
A kind of analogue system, comprising:
Receiving element, for receiving the simulation request that user sends, described simulation request comprises order parameter and mode parameter;
Command Example creating unit, for determining by instruction factory the instruction that described order parameter is corresponding, and creates Command Example corresponding to described instruction;
Instruction functions call unit, for calling the instruction functions for performing described instruction in described Command Example;
Instruction functions performance element, for performing described instruction functions;
Wherein, described instruction functions performance element comprises:
Parameter transfer subelement, for being passed to pattern factory by described mode parameter;
Schema instance creates subelement, for determining by described pattern factory the pattern that described mode parameter is corresponding, and creates schema instance corresponding to described pattern;
Mode function calls subelement, for calling the mode function for performing the described instruction under described pattern in described schema instance;
Simulation operations performs subelement, for performing described mode function to complete the simulation operations of described instruction under described pattern.
Preferably, described system also comprises:
Setup unit, for the instruction enumerated value of the correspondence of pre-defined different instruction, and sets instruction process class corresponding to each enumerated value; And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each enumerated value.
Preferably, described Command Example creating unit specifically for:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
Preferably, described schema instance create subelement specifically for:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
Preferably, described Command Example creating unit when being determined instruction corresponding to described order parameter by instruction factory, specifically for:
The parameter binding instructio that parameter binding instructio parameter is corresponding is determined by instruction factory;
Or, determine by instruction factory the sign on that sign on parameter is corresponding;
Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
Known via above-mentioned technical scheme, compared with prior art, the invention discloses a kind of emulation mode, receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter; Determine by instruction factory the instruction that order parameter is corresponding, and create Command Example corresponding to described instruction; The instruction functions for performing described instruction in call instruction example; Perform instruction functions, wherein, also comprise in the process performing described instruction functions: mode parameter is passed to pattern factory; By the pattern that pattern factory deterministic model parameter is corresponding, and the schema instance that creation mode is corresponding; The mode function for performing the described instruction under described pattern in invocation pattern example; Execution pattern function is to complete the simulation operations of described instruction under described pattern.Said method have employed double-deck factory mode, meets " exploitation is closed " principle, namely open to expansion, closes, ensure that the realization of the copying of multi signal radar echo simulator well to amendment.The invention also discloses a kind of analogue system.
Term in instructions of the present invention and claims and above-mentioned accompanying drawing " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, to comprise the process of a series of unit, method, system, product or equipment being not necessarily limited to those unit, but can comprise clearly do not list or for intrinsic other unit of these processes, method, product or equipment.
From background technology, control class software conventional in prior art is open to amendment, run counter to the encapsulation principle that OO exploitation is closed, very easily maloperation is caused to the source code in " switch " branch corresponding to other mode of operations, therefore can not ensure the functional realiey of many radar echo simulators well.
Therefore, the present invention constructs a kind of emulation mode in conjunction with factory mode and reflex mechanism on the basis that traditional " three-tier architecture " designs, and is applied to multi signal radar echo simulator, concrete, receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter; Determine by instruction factory the instruction that order parameter is corresponding, and create Command Example corresponding to described instruction; The instruction functions for performing described instruction in call instruction example; Perform instruction functions, wherein, also comprise in the process performing described instruction functions: mode parameter is passed to pattern factory; By the pattern that pattern factory deterministic model parameter is corresponding, and the schema instance that creation mode is corresponding; The mode function for performing the described instruction under described pattern in invocation pattern example; Execution pattern function has completed the simulation operations of described instruction under described pattern.Said method have employed double-deck factory mode, meets " exploitation is closed " principle, namely open to expansion, closes, ensure that the realization of the copying of multi signal radar echo simulator well to amendment.
The invention also discloses a kind of analogue system.
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and " three-tier architecture " first used the present invention below, factory mode and reflex mechanism are simply introduced.
Traditional " three-tier architecture " pattern is as shown in accompanying drawing Fig. 1, from top to bottom be followed successively by: presentation layer (UI), Business Logic (BLL) and data access layer (DAL), the object distinguishing level is the thought of " high cohesion; low coupling ", wherein, presentation layer (UI) is the interface being presented to user, i.e. the finding gained of user when a use system; Business Logic (BLL) is the operation for particular problem, to data business logic processing; Data access layer (DAL) is the direct control to data.
Factory mode is the one of Design Mode, the class being responsible for specially instantiation by one obtains concrete object, usually such is called " factory ", and factory class encapsulates the constitutive logic of related object, be separated subclass object structure and definition, the maintainability of software product is strengthened greatly.
Reflex mechanism (Reflection) is the important mechanisms in .NET, allow application developer check program the term of execution procedure set metadata, explore class content, carry out late binding, dynamic creation type etc.
The actual demand controlling class software according to multi signal radar echo simulator describes, mainly contain the place that two need the more example of initialization, one is instruction set, comprise parameter bookbinding, beginning, stopping, self-inspection, reset, memory board erasing, download, upload, the execution of each operation is completely different, needs the different instance differentiation of structure to call; Two is set of modes, comprises point target, one-dimensional distance to pattern, meteorological turbulent model etc.Two set connect each other, i.e. parameter bookbinding, beginning, shut-down operation need to distinguish mode of operation, other instructions then do not need differentiation pattern, therefore, the application proposes on Business Logic (BLL) and adopts double-deck factory configuration design multi signal radar echo simulator control class software.
As shown in illustrations 2, double-deck factory comprises " instruction factory " and " pattern factory " two factory class, wherein, " concrete instructions product " realizes public " instruction abstract good ", " instruction abstract good " class should provide unified interface function, as instruction sending method etc., " instruction factory " dynamically can produce the example of concrete instruction, " pattern factory " is used for producing the example of concrete pattern, " concrete Model Products " realizes public " schema abstraction product ", " schema abstraction product " class should comprise the required public method realized of all patterns, as parameter bookbinding, start and stop etc.In double-deck factory configuration, instruction factory is core, is the bridge connecting extraneous interface interchange and trigger mode factory.
Based on the control class software of the double-deck factory configuration design of above-mentioned employing, multi signal radar echo simulator can be controlled and realize various copying, it should be noted that, for the instruction not distinguishing pattern, directly produce corresponding example according to instruction factory, to this, the application will not describe in detail, needs instruction factory and pattern factory have cooperatively interacted by the instruction for the pattern of differentiation, are described in further detail this kind of situation below in conjunction with the drawings and specific embodiments.
Referring to accompanying drawing 3, is the schematic flow sheet of a kind of emulation mode disclosed by the invention, and the method is applied to the Business Logic (BLL) of the double-deck factory configuration of above-mentioned employing, and the method specifically comprises:
S101: receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter.
The simulation request of user is called by presentation layer (UI) the unified external interface (" calling class " namely in Fig. 2) provided by Business Logic (BLL) and is sent to Business Logic (BLL).
S102: determine the instruction that described order parameter is corresponding by instruction factory, and create Command Example corresponding to described instruction.
It should be noted that, describedly determine to comprise the instruction that described order parameter is corresponding by instruction factory: determine by instruction factory the parameter binding instructio that parameter binding instructio parameter is corresponding; Or, determine by instruction factory the sign on that sign on parameter is corresponding; Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
The order parameter that the user received by unified external interface sends is sent to instruction factory, and instruction factory can determine the instruction that this order parameter is corresponding, and carries out instantiation to this instruction, creates the Command Example that this instruction is corresponding.Described Command Example comprises the instruction functions for performing described instruction.
S103: call the instruction functions for performing described instruction in described Command Example.
S104: perform described instruction functions, and in the process performing described instruction functions, described mode parameter is passed to pattern factory.
It should be noted that, when execution instruction functions, the mode parameter of the user's transmission received by unified external interface can be called, and described mode parameter is passed to pattern factory.
S105: determine the pattern that described mode parameter is corresponding by described pattern factory, and create schema instance corresponding to described pattern.
For radar simulation, described pattern comprises meteorological turbulent model, beacon patterns etc.To other multi signal emulation field, described pattern can also comprise other guide, and to this, 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 determine the pattern that this mode parameter is corresponding, and carries out instantiation to this pattern, creates the schema instance that this pattern is corresponding.Described schema instance comprises the mode function for performing the described instruction under described pattern.
S106: call the mode function for performing the described instruction under described pattern in described schema instance.
It should be noted that, for same instruction, under different patterns, the operation different by different mode function control realization, in the present embodiment, different mode functions is all nested in instruction functions, so that in the process that instruction functions performs, after determining the pattern that instruction is corresponding, create corresponding schema instance, and from schema instance, call corresponding mode function.
S107: perform described mode function to complete the simulation operations of described instruction under described pattern.
Now, Business Logic (BLL) needs visit data layer (DAL), data access layer (DAL) provides the power function in concrete pattern implementation procedure, comprise file interface, hardware board interface etc., to complete the simulation operations of described instruction under described pattern.
It should be noted that, in the present embodiment, because mode function is nested in instruction functions, then step S104 ~ S107 also can think performing the concrete steps comprised in the process of instruction functions.
Present embodiment discloses a kind of emulation mode, receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter; Determine by instruction factory the instruction that order parameter is corresponding, and create Command Example corresponding to described instruction; The instruction functions for performing described instruction in call instruction example; Perform instruction functions, also comprise in the process performing described instruction functions: mode parameter is passed to pattern factory; By the pattern that pattern factory deterministic model parameter is corresponding, and the schema instance that creation mode is corresponding; The mode function for performing the described instruction under described pattern in invocation pattern example; Execution pattern function is to complete the simulation operations of described instruction under described pattern.Said method have employed double-deck factory mode, meets " exploitation is closed " principle, namely open to expansion, closes, ensure that the realization of the copying of multi signal radar echo simulator well to amendment.
On the basis of embodiment disclosed in the invention described above, the present invention has also been described in detail the concrete mode creating example, specific as follows:
The instruction enumerated value of the correspondence of pre-defined different instruction, and set instruction process class corresponding to each instruction enumerated value; And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each pattern enumerated value.
Concrete, suppose that certain project needs to create the example of multiple pattern, specific practice is, in advance multiple mode of operation (as meteorological turbulent flow, beacon, wind shear etc.) is claimed as enumeration type (Enum), mode treatment class (i.e. " " concrete Model Products " Mode " in Fig. 2) corresponding to this pattern is increased in each attribute (Description) enumerated, Simulation Control operation concrete under mode treatment class corresponding to each pattern realizes this pattern, the operations such as such as parameter bookbinding, beginning, stopping.The present invention show in particular the code of the enumerated value of following defining mode to elaborate.
public enum EnumMode
{
LocalCtrlWeatherTurbulence
[Description("LocalCtrlWeatherTurbulence"]
WeatherTurbulence, // meteorological 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 topographic mapping pattern
}
For beacon patterns, program process is:
First the process class title (" LocalCtrlMarker ") that beacon patterns is corresponding is got;
Then by this process class, i.e. LocalCtrlMarker in reflex mechanism dynamic lookup to procedure set, and such object instance is automatically generated;
Finally, according to circumstances call arbitrarily the correlation technique of this example, such as parameter bookbinding, beginning, stopping etc.Profit in this way, effectively can avoid the situation occurring multiple branch.
Based on aforesaid way, then, describedly determine by instruction factory the instruction that described order parameter is corresponding, and create Command Example corresponding to described instruction, comprising:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
Describedly determine by described pattern factory the pattern that described mode parameter is corresponding, and create schema instance corresponding to described pattern, comprising:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
It should be noted that, if increase new pattern, only need increase the pattern enumerated value of this pattern of definition, and increase corresponding mode treatment class, greatly enhance the extensibility of system, and meet the closed principle of exploitation, and maloperation can not be caused to other patterns, ensure that the functional realiey of multi signal radar echo simulator well.
Describe method in detail in embodiment disclosed in the invention described above, the system of various ways can be adopted to realize for method of the present invention, therefore the invention also discloses a kind of system, provide specific embodiment below and be described in detail.
Referring to accompanying drawing 4, is the structural representation of a kind of analogue system disclosed by the invention, and this system is applied to the Business Logic (BLL) of the double-deck factory configuration of above-mentioned employing, and this system specifically comprises:
Receiving element 11, for receiving the simulation request that user sends, described simulation request comprises order parameter and mode parameter;
Command Example creating unit 12, for determining by instruction factory the instruction that described order parameter is corresponding, and creates Command Example corresponding to described instruction;
It should be noted that, described Command Example creating unit when being determined instruction corresponding to described order parameter by instruction factory, specifically for:
The parameter binding instructio that parameter binding instructio parameter is corresponding is determined by instruction factory;
Or, determine by instruction factory the sign on that sign on parameter is corresponding;
Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
Instruction functions call unit 13, for calling the instruction functions for performing described instruction in described Command Example;
Instruction functions performance element 14, for performing described instruction functions.
Concrete, described instruction functions performance element 14 comprises following subelement:
Parameter transfer subelement 15, for being passed to pattern factory by described mode parameter;
Schema instance creates subelement 16, for determining by described pattern factory the pattern that described mode parameter is corresponding, and creates schema instance corresponding to described pattern;
Mode function calls subelement 17, for calling the mode function for performing the described instruction under described pattern in described schema instance;
Simulation operations performs subelement 18, for performing described mode function to complete the simulation operations of described instruction under described pattern.
It should be noted that, described system also comprises:
Setup unit, for the instruction enumerated value of the correspondence of pre-defined different instruction, and sets instruction process class corresponding to each instruction enumerated value; And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each pattern enumerated value.
Then, described Command Example creating unit specifically for:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
Described schema instance create subelement specifically for:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
It should be noted that, the concrete function of above-mentioned unit realizes describing in detail in embodiment of the method, and the present embodiment repeats no more, and specifically refers to the associated description in embodiment of the method.
In sum:
The invention discloses a kind of emulation mode, receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter; Determine by instruction factory the instruction that order parameter is corresponding, and create Command Example corresponding to described instruction; The instruction functions for performing described instruction in call instruction example; Perform instruction functions, wherein, also comprise in the process performing described instruction functions: mode parameter is passed to pattern factory; By the pattern that pattern factory deterministic model parameter is corresponding, and the schema instance that creation mode is corresponding; The mode function for performing the described instruction under described pattern in invocation pattern example; Execution pattern function is to complete the simulation operations of described instruction under described pattern.Said method have employed double-deck factory mode, meets " exploitation is closed " principle, namely open to expansion, closes, ensure that the realization of the copying of multi signal radar echo simulator well to amendment.
The invention also discloses a kind of analogue system.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
It should be noted that in addition, device embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.In addition, in device embodiment accompanying drawing provided by the invention, the annexation between module represents to have communication connection between them, specifically can be implemented as one or more communication bus or signal wire.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required common hardware by software and realize, and can certainly comprise special IC, dedicated cpu, private memory, special components and parts etc. realize by specialized hardware.Generally, all functions completed by computer program can realize with corresponding hardware easily, and the particular hardware structure being used for realizing same function also can be diversified, such as mimic channel, digital circuit or special circuit etc.But under more susceptible for the purpose of the present invention condition, software program realizes is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computing machine, USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform method described in the present invention each embodiment.
In sum, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to above-described embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in the various embodiments described above, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
" three-tier architecture " schematic diagram that Fig. 1 is traditional disclosed in the embodiment of the present invention;
Fig. 2 is disclosed " double-deck factory " configuration diagram of the embodiment of the present invention;
Fig. 3 is a kind of emulation mode schematic flow sheet disclosed in the embodiment of the present invention;
Fig. 4 is a kind of emulate system architecture schematic diagram disclosed in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.

Claims (10)

1. an emulation mode, is characterized in that, comprising:
Receive the simulation request that user sends, described simulation request comprises order parameter and mode parameter;
Determine by instruction factory the instruction that described order parameter is corresponding, and create Command Example corresponding to described instruction;
Call the instruction functions for performing described instruction in described Command Example;
Perform described instruction functions;
Wherein, also comprise in the process performing described instruction functions:
Described mode parameter is passed to pattern factory;
Determine by described pattern factory the pattern that described mode parameter is corresponding, and create schema instance corresponding to described pattern;
Call the mode function for performing the described instruction under described pattern in described schema instance;
Perform described mode function to complete the simulation operations of described instruction under described pattern.
2. method according to claim 1, is characterized in that, described method also comprises:
The instruction enumerated value of the correspondence of pre-defined different instruction, and set instruction process class corresponding to each instruction enumerated value;
And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each pattern enumerated value.
3. emulation mode according to claim 2, is characterized in that, describedly determines by instruction factory the instruction that described order parameter is corresponding, and creates Command Example corresponding to described instruction, comprising:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
4. emulation mode according to claim 2, is characterized in that, describedly determines by described pattern factory the pattern that described mode parameter is corresponding, and creates schema instance corresponding to described pattern, comprising:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
5. according to the emulation mode in Claims 1 to 4 described in any one, it is characterized in that, describedly determine to comprise the instruction that described order parameter is corresponding by instruction factory:
The parameter binding instructio that parameter binding instructio parameter is corresponding is determined by instruction factory;
Or, determine by instruction factory the sign on that sign on parameter is corresponding;
Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
6. an analogue system, is characterized in that, comprising:
Receiving element, for receiving the simulation request that user sends, described simulation request comprises order parameter and mode parameter;
Command Example creating unit, for determining by instruction factory the instruction that described order parameter is corresponding, and creates Command Example corresponding to described instruction;
Instruction functions call unit, for calling the instruction functions for performing described instruction in described Command Example;
Instruction functions performance element, for performing described instruction functions;
Wherein, described instruction functions performance element comprises:
Parameter transfer subelement, for being passed to pattern factory by described mode parameter;
Schema instance creates subelement, for determining by described pattern factory the pattern that described mode parameter is corresponding, and creates schema instance corresponding to described pattern;
Mode function calls subelement, for calling the mode function for performing the described instruction under described pattern in described schema instance;
Simulation operations performs subelement, for performing described mode function to complete the simulation operations of described instruction under described pattern.
7. system according to claim 6, is characterized in that, described system also comprises:
Setup unit, for the instruction enumerated value of the correspondence of pre-defined different instruction, and sets instruction process class corresponding to each enumerated value; And, the pattern enumerated value that pre-defined different mode is corresponding, and set mode treatment class corresponding to each enumerated value.
8. system according to claim 7, is characterized in that, described Command Example creating unit specifically for:
Determine the instruction that described order parameter is corresponding;
Inquire about the instruction enumerated value that described instruction is corresponding;
Corresponding relation according to predefined instruction enumerated value and instruction process class determines the instruction process class that described instruction enumerated value is corresponding;
Call instruction process class corresponding to described instruction enumerated value and create Command Example corresponding to described instruction.
9. system according to claim 7, is characterized in that, described schema instance create subelement specifically for:
Determine the pattern that described mode parameter is corresponding;
Inquire about the pattern enumerated value that described pattern is corresponding;
The mode treatment class that described pattern enumerated value is corresponding is determined according to predefined pattern enumerated value and the corresponding relation of mode treatment class;
Call mode treatment class corresponding to described pattern enumerated value and create schema instance corresponding to described pattern.
10., according to the system in claim 6 ~ 9 described in any one, it is characterized in that, described Command Example creating unit when being determined instruction corresponding to described order parameter by instruction factory, specifically for:
The parameter binding instructio that parameter binding instructio parameter is corresponding is determined by instruction factory;
Or, determine by instruction factory the sign on that sign on parameter is corresponding;
Or, determine by instruction factory the END instruction that END instruction parameter is corresponding.
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 true CN104820615A (en) 2015-08-05
CN104820615B 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)

Cited By (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 (5)

* 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
US20130332898A1 (en) * 2012-06-07 2013-12-12 Microsoft Corporation Object extensions using attributes to decouple base classes from derived classes

Patent Citations (5)

* 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
US20130332898A1 (en) * 2012-06-07 2013-12-12 Microsoft Corporation Object extensions using attributes to decouple base classes from derived classes

Non-Patent Citations (1)

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

Cited By (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

Also Published As

Publication number Publication date
CN104820615B (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN101517536B (en) With the function level instant translation engine of Multiple Optimization
CN102799465B (en) Virtual interrupt management method and device of distributed virtual system
CN104915297B (en) A kind of automated testing method of the APP power consumption of android equipment
CN107408052A (en) Binary Conversion in shared object level
CN104267956A (en) Method and module for controlling hardware device in operating system
CN111859834B (en) UVM-based verification platform development method, system, terminal and storage medium
CN105843873A (en) System and method for managing data modeling
CN105159670A (en) Universal cockpit display control system software development framework
WO2020259163A1 (en) Device deployment method and apparatus, device running method, and electronic device
CN109739600A (en) Data processing method, medium, device and calculating equipment
CN110119282A (en) A kind of internet-of-things terminal and system based on general-purpose built-in type computer
CN107749807A (en) A kind of network function verification method and checking system towards NFV
CN110516447A (en) A kind of method and apparatus of identification terminal simulator
JP2023086678A (en) Method and apparatus for generating and applying deep learning model based on deep learning framework
CN104820615A (en) Simulation method and system
CN108228965B (en) Simulation verification method, device and equipment for memory cell
CN103514074A (en) MVB network card development method and platform
CN102081520A (en) Method and system for establishing graphical user interface of embedded digital video recorder
CN113454607A (en) Debugging method and device and system on chip
CN103793263A (en) DMA transaction-level modeling method based on Power PC processor
CN109257552A (en) Panel TV set sound effect parameters design method
CN105550046B (en) Virtual control method, device and system
US20040064267A1 (en) Method and apparatus for testing microarchitectural features by using tests written in microcode
CN114461478A (en) Simulator, drive test method, electronic device, and computer-readable storage medium
CN106569829B (en) Method for realizing switching of working modes of touch screen, touch screen device and head-mounted equipment

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