#include <zmserver.h>
Definition at line 148 of file zmserver.h.
Public Member Functions | |
| ZMServer (int sock, bool debug) | |
| ~ZMServer () | |
| void | processRequest (char *buf, int nbytes) |
Private Member Functions | |
| string | getZMSetting (const string &setting) |
| bool | send (const string s) const |
| bool | send (const string s, const unsigned char *buffer, int dataLen) const |
| void | sendError (string error) |
| void | getMonitorList (void) |
| void | initMonitor (MONITOR *monitor) |
| int | getFrame (unsigned char *buffer, int bufferSize, MONITOR *monitor) |
| long long | getDiskSpace (const string &filename, long long &total, long long &used) |
| void | tokenize (const string &command, vector< string > &tokens) |
| void | handleHello (void) |
| string | runCommand (string command) |
| void | getMonitorStatus (string id, string type, string device, string channel, string function, string &zmcStatus, string &zmaStatus, string enabled) |
| void | handleGetServerStatus (void) |
| void | handleGetMonitorStatus (void) |
| void | handleGetMonitorList (void) |
| void | handleGetCameraList (void) |
| void | handleGetEventList (vector< string > tokens) |
| void | handleGetEventFrame (vector< string > tokens) |
| void | handleGetAnalyseFrame (vector< string > tokens) |
| void | handleGetLiveFrame (vector< string > tokens) |
| void | handleGetFrameList (vector< string > tokens) |
| void | handleDeleteEvent (vector< string > tokens) |
| void | handleDeleteEventList (vector< string > tokens) |
| void | handleGetEventDates (vector< string > tokens) |
| void | handleRunZMAudit (void) |
| void | handleSetMonitorFunction (vector< string > tokens) |
| void | zmcControl (MONITOR *monitor, const string &mode) |
| void | zmaControl (MONITOR *monitor, const string &mode) |
Private Attributes | |
| bool | m_debug |
| int | m_sock |
| map< int, MONITOR * > | m_monitors |
| string | m_eventFileFormat |
| string | m_analyseFileFormat |
| key_t | m_shmKey |
| ZMServer::ZMServer | ( | int | sock, | |
| bool | debug | |||
| ) |
Definition at line 194 of file zmserver.cpp.
| ZMServer::~ZMServer | ( | ) |
Definition at line 232 of file zmserver.cpp.
| void ZMServer::processRequest | ( | char * | buf, | |
| int | nbytes | |||
| ) |
| string ZMServer::getZMSetting | ( | const string & | setting | ) | [private] |
| bool ZMServer::send | ( | const string | s | ) | const [private] |
Definition at line 315 of file zmserver.cpp.
Referenced by handleDeleteEvent(), handleDeleteEventList(), handleGetAnalyseFrame(), handleGetCameraList(), handleGetEventDates(), handleGetEventFrame(), handleGetEventList(), handleGetFrameList(), handleGetLiveFrame(), handleGetMonitorList(), handleGetMonitorStatus(), handleGetServerStatus(), handleHello(), handleRunZMAudit(), handleSetMonitorFunction(), processRequest(), send(), and sendError().
| bool ZMServer::send | ( | const string | s, | |
| const unsigned char * | buffer, | |||
| int | dataLen | |||
| ) | const [private] |
Definition at line 333 of file zmserver.cpp.
| void ZMServer::sendError | ( | string | error | ) | [private] |
Definition at line 356 of file zmserver.cpp.
Referenced by handleDeleteEvent(), handleDeleteEventList(), handleGetAnalyseFrame(), handleGetCameraList(), handleGetEventDates(), handleGetEventFrame(), handleGetEventList(), handleGetFrameList(), handleGetLiveFrame(), handleGetMonitorList(), handleGetMonitorStatus(), handleSetMonitorFunction(), and zmcControl().
| void ZMServer::getMonitorList | ( | void | ) | [private] |
| void ZMServer::initMonitor | ( | MONITOR * | monitor | ) | [private] |
| int ZMServer::getFrame | ( | unsigned char * | buffer, | |
| int | bufferSize, | |||
| MONITOR * | monitor | |||
| ) | [private] |
| long long ZMServer::getDiskSpace | ( | const string & | filename, | |
| long long & | total, | |||
| long long & | used | |||
| ) | [private] |
| void ZMServer::tokenize | ( | const string & | command, | |
| vector< string > & | tokens | |||
| ) | [private] |
| void ZMServer::handleHello | ( | void | ) | [private] |
| string ZMServer::runCommand | ( | string | command | ) | [private] |
Definition at line 690 of file zmserver.cpp.
Referenced by getMonitorStatus(), handleGetServerStatus(), handleSetMonitorFunction(), zmaControl(), and zmcControl().
| void ZMServer::getMonitorStatus | ( | string | id, | |
| string | type, | |||
| string | device, | |||
| string | channel, | |||
| string | function, | |||
| string & | zmcStatus, | |||
| string & | zmaStatus, | |||
| string | enabled | |||
| ) | [private] |
| void ZMServer::handleGetServerStatus | ( | void | ) | [private] |
| void ZMServer::handleGetMonitorStatus | ( | void | ) | [private] |
| void ZMServer::handleGetMonitorList | ( | void | ) | [private] |
| void ZMServer::handleGetCameraList | ( | void | ) | [private] |
| void ZMServer::handleGetEventList | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleGetEventFrame | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleGetAnalyseFrame | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleGetLiveFrame | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleGetFrameList | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleDeleteEvent | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleDeleteEventList | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleGetEventDates | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::handleRunZMAudit | ( | void | ) | [private] |
| void ZMServer::handleSetMonitorFunction | ( | vector< string > | tokens | ) | [private] |
| void ZMServer::zmcControl | ( | MONITOR * | monitor, | |
| const string & | mode | |||
| ) | [private] |
| void ZMServer::zmaControl | ( | MONITOR * | monitor, | |
| const string & | mode | |||
| ) | [private] |
bool ZMServer::m_debug [private] |
Definition at line 188 of file zmserver.h.
Referenced by getMonitorList(), getZMSetting(), handleDeleteEvent(), handleDeleteEventList(), handleGetAnalyseFrame(), handleGetEventDates(), handleGetEventFrame(), handleGetEventList(), handleGetFrameList(), handleGetLiveFrame(), handleGetMonitorList(), handleGetMonitorStatus(), handleRunZMAudit(), handleSetMonitorFunction(), processRequest(), ZMServer(), and ~ZMServer().
int ZMServer::m_sock [private] |
map<int, MONITOR *> ZMServer::m_monitors [private] |
Definition at line 190 of file zmserver.h.
Referenced by getMonitorList(), handleGetLiveFrame(), and handleSetMonitorFunction().
string ZMServer::m_eventFileFormat [private] |
string ZMServer::m_analyseFileFormat [private] |
key_t ZMServer::m_shmKey [private] |
1.5.5