/****************************************************************************/
/* Copyright (c) MIT Sea Grant                                              */
/* MIT Sea Grant Proprietary Information. All rights reserved.              */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : LblServer.h                                                   */
/* Author   : Don Eickstedt                                                 */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 05/25/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _LblServer_H
#define _LblServer_H

#include "LblIF_SK.h"
#include "LblLog.h"
#include "TimeIF.h"
#include "LblIF.h"
#include "SerialParameters.h"
#include "LblDriverOutput.h"

class LblServer : public LblIF_SK {

public:

  LblServer(const char *name, SerialParameters *serialParams);
  ~LblServer();

  virtual long get_tof(LblIF::RTimes *times);

  virtual long get_ptime(TimeIF::TimeSpec *ping_time);

  virtual int spawnAuxTasks();

  virtual long ping();

  virtual long change_gate();

protected:

  //The time the ping was transmitted
  TimeIF::TimeSpec rp_time;

  //The return times for all 10 channels
  LblIF::RTimes    r_times;

  pid_t            driver_pid;

  LblLog           *_log;

  LblDriverOutput *_driverOutput;
  SerialParameters *_serialParams;
};

#endif




