|
| MaterialFlowLogicalAgent (const AlgorithmConfig &config_algo, bool first_node) |
|
| ~MaterialFlowLogicalAgent () override=default |
| Includes leaving Sola.
|
|
virtual void | init () |
| Method called by the container on start. Initializing components such as Sola.
|
|
void | start () override |
| Starting operations by initalizing components which require the finished initialization of Sola.
|
|
virtual void | addMaterialFlow (std::string mfdl_program) |
| Adding a material flow in the form of the pure string. Processing can be started as soon as the mfdl program is set and initialization is finished.
|
|
void | setWaitingForStart () |
| Setting a flag that the agent is currently waiting for other processes to finish before the handling of material flows is possible. An example is the initialization of Sola.
|
|
bool | isBusy () const |
| Checking whether the agent is currently handling a material flow or running idle instead.
|
|
bool | isFinished () const |
|
| 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.
|
|
bool | isRunning () const |
| Helper method for event scheduling.
|
|
bool | canStop () const |
| Helper method for event scheduling.
|
|
void | prepareStop () |
| Helper method for event scheduling.
|
|
|
void | initAlgorithms () override |
| Initializing algorithm interfaces depending on information from algorithm_config_. Only a part of the available interfaces might be allowed for a material flow agent.
|
|
void | messageReceiveFunction (const solanet::Message &m) override |
| Method being called by solanet when we receive a 1-to-1 message. Here, logging of the messages will be added in comparison to the implementation of the logical agent interface.
|
|
void | topicMessageReceiveFunction (const sola::TopicMessage &m) override |
| Method being called by sola when we receive a message via a topic. Here, logging of the messages will be added in comparison to the implementation of the logical agent interface.
|
|
void | setServices () |
| make the mf agent discoverable for findService queries
|
|
void | initCommunication () |
| Initializing communication via Sola which all logical agents require.
|
|
|
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< CppsLoggerNs3 > | logger_ |
| 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_ |
|
◆ addMaterialFlow()
void daisi::cpps::logical::MaterialFlowLogicalAgent::addMaterialFlow |
( |
std::string |
mfdl_program | ) |
|
|
virtual |
Adding a material flow in the form of the pure string. Processing can be started as soon as the mfdl program is set and initialization is finished.
- Parameters
-
◆ initAlgorithms()
void daisi::cpps::logical::MaterialFlowLogicalAgent::initAlgorithms |
( |
| ) |
|
|
overrideprotectedvirtual |
Initializing algorithm interfaces depending on information from algorithm_config_. Only a part of the available interfaces might be allowed for a material flow agent.
Implements daisi::cpps::logical::LogicalAgent.
◆ isBusy()
bool daisi::cpps::logical::MaterialFlowLogicalAgent::isBusy |
( |
| ) |
const |
Checking whether the agent is currently handling a material flow or running idle instead.
- Returns
- status whether the agent is busy or not
◆ messageReceiveFunction()
void daisi::cpps::logical::MaterialFlowLogicalAgent::messageReceiveFunction |
( |
const solanet::Message & |
m | ) |
|
|
overrideprotectedvirtual |
Method being called by solanet when we receive a 1-to-1 message. Here, logging of the messages will be added in comparison to the implementation of the logical agent interface.
- Parameters
-
Implements daisi::cpps::logical::LogicalAgent.
◆ start()
void daisi::cpps::logical::MaterialFlowLogicalAgent::start |
( |
| ) |
|
|
overridevirtual |
◆ topicMessageReceiveFunction()
void daisi::cpps::logical::MaterialFlowLogicalAgent::topicMessageReceiveFunction |
( |
const sola::TopicMessage & |
m | ) |
|
|
overrideprotectedvirtual |
Method being called by sola when we receive a message via a topic. Here, logging of the messages will be added in comparison to the implementation of the logical agent interface.
- Parameters
-
Implements daisi::cpps::logical::LogicalAgent.
The documentation for this class was generated from the following files: