}
/** Set the source and destination of communications that bypass the mailbox mechanism */
- CommPtr set_from(Host* from);
- CommPtr set_to(Host* to);
+ CommPtr set_source(Host* from);
+ Host* get_source() { return from_; }
+ CommPtr set_destination(Host* to);
+ Host* get_destination() { return to_; }
/** Sets the maximal communication rate (in byte/sec). Must be done before start */
CommPtr set_rate(double rate);
return comms.size();
}
-CommPtr Comm::set_from(Host* from)
+CommPtr Comm::set_source(Host* from)
{
xbt_assert(state_ == State::INITED || state_ == State::STARTING,
"Cannot change the source of a Comm once it's started (state: %s)", to_c_str(state_));
return this;
}
-CommPtr Comm::set_to(Host* to)
+CommPtr Comm::set_destination(Host* to)
{
xbt_assert(state_ == State::INITED || state_ == State::STARTING,
"Cannot change the destination of a Comm once it's started (state: %s)", to_c_str(state_));