+ /** @brief setup the profile file with states events (ON or OFF). The profile must contain boolean values. */
+ AnyResource* set_state_profile(profile::Profile* profile)
+ {
+ if (profile) {
+ xbt_assert(state_event_ == nullptr, "Cannot set a second state profile to %s", get_cname());
+ state_event_ = profile->schedule(&profile::future_evt_set, this);
+ }
+
+ return static_cast<AnyResource*>(this);
+ }
+