TimingSimulationStructures.h

Go to the documentation of this file.
00001 //Copyright GSI 2012
00002 #ifndef TIMING_SIMULATION_STRUCTURES_H_
00003 #define TIMING_SIMULATION_STRUCTURES_H_
00004 
00005 #include <fesa-core/Utilities/XMLParser.h>
00006 #include <string>
00007 #include <vector>
00008 
00009 namespace fesaGSI
00010 {
00018     typedef enum
00019     {
00020         Event, EventBurst
00021     } SimulationEventType;
00022 
00027     class EventConfig
00028     {
00029         public:
00030 
00035                         EventConfig(fesa::ElementXML* config);
00036 
00040             std::string eventName_;
00041 
00045             std::string payload_;
00046 
00050             long delay_;
00051 
00055             SimulationEventType type_;
00056     };
00057 
00062     class EventBurstConfig: public EventConfig
00063     {
00064                 public:
00065 
00070                         EventBurstConfig(fesa::ElementXML* config);
00071 
00075             long period_;
00076 
00080             int occurrences_;
00081     };
00082 
00087     class EventSequenceConfig
00088     {
00089                 public:
00090 
00095                         EventSequenceConfig(fesa::ElementXML* config);
00096 
00100             ~EventSequenceConfig();
00101 
00105             std::string name_;
00106 
00110             std::vector<EventConfig*> events_;
00111     };
00112 
00117     class TelegramDataConfig
00118     {
00119                 public:
00120 
00125                         TelegramDataConfig(fesa::ElementXML* config);
00126 
00130             std::string destination_;
00131 
00135             std::string particleType_;
00136 
00140             std::string spCon_;
00141     };
00142 
00147     class CycleConfig
00148     {
00149                 public:
00150 
00156                         CycleConfig(fesa::ElementXML* config,long cycleID);
00157 
00161             std::string cycleName_;
00162 
00166             long cycleID_;
00167 
00172             int basicPeriodMultiple_;
00173 
00177             std::string eventSequenceName_;
00178 
00182             EventSequenceConfig* eventSequenceRef_;
00183 
00187             TelegramDataConfig* telegramData_;
00188     };
00189 
00194     class SuperCycleConfig
00195     {
00196                 public:
00197 
00202                         SuperCycleConfig();
00203 
00208             void initialize(fesa::ElementXML* config);
00209 
00214             void linkEventSequences(std::vector<EventSequenceConfig*>& eventSequenceCol);
00215 
00219             long shiftDelay_;
00220 
00224             std::vector<CycleConfig> cycleCol_;
00225 
00229             long cycleIDCounter_;
00230     };
00231 
00237     class DomainConfig
00238     {
00239                 public:
00240 
00245                         DomainConfig(fesa::ElementXML* config);
00246 
00250             ~DomainConfig();
00251 
00255             std::string name_;
00256 
00260             bool enable_;
00261 
00265             SuperCycleConfig superCycle_;
00266 
00270             std::vector<EventSequenceConfig*> eventSequenceCol_;
00271     };
00272 
00278     class TimingSimulationConfig
00279     {
00280                 public:
00281 
00285                         TimingSimulationConfig(const std::string& timingSimulationConfigFile);
00286 
00290             ~TimingSimulationConfig();
00291 
00295             std::string timingSimulationConfigFile_;
00296 
00300             long basicPeriodLengthMs_;
00301 
00305             int superCycleRepetition_;
00306 
00310             std::vector<DomainConfig*> timingDomainCol_;
00311     };
00312 }
00313 
00314 #endif /* TIMING_SIMULATION_STRUCTURES_H_ */

Generated on 25 Jan 2013 for fesa-core-gsi by  doxygen 1.6.1