//=========================================================================
// Summary  : Reson 6046
// Filename : Reson6046Command.h
// Author   : Reed Christenson reed@bluefinrobotics.com
// Project  : Reson 6046 Driver
// Revision : 0.0
// Created  : 2002.03.21
// Modified : 2002.03.21
//=========================================================================
// Description : Reson 6046
//=========================================================================

#ifndef _DATABROADCASTERCOMMAND_H
#define _DATABROADCASTERCOMMAND_H

#include "DriverCommand.h"
#include "Reson6046IF.h"

#define Reson6046CommandName "reson6046Command"
#define MAXCOMMANDS 100


class Reson6046Command : public DriverCommand {
 public:
    enum Requests {
	None = CHILD_COMMANDS_BEGIN_HERE,
	DataLoggingOn,
	DataLoggingOff,
	// PLC Command ID 0
	StartSubsystem,
	StopSubsystem,
	SetPulseFilename,
	SetPingRange,
	SetPingRate,
	SetPingPower,
	// PLC Command ID 1
	StartLogging,
	StopLogging,
	// PLC Command ID 4
	GetVersion,
	// PLC Command ID 10
	GetSonarStatus,
	// PLC Command 11
	SetVerboseMode,
	// PLC Command ID 14
	GetModules,
	// PLC Command ID 15
	GetRunList,
	// PLC Command ID 20
	SetTime,

	// MB Remote command 1003
	SetMBRange,
	// MB Remote command 1004
	SetMBPingRate,
	// MB Remote command 1005
	SetMBTxPower,
	// MB Remote command 1008
	SetMBRxGain,
	// MB Remote command 1006
	SetMBPulseWidth,
	// MB Remote command 1010

  // MB Remote Command 7610
	SetMBSoundVelocity,
  // MB Remote Command 7611
	SetMBAbsorptionLoss,
  // MB Remote Command 7612
	SetMBSpreadingLoss,

	SetMBBottomDetectionFilters,
	UseDepthRangeMBBottomDetect,
	
	SetMBSnippetControl,
	// MB Remote command 1100
	MBStartPing,
	// MB Remote command 1101
	MBStopPing,

        MBExternalTrigger, //1114	
	SetSBPDuration,
	SetSBPGain,
	
	RecalcInterval,
	RecalcParams,
	Start7KCenterLogging,
	Stop7KCenterLogging
	
    };

struct Command : DriverCommand::Command_Skel {
  int request;
  int iVal;
  float fVal, fVal1, fVal2, fVal3;
  Reson6046IF::String32 sVal;

  Command( )
  {
    request = DriverCommand::None;
    iVal = 0;
  };

  Command(int req) {
    request = req;
    iVal = 0;
  };

  Command(int req, int intVal )
  {
    request = req;
    iVal = intVal;
  };
	
  Command(int req, int intVal, float floatVal)
  {
    request = req;
    iVal = intVal;
    fVal = floatVal;
  };

  Command(int req, float floatVal, float floatVal1,
	  float floatVal2, float floatVal3)
  {
    request = req;
    fVal = floatVal;
    fVal1 = floatVal1;
    fVal2 = floatVal2;
    fVal3 = floatVal3;
  };

  Command(int req, int intVal, Reson6046IF::String32 stringVal)
  {
    request = req;
    iVal = intVal;
    //sVal = stringVal;
    memcpy(&sVal[0],&stringVal[0],32);
  };
};

/*     struct Command { */
/*           //enum Requests request; */
/*           Reson6046Commands cmd; */
/*           union { */
/*                int iVal; */
/*                float fVal; */
/*           }; */

/*           Command( ) */
/*                { cmd = None; iVal = 0; } */
/*           Command( Reson6046Command::Reson6046Commands inCmd, int newIVal = 0 ) */
/*                { cmd = inCmd; iVal = newIVal; } */
/*           Command( Reson6046Command::Reson6046Commands inCmd, int newIVal = 0, float newFVal = 0.0 ) */
/*                { cmd = inCmd; iVal = newIVal; fVal = newFVal; } */
/*     }; */

    Reson6046Command( MessageQueue::Access access = NoAccess );
    ~Reson6046Command();

    //int read( Command *cmd );
    //int write( Command *cmd );

 protected:

 private:

};

#endif
