SOLA
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
daisi::cpps::logical::LogicalAgent Class Referenceabstract
Inheritance diagram for daisi::cpps::logical::LogicalAgent:
daisi::cpps::logical::AmrLogicalAgent daisi::cpps::logical::MaterialFlowLogicalAgent

Public Member Functions

 LogicalAgent (std::shared_ptr< CppsLoggerNs3 > logger, AlgorithmConfig config_algo, bool first_node)
 
void processMessage (const Message &msg)
 Forwarding a received message to the appropriate algorithm interface for processing.
 
virtual void start ()=0
 
bool isRunning () const
 Helper method for event scheduling.
 
bool canStop () const
 Helper method for event scheduling.
 
void prepareStop ()
 Helper method for event scheduling.
 

Protected Member Functions

void initCommunication ()
 Initializing communication via Sola which all logical agents require.
 
virtual void initAlgorithms ()=0
 Initializing algorithm interfaces depending on information from algorithm_config_. Only a part of the available interfaces might be allowed depending on the type of logical agent.
 
virtual void messageReceiveFunction (const solanet::Message &msg)=0
 Method being called by solanet when we receive a 1-to-1 message.
 
virtual void topicMessageReceiveFunction (const sola::TopicMessage &msg)=0
 Method being called by sola when we receive a message via a topic.
 

Protected Attributes

std::vector< std::unique_ptr< AlgorithmInterface > > algorithms_
 The algorithms which logical messages will be forwarded to for processing.
 
daisi::cpps::common::CppsCommunicatorPtr communicator_
 Collection of members to communicate.
 
std::shared_ptr< CppsLoggerNs3logger_
 Logging relevant information into Database.
 
const AlgorithmConfig algorithm_config_
 Information about which algorithm interfaces will be initialized after the initialization of Sola is finished.
 
std::string uuid_
 Needed for initialization of Sola.
 
bool first_node_
 

Member Function Documentation

◆ initAlgorithms()

virtual void daisi::cpps::logical::LogicalAgent::initAlgorithms ( )
protectedpure virtual

Initializing algorithm interfaces depending on information from algorithm_config_. Only a part of the available interfaces might be allowed depending on the type of logical agent.

Implemented in daisi::cpps::logical::MaterialFlowLogicalAgent.

◆ initCommunication()

void daisi::cpps::logical::LogicalAgent::initCommunication ( )
protected

Initializing communication via Sola which all logical agents require.

Parameters
first_node

◆ messageReceiveFunction()

void daisi::cpps::logical::LogicalAgent::messageReceiveFunction ( const solanet::Message msg)
protectedpure virtual

Method being called by solanet when we receive a 1-to-1 message.

Parameters
mreceived message

Implemented in daisi::cpps::logical::MaterialFlowLogicalAgent.

◆ processMessage()

void daisi::cpps::logical::LogicalAgent::processMessage ( const Message &  msg)

Forwarding a received message to the appropriate algorithm interface for processing.

Parameters
_message

◆ start()

virtual void daisi::cpps::logical::LogicalAgent::start ( )
pure virtual

◆ topicMessageReceiveFunction()

void daisi::cpps::logical::LogicalAgent::topicMessageReceiveFunction ( const sola::TopicMessage msg)
protectedpure virtual

Method being called by sola when we receive a message via a topic.

Parameters
mreceived message

Implemented in daisi::cpps::logical::MaterialFlowLogicalAgent.


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