00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __SIMULATOR_HPP
00033 #define __SIMULATOR_HPP
00034
00035 #include "libecs/libecs.hpp"
00036 #include "libecs/EntityType.hpp"
00037 #include "libecs/Polymorph.hpp"
00038 #include "libecs/DataPointVector.hpp"
00039
00040 #include "libemc.hpp"
00041 #include "SimulatorImplementation.hpp"
00042
00043
00044 #include <stdio.h>
00045 namespace libemc
00046 {
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 class ECELL_API Simulator
00077 {
00078
00079 public:
00080
00081 Simulator();
00082 virtual ~Simulator() {}
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 void createStepper( libecs::StringCref aClassname,
00100 libecs::StringCref anId )
00101 {
00102 theSimulatorImplementation->createStepper( aClassname, anId );
00103 }
00104
00105
00106
00107
00108
00109
00110 void deleteStepper( libecs::StringCref anID )
00111 {
00112 theSimulatorImplementation->deleteStepper( anID );
00113 }
00114
00115
00116
00117
00118
00119
00120
00121 const libecs::Polymorph getStepperList() const
00122 {
00123 return theSimulatorImplementation->getStepperList();
00124 }
00125
00126
00127
00128
00129
00130
00131
00132 const libecs::Polymorph
00133 getStepperPropertyList( libecs::StringCref aStepperID ) const
00134 {
00135 return theSimulatorImplementation->getStepperPropertyList( aStepperID );
00136 }
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 const libecs::Polymorph
00150 getStepperPropertyAttributes( libecs::StringCref aStepperID,
00151 libecs::StringCref aPropertyName ) const
00152 {
00153 return theSimulatorImplementation->
00154 getStepperPropertyAttributes( aStepperID, aPropertyName );
00155 }
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 void setStepperProperty( libecs::StringCref aStepperID,
00166 libecs::StringCref aPropertyName,
00167 libecs::PolymorphCref aValue )
00168 {
00169 theSimulatorImplementation->setStepperProperty( aStepperID,
00170 aPropertyName,
00171 aValue );
00172 }
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183 const libecs::Polymorph
00184 getStepperProperty( libecs::StringCref aStepperID,
00185 libecs::StringCref aPropertyName ) const
00186 {
00187 return theSimulatorImplementation->getStepperProperty( aStepperID,
00188 aPropertyName );
00189 }
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 void loadStepperProperty( libecs::StringCref aStepperID,
00200 libecs::StringCref aPropertyName,
00201 libecs::PolymorphCref aValue )
00202 {
00203 theSimulatorImplementation->loadStepperProperty( aStepperID,
00204 aPropertyName,
00205 aValue );
00206 }
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217 const libecs::Polymorph
00218 saveStepperProperty( libecs::StringCref aStepperID,
00219 libecs::StringCref aPropertyName ) const
00220 {
00221 return theSimulatorImplementation->saveStepperProperty( aStepperID,
00222 aPropertyName );
00223 }
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233 const libecs::String
00234 getStepperClassName( libecs::StringCref aStepperID ) const
00235 {
00236 return theSimulatorImplementation->getStepperClassName( aStepperID );
00237 }
00238
00239
00240
00241
00242 const libecs::PolymorphMap getClassInfo( libecs::StringCref aClasstype,
00243 libecs::StringCref aClassname)
00244 {
00245
00246 return theSimulatorImplementation->getClassInfo( aClasstype, aClassname, 0 );
00247 }
00248
00249 const libecs::PolymorphMap getClassInfo( libecs::StringCref aClasstype,
00250 libecs::StringCref aClassname,
00251 const libecs::Integer forceReload )
00252 {
00253 return theSimulatorImplementation->getClassInfo( aClasstype, aClassname, forceReload );
00254 }
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272 void createEntity( libecs::StringCref aClassname,
00273 libecs::StringCref aFullIDString )
00274 {
00275 theSimulatorImplementation->createEntity( aClassname,
00276 aFullIDString );
00277 }
00278
00279
00280
00281
00282
00283
00284 void deleteEntity( libecs::StringCref aFullIDString )
00285 {
00286 theSimulatorImplementation->deleteEntity( aFullIDString );
00287 }
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297 const libecs::Polymorph
00298 getEntityList( libecs::StringCref anEntityTypeString,
00299 libecs::StringCref aSystemPathString ) const
00300 {
00301 return theSimulatorImplementation->getEntityList( anEntityTypeString,
00302 aSystemPathString );
00303 }
00304
00305
00306
00307
00308
00309
00310
00311
00312 const libecs::Polymorph
00313 getEntityPropertyList( libecs::StringCref aFullIDString ) const
00314 {
00315 return theSimulatorImplementation->
00316 getEntityPropertyList( aFullIDString );
00317 }
00318
00319
00320
00321
00322
00323
00324
00325
00326 const bool isEntityExist( libecs::StringCref aFullIDString ) const
00327 {
00328 return theSimulatorImplementation->isEntityExist( aFullIDString );
00329 }
00330
00331
00332
00333
00334
00335
00336
00337
00338 void setEntityProperty( libecs::StringCref aFullPNString,
00339 libecs::PolymorphCref aValue )
00340 {
00341 theSimulatorImplementation->setEntityProperty( aFullPNString,
00342 aValue );
00343 }
00344
00345
00346
00347
00348
00349
00350
00351
00352 const libecs::Polymorph
00353 getEntityProperty( libecs::StringCref aFullPNString ) const
00354 {
00355 return theSimulatorImplementation->getEntityProperty( aFullPNString );
00356 }
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366 void loadEntityProperty( libecs::StringCref aFullPNString,
00367 libecs::PolymorphCref aValue )
00368 {
00369 theSimulatorImplementation->loadEntityProperty( aFullPNString,
00370 aValue );
00371 }
00372
00373
00374
00375
00376
00377
00378
00379
00380 const libecs::Polymorph
00381 saveEntityProperty( libecs::StringCref aFullPNString ) const
00382 {
00383 return theSimulatorImplementation->saveEntityProperty( aFullPNString );
00384 }
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396 const libecs::Polymorph
00397 getEntityPropertyAttributes( libecs::StringCref aFullPNString ) const
00398 {
00399 return theSimulatorImplementation->
00400 getEntityPropertyAttributes( aFullPNString );
00401 }
00402
00403
00404
00405
00406
00407
00408
00409
00410 const libecs::String
00411 getEntityClassName( libecs::StringCref aFullIDString ) const
00412 {
00413 return theSimulatorImplementation->getEntityClassName( aFullIDString );
00414 }
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439 void createLogger( libecs::StringCref aFullPNString )
00440 {
00441
00442 return theSimulatorImplementation->createLogger( aFullPNString );
00443 }
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459 void createLogger( libecs::StringCref aFullPNString, libecs::Polymorph aParamList )
00460 {
00461
00462 return theSimulatorImplementation->createLogger( aFullPNString, aParamList );
00463 }
00464
00465
00466
00467
00468
00469
00470
00471 const libecs::Polymorph getLoggerList() const
00472 {
00473 return theSimulatorImplementation->getLoggerList();
00474 }
00475
00476 const libecs::DataPointVectorSharedPtr
00477 getLoggerData( libecs::StringCref aFullPNString ) const
00478 {
00479 return theSimulatorImplementation->getLoggerData( aFullPNString );
00480 }
00481
00482 const libecs::DataPointVectorSharedPtr
00483 getLoggerData( libecs::StringCref aFullPNString,
00484 libecs::RealCref aStartTime,
00485 libecs::RealCref anEndTime ) const
00486 {
00487 return theSimulatorImplementation->
00488 getLoggerData( aFullPNString, aStartTime, anEndTime );
00489 }
00490
00491 const libecs::DataPointVectorSharedPtr
00492 getLoggerData( libecs::StringCref aFullPNString,
00493 libecs::RealCref aStartTime, libecs::RealCref anEndTime,
00494 libecs::RealCref anInterval ) const
00495 {
00496 return theSimulatorImplementation->getLoggerData( aFullPNString,
00497 aStartTime, anEndTime,
00498 anInterval );
00499 }
00500
00501 const libecs::Real
00502 getLoggerStartTime( libecs::StringCref aFullPNString ) const
00503 {
00504 return theSimulatorImplementation->getLoggerStartTime( aFullPNString );
00505 }
00506
00507 const libecs::Real
00508 getLoggerEndTime( libecs::StringCref aFullPNString ) const
00509 {
00510 return theSimulatorImplementation->getLoggerEndTime( aFullPNString );
00511 }
00512
00513 void setLoggerMinimumInterval( libecs::StringCref aFullPNString,
00514 libecs::RealCref anInterval )
00515 {
00516 return theSimulatorImplementation->
00517 setLoggerMinimumInterval( aFullPNString, anInterval );
00518 }
00519
00520 const libecs::Real
00521 getLoggerMinimumInterval( libecs::StringCref aFullPNString ) const
00522 {
00523 return theSimulatorImplementation->
00524 getLoggerMinimumInterval( aFullPNString );
00525 }
00526
00527 void setLoggerPolicy( libecs::StringCref aFullPNString,
00528 libecs::Polymorph aParamList )
00529 {
00530 return theSimulatorImplementation->setLoggerPolicy( aFullPNString, aParamList );
00531 }
00532
00533 libecs::Polymorph
00534 getLoggerPolicy( libecs::StringCref aFullPNString ) const
00535 {
00536 return theSimulatorImplementation->getLoggerPolicy( aFullPNString );
00537 }
00538
00539 const libecs::Integer getLoggerSize( libecs::StringCref aFullPNString ) const
00540 {
00541 return theSimulatorImplementation->getLoggerSize( aFullPNString );
00542 }
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559 void step( const libecs::Integer aNumSteps = 1 )
00560 {
00561
00562 theSimulatorImplementation->step( aNumSteps );
00563 }
00564
00565 const libecs::Polymorph getNextEvent() const
00566 {
00567 return theSimulatorImplementation->getNextEvent();
00568 }
00569
00570
00571
00572
00573
00574
00575
00576 const libecs::Real getCurrentTime() const
00577 {
00578 return theSimulatorImplementation->getCurrentTime();
00579 }
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591 void run()
00592 {
00593 theSimulatorImplementation->run();
00594 }
00595
00596
00597
00598
00599
00600
00601
00602 void run( const libecs::Real aDuration )
00603 {
00604 theSimulatorImplementation->run( aDuration );
00605 }
00606
00607
00608
00609
00610
00611
00612
00613 void stop()
00614 {
00615 theSimulatorImplementation->stop();
00616 }
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637 void setEventChecker( EventCheckerSharedPtr aEventChecker )
00638 {
00639 theSimulatorImplementation->setEventChecker( aEventChecker );
00640 }
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654 void setEventHandler( EventHandlerSharedPtrCref anEventHandler )
00655 {
00656 theSimulatorImplementation->setEventHandler( anEventHandler );
00657 }
00658
00659 const libecs::Polymorph getDMInfo()
00660 {
00661 return theSimulatorImplementation->getDMInfo();
00662 }
00663
00664
00665
00666 private:
00667
00668 SimulatorImplementation* theSimulatorImplementation;
00669
00670 };
00671
00672
00673
00674
00675
00676
00677 }
00678
00679 #endif
00680
00681
00682
00683
00684