17#ifndef DAISI_CPPS_LOGICAL_LOGICAL_AGENT_H_
18#define DAISI_CPPS_LOGICAL_LOGICAL_AGENT_H_
23#include "cpps/common/cpps_communicator.h"
24#include "cpps/common/cpps_logger_ns3.h"
25#include "cpps/logical/algorithms/algorithm_config.h"
26#include "cpps/logical/algorithms/algorithm_interface.h"
27#include "cpps/logical/message/serializer.h"
28#include "solanet/network_udp/message.h"
42 virtual void start() = 0;
Definition logical_agent.h:32
virtual void initAlgorithms()=0
Initializing algorithm interfaces depending on information from algorithm_config_....
bool canStop() const
Helper method for event scheduling.
Definition logical_agent.cpp:89
bool isRunning() const
Helper method for event scheduling.
Definition logical_agent.cpp:87
std::string uuid_
Needed for initialization of Sola.
Definition logical_agent.h:85
void prepareStop()
Helper method for event scheduling.
Definition logical_agent.cpp:91
void processMessage(const Message &msg)
Forwarding a received message to the appropriate algorithm interface for processing.
Definition logical_agent.cpp:65
virtual void topicMessageReceiveFunction(const sola::TopicMessage &msg)=0
Method being called by sola when we receive a message via a topic.
Definition logical_agent.cpp:82
std::vector< std::unique_ptr< AlgorithmInterface > > algorithms_
The algorithms which logical messages will be forwarded to for processing.
Definition logical_agent.h:72
void initCommunication()
Initializing communication via Sola which all logical agents require.
Definition logical_agent.cpp:36
daisi::cpps::common::CppsCommunicatorPtr communicator_
Collection of members to communicate.
Definition logical_agent.h:75
virtual void messageReceiveFunction(const solanet::Message &msg)=0
Method being called by solanet when we receive a 1-to-1 message.
Definition logical_agent.cpp:77
std::shared_ptr< CppsLoggerNs3 > logger_
Logging relevant information into Database.
Definition logical_agent.h:78
const AlgorithmConfig algorithm_config_
Information about which algorithm interfaces will be initialized after the initialization of Sola is ...
Definition logical_agent.h:82
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22
Definition algorithm_config.h:31