.. automethod:: simgrid.Mailbox.by_name
Querying info
-.............
+-------------
.. tabs::
.. autoattribute:: simgrid.Mailbox.name
Sending data
-............
+------------
.. tabs::
Receiving data
-..............
+--------------
.. tabs::
.. autodoxymethod:: sg_mailbox_listen(const char *alias)
Receiving actor
-...............
+---------------
See :ref:`s4u_receiving_actor`.
class Disk
=============
-.. doxygenclass:: simgrid::s4u::Disk
- :members:
- :protected-members:
- :undoc-members:
+.. autodoxyclass:: simgrid::s4u::Disk
+Basic management
+----------------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. code-block:: C++
+
+ #include <simgrid/s4u/Disk.hpp>
+
+ Note that there is no DiskPtr type, and that you cannot use the RAII
+ idiom on disks because SimGrid does not allow (yet) to create nor
+ destroy resources once the simulation is started.
+
+
+Querying info
+-------------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. autodoxymethod:: simgrid::s4u::Disk::get_cname()
+ .. autodoxymethod:: simgrid::s4u::Disk::get_host()
+ .. autodoxymethod:: simgrid::s4u::Disk::get_name()
+ .. autodoxymethod:: simgrid::s4u::Disk::get_properties()
+ .. autodoxymethod:: simgrid::s4u::Disk::get_property(const std::string &key)
+ .. autodoxymethod:: simgrid::s4u::Disk::get_read_bandwidth()
+ .. autodoxymethod:: simgrid::s4u::Disk::get_write_bandwidth()
+ .. autodoxymethod:: simgrid::s4u::Disk::set_property(const std::string &, const std::string &value)
+
+I/O operations
+--------------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. autodoxymethod:: simgrid::s4u::Disk::io_init(sg_size_t size, s4u::Io::OpType type)
+ .. autodoxymethod:: simgrid::s4u::Disk::read(sg_size_t size)
+ .. autodoxymethod:: simgrid::s4u::Disk::read_async(sg_size_t size)
+ .. autodoxymethod:: simgrid::s4u::Disk::write(sg_size_t size)
+ .. autodoxymethod:: simgrid::s4u::Disk::write_async(sg_size_t size)
+
+Signals
+-------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. autodoxyvar:: simgrid::s4u::Disk::on_creation
+ .. autodoxyvar:: simgrid::s4u::Disk::on_destruction
+ .. autodoxyvar:: simgrid::s4u::Disk::on_state_change
.. _API_s4u_Host:
The Python API is automatically generated with pybind11. It closely mimicks the C++
API, to which you should refer for more information.
-==========
-this_actor
-==========
-
-.. automodule:: simgrid.this_actor
- :members:
-
==========
Class Comm
==========
friend kernel::resource::DiskImpl;
protected:
+#ifndef DOXYGEN
virtual ~Disk() = default;
+#endif
public:
+#ifndef DOXYGEN
explicit Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name) {}
+#endif
/** @brief Callback signal fired when a new Disk is created */
static xbt::signal<void(Disk&)> on_creation;
IoPtr write_async(sg_size_t size);
sg_size_t write(sg_size_t size);
+#ifndef DOXYGEN
kernel::resource::DiskImpl* get_impl() const { return pimpl_; }
+#endif
};
} // namespace s4u