|
SimGrid
3.14.159
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 void | start ()=0 |
| Starts a previously created activity. More... | |
| virtual void | wait ()=0 |
| Tests whether the given activity is terminated yet. More... | |
| virtual void | 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... | |
| double | getRemains () |
| Get the remaining amount of work that this Activity entails. More... | |
| void | setRemains (double remains) |
| Set the [remaining] amount of work that this Activity will entail. More... | |
| void | 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 () | |
| virtual | ~Activity () |
|
protected |
|
protectedvirtual |
|
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.
|
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.
|
pure virtual |
Blocks until the activity is terminated, or until the timeout is elapsed Raises: timeout exception.
Implemented in simgrid::s4u::Comm.
|
inline |
Cancel that activity.
Retrieve the current state of the activity
| double simgrid::s4u::Activity::getRemains | ( | ) |
Get the remaining amount of work that this Activity entails.
When it's 0, it's done.
| void simgrid::s4u::Activity::setRemains | ( | double | remains | ) |
Put some user data onto the Activity.