Logo Search packages:      
Sourcecode: qsstv version File versions  Download package

cw.h

/***************************************************************************
                          cw.h  -  QSSTV
                             -------------------
    begin                : Tue Apr 17 22:27:58 CEST 2001
    copyright            : (C) 2001 by Johan Maes ON1MH
    email                : on1mh@pandora.be
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CW_H
#define CW_H

class morse
{
 public:
  morse();
  ~morse();
  void initCW(const char *st=0);
  bool sendText(int &tone,float &duration);
 private:
  enum eCWState {CWNEW,CWNEXTDOT,CWDOTSPACING,CWNEXTCHAR,CWCHARSPACING,CWWORDSPACING,CWEND,CWFINISHED};
  enum  eCWResult {CWIDLE,CWFALSE,CWTRUE};
  eCWState cwState;
  eCWResult result;
  const char *charLookup(char a);
  bool sendChar(float &duration);
  const char *s;
  const char *dotPtr;
  int dotIndex;
  int charIndex;
  float dotSpacing;
};


#endif

Generated by  Doxygen 1.6.0   Back to index