Research Article
Research on the Development Approach for Reusable Model in Parallel Discrete Event Simulation
Algorithm 2
Header file structure of the radar model.
/** | *Radar Header file | *@Function: to detect the target | *@InvocationTime: invoked periodically | *@Instruction: A simplified Radar model under the Reusable Component Model Framework. | */ | #include <iostream> | … | #define Pai 3.14 | #define e 2.7183 | using namespace std; | namespace YHSim | /** | *User_defined_dataTypes | */ | //@struct_TargetInf Namespace:YHSim;Instruction:struct of orientation | struct TargetInf { | … //struct members | }; | … //other user_defined dataTypes | class Radar { | private: | //@model_member_radarName IsStateVariable:No;Instruction:radar name | string radarName; | … | Velocity * targetVelocity; | public: | Radar(); | ~Radar(); | //Default initialize function without any parameter | int Initialize(); | //@initialize_PerformancePara_Pointer Corresponding:performancePara;Instruction:init | int Initialize(PerformancePara * performancePara); | //@initialize_DdeploymentInf_Pointer Corresponding:xxx;Instruction:xxx | int Initialize(DdeploymentInf * deploymentInf); | //@input_EchoSignal_Pointer Corresponding:xxx;Instruction:xxx | int SetInputData(EchoSignal * echoSignal); | //@output_TargetInf_Pointer Corresponding:xxx;Instruction:xxx | int GetOutputData(TargetInf * target); | … | int SetSimuStatus(string & SimuStatus); | int GetSimuStatus(string & SimuStatus); | int ModelProcess(double dSimuTime); | }; | } |
|