53class AttributeEvent :
public Event,
public SharedFactory<AttributeEvent<T>> {
55 typename CPS::Attribute<T>::Ptr mAttribute;
59 AttributeEvent(CPS::Real t,
typename CPS::Attribute<T>::Ptr attr, T val)
60 : Event(t), mAttribute(attr), mNewValue(val) {}
62 void execute() { mAttribute->set(mNewValue); }
86class SwitchEvent3Ph :
public Event,
public SharedFactory<SwitchEvent3Ph> {
89 std::shared_ptr<CPS::Base::Ph3::Switch> mSwitch;
95 SwitchEvent3Ph(CPS::Real t,
const std::shared_ptr<CPS::Base::Ph3::Switch> &sw,
97 : Event(t), mSwitch(sw), mNewState(state) {}
101 mSwitch->closeSwitch();
103 mSwitch->openSwitch();