TTEthernet Model for INET Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
HelperFunctions.h
Go to the documentation of this file.
1 /*
2  * HelperFunctions.h
3  *
4  * Created on: Dec 7, 2011
5  * Author: tillsteinbach
6  */
7 
8 #ifndef HELPERFUNCTIONS_H_
9 #define HELPERFUNCTIONS_H_
10 
11 #include <string>
12 #include <vector>
13 
14 #include "cpar.h"
15 #include "cgate.h"
16 
25 std::vector<std::string>& split(const std::string &string, char delimiter, std::vector<std::string> &elements);
26 
35 std::string& replaceAll(std::string &string, std::string toFind, std::string replacement);
36 
43 void addPath(cPar &parameter, std::string &pathToAdd);
44 
51 cGate* gateByFullPath(std::string &path);
52 
60 uint64_t ticksToTransparentClock(uint64_t ticks, simtime_t tick);
61 
68 uint64_t secondsToTransparentClock(simtime_t seconds);
69 
77 uint64_t transparentClockToTicks(uint64_t transparentClock, simtime_t tick);
78 
79 #endif /* HELPERFUNCTIONS_H_ */