SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::surf::LinkL07 Class Reference

#include <ptask_L07.hpp>

Inheritance diagram for simgrid::surf::LinkL07:
simgrid::surf::LinkImpl simgrid::surf::Resource simgrid::surf::PropertyHolder

Public Member Functions

 LinkL07 (NetworkL07Model *model, const std::string &name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy)
 
 ~LinkL07 () override
 
bool isUsed () override
 Check if the Link is used. More...
 
void apply_event (tmgr_trace_event_t event, double value) override
 Apply an event of external load event to that resource. More...
 
void setBandwidth (double value) override
 Update the bandwidth in bytes per second of current Link. More...
 
void setLatency (double value) override
 Update the latency in seconds of current Link. More...
 
- Public Member Functions inherited from simgrid::surf::LinkImpl
void destroy ()
 Fire the required callbacks and destroy the object. More...
 
virtual double bandwidth ()
 Get the bandwidth in bytes per second of current Link. More...
 
virtual double latency ()
 Get the latency in seconds of current Link. More...
 
virtual int sharingPolicy ()
 The sharing policy is alink e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX) 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)
 
voidgetData ()
 
void setData (void *d)
 
- Public Member Functions inherited from simgrid::surf::Resource
 Resource (Model *model, const std::string &name, lmm_constraint_t constraint)
 Constructor of LMM Resources. More...
 
virtual ~Resource ()
 
Modelmodel () const
 Get the Model of the current Resource. More...
 
const std::stringgetName () const
 Get the name of the current Resource. More...
 
const char * getCname () const
 Get the name of the current Resource. More...
 
bool operator== (const Resource &other) const
 
virtual double getLoad ()
 returns the current load (in flops per second, byte per second or similar) 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 constraint () 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 ()=default
 
 ~PropertyHolder ()
 
const char * getProperty (std::string key)
 Return the property associated to the provided key (or nullptr if not existing) More...
 
void setProperty (std::string id, std::string value)
 Change the value of a given key in the property set. More...
 
std::map< std::string, std::string > * getProperties ()
 Return the whole set of properties. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from simgrid::surf::LinkImpl
static LinkImplbyName (std::string name)
 
static int linksCount ()
 Returns the amount of links in the platform. More...
 
static LinkImpl ** linksList ()
 Returns a list of all existing links. More...
 
static void linksList (std::vector< s4u::Link *> *linkList)
 
static void linksExit ()
 destructor of the static data More...
 
- Public Attributes inherited from simgrid::surf::LinkImpl
s4u::Link piface_
 Public interface. More...
 
tmgr_trace_event_t stateEvent_ = nullptr
 
s_surf_metric_t latency_ = {1.0, 0, nullptr}
 
s_surf_metric_t bandwidth_ = {1.0, 0, nullptr}
 
- Protected Member Functions inherited from simgrid::surf::LinkImpl
 LinkImpl (simgrid::surf::NetworkModel *model, const std::string &name, lmm_constraint_t constraint)
 
 ~LinkImpl () override
 use destroy() instead of this destructor More...
 
- Protected Attributes inherited from simgrid::surf::Resource
const lmm_constraint_t constraint_ = nullptr
 

Constructor & Destructor Documentation

◆ LinkL07()

simgrid::surf::LinkL07::LinkL07 ( NetworkL07Model model,
const std::string name,
double  bandwidth,
double  latency,
e_surf_link_sharing_policy_t  policy 
)

◆ ~LinkL07()

simgrid::surf::LinkL07::~LinkL07 ( )
overridedefault

Member Function Documentation

◆ isUsed()

bool simgrid::surf::LinkL07::isUsed ( )
overridevirtual

Check if the Link is used.

Reimplemented from simgrid::surf::LinkImpl.

◆ apply_event()

void simgrid::surf::LinkL07::apply_event ( tmgr_trace_event_t  event,
double  value 
)
overridevirtual

Apply an event of external load event to that resource.

Parameters
eventWhat happened
value[TODO]

Implements simgrid::surf::Resource.

◆ setBandwidth()

void simgrid::surf::LinkL07::setBandwidth ( double  value)
overridevirtual

Update the bandwidth in bytes per second of current Link.

Implements simgrid::surf::LinkImpl.

◆ setLatency()

void simgrid::surf::LinkL07::setLatency ( double  value)
overridevirtual

Update the latency in seconds of current Link.

Implements simgrid::surf::LinkImpl.


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