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

#ifndef __BuoyLauncherIF_SK_H
#define __BuoyLauncherIF_SK_H

#include "TaskServer.h"
#include "BuoyLauncherIF.h"
#include "DeviceIF_SK.h"

class BuoyLauncherIF_SK : public DeviceIF_SK {

  public:

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

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

  virtual ~BuoyLauncherIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual DeviceIF::Status nBuoys(short *total, short *launched) = 0;
  virtual DeviceIF::Status statusOn(Boolean on) = 0;
  virtual DeviceIF::Status currentBuoy(short buoyNo) = 0;
  virtual DeviceIF::Status loadData(BuoyLauncherIF::Filename filename) = 0;
  virtual DeviceIF::Status rotateBuoy() = 0;
  virtual DeviceIF::Status rotateCarousel() = 0;
  virtual DeviceIF::Status launch() = 0;
  virtual DeviceIF::Status launchDummyBuoy() = 0;
  virtual DeviceIF::Status launched(Boolean *launched) = 0;
  virtual DeviceIF::Status getLauncherStatus(BuoyLauncherIF::LC_status *status) = 0;
  virtual DeviceIF::Status getBuoyStatus(BuoyLauncherIF::BC_status *status) = 0;
  
  // Declare callbacks corresponding to each method
  Boolean nBuoysCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

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

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

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

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

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

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

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

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

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

  
  // Message structure pointer for each method
  BuoyLauncherIF::NBuoysMsg *_nBuoysMsg;
  BuoyLauncherIF::StatusOnMsg *_statusOnMsg;
  BuoyLauncherIF::CurrentBuoyMsg *_currentBuoyMsg;
  BuoyLauncherIF::LoadDataMsg *_loadDataMsg;
  BuoyLauncherIF::RotateBuoyMsg *_rotateBuoyMsg;
  BuoyLauncherIF::RotateCarouselMsg *_rotateCarouselMsg;
  BuoyLauncherIF::LaunchMsg *_launchMsg;
  BuoyLauncherIF::LaunchDummyBuoyMsg *_launchDummyBuoyMsg;
  BuoyLauncherIF::LaunchedMsg *_launchedMsg;
  BuoyLauncherIF::GetLauncherStatusMsg *_getLauncherStatusMsg;
  BuoyLauncherIF::GetBuoyStatusMsg *_getBuoyStatusMsg;
  
  // 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

