//=========================================================================
// Summary  : Reson 6046
// Filename : EdgetechFSDWCommand.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 "EdgetechFSDWIF.h"

#define EdgetechFSDWCommandName "edgetechFSDWCommand"
#define MAXCOMMANDS 100

class EdgetechFSDWCommand : public DriverCommand {
 public:
    enum Requests {
	None = CHILD_COMMANDS_BEGIN_HERE,
	DataLoggingOn,
	DataLoggingOff,
	// PLC Command ID 0
	StartSubsystem,
	StopSubsystem,
	SetPulseFilename,
	SetPingRange,
	SetPingRate,
	SetPingPower,
	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,
	
	SetSBPDuration,
	SetSBPGain,
	
	RecalcInterval,
	RecalcParams,
//	Start7KCenterLogging,
//	Stop7KCenterLogging
	//Data Entry Commands
	RelaySituation
	
    };

struct Command : DriverCommand::Command_Skel {
  int request;
  int iVal;
  float fVal, fVal1, fVal2, fVal3,fVal4, fVal5, fVal6, fVal7,fVal8, fVal9, fVal10, fVal11;
  long lVal, lVal1;
  unsigned char ucVal;
  double dVal, dVal1;
  Boolean bVal;
  EdgetechFSDWIF::String32 sVal;

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

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

  Command(int req, Boolean boolVal) {
    request = req;
    iVal = 0;
    bVal = boolVal;
  };

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

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

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

  Command(int req, long longVal, unsigned char ucharVal, long longVal1, double doubleVal, double doubleVal1,
		  float floatVal, float floatVal1, float floatVal2, float floatVal3,
		  float floatVal4, float floatVal5, float floatVal6, float floatVal7,
		  float floatVal8, float floatVal9, float floatVal10, Boolean boolVal)
  {
	  request = req;
	  lVal = longVal;
	  ucVal = ucharVal;
	  lVal1 = longVal1;
	  dVal = doubleVal;
	  dVal1 = doubleVal1;
	  fVal = floatVal;
	  fVal1 = floatVal1;
	  fVal2 = floatVal2;
	  fVal3 = floatVal3;
	  fVal4 = floatVal4;
	  fVal5 = floatVal5;
	  fVal6 = floatVal6;
	  fVal7 = floatVal7;
	  fVal8 = floatVal8;
	  fVal9 = floatVal9;
	  fVal10 = floatVal10;
	  bVal = boolVal;
  };
};

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

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

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

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

 protected:

 private:

};

#endif
