SimGrid  3.12
Versatile Simulation of Distributed Systems
Links

Functions for managing the network links. More...

Functions

const SD_link_tSD_link_get_list (void)
 Returns the link list. More...
 
static int SD_link_get_number (void)
 Returns the number of links in the whole platform.
 
static void * SD_link_get_data (SD_link_t link)
 Returns the user data of a link.
 
static void SD_link_set_data (SD_link_t link, void *data)
 Sets the user data of a link. More...
 
static const char * SD_link_get_name (SD_link_t link)
 Returns the name of a link.
 
static double SD_link_get_current_bandwidth (SD_link_t link)
 Returns the current bandwidth of a link (in bytes per second)
 
static double SD_link_get_current_latency (SD_link_t link)
 Returns the current latency of a link (in seconds)
 
static int SD_link_is_shared (SD_link_t link)
 Returns the sharing policy of this workstation. More...
 

Detailed Description

Functions for managing the network links.

This section describes the functions for managing the network links.

A link is a network node represented as a name, a current bandwidth and a current latency. The links are created when you call the function SD_create_environment.

See also
SD_link_t

Function Documentation

const SD_link_t* SD_link_get_list ( void  )

Returns the link list.

Use SD_link_get_number() to know the array size.

Returns
an array of SD_link_t containing all links
See also
SD_link_get_number()
static void SD_link_set_data ( SD_link_t  link,
void *  data 
)
inlinestatic

Sets the user data of a link.

The new data can be NULL. The old data should have been freed first if it was not NULL.

static int SD_link_is_shared ( SD_link_t  link)
inlinestatic

Returns the sharing policy of this workstation.

Returns
true if the link is shared, and false if it's a fatpipe