SimGrid  3.11
Versatile Simulation of Distributed Systems
NetworkLink Class Referenceabstract

SURF network link interface class. More...

#include <network_interface.hpp>

Inheritance diagram for NetworkLink:
Resource

Public Member Functions

 NetworkLink (NetworkModelPtr model, const char *name, xbt_dict_t props)
 NetworkLink constructor. More...
 
 NetworkLink (NetworkModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, tmgr_history_t history, tmgr_trace_t state_trace)
 NetworkLink constructor. More...
 
 ~NetworkLink ()
 NetworkLink destructor.
 
virtual double getBandwidth ()
 Get the bandwidth in bytes per second of current NetworkLink. More...
 
virtual void updateBandwidth (double value, double date=surf_get_clock())=0
 Update the bandwidth in bytes per second of current NetworkLink.
 
virtual double getLatency ()
 Get the latency in seconds of current NetworkLink. More...
 
virtual void updateLatency (double value, double date=surf_get_clock())=0
 Update the latency in seconds of current NetworkLink.
 
virtual bool isShared ()
 Check if the NetworkLink is shared. More...
 
bool isUsed ()
 Check if the NetworkLink is used. More...
 
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 (ModelPtr model, const char *name, xbt_dict_t props)
 Resource constructor. More...
 
 Resource (ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint)
 Resource constructor. More...
 
 Resource (ModelPtr model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit)
 Resource constructor. More...
 
virtual ~Resource ()
 Resource destructor.
 
ModelPtr getModel ()
 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...
 

Detailed Description

SURF network link interface class.

A NetworkLink represent the link between two Workstations

Constructor & Destructor Documentation

NetworkLink::NetworkLink ( NetworkModelPtr  model,
const char *  name,
xbt_dict_t  props 
)

NetworkLink constructor.

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

NetworkLink constructor.

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

Member Function Documentation

double NetworkLink::getBandwidth ( )
virtual

Get the bandwidth in bytes per second of current NetworkLink.

Returns
The bandwith in bytes per second of the current NetworkLink
double NetworkLink::getLatency ( )
virtual

Get the latency in seconds of current NetworkLink.

Returns
The latency in seconds of the current NetworkLink
bool NetworkLink::isShared ( )
virtual

Check if the NetworkLink is shared.

[long description]

Returns
true if the current NetwokrLink is shared, false otherwise
bool NetworkLink::isUsed ( )
virtual

Check if the NetworkLink is used.

Returns
true if the current NetwokrLink is used, false otherwise

Implements Resource.

void NetworkLink::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: