51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
//
|
|
// Created by titov on 23.01.2022.
|
|
//
|
|
|
|
#ifndef UMLIBRARY_DEV_ATTACHMESSAGESERVER_HH
|
|
#define UMLIBRARY_DEV_ATTACHMESSAGESERVER_HH
|
|
|
|
#include "../ISetupStep.hh"
|
|
|
|
#include "../../communication/IMessageServer.hh"
|
|
|
|
#include "../../units/LogicalEntities.hpp"
|
|
|
|
#include <exception>
|
|
|
|
namespace application { namespace communication {
|
|
|
|
//!Ïîäêëþ÷åíèå ñåðâåðà ñîîáùåíèé ê ðîóòåðó.
|
|
struct AttachMessageServer : public ISetupStep {
|
|
|
|
typedef ::communication::IMessageRouter Router;
|
|
typedef ::communication::IMessageServer Server;
|
|
|
|
Router * router = nullptr;
|
|
Server * server = nullptr;
|
|
|
|
bool input( Environment & env );
|
|
bool prepare();
|
|
void build( Environment & env );
|
|
|
|
struct Links {
|
|
Environment::Id router; //!<Äèñïåò÷åð ñîîáùåíèé.
|
|
Environment::Id server; //!<Ñåðâåð ñîîáùåíèé.
|
|
};
|
|
|
|
//!Èäåíòèôèêàòîðû ñîîáùåíèé
|
|
struct Setting {
|
|
Router::ServerId server_id; //!<Êîìàíäà âûïîëíåíèÿ äåéñòâèÿ.
|
|
};
|
|
|
|
const Links & links;
|
|
const Setting & config;
|
|
|
|
AttachMessageServer( const Links & links, const Setting & setting );
|
|
};
|
|
|
|
} // namespace communication
|
|
} // namespace application
|
|
|
|
#endif //UMLIBRARY_DEV_ATTACHMESSAGESERVER_HH
|