#ifndef _BENTHOSMODEMCOMMAND_H
#define _BENTHOSMODEMCOMMAND_H

#include "AcousticModemIF.h"
#include "MessageQueue.h"
#include <string.h>

class BenthosModemCommand : public MessageQueue {
 public:
    enum BenthosModemCommands {
	None = 0,
	Power,
	Range,
	DopplerCorrection,
	SendString,
	Transpond,
	SetRegister,
	SendStatus
    };

    struct Command {
	BenthosModemCommands _cmd;
	short _address;
	short _arg1;
	short _arg2;
        AcousticModemIF::modemString string;

      Command() {
	_cmd = BenthosModemCommand::None;
	_address = 0;
	_arg1 = 0;
	_arg2 = 0;
      };

      Command(AcousticModemIF::modemString str) {
	_cmd = BenthosModemCommand::SendString;
	_address = 0;
	_arg1 = 0;
	_arg2 = 0;
	strncpy(string, str, 127);
      };

      Command(BenthosModemCommand::BenthosModemCommands cmd) {
	_cmd = cmd;
	_address = 0;
	_arg1 = 0;
	_arg2 = 0;
      };
       
      Command(BenthosModemCommand::BenthosModemCommands cmd, short modem) {
	_cmd = cmd;
	_address = modem;
	_arg1 = 0;
	_arg2 = 0;
      };

      Command(BenthosModemCommand::BenthosModemCommands cmd,
	      short modem, short arg) {
	_cmd = cmd;
	_address = modem;
	_arg1 = arg;
	_arg2 = 0;
      };

      Command(BenthosModemCommand::BenthosModemCommands cmd, 
	      short modem, short arg1, short arg2) {
	_cmd = cmd;
	_address = modem;
	_arg1 = arg1;
	_arg2 = arg2;
      };
    };

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

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

 protected:

 private:

};

#endif
