vail-adapter/keyers.h

22 lines
479 B
C
Raw Permalink Normal View History

2022-05-22 21:55:22 -06:00
#pragma once
#define MAX_KEYER_QUEUE 5
typedef enum {
PADDLE_DIT = 0,
2022-05-28 15:18:28 -06:00
PADDLE_DAH = 1,
2022-05-22 21:55:22 -06:00
} Paddle;
class Keyer {
public:
virtual char *Name() = 0;
virtual void Reset() = 0;
virtual void SetDitDuration(unsigned int d) = 0;
virtual void Key(Paddle key, bool pressed) = 0;
// Tick updates internal state,
// and returns whether the keyer is transmitting at time now.
virtual bool Tick(unsigned long now) = 0;
2022-05-22 21:55:22 -06:00
};
Keyer *GetKeyerByNumber(int n);