|
SimGrid
3.13
Versatile Simulation of Distributed Systems
|
SURF network link interface class. More...
#include <network_interface.hpp>
Public Member Functions | |
| Link (simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props) | |
| Constructor of non-LMM links. More... | |
| Link (simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint) | |
| Constructor of LMM links. More... | |
| void | destroy () |
| Fire the require callbacks and destroy the object. More... | |
| virtual double | getBandwidth () |
| Get the bandwidth in bytes per second of current Link. More... | |
| virtual void | updateBandwidth (double value)=0 |
| Update the bandwidth in bytes per second of current Link. More... | |
| virtual double | getLatency () |
| Get the latency in seconds of current Link. More... | |
| virtual void | updateLatency (double value)=0 |
| Update the latency in seconds of current Link. More... | |
Public Member Functions inherited from simgrid::surf::Resource | |
| Resource (Model *model, const char *name) | |
| Constructor of non-LMM Resources. More... | |
| Resource (Model *model, const char *name, lmm_constraint_t constraint) | |
| Constructor of LMM Resources. More... | |
| virtual | ~Resource () |
| Model * | getModel () const |
| Get the Model of the current Resource. More... | |
| const char * | getName () const |
| Get the name of the current Resource. More... | |
| bool | operator== (const Resource &other) const |
| virtual void | apply_event (tmgr_trace_iterator_t event, double value)=0 |
| Apply an event of external load event to that resource. More... | |
| virtual bool | isOn () const |
| Check if the current Resource is active. More... | |
| virtual bool | isOff () const |
| Check if the current Resource is shut down. More... | |
| lmm_constraint_t | getConstraint () const |
| Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) More... | |
Public Member Functions inherited from simgrid::surf::PropertyHolder | |
| PropertyHolder (xbt_dict_t props) | |
| ~PropertyHolder () | |
| const char * | getProperty (const char *id) |
| Return the property associated to the provided key (or NULL if not existing) More... | |
| void | setProperty (const char *id, const char *value) |
| Change the value of a given key in the property set. More... | |
| xbt_dict_t | getProperties () |
| Return the whole set of properties. More... | |
Static Public Attributes | |
| static simgrid::xbt::signal< void(simgrid::surf::Link *)> | onCreation |
| Callback signal fired when a new Link is created. More... | |
| static simgrid::xbt::signal< void(simgrid::surf::Link *)> | onDestruction |
| Callback signal fired when a Link is destroyed. More... | |
| static simgrid::xbt::signal< void(simgrid::surf::Link *)> | onStateChange |
Callback signal fired when the state of a Link changes (when it is turned on or off) Signature: void(Link*) More... | |
| static simgrid::xbt::signal< void(simgrid::surf::NetworkAction *, simgrid::surf::NetCard *src, simgrid::surf::NetCard *dst)> | onCommunicate |
Callback signal fired when a communication starts Signature: void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst) More... | |
Protected Member Functions | |
| ~Link () | |
| use destroy() instead of this destructor More... | |
| tmgr_trace_iterator_t | m_stateEvent = NULL |
| s_surf_metric_t | m_latency = {1.0,0,NULL} |
| s_surf_metric_t | m_bandwidth = {1.0,0,NULL} |
| virtual int | sharingPolicy () |
| The sharing policy is alink e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX) More... | |
| bool | isUsed () override |
| Check if the Link is used. More... | |
| void | turnOn () override |
| Turn on the current Resource. More... | |
| void | turnOff () override |
| Turn off the current Resource. More... | |
| virtual void | setStateTrace (tmgr_trace_t trace) |
| virtual void | setBandwidthTrace (tmgr_trace_t trace) |
| virtual void | setLatencyTrace (tmgr_trace_t trace) |
| void * | getData () |
| void | setData (void *d) |
| static Link * | byName (const char *name) |
| static int | linksCount () |
| Returns the amount of links in the platform. More... | |
| static Link ** | linksList () |
| Returns a list of all existing links. More... | |
| static void | linksExit () |
| destructor of the static data More... | |
Additional Inherited Members | |
Protected Attributes inherited from simgrid::surf::Resource | |
| lmm_constraint_t | constraint_ = nullptr |
SURF network link interface class.
A Link represents the link between two hosts
| simgrid::surf::Link::Link | ( | simgrid::surf::NetworkModel * | model, |
| const char * | name, | ||
| xbt_dict_t | props | ||
| ) |
Constructor of non-LMM links.
| simgrid::surf::Link::Link | ( | simgrid::surf::NetworkModel * | model, |
| const char * | name, | ||
| xbt_dict_t | props, | ||
| lmm_constraint_t | constraint | ||
| ) |
Constructor of LMM links.
|
protected |
use destroy() instead of this destructor
| void simgrid::surf::Link::destroy | ( | ) |
|
virtual |
Get the bandwidth in bytes per second of current Link.
|
pure virtual |
Update the bandwidth in bytes per second of current Link.
Implemented in simgrid::surf::LinkL07, simgrid::surf::NetworkCm02Link, and simgrid::surf::LinkNS3.
|
virtual |
Get the latency in seconds of current Link.
|
pure virtual |
Update the latency in seconds of current Link.
Implemented in simgrid::surf::LinkL07, simgrid::surf::NetworkCm02Link, and simgrid::surf::LinkNS3.
|
virtual |
The sharing policy is alink e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX)
|
overridevirtual |
Check if the Link is used.
Implements simgrid::surf::Resource.
Reimplemented in simgrid::surf::LinkL07.
|
overridevirtual |
Turn on the current Resource.
Reimplemented from simgrid::surf::Resource.
|
overridevirtual |
Turn off the current Resource.
Reimplemented from simgrid::surf::Resource.
|
virtual |
|
virtual |
Reimplemented in simgrid::surf::LinkNS3.
|
virtual |
Reimplemented in simgrid::surf::LinkNS3.
|
inline |
|
static |
|
static |
Returns the amount of links in the platform.
|
static |
Returns a list of all existing links.
|
static |
destructor of the static data
|
static |
Callback signal fired when a new Link is created.
Signature: void(Link*)
|
static |
Callback signal fired when a Link is destroyed.
Signature: void(Link*)
|
static |
Callback signal fired when the state of a Link changes (when it is turned on or off) Signature: void(Link*)
|
static |
Callback signal fired when a communication starts Signature: void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)
| tmgr_trace_iterator_t simgrid::surf::Link::m_stateEvent = NULL |
| s_surf_metric_t simgrid::surf::Link::m_latency = {1.0,0,NULL} |
| s_surf_metric_t simgrid::surf::Link::m_bandwidth = {1.0,0,NULL} |