1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 Purpose: Schedules and runs the model routines.
8 ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20 You should have received a copy of the GNU General Public License along with
21 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22 Place - Suite 330, Boston, MA 02111-1307, USA.
24 Further information about the GNU General Public License can also be found on
25 the world wide web at http://www.gnu.org.
27 FUNCTIONAL DESCRIPTION
28 --------------------------------------------------------------------------------
30 This class wraps up the simulation scheduling routines.
33 --------------------------------------------------------------------------------
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 COMMENTS, REFERENCES, and NOTES
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
49 # include <simgear/compiler.h>
50 # include STL_IOSTREAM
51 # include STL_ITERATOR
53 # if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
54 # include <iostream.h>
61 #include "FGFDMExec.h"
63 #include "FGAtmosphere.h"
65 #include "FGGroundCallback.h"
66 #include "FGPropulsion.h"
67 #include "FGMassBalance.h"
68 #include "FGGroundReactions.h"
69 #include "FGAerodynamics.h"
70 #include "FGInertial.h"
71 #include "FGAircraft.h"
72 #include "FGPropagate.h"
73 #include "FGAuxiliary.h"
75 #include "FGConfigFile.h"
76 #include "FGInitialCondition.h"
77 #include "FGPropertyManager.h"
81 static const char *IdSrc = "$Id$";
82 static const char *IdHdr = ID_FDMEXEC;
84 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
88 unsigned int FGFDMExec::FDMctr = 0;
89 FGPropertyManager* FGFDMExec::master=0;
91 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
93 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
95 void checkTied ( FGPropertyManager *node )
97 int N = node->nChildren();
100 for (int i=0; i<N; i++) {
101 if (node->getChild(i)->nChildren() ) {
102 checkTied( (FGPropertyManager*)node->getChild(i) );
103 } else if ( node->getChild(i)->isTied() ) {
104 name = ((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
105 cerr << name << " is tied" << endl;
110 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 FGFDMExec::FGFDMExec(FGPropertyManager* root)
140 // Multiple FDM's are stopped for now. We need to ensure that
141 // the "user" instance always gets the zeroeth instance number,
142 // because there may be instruments or scripts tied to properties
143 // in the jsbsim[0] node.
148 char* num = getenv("JSBSIM_DEBUG");
149 if (num) debug_lvl = atoi(num); // set debug level
150 } catch (...) { // if error set to 1
154 if (root == 0) master= new FGPropertyManager;
157 instance = master->GetNode("/fdm/jsbsim",IdFDM,true);
162 // this is here to catch errors in binding member functions
163 // to the property tree.
166 } catch ( string msg ) {
167 cout << "Caught error: " << msg << endl;
172 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
174 FGFDMExec::~FGFDMExec()
178 checkTied( instance );
179 } catch ( string msg ) {
180 cout << "Caught error: " << msg << endl;
183 for (unsigned int i=1; i<SlaveFDMList.size(); i++) delete SlaveFDMList[i]->exec;
184 SlaveFDMList.clear();
189 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191 bool FGFDMExec::Allocate(void)
195 Atmosphere = new FGAtmosphere(this);
196 FCS = new FGFCS(this);
197 Propulsion = new FGPropulsion(this);
198 MassBalance = new FGMassBalance(this);
199 Aerodynamics = new FGAerodynamics (this);
200 Inertial = new FGInertial(this);
201 GroundReactions = new FGGroundReactions(this);
202 Aircraft = new FGAircraft(this);
203 GroundCallback = new FGGroundCallback();
204 Propagate = new FGPropagate(this);
205 Auxiliary = new FGAuxiliary(this);
206 Output = new FGOutput(this);
208 State = new FGState(this); // This must be done here, as the FGState
209 // class needs valid pointers to the above
212 // Initialize models so they can communicate with each other
214 if (!Atmosphere->InitModel()) {
215 cerr << fgred << "Atmosphere model init failed" << fgdef << endl;
217 if (!FCS->InitModel()) {
218 cerr << fgred << "FCS model init failed" << fgdef << endl;
220 if (!Propulsion->InitModel()) {
221 cerr << fgred << "FGPropulsion model init failed" << fgdef << endl;
223 if (!MassBalance->InitModel()) {
224 cerr << fgred << "FGMassBalance model init failed" << fgdef << endl;
226 if (!Aerodynamics->InitModel()) {
227 cerr << fgred << "FGAerodynamics model init failed" << fgdef << endl;
229 if (!Inertial->InitModel()) {
230 cerr << fgred << "FGInertial model init failed" << fgdef << endl;
232 if (!GroundReactions->InitModel()) {
233 cerr << fgred << "Ground Reactions model init failed" << fgdef << endl;
235 if (!Aircraft->InitModel()) {
236 cerr << fgred << "Aircraft model init failed" << fgdef << endl;
238 if (!Propagate->InitModel()) {
239 cerr << fgred << "Propagate model init failed" << fgdef << endl;
241 if (!Auxiliary->InitModel()) {
242 cerr << fgred << "Auxiliary model init failed" << fgdef << endl;
244 if (!Output->InitModel()) {
245 cerr << fgred << "Output model init failed" << fgdef << endl;
248 if (Error > 0) result = false;
250 IC = new FGInitialCondition(this);
252 // Schedule a model. The second arg (the integer) is the pass number. For
253 // instance, the atmosphere model gets executed every fifth pass it is called
254 // by the executive. Everything else here gets executed each pass.
255 // IC and Trim objects are NOT scheduled.
257 Schedule(Atmosphere, 1);
259 Schedule(Propulsion, 1);
260 Schedule(MassBalance, 1);
261 Schedule(Aerodynamics, 1);
262 Schedule(Inertial, 1);
263 Schedule(GroundReactions, 1);
264 Schedule(Aircraft, 1);
265 Schedule(Propagate, 1);
266 Schedule(Auxiliary, 1);
274 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
276 bool FGFDMExec::DeAllocate(void)
284 delete GroundReactions;
294 delete GroundCallback;
316 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
318 int FGFDMExec::Schedule(FGModel* model, int rate)
320 FGModel* model_iterator;
322 model_iterator = FirstModel;
324 if (model_iterator == 0L) { // this is the first model
327 FirstModel->NextModel = 0L;
328 FirstModel->SetRate(rate);
330 } else { // subsequent model
332 while (model_iterator->NextModel != 0L) {
333 model_iterator = model_iterator->NextModel;
335 model_iterator->NextModel = model;
336 model_iterator->NextModel->SetRate(rate);
343 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345 bool FGFDMExec::Run(void)
347 FGModel* model_iterator;
349 if (frozen) return true;
351 model_iterator = FirstModel;
352 if (model_iterator == 0L) return false;
356 for (unsigned int i=1; i<SlaveFDMList.size(); i++) {
357 // SlaveFDMList[i]->exec->State->Initialize(); // Transfer state to the slave FDM
358 // SlaveFDMList[i]->exec->Run();
361 while (model_iterator != 0L) {
362 model_iterator->Run();
363 model_iterator = model_iterator->NextModel;
371 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
373 bool FGFDMExec::RunIC(void)
376 State->Initialize(IC);
383 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
385 void FGFDMExec::SetGroundCallback(FGGroundCallback* p) {
387 delete GroundCallback;
391 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
393 vector <string> FGFDMExec::EnumerateFDMs(void)
395 vector <string> FDMList;
397 FDMList.push_back(Aircraft->GetAircraftName());
399 for (unsigned int i=1; i<SlaveFDMList.size(); i++) {
400 FDMList.push_back(SlaveFDMList[i]->exec->GetAircraft()->GetAircraftName());
406 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
408 bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model,
412 FGFDMExec::AircraftPath = AircraftPath;
413 FGFDMExec::EnginePath = EnginePath;
415 return LoadModel(model, addModelToPath);
418 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
421 bool FGFDMExec::LoadModel(string model, bool addModelToPath)
426 string aircraftCfgFileName;
428 if( AircraftPath.empty() || EnginePath.empty() ) {
429 cerr << "Error: attempted to load aircraft with undefined ";
430 cerr << "aircraft and engine paths" << endl;
434 aircraftCfgFileName = AircraftPath;
436 if (addModelToPath) aircraftCfgFileName += "/" + model;
437 aircraftCfgFileName += "/" + model + ".xml";
439 if (addModelToPath) aircraftCfgFileName += ";" + model;
440 aircraftCfgFileName += ";" + model + ".xml";
443 FGConfigFile AC_cfg(aircraftCfgFileName);
444 if (!AC_cfg.IsOpen()) return false;
453 if (!ReadPrologue(&AC_cfg)) return false;
455 while ((AC_cfg.GetNextConfigLine() != string("EOF")) &&
456 (token = AC_cfg.GetValue()) != string("/FDM_CONFIG")) {
457 if (token == "METRICS") {
458 if (debug_lvl > 0) cout << fgcyan << "\n Reading Metrics" << fgdef << endl;
459 if (!ReadMetrics(&AC_cfg)) result = false;
460 } else if (token == "SLAVE") {
461 if (debug_lvl > 0) cout << fgcyan << "\n Reading Slave flight vehicle: " << fgdef
462 << AC_cfg.GetValue("NAME") << endl;
463 if (!ReadSlave(&AC_cfg)) result = false;
464 } else if (token == "AERODYNAMICS") {
465 if (debug_lvl > 0) cout << fgcyan << "\n Reading Aerodynamics" << fgdef << endl;
466 if (!ReadAerodynamics(&AC_cfg)) result = false;
467 } else if (token == "UNDERCARRIAGE") {
468 if (debug_lvl > 0) cout << fgcyan << "\n Reading Landing Gear" << fgdef << endl;
469 if (!ReadUndercarriage(&AC_cfg)) result = false;
470 } else if (token == "PROPULSION") {
471 if (debug_lvl > 0) cout << fgcyan << "\n Reading Propulsion" << fgdef << endl;
472 if (!ReadPropulsion(&AC_cfg)) result = false;
473 } else if (token == "FLIGHT_CONTROL") {
474 if (debug_lvl > 0) cout << fgcyan << "\n Reading Flight Control" << fgdef << endl;
475 if (!ReadFlightControls(&AC_cfg)) result = false;
476 } else if (token == "AUTOPILOT") {
477 if (debug_lvl > 0) cout << fgcyan << "\n Reading Autopilot" << fgdef << endl;
478 if (!ReadFlightControls(&AC_cfg)) result = false;
479 } else if (token == "OUTPUT") {
480 if (debug_lvl > 0) cout << fgcyan << "\n Reading Output directives" << fgdef << endl;
481 if (!ReadOutput(&AC_cfg)) result = false;
490 << " FGFDMExec: Failed to load aircraft and/or engine model"
497 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
499 bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
501 string token = AC_cfg->GetValue();
505 AircraftName = AC_cfg->GetValue("NAME");
506 Aircraft->SetAircraftName(AircraftName);
508 if (debug_lvl > 0) cout << underon << "Reading Aircraft Configuration File"
509 << underoff << ": " << highint << AircraftName << normint << endl;
510 scratch = AC_cfg->GetValue("VERSION").c_str();
512 CFGVersion = AC_cfg->GetValue("VERSION");
513 Release = AC_cfg->GetValue("RELEASE");
516 cout << " Version: " << highint << CFGVersion
518 if (CFGVersion != needed_cfg_version) {
519 cerr << endl << fgred << "YOU HAVE AN INCOMPATIBLE CFG FILE FOR THIS AIRCRAFT."
520 " RESULTS WILL BE UNPREDICTABLE !!" << endl;
521 cerr << "Current version needed is: " << needed_cfg_version << endl;
522 cerr << " You have version: " << CFGVersion << endl << fgdef << endl;
526 if (Release == "ALPHA" && debug_lvl > 0) {
528 system("banner ALPHA");
531 << highint << "This aircraft model is an " << fgred << Release
532 << reset << highint << " release!!!" << endl << endl << reset
533 << "This aircraft model may not even properly load, and probably"
534 << " will not fly as expected." << endl << endl
535 << fgred << highint << "Use this model for development purposes ONLY!!!"
536 << normint << reset << endl << endl;
537 } else if (Release == "BETA" && debug_lvl > 0) {
539 system("banner BETA");
542 << highint << "This aircraft model is a " << fgred << Release
543 << reset << highint << " release!!!" << endl << endl << reset
544 << "This aircraft model probably will not fly as expected." << endl << endl
545 << fgblue << highint << "Use this model for development purposes ONLY!!!"
546 << normint << reset << endl << endl;
552 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
554 bool FGFDMExec::ReadSlave(FGConfigFile* AC_cfg)
556 // Add a new slaveData object to the slave FDM list
557 // Populate that slaveData element with a new FDMExec object
558 // Set the IsSlave flag for that FDMExec object
559 // Get the aircraft name
560 // set debug level to print out no additional data for slave objects
561 // Load the model given the aircraft name
562 // reset debug level to prior setting
564 int saved_debug_lvl = debug_lvl;
567 SlaveFDMList.push_back(new slaveData);
568 SlaveFDMList.back()->exec = new FGFDMExec();
569 SlaveFDMList.back()->exec->SetSlave();
571 string AircraftName = AC_cfg->GetValue("FILE");
573 debug_lvl = 0; // turn off debug output for slave vehicle
575 SlaveFDMList.back()->exec->SetAircraftPath( AircraftPath );
576 SlaveFDMList.back()->exec->SetEnginePath( EnginePath );
577 SlaveFDMList.back()->exec->LoadModel(AircraftName);
578 debug_lvl = saved_debug_lvl; // turn debug output back on for master vehicle
580 AC_cfg->GetNextConfigLine();
581 while ((token = AC_cfg->GetValue()) != string("/SLAVE")) {
583 if (token == "XLOC") { *AC_cfg >> SlaveFDMList.back()->x; }
584 else if (token == "YLOC") { *AC_cfg >> SlaveFDMList.back()->y; }
585 else if (token == "ZLOC") { *AC_cfg >> SlaveFDMList.back()->z; }
586 else if (token == "PITCH") { *AC_cfg >> SlaveFDMList.back()->pitch;}
587 else if (token == "YAW") { *AC_cfg >> SlaveFDMList.back()->yaw; }
588 else if (token == "ROLL") { *AC_cfg >> SlaveFDMList.back()->roll; }
589 else cerr << "Unknown identifier: " << token << " in slave vehicle definition" << endl;
593 cout << " X = " << SlaveFDMList.back()->x << endl;
594 cout << " Y = " << SlaveFDMList.back()->y << endl;
595 cout << " Z = " << SlaveFDMList.back()->z << endl;
596 cout << " Pitch = " << SlaveFDMList.back()->pitch << endl;
597 cout << " Yaw = " << SlaveFDMList.back()->yaw << endl;
598 cout << " Roll = " << SlaveFDMList.back()->roll << endl;
604 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
606 bool FGFDMExec::ReadPropulsion(FGConfigFile* AC_cfg)
608 if (!Propulsion->Load(AC_cfg)) {
609 cerr << " Propulsion not successfully loaded" << endl;
615 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
617 bool FGFDMExec::ReadFlightControls(FGConfigFile* AC_cfg)
619 if (!FCS->Load(AC_cfg)) {
620 cerr << " Flight Controls not successfully loaded" << endl;
626 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
628 bool FGFDMExec::ReadAerodynamics(FGConfigFile* AC_cfg)
630 if (!Aerodynamics->Load(AC_cfg)) {
631 cerr << " Aerodynamics not successfully loaded" << endl;
637 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
639 bool FGFDMExec::ReadUndercarriage(FGConfigFile* AC_cfg)
641 if (!GroundReactions->Load(AC_cfg)) {
642 cerr << " Ground Reactions not successfully loaded" << endl;
648 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
650 bool FGFDMExec::ReadMetrics(FGConfigFile* AC_cfg)
652 if (!Aircraft->Load(AC_cfg)) {
653 cerr << " Aircraft metrics not successfully loaded" << endl;
659 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
661 bool FGFDMExec::ReadOutput(FGConfigFile* AC_cfg)
663 if (!Output->Load(AC_cfg)) {
664 cerr << " Output not successfully loaded" << endl;
670 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672 FGPropertyManager* FGFDMExec::GetPropertyManager(void) {
676 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
678 FGTrim* FGFDMExec::GetTrim(void) {
680 Trim = new FGTrim(this,tNone);
684 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
685 // The bitmasked value choices are as follows:
686 // unset: In this case (the default) JSBSim would only print
687 // out the normally expected messages, essentially echoing
688 // the config files as they are read. If the environment
689 // variable is not set, debug_lvl is set to 1 internally
690 // 0: This requests JSBSim not to output any messages
692 // 1: This value explicity requests the normal JSBSim
694 // 2: This value asks for a message to be printed out when
695 // a class is instantiated
696 // 4: When this value is set, a message is displayed when a
697 // FGModel object executes its Run() method
698 // 8: When this value is set, various runtime state variables
699 // are printed out periodically
700 // 16: When set various parameters are sanity checked and
701 // a message is printed out when they go out of bounds
703 void FGFDMExec::Debug(int from)
705 if (debug_lvl <= 0) return;
707 if (debug_lvl & 1 && IdFDM == 0) { // Standard console startup message output
708 if (from == 0) { // Constructor
709 cout << "\n\n " << highint << underon << "JSBSim Flight Dynamics Model v"
710 << JSBSim_version << underoff << normint << endl;
711 cout << halfint << " [cfg file spec v" << needed_cfg_version << "]\n\n";
712 cout << normint << "JSBSim startup beginning ...\n\n";
713 } else if (from == 3) {
714 cout << "\n\nJSBSim startup complete\n\n";
717 if (debug_lvl & 2 ) { // Instantiation/Destruction notification
718 if (from == 0) cout << "Instantiated: FGFDMExec" << endl;
719 if (from == 1) cout << "Destroyed: FGFDMExec" << endl;
721 if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
723 cout << "================== Frame: " << Frame << " Time: "
724 << State->Getsim_time() << endl;
727 if (debug_lvl & 8 ) { // Runtime state variables
729 if (debug_lvl & 16) { // Sanity checking
731 if (debug_lvl & 64) {
732 if (from == 0) { // Constructor
733 cout << IdSrc << endl;
734 cout << IdHdr << endl;