libdrmconf 0.14.1
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
80 Q_PROPERTY(bool handsFree READ handsFree WRITE enableHandsFree)
85 Q_PROPERTY(APRSPTT aprsPTT READ aprsPTT WRITE setAPRSPTT)
86
87public:
89 enum class APRSPTT{
90 Off, Start, End
91 };
92 Q_ENUM(APRSPTT)
93
94protected:
96 explicit AnytoneChannelExtension(QObject *parent=nullptr);
97
98public:
100 int frequencyCorrection() const;
102 void setFrequencyCorrection(int corr);
103
105 bool handsFree() const;
107 void enableHandsFree(bool enable);
108
111
114 APRSPTT aprsPTT() const;
116 void setAPRSPTT(APRSPTT mode);
117
118protected:
127};
128
129
133{
134 Q_OBJECT
135
141 Q_PROPERTY(double customCTCSS READ customCTCSS WRITE setCustomCTCSS)
146
147public:
149 enum class SquelchMode {
150 Carrier = 0,
151 SubTone = 1,
152 OptSig = 2,
153 SubToneAndOptSig = 3,
154 SubToneOrOptSig = 4
155 };
156 Q_ENUM(SquelchMode)
157
158public:
160 Q_INVOKABLE explicit AnytoneFMChannelExtension(QObject *parent=nullptr);
161
162 ConfigItem *clone() const;
163
165 bool rxCustomCTCSS() const;
167 void enableRXCustomCTCSS(bool enable);
169 bool txCustomCTCSS() const;
171 void enableTXCustomCTCSS(bool enable);
173 double customCTCSS() const;
175 void setCustomCTCSS(double freq);
176
178 SquelchMode squelchMode() const;
180 void setSquelchMode(SquelchMode mode);
181
185 void setScramblerFrequency(const Frequency &freq);
186
187protected:
198};
199
200
204{
205 Q_OBJECT
206
210 Q_PROPERTY(bool adaptiveTDMA READ adaptiveTDMA WRITE enableAdaptiveTDMA)
212 Q_PROPERTY(bool throughMode READ throughMode WRITE enableThroughMode)
213
214public:
216 Q_INVOKABLE explicit AnytoneDMRChannelExtension(QObject *parent=nullptr);
217
218 ConfigItem *clone() const;
219
221 bool adaptiveTDMA() const;
223 void enableAdaptiveTDMA(bool enable);
225 bool throughMode() const;
227 void enableThroughMode(bool enable);
228
229protected:
234};
235
236
240{
241 Q_OBJECT
242
244 Q_PROPERTY(bool hidden READ hidden WRITE enableHidden)
245
246public:
248 Q_INVOKABLE explicit AnytoneZoneExtension(QObject *parent=nullptr);
249
250 ConfigItem *clone() const;
251
253 bool hidden() const;
255 void enableHidden(bool enable);
256
257protected:
260};
261
262
266{
267 Q_OBJECT
268
271
272public:
274 enum class AlertType {
275 None = 0,
276 Ring = 1,
277 Online = 2
278 };
279 Q_ENUM(AlertType)
280
281public:
283 Q_INVOKABLE explicit AnytoneContactExtension(QObject *parent=nullptr);
284
285 ConfigItem *clone() const;
286
288 AlertType alertType() const;
290 void setAlertType(AlertType type);
291
292protected:
295};
296
297
302{
303 Q_OBJECT
304
306 Q_PROPERTY(Interval txDelay READ txDelay WRITE setTXDelay)
310 Q_PROPERTY(bool passAll READ passAll WRITE enablePassAll)
314 Q_PROPERTY(bool reportMicE READ reportMicE WRITE enableReportMicE)
316 Q_PROPERTY(bool reportObject READ reportObject WRITE enableReportObject)
318 Q_PROPERTY(bool reportItem READ reportItem WRITE enableReportItem)
324 Q_PROPERTY(bool reportNMEA READ reportNMEA WRITE enableReportNMEA)
326 Q_PROPERTY(bool reportStatus READ reportStatus WRITE enableReportStatus)
328 Q_PROPERTY(bool reportOther READ reportOther WRITE enableReportOther)
329
332
333public:
335 enum class Bandwidth {
336 Narrow = 0, Wide = 1
337 };
338 Q_ENUM(Bandwidth)
339
340public:
342 explicit Q_INVOKABLE AnytoneFMAPRSSettingsExtension(QObject *parent=nullptr);
343
344 ConfigItem *clone() const;
345
347 Interval txDelay() const;
349 void setTXDelay(Interval intv);
350
352 Interval preWaveDelay() const;
354 void setPreWaveDelay(Interval ms);
355
357 bool passAll() const;
359 void enablePassAll(bool enable);
360
362 bool reportPosition() const;
364 void enableReportPosition(bool enable);
366 bool reportMicE() const;
368 void enableReportMicE(bool enable);
370 bool reportObject() const;
372 void enableReportObject(bool enable);
374 bool reportItem() const;
376 void enableReportItem(bool enable);
378 bool reportMessage() const;
380 void enableReportMessage(bool enable);
382 bool reportWeather() const;
384 void enableReportWeather(bool enable);
386 bool reportNMEA() const;
388 void enableReportNMEA(bool enable);
390 bool reportStatus() const;
392 void enableReportStatus(bool enable);
394 bool reportOther() const;
396 void enableReportOther(bool enable);
397
399 AnytoneAPRSFrequencyList *frequencies() const;
400
401protected:
428};
429
430#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
AnytoneAPRSFrequencyList(QObject *parent=nullptr)
Empty constructor.
Definition anytone_extension.cc:48
Represents a reference to an APRS frequency.
Definition anytone_extension.hh:47
AnytoneAPRSFrequencyRef(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:38
Implements the config representation of an FM APRS frequency.
Definition anytone_extension.hh:16
Frequency _frequency
The transmit frequency.
Definition anytone_extension.hh:40
bool handsFree
If true, the hands-free feature is enabled for this channel.
Definition anytone_extension.hh:80
AnytoneChannelExtension(QObject *parent=nullptr)
Hidden constructor.
Definition anytone_extension.cc:64
void setFrequencyCorrection(int corr)
Sets the frequency correction.
Definition anytone_extension.cc:76
APRSPTT aprsPTT
Specifies if and when the position is send via the associated APRS system, once the PTT is pressed.
Definition anytone_extension.hh:85
bool _handsFree
If true, the hands-free feature is enabled for this channel.
Definition anytone_extension.hh:122
APRSPTT
Possible APRS PTT modes.
Definition anytone_extension.hh:89
int _frequencyCorrection
The frequency correction.
Definition anytone_extension.hh:120
int frequencyCorrection
Holds the frequency correction in some unknown units.
Definition anytone_extension.hh:78
void enableHandsFree(bool enable)
Enables/disables the hands-free feature for this channel.
Definition anytone_extension.cc:88
void setAPRSPTT(APRSPTT mode)
Sets the APRS PTT mode.
Definition anytone_extension.cc:105
APRSPTT _aprsPTT
Holds the APRS PTT mode.
Definition anytone_extension.hh:126
AnytoneAPRSFrequencyRef * fmAPRSFrequency
A reference to the FM APRS frequency.
Definition anytone_extension.hh:82
AnytoneAPRSFrequencyRef * _fmAPRSFrequency
A reference to the FM APRS frequency.
Definition anytone_extension.hh:124
Implements the AnyTone contact extension.
Definition anytone_extension.hh:266
void setAlertType(AlertType type)
Sets the alert type for the contact.
Definition anytone_extension.cc:294
Q_INVOKABLE AnytoneContactExtension(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:273
AlertType _alertType
Holds the alert type for the contact.
Definition anytone_extension.hh:294
AlertType
Possible ring-tone types.
Definition anytone_extension.hh:274
AlertType alertType
Overrides the ring flag, allows to set None, Ring and Online.
Definition anytone_extension.hh:270
void enableAdaptiveTDMA(bool enable)
Enables/disables the adaptive TDMA mode.
Definition anytone_extension.cc:218
bool _throughMode
If true the through mode is enabled.
Definition anytone_extension.hh:233
Q_INVOKABLE AnytoneDMRChannelExtension(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:196
void enableThroughMode(bool enable)
Enables/disables the through mode.
Definition anytone_extension.cc:230
ConfigItem * clone() const
Clones this item.
Definition anytone_extension.cc:203
bool adaptiveTDMA
If true, the adaptive TDMA mode is enabled.
Definition anytone_extension.hh:210
bool throughMode
If true, the through mode is enabled (what ever that means).
Definition anytone_extension.hh:212
bool _adaptiveTDMA
If true, the adaptive TDMA mode is enabled.
Definition anytone_extension.hh:231
Implements some additional settings for the FM APRS system.
Definition anytone_extension.hh:302
void setPreWaveDelay(Interval ms)
Sets the pre-wave delay in ms.
Definition anytone_extension.cc:340
bool reportMessage
If true, the report message flag is set.
Definition anytone_extension.hh:320
bool _reportWeather
The report weather flag.
Definition anytone_extension.hh:419
bool _reportMessage
The report message flag.
Definition anytone_extension.hh:417
bool _reportMicE
The report Mic-E flag.
Definition anytone_extension.hh:411
bool _reportStatus
The report status flag.
Definition anytone_extension.hh:423
Q_INVOKABLE AnytoneFMAPRSSettingsExtension(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:303
Interval _preWaveDelay
The pre-wave delay.
Definition anytone_extension.hh:405
void enableReportMessage(bool enable)
Enables/disables report message flag.
Definition anytone_extension.cc:412
Interval _txDelay
The transmit delay.
Definition anytone_extension.hh:403
void enableReportStatus(bool enable)
Enables/disables report status flag.
Definition anytone_extension.cc:448
bool reportPosition
If true, the report position flag is set.
Definition anytone_extension.hh:312
bool reportItem
If true, the report item flag is set.
Definition anytone_extension.hh:318
bool _reportOther
The report other flag.
Definition anytone_extension.hh:425
Interval preWaveDelay
The transmit pre-wave delay in milliseconds.
Definition anytone_extension.hh:308
void enableReportObject(bool enable)
Enables/disables report object flag.
Definition anytone_extension.cc:388
bool reportWeather
If true, the report weather flag is set.
Definition anytone_extension.hh:322
bool passAll
If true, all APRS messages are processed, including those with invalid CRC.
Definition anytone_extension.hh:310
bool reportNMEA
If true, the report NMEA flag is set.
Definition anytone_extension.hh:324
AnytoneAPRSFrequencyList * frequencies
The list of additional APRS frequencies.
Definition anytone_extension.hh:331
bool _reportItem
The report item flag.
Definition anytone_extension.hh:415
bool _reportNMEA
The report NMEA flag.
Definition anytone_extension.hh:421
Interval txDelay
The transmit delay in milliseconds.
Definition anytone_extension.hh:306
bool _reportPosition
If true the report position flag is set.
Definition anytone_extension.hh:409
bool _passAll
If true, all APRS messages are processed.
Definition anytone_extension.hh:407
void enableReportMicE(bool enable)
Enables/disables report Mic-E flag.
Definition anytone_extension.cc:376
void enableReportNMEA(bool enable)
Enables/disables report NMEA flag.
Definition anytone_extension.cc:436
void enableReportWeather(bool enable)
Enables/disables report weather flag.
Definition anytone_extension.cc:424
bool _reportObject
The report object flag.
Definition anytone_extension.hh:413
void enableReportItem(bool enable)
Enables/disables report item flag.
Definition anytone_extension.cc:400
Bandwidth
Possible bandwidth settings.
Definition anytone_extension.hh:335
void enableReportOther(bool enable)
Enables/disables report other flag.
Definition anytone_extension.cc:460
void enablePassAll(bool enable)
Enables processing of all received APRS messages, including those with invalid CRC.
Definition anytone_extension.cc:352
bool reportOther
If true, the report other flag is set.
Definition anytone_extension.hh:328
bool reportStatus
If true, the report status flag is set.
Definition anytone_extension.hh:326
void enableReportPosition(bool enable)
Enables/disables report position flag.
Definition anytone_extension.cc:364
bool reportMicE
If true, the report Mic-E flag is set.
Definition anytone_extension.hh:314
bool reportObject
If true, the report object flag is set.
Definition anytone_extension.hh:316
AnytoneAPRSFrequencyList * _frequencies
The list of additional FM APRS frequencies.
Definition anytone_extension.hh:427
void setTXDelay(Interval intv)
Sets the transmit delay.
Definition anytone_extension.cc:328
SquelchMode squelchMode
Holds the squelch mode.
Definition anytone_extension.hh:143
bool txCustomCTCSS
If true, the custom CTCSS tone is transmitted.
Definition anytone_extension.hh:139
SquelchMode _squelchMode
Holds the squelch mode.
Definition anytone_extension.hh:195
void setScramblerFrequency(const Frequency &freq)
Sets the FM scrambler carrier frequency.
Definition anytone_extension.cc:185
void enableRXCustomCTCSS(bool enable)
Enables/disables usage of custom CTCSS frequency for RX.
Definition anytone_extension.cc:139
Frequency _scramblerFrequency
Sets the FM scrambler frequency.
Definition anytone_extension.hh:197
ConfigItem * clone() const
Clones this item.
Definition anytone_extension.cc:125
SquelchMode
Possible squelch mode settings.
Definition anytone_extension.hh:149
void enableTXCustomCTCSS(bool enable)
Enables/disables usage of custom CTCSS frequency for TX.
Definition anytone_extension.cc:150
void setSquelchMode(SquelchMode mode)
Sets the squelch mode.
Definition anytone_extension.cc:173
Q_INVOKABLE AnytoneFMChannelExtension(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:116
double customCTCSS
Holds the custom CTCSS tone frequency in Hz.
Definition anytone_extension.hh:141
bool _rxCustomCTCSS
If true, the custom CTCSS tone is used for RX (open squelch).
Definition anytone_extension.hh:189
void setCustomCTCSS(double freq)
Sets the custom CTCSS frequency in Hz.
Definition anytone_extension.cc:161
Frequency scramblerFrequency
If true, the analog scrabler is enabled.
Definition anytone_extension.hh:145
bool _txCustomCTCSS
If true, the custom CTCSS tone is transmitted.
Definition anytone_extension.hh:191
double _customCTCSS
Holds the custom CTCSS tone frequency in Hz.
Definition anytone_extension.hh:193
bool rxCustomCTCSS
If true, the custom CTCSS tone is used for RX (open squelch).
Definition anytone_extension.hh:137
bool _hidden
If true, the zone is hidden in the menu.
Definition anytone_extension.hh:259
void enableHidden(bool enable)
Enables/disables hidden zone.
Definition anytone_extension.cc:262
Q_INVOKABLE AnytoneZoneExtension(QObject *parent=nullptr)
Default constructor.
Definition anytone_extension.cc:241
bool hidden
If true, the zone is hidden in the menu.
Definition anytone_extension.hh:244
ConfigExtension(QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:1234
Parse context for config objects.
Definition configobject.hh:43
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
virtual ConfigItem * clone() const =0
Clones this item.
ConfigItem(QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:158
ConfigObjectList(const QMetaObject &elementTypes=ConfigItem::staticMetaObject, QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:1511
ConfigObjectReference(const QMetaObject &elementType=ConfigObject::staticMetaObject, QObject *parent=nullptr)
Hidden constructor.
Definition configreference.cc:17
ConfigObject(QObject *parent=nullptr)
Specifies the prefix for every ID assigned to every object during serialization.
Definition configobject.cc:1141
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