SimGrid  3.12
Versatile Simulation of Distributed Systems
Link Class Referenceabstract

SURF network link interface class. More...

#include <network_interface.hpp>

Inheritance diagram for Link:
Resource

Public Member Functions

 Link (NetworkModel *model, const char *name, xbt_dict_t props)
 Link constructor. More...
 
 Link (NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, tmgr_history_t history, tmgr_trace_t state_trace)
 Link constructor. More...
 
 ~Link ()
 Link destructor.
 
virtual double getBandwidth ()
 Get the bandwidth in bytes per second of current Link.
 
virtual void updateBandwidth (double value, double date=surf_get_clock())=0
 Update the bandwidth in bytes per second of current Link.
 
virtual double getLatency ()
 Get the latency in seconds of current Link.
 
virtual void updateLatency (double value, double date=surf_get_clock())=0
 Update the latency in seconds of current Link.
 
virtual bool isShared ()
 Check if the Link is shared. More...
 
bool isUsed ()
 Check if the Link is used.
 
void setState (e_surf_resource_state_t state)
 Set the state of the current Resource. More...
 
- Public Member Functions inherited from Resource
 Resource ()
 Resource constructor.
 
 Resource (Model *model, const char *name, xbt_dict_t props)
 Resource constructor. More...
 
 Resource (Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint)
 Resource constructor. More...
 
 Resource (Model *model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit)
 Resource constructor. More...
 
virtual ~Resource ()
 Resource destructor.
 
ModelgetModel ()
 Get the Model of the current Resource. More...
 
const char * getName ()
 Get the name of the current Resource. More...
 
virtual xbt_dict_t getProperties ()
 Get the properties of the current Resource. More...
 
virtual void updateState (tmgr_trace_event_t event_type, double value, double date)=0
 Update the state of the current Resource. More...
 
bool isOn ()
 Check if the current Resource is active. More...
 
void turnOn ()
 Turn on the current Resource.
 
void turnOff ()
 Turn off the current Resource.
 
virtual e_surf_resource_state_t getState ()
 Get the state of the current Resource. More...
 
lmm_constraint_t getConstraint ()
 Get the lmm constraint associated to this Resource if it is part of a LMM component. More...
 

Static Public Member Functions

static int linksAmount ()
 Returns the amount of links in the platform.
 
static Link ** linksList ()
 Returns a list of all existing links.
 
static void linksExit ()
 destructor of the static data
 

Detailed Description

SURF network link interface class.

A Link represents the link between two hosts

Constructor & Destructor Documentation

Link::Link ( NetworkModel model,
const char *  name,
xbt_dict_t  props 
)

Link constructor.

Parameters
modelThe NetworkModel associated to this Link
nameThe name of the Link
propsDictionary of properties associated to this Link
Link::Link ( NetworkModel model,
const char *  name,
xbt_dict_t  props,
lmm_constraint_t  constraint,
tmgr_history_t  history,
tmgr_trace_t  state_trace 
)

Link constructor.

Parameters
modelThe NetworkModel associated to this Link
nameThe name of the Link
propsDictionary of properties associated to this Link
constraintThe lmm constraint associated to this Cpu if it is part of a LMM component
history[TODO]
state_trace[TODO]

Member Function Documentation

bool Link::isShared ( )
virtual

Check if the Link is shared.

Returns
true if the current NetwokrLink is shared, false otherwise
void Link::setState ( e_surf_resource_state_t  state)
virtual

Set the state of the current Resource.

Parameters
stateThe new state of the current Resource

Reimplemented from Resource.


The documentation for this class was generated from the following files: