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

#ifndef __ExternalCommsIF_H
#define __ExternalCommsIF_H

#include "TaskInterface.h"


#define ExternalCommsIFServerName "ExternalCommsIFServer"

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

DESCRIPTION
TaskInterface to ExternalComms

AUTHOR
Tom O'Reilly

*/
class ExternalCommsIF : public TaskInterface {

  friend class ExternalCommsIF_SK;

  public:

  
  /////////////////////////////////////////////////////////////////
  // Events generated by ExternalComms 
  enum Event {
    LinkChange,
    LinkUp,
    LinkDown
  };

  /////////////////////////////////////////////////////////////////
  // Communications link state
  enum Channel {
    NoLink,
    Ethernet,
    Radio,
    Acoustic
  };

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

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

  ~ExternalCommsIF();

  /////////////////////////////////////////////////////////////////
  // Set communications Channel
  // [input] channel: Channel to use
  long setChannel(ExternalCommsIF::Channel channel);

  /////////////////////////////////////////////////////////////////
  // Get communications Channel
  // [output] channel: Channel currently in use
  void channel(ExternalCommsIF::Channel *channel);

  
  protected:

  // Message codes for each method
  enum ExternalCommsIFMsgCode {
    SetChannelMsgCode,
    ChannelMsgCode
  };

  // Define message structure for each method
  struct SetChannelMsg : Request, Reply {
    long returnVal;
    ExternalCommsIF::Channel channel;
  
  } _setChannelMsg;

  struct ChannelMsg : Request, Reply {
    ExternalCommsIF::Channel channel;
  
  } _channelMsg;

};

#endif

