35 {.key =
" ", .value =
" "},
37 {.key =
"A", .value =
".-"},
38 {.key =
"B", .value =
"-..."},
39 {.key =
"C", .value =
"-.-."},
40 {.key =
"D", .value =
"-.."},
41 {.key =
"E", .value =
"."},
42 {.key =
"F", .value =
"..-."},
43 {.key =
"G", .value =
"--."},
44 {.key =
"H", .value =
"...."},
45 {.key =
"I", .value =
".."},
46 {.key =
"J", .value =
".---"},
47 {.key =
"K", .value =
"-.-"},
48 {.key =
"L", .value =
".-.."},
49 {.key =
"M", .value =
"--"},
50 {.key =
"N", .value =
"-."},
51 {.key =
"O", .value =
"---"},
52 {.key =
"P", .value =
".--."},
53 {.key =
"Q", .value =
"--.-"},
54 {.key =
"R", .value =
".-."},
55 {.key =
"S", .value =
"..."},
56 {.key =
"T", .value =
"-"},
57 {.key =
"U", .value =
"..-"},
58 {.key =
"V", .value =
"...-"},
59 {.key =
"W", .value =
".--"},
60 {.key =
"X", .value =
"-..-"},
61 {.key =
"Y", .value =
"-.--"},
62 {.key =
"Z", .value =
"--.."},
64 {.key =
"0", .value =
"-----"},
65 {.key =
"1", .value =
".----"},
66 {.key =
"2", .value =
"..---"},
67 {.key =
"3", .value =
"...--"},
68 {.key =
"4", .value =
"....-"},
69 {.key =
"5", .value =
"....."},
70 {.key =
"6", .value =
"-...."},
71 {.key =
"7", .value =
"--..."},
72 {.key =
"8", .value =
"---.."},
73 {.key =
"9", .value =
"----."},
75 {.key =
".", .value =
".-.-.-"},
76 {.key =
",", .value =
"--..--"},
77 {.key =
"?", .value =
"..--.."},
78 {.key =
"'", .value =
".----."},
79 {.key =
"!", .value =
"-.-.--"},
80 {.key =
"/", .value =
"-..-."},
81 {.key =
"(", .value =
"-.--."},
82 {.key =
")", .value =
"-.--.-"},
83 {.key =
"&", .value =
".-..."},
84 {.key =
":", .value =
"---..."},
85 {.key =
"=", .value =
"-...-"},
86 {.key =
"+", .value =
".-.-."},
87 {.key =
"-", .value =
"-....-"},
88 {.key =
"_", .value =
"..--.-"},
89 {.key =
"\"", .value =
".-..-."},
90 {.key =
"$", .value =
"...-..-"},
91 {.key =
"@", .value =
".--.-."},
92 {.key = NULL, .value = NULL},
101 {.key =
"À", .value =
".--.-"},
102 {.key =
"Ä", .value =
".-.-"},
103 {.key =
"Å", .value =
".--.-"},
104 {.key =
"Æ", .value =
".-.-"},
105 {.key =
"Ą", .value =
".-.-"},
106 {.key =
"Ć", .value =
"-.-.."},
107 {.key =
"Ĉ", .value =
"-.-.."},
108 {.key =
"Ç", .value =
"-.-.."},
109 {.key =
"Ð", .value =
"..--."},
110 {.key =
"É", .value =
"..-.."},
111 {.key =
"È", .value =
".-..-"},
112 {.key =
"Ę", .value =
"..-.."},
113 {.key =
"Ĝ", .value =
"--.-."},
114 {.key =
"Ĥ", .value =
"----"},
115 {.key =
"Ĵ", .value =
".---."},
116 {.key =
"Ł", .value =
".-..-"},
117 {.key =
"Ń", .value =
"--.--"},
118 {.key =
"Ñ", .value =
"--.--"},
119 {.key =
"Ó", .value =
"---."},
120 {.key =
"Ö", .value =
"---."},
121 {.key =
"Ø", .value =
"---."},
122 {.key =
"Ś", .value =
"...-..."},
123 {.key =
"Ŝ", .value =
"...-."},
124 {.key =
"Š", .value =
"----"},
125 {.key =
"Þ", .value =
".--.."},
126 {.key =
"Ü", .value =
"..--"},
127 {.key =
"Ŭ", .value =
"..--"},
128 {.key =
"Ź", .value =
"--..-."},
129 {.key =
"Ż", .value =
"--..-"},
130 {.key =
"<CH>", .value =
"----"},
135 {.key =
"<END_OF_WORK>", .value =
"...-.-"},
136 {.key =
"<ERROR>", .value =
"........"},
137 {.key =
"<INVITATION>", .value =
"-.-"},
138 {.key =
"<START>", .value =
"-.-.-"},
139 {.key =
"<NEW_MESSAGE>", .value =
".-.-."},
140 {.key =
"<VERIFIED>", .value =
"...-."},
141 {.key =
"<WAIT>", .value =
".-..."},
142 {.key = NULL, .value = NULL},
313 double amplitude,
double frequency,
double dit_period,
314 double slope_period, uint32_t sample_rate,
318 slope_period, sample_rate, time_unit);
332 if (!strncmp(sym, candidate->
key, strlen(candidate->
key))) {
347 if (!strncmp(sym, table->
key, len)
348 && (table->
key[len] == 0)) {
531 size_t written_sz = 0;
#define SSTVENC_CW_MOD_STATE_DAHSPACE
#define SSTVENC_CW_MOD_STATE_INIT
#define SSTVENC_CW_MOD_STATE_DONE
#define SSTVENC_CW_MOD_STATE_MARK
#define SSTVENC_CW_MOD_STATE_DITSPACE
#define SSTVENC_CW_MOD_STATE_NEXT_SYM
struct sstvenc_oscillator osc
struct sstvenc_pulseshape ps
const struct sstvenc_cw_pair * symbol
static struct sstvenc_cw_pair sstvenc_cw_mbsymbols[]
static struct sstvenc_cw_pair sstvenc_cw_symbols[]
static const struct sstvenc_cw_pair * sstvenc_cw_get_symbol(const char *sym)
static void sstvenc_cw_end_subsym(struct sstvenc_cw_mod *const cw)
void sstvenc_cw_compute(struct sstvenc_cw_mod *const cw)
static void sstvenc_cw_end_symbol(struct sstvenc_cw_mod *const cw)
static const struct sstvenc_cw_pair * sstvenc_cw_symbol_match(const char *sym, const struct sstvenc_cw_pair *candidate)
static void sstvenc_cw_handle_state_done(struct sstvenc_cw_mod *const cw)
static void sstvenc_cw_get_next_sym(struct sstvenc_cw_mod *const cw)
static void sstvenc_cw_handle_state_ditspace(struct sstvenc_cw_mod *const cw)
static void sstvenc_cw_handle_state_dahspace(struct sstvenc_cw_mod *const cw)
void sstvenc_cw_init(struct sstvenc_cw_mod *const cw, const char *text, double amplitude, double frequency, double dit_period, double slope_period, uint32_t sample_rate, uint8_t time_unit)
static const struct sstvenc_cw_pair * sstvenc_cw_symbol_lookup(const char *sym, const struct sstvenc_cw_pair *table, uint8_t len)
static void sstvenc_cw_start_mark(struct sstvenc_cw_mod *const cw)
static void sstvenc_cw_handle_state_mark(struct sstvenc_cw_mod *const cw)
size_t sstvenc_cw_fill_buffer(struct sstvenc_cw_mod *const cw, double *buffer, size_t buffer_sz)
void sstvenc_osc_init(struct sstvenc_oscillator *const osc, double amplitude, double frequency, double offset, uint32_t sample_rate)
void sstvenc_osc_compute(struct sstvenc_oscillator *const osc)
#define SSTVENC_PS_PHASE_HOLD
#define SSTVENC_PS_PHASE_FALL
#define SSTVENC_PS_PHASE_INIT
#define SSTVENC_PS_PHASE_RISE
#define SSTVENC_PS_PHASE_DONE
void sstvenc_ps_compute(struct sstvenc_pulseshape *const ps)
void sstvenc_ps_init(struct sstvenc_pulseshape *const ps, double amplitude, double rise_time, double hold_time, double fall_time, uint32_t sample_rate, uint8_t time_unit)
void sstvenc_ps_reset(struct sstvenc_pulseshape *const ps, double hold_time, uint8_t time_unit)
void sstvenc_ps_reset_samples(struct sstvenc_pulseshape *const ps, uint32_t hold_time)
#define SSTVENC_TS_UNIT_SECONDS
uint32_t sstvenc_ts_unit_to_samples(double time, uint32_t sample_rate, uint8_t unit)