UniSet 2.32.1
DBServer.h
1/*
2 * Copyright (c) 2015 Pavel Vainerman.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation, version 2.1.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Lesser Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16// --------------------------------------------------------------------------
20// --------------------------------------------------------------------------
21#ifndef DBServer_H_
22#define DBServer_H_
23// --------------------------------------------------------------------------
24#include "UniSetTypes.h"
25#include "UniSetObject.h"
26#include "LogServer.h"
27#include "DebugStream.h"
28#include "LogAgregator.h"
29//------------------------------------------------------------------------------------------
30namespace uniset
31{
43 class DBServer:
44 public UniSetObject
45 {
46 public:
47 DBServer( uniset::ObjectId id, const std::string& prefix = "db" );
48 DBServer( const std::string& prefix = "db" );
49 ~DBServer();
50
51 static std::string help_print();
52
53 virtual uniset::SimpleInfo* getInfo( const char* userparam = "" ) override;
54
55 protected:
56
57 virtual void processingMessage( const uniset::VoidMessage* msg ) override;
58 virtual void sysCommand( const uniset::SystemMessage* sm ) override;
59 virtual void confirmInfo( const uniset::ConfirmMessage* cmsg ) {}
60
61 virtual bool activateObject() override;
62 virtual void initDBServer() {}
63 virtual std::string getMonitInfo( const std::string& params )
64 {
65 return "";
66 }
67
68 std::shared_ptr<LogAgregator> loga;
69 std::shared_ptr<DebugStream> dblog;
70 std::shared_ptr<LogServer> logserv;
71 std::string logserv_host = {""};
72 int logserv_port = {0};
73 const std::string prefix = { "db" };
74
75 private:
76 };
77 // -------------------------------------------------------------------------
78} // end of uniset namespace
79//------------------------------------------------------------------------------------------
80#endif
Definition MessageType.h:240
Definition DBServer.h:45
virtual bool activateObject() override
Активизация объекта (переопределяется для необходимых действий после активизации)
Definition DBServer.cc:103
virtual void processingMessage(const uniset::VoidMessage *msg) override
Definition DBServer.cc:88
Definition MessageType.h:171
Definition UniSetObject.h:80
Definition MessageType.h:91
Definition Calibration.h:27
long ObjectId
Definition UniSetTypes_i.idl:30
Definition UniSetTypes_i.idl:65