#ifndef _SONARDYNECOMMAND_H
#define _SONARDYNECOMMAND_H

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

class SonardyneCommand : public MessageQueue {
  public:
  SonardyneCommand( MessageQueue::Access access = NoAccess );
  ~SonardyneCommand();

    enum SonardyneCommands {
      None = 0,
      Start,
      SetBeacon,
      Stop
    };

    struct Command {
      SonardyneCommands _cmd;
      UsblIF::String32 string;

      Command() {
        _cmd = SonardyneCommand::None;
      };

      Command( SonardyneCommands cmd )
      {
	 _cmd = cmd;
      }

      Command(UsblIF::String32 beacon) {
        _cmd = SonardyneCommand::SetBeacon;
        strncpy(string, beacon, 32);
      };
    };
    
  int read( Command *cmd );
  int write( Command *cmd );

  protected:

  private:

};

#endif
