SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::s4u::Link Class Reference

Detailed Description

A Link represents the network facilities between hosts.

#include <Link.hpp>

Inheritance diagram for simgrid::s4u::Link:
simgrid::xbt::Extendable< Link >

Public Member Functions

const std::string & getName () const
 Retrieves the name of that link as a C++ string. More...
 
const char * getCname () const
 Retrieves the name of that link as a C string. More...
 
double bandwidth ()
 Get the bandwidth in bytes per second of current Link. More...
 
double latency ()
 Get the latency in seconds of current Link. More...
 
- Public Member Functions inherited from simgrid::xbt::Extendable< Link >
 Extendable ()
 
 ~Extendable ()
 
void * extension (std::size_t rank)
 
U * extension (Extension< Link, U > rank)
 
U * extension ()
 
void extension_set (std::size_t rank, void *value, bool use_dtor=true)
 
void extension_set (Extension< Link, U > rank, U *value, bool use_dtor=true)
 
void extension_set (U *p)
 

Static Public Member Functions

static Link * byName (const char *name)
 Retrieve a link from its name. More...
 
- Static Public Member Functions inherited from simgrid::xbt::Extendable< Link >
static size_t extension_create (void(*deleter)(void *))
 
static Extension< Link, U > extension_create (void(*deleter)(void *))
 
static Extension< Link, U > extension_create ()
 
static simgrid::xbt::signal< void(s4u::Link &)> onCreation
 Callback signal fired when a new Link is created. More...
 
static simgrid::xbt::signal< void(s4u::Link &)> onDestruction
 Callback signal fired when a Link is destroyed. More...
 
static simgrid::xbt::signal< void(s4u::Link &)> onStateChange
 Callback signal fired when the state of a Link changes (when it is turned on or off) More...
 
static simgrid::xbt::signal< void(surf::NetworkAction *, s4u::Host *src, s4u::Host *dst)> onCommunicate
 Callback signal fired when a communication starts. More...
 
static simgrid::xbt::signal< void(surf::NetworkAction *)> onCommunicationStateChange
 Callback signal fired when a communication changes it state (ready/done/cancel) More...
 
int sharingPolicy ()
 The sharing policy is alink e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX) More...
 
double getUsage ()
 Returns the current load (in flops per second) More...
 
bool isUsed ()
 Check if the Link is used. More...
 
void turnOn ()
 
void turnOff ()
 
void * getData ()
 
void setData (void *d)
 
void setStateTrace (tmgr_trace_t trace)
 
void setBandwidthTrace (tmgr_trace_t trace)
 
void setLatencyTrace (tmgr_trace_t trace)
 
const char * getProperty (const char *key)
 
void setProperty (std::string key, std::string value)
 
 XBT_ATTRIB_DEPRECATED_v321 ("Use getCname(): v3.21 will turn this warning into an error.") const char *name()
 

Member Function Documentation

◆ byName()

Link * simgrid::s4u::Link::byName ( const char *  name)
static

Retrieve a link from its name.

◆ getName()

const std::string & simgrid::s4u::Link::getName ( ) const

Retrieves the name of that link as a C++ string.

◆ getCname()

const char * simgrid::s4u::Link::getCname ( ) const

Retrieves the name of that link as a C string.

◆ bandwidth()

double simgrid::s4u::Link::bandwidth ( )

Get the bandwidth in bytes per second of current Link.

◆ latency()

double simgrid::s4u::Link::latency ( )

Get the latency in seconds of current Link.

◆ sharingPolicy()

int simgrid::s4u::Link::sharingPolicy ( )

The sharing policy is alink e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX)

◆ getUsage()

double simgrid::s4u::Link::getUsage ( )

Returns the current load (in flops per second)

◆ isUsed()

bool simgrid::s4u::Link::isUsed ( )

Check if the Link is used.

◆ turnOn()

void simgrid::s4u::Link::turnOn ( )

◆ turnOff()

void simgrid::s4u::Link::turnOff ( )

◆ getData()

void * simgrid::s4u::Link::getData ( )

◆ setData()

void simgrid::s4u::Link::setData ( void *  d)

◆ setStateTrace()

void simgrid::s4u::Link::setStateTrace ( tmgr_trace_t  trace)

◆ setBandwidthTrace()

void simgrid::s4u::Link::setBandwidthTrace ( tmgr_trace_t  trace)

◆ setLatencyTrace()

void simgrid::s4u::Link::setLatencyTrace ( tmgr_trace_t  trace)

◆ getProperty()

const char * simgrid::s4u::Link::getProperty ( const char *  key)

◆ setProperty()

void simgrid::s4u::Link::setProperty ( std::string  key,
std::string  value 
)

◆ XBT_ATTRIB_DEPRECATED_v321()

simgrid::s4u::Link::XBT_ATTRIB_DEPRECATED_v321 ( "Use getCname(): v3.21 will turn this warning into an error."  ) const

Member Data Documentation

◆ onCreation

simgrid::xbt::signal< void(s4u::Link &)> simgrid::s4u::Link::onCreation
static

Callback signal fired when a new Link is created.

◆ onDestruction

simgrid::xbt::signal< void(s4u::Link &)> simgrid::s4u::Link::onDestruction
static

Callback signal fired when a Link is destroyed.

◆ onStateChange

simgrid::xbt::signal< void(s4u::Link &)> simgrid::s4u::Link::onStateChange
static

Callback signal fired when the state of a Link changes (when it is turned on or off)

◆ onCommunicate

simgrid::xbt::signal< void(surf::NetworkAction *, s4u::Host *src, s4u::Host *dst)> simgrid::s4u::Link::onCommunicate
static

Callback signal fired when a communication starts.

◆ onCommunicationStateChange

simgrid::xbt::signal< void(surf::NetworkAction *)> simgrid::s4u::Link::onCommunicationStateChange
static

Callback signal fired when a communication changes it state (ready/done/cancel)


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