/*
********************************************************
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 Boolean ready() = 0;
  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, char type_of_data) = 0;
  virtual DeviceIF::Status uploadLog(short numMinutesToUpload) = 0;
  virtual DeviceIF::Status rotateBuoy() = 0;
  virtual DeviceIF::Status rotateToLaunchPosition(Boolean realBuoy) = 0;
  virtual DeviceIF::Status rotateCarousel() = 0;
  virtual DeviceIF::Status launch(char hot_or_cold) = 0;
  virtual DeviceIF::Status launchDummyBuoy() = 0;
  virtual DeviceIF::Status ejectBuoy() = 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;
  virtual DeviceIF::Status reinitLauncher() = 0;
  virtual DeviceIF::Status retractArms() = 0;
  virtual DeviceIF::Status pushAndRetract() = 0;
  virtual DeviceIF::Status rotateAPosition(char launch_or_data) = 0;
  
  // Declare callbacks corresponding to each method
  Boolean readyCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  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 uploadLogCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

  Boolean rotateToLaunchPositionCallback(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 ejectBuoyCallback(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);

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

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

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

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

  
  // Message structure pointer for each method
  BuoyLauncherIF::ReadyMsg *_readyMsg;
  BuoyLauncherIF::NBuoysMsg *_nBuoysMsg;
  BuoyLauncherIF::StatusOnMsg *_statusOnMsg;
  BuoyLauncherIF::CurrentBuoyMsg *_currentBuoyMsg;
  BuoyLauncherIF::LoadDataMsg *_loadDataMsg;
  BuoyLauncherIF::UploadLogMsg *_uploadLogMsg;
  BuoyLauncherIF::RotateBuoyMsg *_rotateBuoyMsg;
  BuoyLauncherIF::RotateToLaunchPositionMsg *_rotateToLaunchPositionMsg;
  BuoyLauncherIF::RotateCarouselMsg *_rotateCarouselMsg;
  BuoyLauncherIF::LaunchMsg *_launchMsg;
  BuoyLauncherIF::LaunchDummyBuoyMsg *_launchDummyBuoyMsg;
  BuoyLauncherIF::EjectBuoyMsg *_ejectBuoyMsg;
  BuoyLauncherIF::LaunchedMsg *_launchedMsg;
  BuoyLauncherIF::GetLauncherStatusMsg *_getLauncherStatusMsg;
  BuoyLauncherIF::GetBuoyStatusMsg *_getBuoyStatusMsg;
  BuoyLauncherIF::ReinitLauncherMsg *_reinitLauncherMsg;
  BuoyLauncherIF::RetractArmsMsg *_retractArmsMsg;
  BuoyLauncherIF::PushAndRetractMsg *_pushAndRetractMsg;
  BuoyLauncherIF::RotateAPositionMsg *_rotateAPositionMsg;
  
  // 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

