ConfigurationUtils.h

Go to the documentation of this file.
00001 /*
00002  * ConfigurationUtils.h
00003  *
00004  *  Created on: Feb 8, 2011
00005  *      Author: tillsteinbach
00006  */
00007 
00008 #ifndef CONFIGURATIONUTILS_H_
00009 #define CONFIGURATIONUTILS_H_
00010 
00011 #include <omnetpp.h>
00012 #include <ecorecpp.hpp>
00013 
00014 #include <System_Specification.hpp>
00015 #include <Network_Configuration.hpp>
00016 #include <Device_Target_Mapping.hpp>
00017 #include <Device_Specification.hpp>
00018 #include <Device_Targets.hpp>
00019 #include <Protocol_Definition.hpp>
00020 #include <IP_Configuration.hpp>
00021 #include <Virtuallink_Map.hpp>
00022 
00023 #include <list>
00024 
00025 using namespace std;
00026 
00027 using namespace Network_Configuration;
00028 using namespace System_Specification;
00029 using namespace Device_Target_Mapping;
00030 using namespace Device_Specification;
00031 using namespace Device_Targets;
00032 using namespace Protocol_Definition;
00033 using namespace IP_Configuration;
00034 using namespace Virtuallink_Map;
00035 using namespace ecore;
00036 using namespace ecorecpp;
00037 using namespace ecorecpp::mapping;
00038 
00044 class ConfigurationUtils
00045 {
00046 
00047     public:
00053         static ecorecpp::MetaModelRepository_ptr getPreloadedMMR();
00054 
00060         static void resolveCommonAliases(ecorecpp::ModelRepository_ptr mr);
00061 
00062         //Conversion Utils
00063 
00070         static long mac2long(std::string string);
00079         static unsigned long time2ticks(std::string string, double tick);
00080 
00087         static double freq2s(std::string string);
00088 
00089         //Find Utils
00097         static Device_Specification::DeviceSpecification_ptr getDeviceSpecification(std::string device_name,
00098                 Network_Configuration::NetworkConfig_ptr nc);
00099 
00107         static int getPortSerialNumber(System_Specification::Port_ptr port, Device_Target_Mapping::Mappings_ptr map);
00108 
00116         static string getPortName(System_Specification::Port_ptr port, Device_Target_Mapping::Mappings_ptr map);
00117 
00125         static int getVLid(System_Specification::VirtualLink_ptr vl, Device_Target_Mapping::Mappings_ptr map);
00126 
00134         static System_Specification::VirtualLink_ptr getVLfromVLid(int vlid, Device_Target_Mapping::Mappings_ptr map);
00135 };
00136 
00137 #endif /* CONFIGURATIONUTILS_H_ */
Generated on Wed Dec 7 11:24:06 2011 for TTEthernet Model for INET Framework by  doxygen 1.6.3