#include <CWGenerator.hxx>
|
| void | setCWSpeed (unsigned int wpm) |
| | set the speed of the cw stream in words per minute
|
| unsigned int | getCWSpeed () |
| | tell us what the current CW speed is
|
| bool | readyForMore () |
| | check envelope stream to see if we have less than 1 second's worth of stuff enqueued
|
| bool | sendChar (char c) |
| | encode a character into the envelope buffer
|
|
| void | appendToOut (std::vector< float > &v) |
| | add a buffer of envelope pieces to the outgoing envelope buffer
|
| void | flushBuffer () |
| | push the current buffer out to the transmitter, filling it with zeros
|
| void | clearBuffer () |
| | empty the current envelope, don't send it along to the TX unit
|
| void | initMorseMap () |
| | setup the mapping from ascii character to morse sequence
|
|
| FDatMBoxPtr | env_stream |
| | this is the stream we send envelope buffers into.
|
| double | sample_rate |
| | we need to know how long a sample is (in time)
|
| unsigned int | env_buf_len |
| | the length of an envelope buffer
|
| unsigned int | words_per_minute |
| unsigned int | edge_sample_count |
| | edges are 'pre-built' this is the length of an edge, in samples
|
| unsigned int | bufs_per_sec |
| | number of envelope buffers required per second.
|
| std::vector< float > | dit |
| | prototype dit buffer
|
| std::vector< float > | dah |
| | prototype dah buffer
|
| std::vector< float > | inter_char_space |
| | prototype space between characters
|
| std::vector< float > | inter_word_space |
| | prototype space between words
|
| std::vector< float > | rising_edge |
| | a gentle shape for the leading edge of a pulse
|
| std::vector< float > | falling_edge |
| | a gentle shape for the trailing edge of a pulse
|
| SoDa::FBufPtr | cur_buf |
| | the current envelope to be filled in
|
| unsigned int | cur_buf_idx |
| | where are we in the buffer?
|
| bool | in_digraph |
| | if true, we're sending a two-character (no inter-char space) sequence (like _AR)
|
| bool | last_was_space |
| | if true, next interword space should be a little short
|
|
| static std::map< char, std::string > | morse_map |
| | map from ascii character to dits-and-dahs
|
Definition at line 46 of file CWGenerator.hxx.
◆ CWGenerator()
| SoDa::CWGenerator::CWGenerator |
( |
FDatMBoxPtr | cw_env_stream, |
|
|
double | _samp_rate, |
|
|
unsigned int | _env_buf_len ) |
|
protected |
Constructor.
- Parameters
-
| cw_env_stream | envelope stream from text-to-CW converter |
| _samp_rate | sample rate for outbound envelope |
| _env_buf_len | length of outbound buffer |
Referenced by make().
◆ appendToOut()
| void SoDa::CWGenerator::appendToOut |
( |
std::vector< float > & | v | ) |
|
|
private |
add a buffer of envelope pieces to the outgoing envelope buffer
- Parameters
-
| v | vector of floating point envelope amplitudes |
◆ clearBuffer()
| void SoDa::CWGenerator::clearBuffer |
( |
| ) |
|
|
private |
empty the current envelope, don't send it along to the TX unit
◆ flushBuffer()
| void SoDa::CWGenerator::flushBuffer |
( |
| ) |
|
|
private |
push the current buffer out to the transmitter, filling it with zeros
◆ getCWSpeed()
| unsigned int SoDa::CWGenerator::getCWSpeed |
( |
| ) |
|
|
inline |
◆ initMorseMap()
| void SoDa::CWGenerator::initMorseMap |
( |
| ) |
|
|
private |
setup the mapping from ascii character to morse sequence
◆ make()
◆ readyForMore()
| bool SoDa::CWGenerator::readyForMore |
( |
| ) |
|
check envelope stream to see if we have less than 1 second's worth of stuff enqueued
- Returns
- true if we need to encode more characters
◆ sendChar()
| bool SoDa::CWGenerator::sendChar |
( |
char | c | ) |
|
encode a character into the envelope buffer
- Parameters
-
| c | the character to be sent |
- Returns
- true if c was a morse-encodable character
◆ setCWSpeed()
| void SoDa::CWGenerator::setCWSpeed |
( |
unsigned int | wpm | ) |
|
set the speed of the cw stream in words per minute
- Parameters
-
◆ bufs_per_sec
| unsigned int SoDa::CWGenerator::bufs_per_sec |
|
private |
number of envelope buffers required per second.
Definition at line 123 of file CWGenerator.hxx.
◆ cur_buf
◆ cur_buf_idx
| unsigned int SoDa::CWGenerator::cur_buf_idx |
|
private |
◆ dah
| std::vector<float> SoDa::CWGenerator::dah |
|
private |
◆ dit
| std::vector<float> SoDa::CWGenerator::dit |
|
private |
◆ edge_sample_count
| unsigned int SoDa::CWGenerator::edge_sample_count |
|
private |
edges are 'pre-built' this is the length of an edge, in samples
Definition at line 121 of file CWGenerator.hxx.
◆ env_buf_len
| unsigned int SoDa::CWGenerator::env_buf_len |
|
private |
◆ env_stream
this is the stream we send envelope buffers into.
Definition at line 115 of file CWGenerator.hxx.
◆ falling_edge
| std::vector<float> SoDa::CWGenerator::falling_edge |
|
private |
a gentle shape for the trailing edge of a pulse
Definition at line 133 of file CWGenerator.hxx.
◆ in_digraph
| bool SoDa::CWGenerator::in_digraph |
|
private |
if true, we're sending a two-character (no inter-char space) sequence (like _AR)
Definition at line 142 of file CWGenerator.hxx.
◆ inter_char_space
| std::vector<float> SoDa::CWGenerator::inter_char_space |
|
private |
◆ inter_word_space
| std::vector<float> SoDa::CWGenerator::inter_word_space |
|
private |
◆ last_was_space
| bool SoDa::CWGenerator::last_was_space |
|
private |
if true, next interword space should be a little short
Definition at line 143 of file CWGenerator.hxx.
◆ morse_map
| std::map<char, std::string> SoDa::CWGenerator::morse_map |
|
staticprivate |
◆ rising_edge
| std::vector<float> SoDa::CWGenerator::rising_edge |
|
private |
a gentle shape for the leading edge of a pulse
Definition at line 132 of file CWGenerator.hxx.
◆ sample_rate
| double SoDa::CWGenerator::sample_rate |
|
private |
we need to know how long a sample is (in time)
Definition at line 116 of file CWGenerator.hxx.
◆ words_per_minute
| unsigned int SoDa::CWGenerator::words_per_minute |
|
private |
The documentation for this class was generated from the following file: