/*
********************************************************
Copyright 2000 MBARI.
MBARI Proprietary Information. All rights reserved.
NOTE: This file is automatically generated.
DO NOT MODIFY.
********************************************************
*/

#ifndef __LblIF_SK_H
#define __LblIF_SK_H

#include "TaskServer.h"
#include "LblIF.h"

class LblIF_SK : public TaskServer {

  public:

  // Constructor for server with default name
  LblIF_SK();

  // Constructor for server with specific name
  LblIF_SK(const char *serverName);

  virtual ~LblIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual long get_tof(LblIF::RTimes *times) = 0;
  virtual long get_ptime(TimeIF::TimeSpec *ping_time) = 0;
  virtual long ping() = 0;
  
  // Declare callbacks corresponding to each method
  Boolean get_tofCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean get_ptimeCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean pingCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  
  // Message structure pointer for each method
  LblIF::Get_tofMsg *_get_tofMsg;
  LblIF::Get_ptimeMsg *_get_ptimeMsg;
  LblIF::PingMsg *_pingMsg;
  
  // Determine max bytes required for message buffer
  virtual size_t maxRequestBytes();

  // Allocate buffer for messages, set pointers, etc
  virtual void allocateBuffers();

  private:

  // Initializer method called by constructors
  int init();

};

#endif

