// // 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 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