#ifndef _VIRTUAL_SERVER_H_ #define _VIRTUAL_SERVER_H_ 1 #include #include #include // ***************************************************************************** // * class MonitorTestServer : // * This is the server class for the MonitorTestDevice. It simply receives // * messages from a client and immediately returns them. // * // * The constructor passes the domain, server, port and rate to the // * underlying cdevServer class to be processed. The cdevServer constructor // * will add this server to the Name Server and will begin processing // * messages when the cdevServer::runServer() method is executed. // * // * The processMessages method is the servers interface to the world... Each // * time a complete message is received or the time specified in rate // * expires, that method will be called. // ***************************************************************************** class MonitorTestServer : public cdevServer, public cdevMonitorTable { private: StringHash attribHash; public: MonitorTestServer ( char * domain, char * server, unsigned int port, double pulse ) : cdevServer(domain, server, port, pulse), attribHash() { populateTable(); } virtual ~MonitorTestServer ( void ); virtual void processMessages ( void ); void populateTable ( void ); virtual int fireCallback ( cdevMessage * message ); }; #endif