version 0.4.2
Ikarus::ControlLogger Class Reference

Implementation of an observer for logging control routines.

#include <ikarus/utils/listener/controllogger.hh>

Inheritance diagram for Ikarus::ControlLogger:
[legend]

Public Types

using Token = std::shared_ptr< void >
 

Public Member Functions

template<typename BC >
ControlLoggersubscribeTo (BC &bc)
 
void update (ControlMessages message, const Concepts::ControlRoutineState auto &state)
 Implementation of the update method for logging control messages with a control routine state. More...
 
template<typename Broadcaster >
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 function pointer). More...
 
void unSubscribeAll ()
 Unsubscribe from all listeners. At the moment unsubscribing can't be done more granularly. More...
 
void unSubscribeLast ()
 Unsubscribe from the last subscribed listener. More...
 
void unSubscribe (const Token &token)
 Unsubscribe from a specific token. More...
 

Member Typedef Documentation

◆ Token

using Ikarus::Listener::Token = std::shared_ptr<void>
inherited

Member Function Documentation

◆ subscribe()

template<typename Broadcaster >
auto Ikarus::Listener::subscribe ( Broadcaster broadcaster,
std::function< void(typename Broadcaster::MessageType, const typename Broadcaster::State &)>  callback 
)
inlineinherited
Template Parameters
Broadcasterthe type of the Broadcaster (for example a NonlinearSolver or ControlRoutine)
Parameters
broadcasterthe broadcaster
callbackthe function
Here is the caller graph for this function:

◆ subscribeTo()

template<typename BC >
ControlLogger & Ikarus::ControlLogger::subscribeTo ( BC &  bc)
inline

◆ unSubscribe()

void Ikarus::Listener::unSubscribe ( const Token token)
inlineinherited

◆ unSubscribeAll()

void Ikarus::Listener::unSubscribeAll ( )
inlineinherited

◆ unSubscribeLast()

void Ikarus::Listener::unSubscribeLast ( )
inlineinherited

◆ update()

void Ikarus::ControlLogger::update ( ControlMessages  message,
const Concepts::ControlRoutineState auto &  state 
)
inline
Parameters
messageThe received control message.
stateThe received control state.
Here is the caller graph for this function:

The documentation for this class was generated from the following file: