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

#ifndef __MissionPlanIF_H
#define __MissionPlanIF_H

#include "TaskInterface.h"


#define MissionPlanIFServerName "MissionPlanIFServer"

/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : MissionPlanIF.idl                                             */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
CLASS 
MissionPlanIF

DESCRIPTION
TaskInterface to MissionPlan

AUTHOR
Tom O'Reilly
*/
class MissionPlanIF : public TaskInterface {

  friend class MissionPlanIF_SK;

  public:

  // Forward declarations of public structures
  struct Behavior;
  
  
  typedef float BehaviorArgs[10];
  
  struct Behavior {
    /////////////////////////////////////////////////////////
    // Unique identifier for Behavior
    long id;
    /////////////////////////////////////////////////////////
    // Number of arguments to Behavior
    short nArgs;
    /////////////////////////////////////////////////////////
    // Arguments to Behavior
    MissionPlanIF::BehaviorArgs args;
    /////////////////////////////////////////////////////////
    // Priority within plan
    short priority;
    /////////////////////////////////////////////////////////
    // Starting mission time of behavior
    long startTime;
    /////////////////////////////////////////////////////////
    // Duration of behavior
    long duration;
  };
  MissionPlanIF(const char *name, int timeout = 10);

  MissionPlanIF(const char *name, const char *serverName, int timeout = 10);

  ~MissionPlanIF();

  /////////////////////////////////////////////////////////
  // Number of Behaviors
  short nBehaviors();

  /////////////////////////////////////////////////////////
  // Get nth Behavior
  short nthBehavior(short n, MissionPlanIF::Behavior *behavior);

  
  protected:

  // Message codes for each method
  enum MissionPlanIFMsgCode {
    NBehaviorsMsgCode,
    NthBehaviorMsgCode
  };

  // Define message structure for each method
  struct NBehaviorsMsg : Request, Reply {
    short returnVal;
  
  } _nBehaviorsMsg;

  struct NthBehaviorMsg : Request, Reply {
    short returnVal;
    short n;
    MissionPlanIF::Behavior behavior;
  
  } _nthBehaviorMsg;

};

#endif

