25 template <
typename BC>
43 controlStarted(state.information.name);
46 stepStarted(state.loadStep, state.stepSize);
49 controlEnded(state.information.totalIterations, state.information.name);
57 using TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock>;
60 std::chrono::milliseconds duration_{};
63 void controlStarted(
const std::string& name);
64 void controlEnded(
int totalIterations,
const std::string& name);
65 void stepStarted(
int stepNumber,
double stepSize);
Enums for observer messages.
Implementation of the observer design pattern with broadcasters.
Definition: assemblermanipulatorbuildingblocks.hh:22
ControlMessages
Enum class defining control-routine-related messages.
Definition: broadcastermessages.hh:18
Implementation of an observer for logging control routines.
Definition: controllogger.hh:23
ControlLogger & subscribeTo(BC &bc)
Definition: controllogger.hh:26
void update(ControlMessages message, const Concepts::ControlRoutineState auto &state)
Implementation of the update method for logging control messages with a control routine state.
Definition: controllogger.hh:37
Implements a listener.
Definition: listener.hh:28
auto subscribe(Broadcaster &broadcaster, std::function< void(typename Broadcaster::MessageType, const typename Broadcaster::State &)> callback)
Function to subscribe to a broadcaster with a given function (either a lambda, std::function or funct...
Definition: listener.hh:41
Concept to check if a type represents a control routine state.
Definition: utils/concepts.hh:649