EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ConsoleCommands.h
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Allan
24  Thanks to: avianrr for the idea
25 */
26 
27 #ifndef EVEMU_EVESERVER_CONSOLECOMMANDS_H_
28 #define EVEMU_EVESERVER_CONSOLECOMMANDS_H_
29 
30 #define BUFLEN 256
31 
32 #include "eve-server.h"
33 #include "EVEServerConfig.h"
34 
35 #include "Client.h"
36 #include "EntityList.h"
37 #include "ServiceDB.h"
39 #include "chat/LSCChannel.h"
40 #include "inventory/ItemFactory.h"
41 #include "system/DestinyManager.h"
42 #include "system/SystemBubble.h"
43 #include "system/SystemManager.h"
44 
45 
47 : public Singleton<ConsoleCommand>
48 {
49  public:
51  ~ConsoleCommand() { /* do nothing here */ }
52 
53  void Initialize(CommandDispatcher* cd);
54 
55  // this calls multiple methods that get/process/save data for running server
56  void UpdateStatus();
57  void HaltServer(bool dbError=false) { m_haltServer = true; m_dbError = dbError; }
58 
59  bool Process();
60  bool IsShutdown() { return m_haltServer; }
61  // avoid using db after it has lost connection.
62  bool IsDbError() { return m_dbError; }
63 
64 private:
65  // we do not own any of these...
70 
71  char* buf;
72  fd_set fds;
73  struct timeval tv;
75  bool m_dbError;
76 
77  void SendMessage(const char *msg);
78  void Status(std::string& state, int64& threads, float& vm_usage, float& resident_set, float& user, float& kernel);
79 
80  void Test();
81  void FxProc(uint8 idx=0);
82 
83 };
84 
85 //Singleton
86 #define sConsole \
87  ( ConsoleCommand::get() )
88 
89 #endif // EVEMU_EVESERVER_CONSOLECOMMANDS_H_
90 
CommandDispatcher * pCommand
unsigned __int8 uint8
Definition: eve-compat.h:46
void HaltServer(bool dbError=false)
struct timeval tv
LSCChannel * plscc
void FxProc(uint8 idx=0)
void Status(std::string &state, int64 &threads, float &vm_usage, float &resident_set, float &user, float &kernel)
void SendMessage(const char *msg)
SystemManager * pSystems
void Initialize(CommandDispatcher *cd)
signed __int64 int64
Definition: eve-compat.h:51
Template used for singleton classes.
Definition: Singleton.h:43
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state
SystemBubble * pBubbles