diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /HoundTransmissionPolicy.hpp | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'HoundTransmissionPolicy.hpp')
| -rw-r--r-- | HoundTransmissionPolicy.hpp | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/HoundTransmissionPolicy.hpp b/HoundTransmissionPolicy.hpp new file mode 100644 index 00000000..052562c8 --- /dev/null +++ b/HoundTransmissionPolicy.hpp @@ -0,0 +1,83 @@ +#ifndef HOUND_TRANSMISSION_POLICY_HPP_ +#define HOUND_TRANSMISSION_POLICY_HPP_ + +namespace HoundTransmissionPolicy +{ + enum class Protocol + { + Classic, + SuperFox + }; + + enum class ReplyState + { + None, + FirstReplyPending, + FirstReplySent + }; + + enum class FrequencyAction + { + Keep, + RandomizeCalling, + Set + }; + + enum class TxMessage + { + None, + Tx3 + }; + + struct State + { + ReplyState replyState {ReplyState::None}; + int foxFrequency {0}; + }; + + struct FrequencyDecision + { + FrequencyAction action {FrequencyAction::Keep}; + int frequency {0}; + }; + + struct ReplyInput + { + Protocol protocol {Protocol::Classic}; + bool tune {false}; + bool autoEnabled {false}; + int sentReport {0}; + int decodedFoxFrequency {0}; + double trPeriod {0.0}; + }; + + struct ReplyPlan + { + bool applyReply {false}; + TxMessage txMessage {TxMessage::None}; + int report {0}; + bool enableAuto {false}; + FrequencyDecision frequencyDecision; + int timeoutMilliseconds {0}; + State nextState; + }; + + struct ClassicTxStartInput + { + bool autoEnabled {false}; + bool tune {false}; + int selectedTxMessage {0}; + int currentTxFrequency {0}; + }; + + struct TxStartPlan + { + FrequencyDecision frequencyDecision; + State nextState; + }; + + ReplyPlan planFoxReportReply (State const&, ReplyInput const&); + TxStartPlan planClassicTxStart (State const&, ClassicTxStartInput const&); +} + +#endif |
