/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : ClockServer.h                                                 */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _CLOCKSERVER_H
#define _CLOCKSERVER_H

#include "TaskServer.h"
#include "Clock.h"

#define ClockSharedDataName "clockSharedData"

/*
CLASS 
ClockServer

DESCRIPTION
Server for Clock interface

AUTHOR
Tom O'Reilly
*/

class ClockServer : public TaskServer {

public:

  ClockServer(const char *name);
  ~ClockServer();

  ////////////////////////////////////////////////////////////////
  // Fills in time_t field of Clock::ClockReply structure
  void getTime(Request *request, int nRequestBytes, 
	       Reply **reply, int *nReplyBytes);

protected:

  virtual size_t maxRequestBytes();

  Clock::ClockRequest _clockRequest;
  Clock::ClockReply _clockReply;
};

#endif
