24 #include "UTCPStream.h"
25 #include "DebugStream.h"
26 #include "LogServerTypes.h"
40 Command( LogServerTypes::Command c,
unsigned int d,
const std::string& f =
"" ): cmd(c), data(d), logfilter(f) {}
42 LogServerTypes::Command cmd = { LogServerTypes::cmdNOP };
43 unsigned int data = {0};
44 std::string logfilter = {
"" };
47 void sendCommand(
const std::string& addr,
int port,
48 std::vector<Command>& vcmd,
bool cmd_only =
true,
49 bool verbose =
false );
51 void readlogs(
const std::string& addr,
int port, LogServerTypes::Command c = LogServerTypes::cmdNOP,
const std::string logfilter =
"",
bool verbose =
false );
53 bool isConnection()
const;
55 inline void setReadCount(
unsigned int n )
60 inline void setCommandOnlyMode(
bool s )
65 inline void setinTimeout( timeout_t msec )
69 inline void setoutTimeout( timeout_t msec )
73 inline void setReconnectDelay( timeout_t msec )
78 DebugStream::StreamEvent_Signal signal_stream_event();
80 void setLogLevel( Debug::type t );
82 inline std::shared_ptr<DebugStream> log()
91 void logOnEvent(
const std::string& s );
92 void sendCommand(LogServerTypes::lsMessage& msg,
bool verbose =
false );
94 timeout_t inTimeout = { 10000 };
95 timeout_t outTimeout = { 6000 };
96 timeout_t reconDelay = { 5000 };
99 std::shared_ptr<UTCPStream> tcp;
100 std::string iaddr = {
"" };
102 bool cmdonly {
false };
103 unsigned int readcount = { 0 };
106 std::shared_ptr<DebugStream> outlog;
108 DebugStream::StreamEvent_Signal m_logsig;
113 #endif // LogReader_H_