TTEthernet Model for INET Framework
|
Go to the source code of this file.
Functions | |
std::vector< std::string > & | split (const std::string &string, char delimiter, std::vector< std::string > &elements) |
Splits a string into a vector of strings by using the delimiter character as separator. More... | |
std::string & | replaceAll (std::string &string, std::string toFind, std::string replacement) |
Replaces all occurrences of a string by another string. More... | |
void | addPath (cPar ¶meter, std::string &pathToAdd) |
Adds a path to a parameter that contains paths to elements. More... | |
cGate * | gateByFullPath (std::string &path) |
Returns the gate defined by an object path. More... | |
uint64_t | ticksToTransparentClock (uint64_t ticks, simtime_t tick) |
Converts value in ticks to the transparent clock unit that is ns*0x10000. More... | |
uint64_t | secondsToTransparentClock (simtime_t seconds) |
Converts value in seconds to the transparent clock unit that is ns*0x10000. More... | |
uint64_t | transparentClockToTicks (uint64_t transparentClock, simtime_t tick) |
Converts value in the transparent clock unit that is ns*0x10000 to ticks. More... | |
void addPath | ( | cPar & | parameter, |
std::string & | pathToAdd | ||
) |
Adds a path to a parameter that contains paths to elements.
parameter | the parameter object that contains the paths |
pathToAdd | a string with the path that should be added to the parameter |
Definition at line 35 of file HelperFunctions.cc.
cGate* gateByFullPath | ( | std::string & | path | ) |
Returns the gate defined by an object path.
path | the path to the gate |
Definition at line 43 of file HelperFunctions.cc.
Referenced by TTEthernetModel::Buffer::handleParameterChange().
std::string& replaceAll | ( | std::string & | string, |
std::string | toFind, | ||
std::string | replacement | ||
) |
Replaces all occurrences of a string by another string.
string | the input string where the substrings are replaced |
toFind | the substring that should be replaced |
replacement | the string that replaces the toFind string |
Definition at line 26 of file HelperFunctions.cc.
uint64_t secondsToTransparentClock | ( | simtime_t | seconds | ) |
Converts value in seconds to the transparent clock unit that is ns*0x10000.
seconds | number of seconds to convert |
Definition at line 60 of file HelperFunctions.cc.
Referenced by TTEthernetModel::TTEOutput::setTransparentClock(), ticksToTransparentClock(), and transparentClockToTicks().
std::vector<std::string>& split | ( | const std::string & | string, |
char | delimiter, | ||
std::vector< std::string > & | elements | ||
) |
Splits a string into a vector of strings by using the delimiter character as separator.
string | the input string that is splitted |
delimiter | the character that is used to split the string |
elements | the vector in which the splitted strings are added |
Definition at line 13 of file HelperFunctions.cc.
Referenced by TTEthernetModel::TTEOutput::handleParameterChange(), TTEthernetModel::TTEApplicationBase::handleParameterChange(), TTEthernetModel::Buffer::handleParameterChange(), and TTEthernetModel::TTEInput::handleParameterChange().
uint64_t ticksToTransparentClock | ( | uint64_t | ticks, |
simtime_t | tick | ||
) |
Converts value in ticks to the transparent clock unit that is ns*0x10000.
ticks | number of ticks |
tick | length of one tick in seconds |
Definition at line 56 of file HelperFunctions.cc.
Referenced by TTEthernetModel::TTEOutput::setTransparentClock().
uint64_t transparentClockToTicks | ( | uint64_t | transparentClock, |
simtime_t | tick | ||
) |
Converts value in the transparent clock unit that is ns*0x10000 to ticks.
transparentClock | value in transparentClock |
tick | length of one tick in seconds |
Definition at line 64 of file HelperFunctions.cc.