libdrmconf 0.13.3
A library to program DMR radios.
Loading...
Searching...
No Matches
anytone_extension.hh
1#ifndef ANYTONEEXTENSION_HH
2#define ANYTONEEXTENSION_HH
3
4#include "configobject.hh"
5#include "configreference.hh"
6#include "frequency.hh"
7#include "interval.hh"
8
9#include <QTimeZone>
10
11
12
16{
17 Q_OBJECT
18
19 Q_CLASSINFO("IdPrefix", "af")
20
21 Q_CLASSINFO("frequencyDecription",
22 "Transmit-frequency.")
23
24
25 Q_PROPERTY(Frequency frequency READ frequency WRITE setFrequency)
26
27public:
29 Q_INVOKABLE explicit AnytoneAPRSFrequency(QObject *parent=nullptr);
30
31 ConfigItem *clone() const;
32
34 Frequency frequency() const;
36 void setFrequency(Frequency freq);
37
38protected:
41};
42
43
47{
48 Q_OBJECT
49
50public:
52 explicit AnytoneAPRSFrequencyRef(QObject *parent=nullptr);
53};
54
55
59{
60 Q_OBJECT
61
62public:
64 explicit AnytoneAPRSFrequencyList(QObject *parent=nullptr);
65
66 ConfigItem *allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err);
67};
68
69
74{
75 Q_OBJECT
76
78 Q_PROPERTY(bool talkaround READ talkaround WRITE enableTalkaround)
82 Q_PROPERTY(bool handsFree READ handsFree WRITE enableHandsFree)
87 Q_PROPERTY(APRSPTT aprsPTT READ aprsPTT WRITE setAPRSPTT)
88
89public:
91 enum class APRSPTT{
92 Off, Start, End
93 };
94 Q_ENUM(APRSPTT)
95
96protected:
98 explicit AnytoneChannelExtension(QObject *parent=nullptr);
99
100public:
102 bool talkaround() const;
104 void enableTalkaround(bool enable);
105
107 int frequencyCorrection() const;
109 void setFrequencyCorrection(int corr);
110
112 bool handsFree() const;
114 void enableHandsFree(bool enable);
115
118
121 APRSPTT aprsPTT() const;
123 void setAPRSPTT(APRSPTT mode);
124
125protected:
136};
137
138
142{
143 Q_OBJECT
144
146 Q_PROPERTY(bool reverseBurst READ reverseBurst WRITE enableReverseBurst)
152 Q_PROPERTY(double customCTCSS READ customCTCSS WRITE setCustomCTCSS)
157
158public:
160 enum class SquelchMode {
161 Carrier = 0,
162 SubTone = 1,
163 OptSig = 2,
164 SubToneAndOptSig = 3,
165 SubToneOrOptSig = 4
166 };
167 Q_ENUM(SquelchMode)
168
169public:
171 Q_INVOKABLE explicit AnytoneFMChannelExtension(QObject *parent=nullptr);
172
173 ConfigItem *clone() const;
174
176 bool reverseBurst() const;
178 void enableReverseBurst(bool enable);
179
181 bool rxCustomCTCSS() const;
183 void enableRXCustomCTCSS(bool enable);
185 bool txCustomCTCSS() const;
187 void enableTXCustomCTCSS(bool enable);
189 double customCTCSS() const;
191 void setCustomCTCSS(double freq);
192
194 SquelchMode squelchMode() const;
196 void setSquelchMode(SquelchMode mode);
197
201 void setScramblerFrequency(const Frequency &freq);
202
203protected:
216};
217
218
222{
223 Q_OBJECT
224
226 Q_PROPERTY(bool callConfirm READ callConfirm WRITE enableCallConfirm)
228 Q_PROPERTY(bool sms READ sms WRITE enableSMS)
230 Q_PROPERTY(bool smsConfirm READ smsConfirm WRITE enableSMSConfirm)
232 Q_PROPERTY(bool dataACK READ dataACK WRITE enableDataACK)
234 Q_PROPERTY(bool simplexTDMA READ simplexTDMA WRITE enableSimplexTDMA)
238 Q_PROPERTY(bool adaptiveTDMA READ adaptiveTDMA WRITE enableAdaptiveTDMA)
240 Q_PROPERTY(bool loneWorker READ loneWorker WRITE enableLoneWorker)
242 Q_PROPERTY(bool throughMode READ throughMode WRITE enableThroughMode)
243
244public:
246 Q_INVOKABLE explicit AnytoneDMRChannelExtension(QObject *parent=nullptr);
247
248 ConfigItem *clone() const;
249
251 bool callConfirm() const;
253 void enableCallConfirm(bool enabled);
255 bool sms() const;
257 void enableSMS(bool enable);
259 bool smsConfirm() const;
261 void enableSMSConfirm(bool enabled);
263 bool dataACK() const;
265 void enableDataACK(bool enable);
267 bool simplexTDMA() const;
269 void enableSimplexTDMA(bool enable);
271 bool adaptiveTDMA() const;
273 void enableAdaptiveTDMA(bool enable);
275 bool loneWorker() const;
277 void enableLoneWorker(bool enable);
279 bool throughMode() const;
281 void enableThroughMode(bool enable);
282
283protected:
287 bool _sms;
300};
301
302
306{
307 Q_OBJECT
308
310 Q_PROPERTY(bool hidden READ hidden WRITE enableHidden)
311
312public:
314 Q_INVOKABLE explicit AnytoneZoneExtension(QObject *parent=nullptr);
315
316 ConfigItem *clone() const;
317
319 bool hidden() const;
321 void enableHidden(bool enable);
322
323protected:
326};
327
328
332{
333 Q_OBJECT
334
336 Q_PROPERTY(AlertType alertType READ alertType WRITE setAlertType)
337
338public:
340 enum class AlertType {
341 None = 0,
342 Ring = 1,
343 Online = 2
344 };
345 Q_ENUM(AlertType)
346
347public:
349 Q_INVOKABLE explicit AnytoneContactExtension(QObject *parent=nullptr);
350
351 ConfigItem *clone() const;
352
354 AlertType alertType() const;
356 void setAlertType(AlertType type);
357
358protected:
361};
362
363
368{
369 Q_OBJECT
370
372 Q_PROPERTY(Interval txDelay READ txDelay WRITE setTXDelay)
374 Q_PROPERTY(Interval preWaveDelay READ preWaveDelay WRITE setPreWaveDelay)
376 Q_PROPERTY(bool passAll READ passAll WRITE enablePassAll)
378 Q_PROPERTY(bool reportPosition READ reportPosition WRITE enableReportPosition)
380 Q_PROPERTY(bool reportMicE READ reportMicE WRITE enableReportMicE)
382 Q_PROPERTY(bool reportObject READ reportObject WRITE enableReportObject)
384 Q_PROPERTY(bool reportItem READ reportItem WRITE enableReportItem)
386 Q_PROPERTY(bool reportMessage READ reportMessage WRITE enableReportMessage)
388 Q_PROPERTY(bool reportWeather READ reportWeather WRITE enableReportWeather)
390 Q_PROPERTY(bool reportNMEA READ reportNMEA WRITE enableReportNMEA)
392 Q_PROPERTY(bool reportStatus READ reportStatus WRITE enableReportStatus)
394 Q_PROPERTY(bool reportOther READ reportOther WRITE enableReportOther)
395
397 Q_PROPERTY(AnytoneAPRSFrequencyList *frequencies READ frequencies)
398
399public:
401 enum class Bandwidth {
402 Narrow = 0, Wide = 1
403 };
404 Q_ENUM(Bandwidth)
405
406public:
408 explicit Q_INVOKABLE AnytoneFMAPRSSettingsExtension(QObject *parent=nullptr);
409
410 ConfigItem *clone() const;
411
413 Interval txDelay() const;
415 void setTXDelay(Interval intv);
416
418 Interval preWaveDelay() const;
420 void setPreWaveDelay(Interval ms);
421
423 bool passAll() const;
425 void enablePassAll(bool enable);
426
428 bool reportPosition() const;
430 void enableReportPosition(bool enable);
432 bool reportMicE() const;
434 void enableReportMicE(bool enable);
436 bool reportObject() const;
438 void enableReportObject(bool enable);
440 bool reportItem() const;
442 void enableReportItem(bool enable);
444 bool reportMessage() const;
446 void enableReportMessage(bool enable);
448 bool reportWeather() const;
450 void enableReportWeather(bool enable);
452 bool reportNMEA() const;
454 void enableReportNMEA(bool enable);
456 bool reportStatus() const;
458 void enableReportStatus(bool enable);
460 bool reportOther() const;
462 void enableReportOther(bool enable);
463
465 AnytoneAPRSFrequencyList *frequencies() const;
466
467protected:
494};
495
496#endif // ANYTONEEXTENSION_HH
Represents a list of APRS transmit frequencies.
Definition anytone_extension.hh:59
ConfigItem * allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err)
Allocates a member objects for the given YAML node.
Definition anytone_extension.cc:55
Represents a reference to an APRS frequency.
Definition anytone_extension.hh:47
Implements the config representation of an FM APRS frequency.
Definition anytone_extension.hh:16
Frequency _frequency
The transmit frequency.
Definition anytone_extension.hh:40
Implements the common properties for analog and digital AnyTone channels.
Definition anytone_extension.hh:74
bool _talkaround
If true, talkaround is enabled.
Definition anytone_extension.hh:127
bool handsFree
If true, the hands-free feature is enabled for this channel.
Definition anytone_extension.hh:82
void setFrequencyCorrection(int corr)
Sets the frequency correction.
Definition anytone_extension.cc:88
APRSPTT aprsPTT
Specifies if and when the position is send via the associated APRS system, once the PTT is pressed.
Definition anytone_extension.hh:87
bool _handsFree
If true, the hands-free feature is enabled for this channel.
Definition anytone_extension.hh:131
APRSPTT
Possible APRS PTT modes.
Definition anytone_extension.hh:91
void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition anytone_extension.cc:76
int _frequencyCorrection
The frequency correction.
Definition anytone_extension.hh:129
int frequencyCorrection
Holds the frequency correction in some unknown units.
Definition anytone_extension.hh:80
void enableHandsFree(bool enable)
Enables/disables the hands-free feature for this channel.
Definition anytone_extension.cc:100
void setAPRSPTT(APRSPTT mode)
Sets the APRS PTT mode.
Definition anytone_extension.cc:117
APRSPTT _aprsPTT
Holds the APRS PTT mode.
Definition anytone_extension.hh:135
bool talkaround
If true, talkaround is enabled.
Definition anytone_extension.hh:78
AnytoneAPRSFrequencyRef * fmAPRSFrequency
A reference to the FM APRS frequency.
Definition anytone_extension.hh:84
AnytoneAPRSFrequencyRef * _fmAPRSFrequency
A reference to the FM APRS frequency.
Definition anytone_extension.hh:133
Implements the AnyTone contact extension.
Definition anytone_extension.hh:332
AlertType _alertType
Holds the alert type for the contact.
Definition anytone_extension.hh:360
AlertType
Possible ring-tone types.
Definition anytone_extension.hh:340
Implements the settings extension for DMR channels on AnyTone devices.
Definition anytone_extension.hh:222
void enableAdaptiveTDMA(bool enable)
Enables/disables the adaptive TDMA mode.
Definition anytone_extension.cc:303
void enableDataACK(bool enable)
Enables/disables the data acknowledgement.
Definition anytone_extension.cc:279
void enableSMS(bool enable)
Enables/disables SMS reception.
Definition anytone_extension.cc:255
bool _throughMode
If true the through mode is enabled.
Definition anytone_extension.hh:299
bool loneWorker
If true, the lone-worker feature is enabled for this channel.
Definition anytone_extension.hh:240
void enableLoneWorker(bool enable)
Enables the lone-worker feature for this channel.
Definition anytone_extension.cc:315
void enableThroughMode(bool enable)
Enables/disables the through mode.
Definition anytone_extension.cc:327
void enableSMSConfirm(bool enabled)
Enables/disables the SMS confirmation.
Definition anytone_extension.cc:267
bool simplexTDMA
If true, the simplex TDMA mode is enabled (aka DCDM).
Definition anytone_extension.hh:234
ConfigItem * clone() const
Clones this item.
Definition anytone_extension.cc:229
bool _smsConfirm
If true, the SMS confirmation is enabled.
Definition anytone_extension.hh:289
void enableSimplexTDMA(bool enable)
Enables/disables the simplex TDMA (DCDM) mode.
Definition anytone_extension.cc:291
bool _simplexTDMA
If true, the simplex TDMA mode is enabled.
Definition anytone_extension.hh:293
bool sms
If true, SMS reception is enabled.
Definition anytone_extension.hh:228
bool _dataACK
If true, the data acknowledgement is enabled.
Definition anytone_extension.hh:291
bool _sms
If true, the SMS reception is enabled.
Definition anytone_extension.hh:287
bool adaptiveTDMA
If true, the adaptive TDMA mode is enabled.
Definition anytone_extension.hh:238
bool callConfirm
If true, the call confirmation is enabled.
Definition anytone_extension.hh:226
bool smsConfirm
If true, the SMS confirmation is enabled.
Definition anytone_extension.hh:230
bool throughMode
If true, the through mode is enabled (what ever that means).
Definition anytone_extension.hh:242
bool dataACK
If true, the radio will response to received data packages.
Definition anytone_extension.hh:232
bool _callConfirm
If true, the call confirmation is enabled.
Definition anytone_extension.hh:285
void enableCallConfirm(bool enabled)
Enables/disables the call confirmation.
Definition anytone_extension.cc:243
bool _adaptiveTDMA
If true, the adaptive TDMA mode is enabled.
Definition anytone_extension.hh:295
bool _loneWorker
If true the lone-worker feature is enabled.
Definition anytone_extension.hh:297
Implements some additional settings for the FM APRS system.
Definition anytone_extension.hh:368
bool _reportWeather
The report weather flag.
Definition anytone_extension.hh:485
bool _reportMessage
The report message flag.
Definition anytone_extension.hh:483
bool _reportMicE
The report Mic-E flag.
Definition anytone_extension.hh:477
bool _reportStatus
The report status flag.
Definition anytone_extension.hh:489
Interval _preWaveDelay
The pre-wave delay.
Definition anytone_extension.hh:471
Interval _txDelay
The transmit delay.
Definition anytone_extension.hh:469
bool _reportOther
The report other flag.
Definition anytone_extension.hh:491
bool _reportItem
The report item flag.
Definition anytone_extension.hh:481
bool _reportNMEA
The report NMEA flag.
Definition anytone_extension.hh:487
bool _reportPosition
If true the report position flag is set.
Definition anytone_extension.hh:475
bool _passAll
If true, all APRS messages are processed.
Definition anytone_extension.hh:473
bool _reportObject
The report object flag.
Definition anytone_extension.hh:479
Bandwidth
Possible bandwidth settings.
Definition anytone_extension.hh:401
AnytoneAPRSFrequencyList * _frequencies
The list of additional FM APRS frequencies.
Definition anytone_extension.hh:493
Implements the settings extension for FM channels on AnyTone devices.
Definition anytone_extension.hh:142
SquelchMode squelchMode
Holds the squelch mode.
Definition anytone_extension.hh:154
bool txCustomCTCSS
If true, the custom CTCSS tone is transmitted.
Definition anytone_extension.hh:150
SquelchMode _squelchMode
Holds the squelch mode.
Definition anytone_extension.hh:213
bool _reverseBurst
If true, the CTCSS phase-reverse burst at the end of transmission is enabled.
Definition anytone_extension.hh:205
void setScramblerFrequency(const Frequency &freq)
Sets the FM scrambler carrier frequency.
Definition anytone_extension.cc:209
void enableRXCustomCTCSS(bool enable)
Enables/disables usage of custom CTCSS frequency for RX.
Definition anytone_extension.cc:163
Frequency _scramblerFrequency
Sets the FM scrambler frequency.
Definition anytone_extension.hh:215
ConfigItem * clone() const
Clones this item.
Definition anytone_extension.cc:137
SquelchMode
Possible squelch mode settings.
Definition anytone_extension.hh:160
void enableTXCustomCTCSS(bool enable)
Enables/disables usage of custom CTCSS frequency for TX.
Definition anytone_extension.cc:174
void setSquelchMode(SquelchMode mode)
Sets the squelch mode.
Definition anytone_extension.cc:197
bool reverseBurst
If true, the CTCSS phase-reverse burst at the end of transmission is enabled.
Definition anytone_extension.hh:146
void enableReverseBurst(bool enable)
Enables/disables the CTCSS phase-reverse burst.
Definition anytone_extension.cc:151
double customCTCSS
Holds the custom CTCSS tone frequency in Hz.
Definition anytone_extension.hh:152
bool _rxCustomCTCSS
If true, the custom CTCSS tone is used for RX (open squelch).
Definition anytone_extension.hh:207
void setCustomCTCSS(double freq)
Sets the custom CTCSS frequency in Hz.
Definition anytone_extension.cc:185
Frequency scramblerFrequency
If true, the analog scrabler is enabled.
Definition anytone_extension.hh:156
bool _txCustomCTCSS
If true, the custom CTCSS tone is transmitted.
Definition anytone_extension.hh:209
double _customCTCSS
Holds the custom CTCSS tone frequency in Hz.
Definition anytone_extension.hh:211
bool rxCustomCTCSS
If true, the custom CTCSS tone is used for RX (open squelch).
Definition anytone_extension.hh:148
Implements the AnyTone extensions for zones.
Definition anytone_extension.hh:306
bool _hidden
If true, the zone is hidden in the menu.
Definition anytone_extension.hh:325
Base class of all device/vendor specific configuration extensions.
Definition configobject.hh:241
Parse context for config objects.
Definition configobject.hh:43
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
List class for config objects.
Definition configobject.hh:344
Implements a reference to a config object.
Definition configreference.hh:17
Base class of all labeled and named objects.
Definition configobject.hh:194
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
Represents a time interval.
Definition interval.hh:11
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:107