From 0a63e497ca28d2176a61304e62050790cbda853c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 26 Aug 2020 10:00:41 +0200 Subject: [PATCH] Add some s4u::Link setters, and doc improvements --- docs/source/app_s4u.rst | 12 +++++++++++- examples/README.rst | 2 +- include/simgrid/s4u/Link.hpp | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/source/app_s4u.rst b/docs/source/app_s4u.rst index 4fd78f76b0..eaf51ddf78 100644 --- a/docs/source/app_s4u.rst +++ b/docs/source/app_s4u.rst @@ -1365,6 +1365,16 @@ Querying info .. autodoxymethod:: sg_link_latency(const_sg_link_t link) .. autodoxymethod:: sg_link_name(const_sg_link_t link) +Modifying characteristics +------------------------- + +.. tabs:: + + .. group-tab:: C++ + + .. autodoxymethod:: simgrid::s4u::Link::set_bandwidth(double value) + .. autodoxymethod:: simgrid::s4u::Link::set_latency(double value) + User data and properties ------------------------ @@ -1413,7 +1423,7 @@ WIFI links .. group-tab:: C++ - .. autodoxymethod:: simgrid::s4u::Link::set_host_wifi_rate(s4u::Host* host, int level) + .. autodoxymethod:: simgrid::s4u::Link::set_host_wifi_rate(const s4u::Host* host, int level) const Signals ------- diff --git a/examples/README.rst b/examples/README.rst index 7a4d9fdca7..32222e3a82 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -147,7 +147,7 @@ Starting and Stopping Actors - **Specify the stack size to use** The stack size can be specified by default on the command line, - globally by changing the configuration with :cpp:func:`simgrid::s4u::Engine::set_config(std::string)`, + globally by changing the configuration with :cpp:func:`simgrid::s4u::Engine::set_config`, or for a specific actor using :cpp:func:`simgrid::s4u::Actor::set_stacksize` before its start. .. tabs:: diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp index 6dbf49e3c8..11212f9526 100644 --- a/include/simgrid/s4u/Link.hpp +++ b/include/simgrid/s4u/Link.hpp @@ -52,12 +52,14 @@ public: /** @brief Retrieves the name of that link as a C string */ const char* get_cname() const; - /** @brief Get the bandwidth in bytes per second of current Link */ + /** Get the bandwidth of the current Link (in bytes per second) */ double get_bandwidth() const; + /** Set the bandwidth of the current Link (in bytes per second) */ void set_bandwidth(double value); - /** @brief Get the latency in seconds of current Link */ + /** Get the latency of the current Link (in seconds) */ double get_latency() const; + /** Set the latency of the current Link (in seconds) */ void set_latency(double value); /** @brief Describes how the link is shared between flows */ -- 2.20.1