|
SimGrid
3.18
Versatile Simulation of Distributed Systems
|
Activities.
This class is the ancestor of every activities that an actor can undertake, that is, of the actions that do take time in the simulated world.
#include <Activity.hpp>
Public Member Functions | |
| Activity (Activity const &)=delete | |
| Activity & | operator= (Activity const &)=delete |
| virtual Activity * | start ()=0 |
| Starts a previously created activity. More... | |
| virtual Activity * | wait ()=0 |
| Tests whether the given activity is terminated yet. More... | |
| virtual Activity * | wait (double timeout)=0 |
| Blocks until the activity is terminated, or until the timeout is elapsed Raises: timeout exception. More... | |
| e_s4u_activity_state_t | getState () |
| Cancel that activity. More... | |
| virtual double | getRemains () |
| Get the remaining amount of work that this Activity entails. More... | |
| Activity * | setRemains (double remains) |
| Set the [remaining] amount of work that this Activity will entail. More... | |
| Activity * | setUserData (void *data) |
| Put some user data onto the Activity. More... | |
| void * | getUserData () |
| Retrieve the user data of the Activity. More... | |
Protected Member Functions | |
| Activity ()=default | |
| virtual | ~Activity ()=default |
Friends | |
| void | intrusive_ptr_release (Comm *c) |
| void | intrusive_ptr_add_ref (Comm *c) |
| void | intrusive_ptr_release (Exec *e) |
| void | intrusive_ptr_add_ref (Exec *e) |
|
protecteddefault |
|
protectedvirtualdefault |
|
delete |
|
pure virtual |
Starts a previously created activity.
This function is optional: you can call wait() even if you didn't call start()
Implemented in simgrid::s4u::Comm, and simgrid::s4u::Exec.
|
pure virtual |
Tests whether the given activity is terminated yet.
This is a pure function. Blocks until the activity is terminated
Implemented in simgrid::s4u::Comm, and simgrid::s4u::Exec.
|
pure virtual |
Blocks until the activity is terminated, or until the timeout is elapsed Raises: timeout exception.
Implemented in simgrid::s4u::Comm, and simgrid::s4u::Exec.
|
inline |
Cancel that activity.
Retrieve the current state of the activity
|
virtual |
Get the remaining amount of work that this Activity entails.
When it's 0, it's done.
Reimplemented in simgrid::s4u::Exec.
| Activity * simgrid::s4u::Activity::setRemains | ( | double | remains | ) |
Put some user data onto the Activity.