SpShellConsole.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef RVC_SPSHELL_CONSOEL_H_
  2. #define RVC_SPSHELL_CONSOEL_H_
  3. #pragma once
  4. #include "TelnetServer.h"
  5. #include <map>
  6. using namespace std;
  7. class CSpShellConsole : public CTelnetServer
  8. {
  9. public:
  10. CSpShellConsole(void);
  11. ~CSpShellConsole(void);
  12. bool HasSubLogCnn();
  13. void OutputLog(int nLogEntityID, const char *pLogEntity, const char *pMsg);
  14. CSpShellConsole(const CSpShellConsole &rhs);
  15. CSpShellConsole& operator=(const CSpShellConsole &rhs);
  16. string GetPromptString();
  17. string GetHelloString();
  18. bool ParseCmdLine(int nConnectionID, const char *pCmdLine, string &strReplyMsg);
  19. const char* GetStateName(int state);
  20. string PrintfHelp(const char *pCmd);
  21. string StartEntity(const char *pEntityName, const char* pCmdLine = NULL);
  22. string StopEntity(const char *pEntityName);
  23. string PauseEntity(const char *pEntityName);
  24. string ContinueEntity(const char *pEntityName);
  25. string TerminateEntity(const char *pEntityName);
  26. string SetEntityLost(const char *pEntityName); // only for test
  27. string TestEntity(const char* pEntityName);
  28. string BlueScreen(const char *pMsg);
  29. string UnBlueScreen();
  30. string ListAllEntitys();
  31. string ShutdownSpShell();
  32. string SetLogOn(int nConnectionID, const char *pEntityName);
  33. string SetLogOff(int nConnectionID, const char *pEntityName);
  34. string ShowSysVar();
  35. static string GetEntityLogPath(const char* pEntityName);
  36. static string GetEntityRTPath(const char* pEntityName);
  37. static string GetRootConfigPath();
  38. static string GetTempPath();
  39. static int RestartApplication();
  40. private:
  41. map<int, UINT64> m_SubLogCnns;
  42. };
  43. #endif /*RVC_SPSHELL_CONSOEL_H_*/