libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
channel.hh
1#ifndef CHANNEL_HH
2#define CHANNEL_HH
3
4#include <QObject>
5#include <QAbstractTableModel>
6
7#include "configobject.hh"
8#include "configreference.hh"
9#include "signaling.hh"
10#include "interval.hh"
11#include "level.hh"
12
13#include "channel_extension.hh"
14#include "opengd77_extension.hh"
15#include "tyt_extensions.hh"
16#include "opengd77_extension.hh"
17#include "anytone_extension.hh"
18#include "commercial_extension.hh"
19
20class Config;
21class RXGroupList;
22class DMRContact;
23class M17Contact;
24class ScanList;
25class FMAPRSSystem;
27class RoamingZone;
28class DMRRadioID;
29
30
37class Channel: public ConfigObject
38{
39 Q_OBJECT
40
46 Q_PROPERTY(Power power READ power WRITE setPower SCRIPTABLE false)
48 Q_PROPERTY(Interval timeout READ timeout WRITE setTimeout)
50 Q_PROPERTY(bool rxOnly READ rxOnly WRITE setRXOnly)
54 Q_PROPERTY(Level vox READ vox WRITE setVOX)
59
61 Q_CLASSINFO("IdPrefix", "ch")
62
63public:
65 enum class Power {
71 };
72 Q_ENUM(Power)
73
79 Q_ENUM(OffsetShift)
80
81
82 enum class Type {
83 None=0, DMR=1, M17=2, FM=4, AM=8, Analog=FM|AM, Digital=DMR|M17, All=Analog|Digital
84 };
85 Q_ENUM(Type);
86 Q_DECLARE_FLAGS(Types, Type);
87 Q_FLAGS(Types);
88
89protected:
92 explicit Channel(QObject *parent=nullptr);
94 Channel(const Channel &other, QObject *parent=nullptr);
95
96public:
97 bool copy(const ConfigItem &other);
98 void clear();
99
101 Frequency rxFrequency() const;
103 bool setRXFrequency(Frequency freq);
105 Frequency txFrequency() const;
107 bool setTXFrequency(Frequency freq);
111 OffsetShift offsetShift() const;
112
114 bool defaultPower() const;
116 Power power() const;
118 void setPower(Power power);
120 void setDefaultPower();
121
123 bool defaultTimeout() const;
125 bool timeoutDisabled() const;
127 Interval timeout() const;
129 bool setTimeout(const Interval &dur);
131 void disableTimeout();
133 void setDefaultTimeout();
134
136 bool rxOnly() const;
138 bool setRXOnly(bool enable);
139
141 bool voxDisabled() const;
143 bool defaultVOX() const;
145 Level vox() const;
147 void setVOX(Level level);
149 void setVOXDefault();
151 void disableVOX();
152
154 const ScanListReference *scanListRef() const;
158 ScanList *scanList() const;
160 bool setScanList(ScanList *list);
161
167
173
174public:
175 bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack());
176 bool link(const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack());
177
178protected:
179 bool populate(YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack());
180
181protected slots:
183 void onReferenceModified();
184
185protected:
207};
208
209
210
215{
216 Q_OBJECT
217
219 Q_PROPERTY(Level squelch READ squelch WRITE setSquelch FINAL)
220
221protected:
223 explicit AnalogChannel(QObject *parent=nullptr);
224
225public:
227 AnalogChannel(const AnalogChannel &other, QObject *parent=nullptr);
228
229
231 bool defaultSquelch() const;
233 bool squelchDisabled() const;
235 Level squelch() const;
239 void disableSquelch();
241 void setSquelchDefault();
242
243
244protected:
247};
248
249
250
258{
259 Q_OBJECT
260
262 Q_PROPERTY(Admit admit READ admit WRITE setAdmit)
264 Q_PROPERTY(SelectiveCall rxTone READ rxTone WRITE setRXTone)
266 Q_PROPERTY(SelectiveCall txTone READ txTone WRITE setTXTone)
271
276
277
278public:
280 enum class Admit {
284 };
285 Q_ENUM(Admit)
286
287
288 enum class Bandwidth {
291 };
292 Q_ENUM(Bandwidth)
293
294public:
296 Q_INVOKABLE explicit FMChannel(QObject *parent=nullptr);
297
298 bool copy(const ConfigItem &other);
299 ConfigItem *clone() const;
300 void clear();
301
303 Admit admit() const;
305 void setAdmit(Admit admit);
306
308 SelectiveCall rxTone() const;
310 bool setRXTone(SelectiveCall code);
312 SelectiveCall txTone() const;
314 bool setTXTone(SelectiveCall code);
315
317 Bandwidth bandwidth() const;
319 bool setBandwidth(Bandwidth bw);
320
322 const FMAPRSSystemReference *aprsRef() const;
326 FMAPRSSystem *aprs() const;
328 void setAPRS(FMAPRSSystem *sys);
329
332
338
339public:
340 YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack());
341 bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack());
342
343protected:
358};
359
360
361
369{
370 Q_OBJECT
371
372public:
374 Q_INVOKABLE explicit AMChannel(QObject *parent=nullptr);
375
376 bool copy(const ConfigItem &other) override;
377 ConfigItem *clone() const override;
378 void clear() override;
379
380public:
381 YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack()) override;
382 bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack()) override;
383};
384
385
386
391{
392 Q_OBJECT
393
394protected:
396 explicit DigitalChannel(QObject *parent=nullptr);
397
398public:
400 DigitalChannel(const DigitalChannel &other, QObject *parent=nullptr);
401};
402
403
404
411{
412 Q_OBJECT
413
415 Q_PROPERTY(Admit admit READ admit WRITE setAdmit)
417 Q_PROPERTY(unsigned colorCode READ colorCode WRITE setColorCode)
419 Q_PROPERTY(TimeSlot timeSlot READ timeSlot WRITE setTimeSlot)
430
437
438public:
440 enum class Admit {
444 };
445 Q_ENUM(Admit)
446
447
448 enum class TimeSlot {
451 };
452 Q_ENUM(TimeSlot)
453
454public:
456 Q_INVOKABLE explicit DMRChannel(QObject *parent=nullptr);
457
458 ConfigItem *clone() const;
459 void clear();
460
462 Admit admit() const;
464 void setAdmit(Admit admit);
465
467 unsigned colorCode() const;
469 bool setColorCode(unsigned cc);
470
472 TimeSlot timeSlot() const;
474 bool setTimeSlot(TimeSlot ts);
475
477 const GroupListReference *groupListRef() const;
481 RXGroupList *groupList() const;
483 bool setGroupList(RXGroupList *rxg);
484
486 const DMRContactReference *contactRef() const;
490 DMRContact *contact() const;
492 bool setContact(DMRContact *c);
493
495 const PositioningSystemReference *aprsRef() const;
502
504 const RoamingZoneReference *roamingRef() const;
508 RoamingZone *roaming() const;
510 bool setRoaming(RoamingZone *zone);
511
513 const DMRRadioIDReference *radioIdRef() const;
517 DMRRadioID *radioId() const;
519 bool setRadioId(DMRRadioID *id);
520
523
528
534
535public:
536 YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack());
537
538protected:
542 unsigned _colorCode;
555
562};
563
564
568{
569 Q_OBJECT
570
572 Q_PROPERTY(unsigned accessNumber READ accessNumber WRITE setAccessNumber)
576 Q_PROPERTY(Mode mode READ mode WRITE setMode)
580 Q_PROPERTY(bool aprs READ aprsEnabled WRITE enableAPRS)
581
582public:
584 enum class Mode {
585 Voice, Data, VoiceAndData
586 };
587 Q_ENUM(Mode)
588
589
590 enum class EncryptionMode {
591 None, AES256, Scrambled
592 };
593 Q_ENUM(EncryptionMode)
594
595public:
597 M17Channel(QObject *parent=nullptr);
599 M17Channel(const M17Channel &other, QObject *parent=nullptr);
600
601 ConfigItem *clone() const;
602 void clear();
603
605 Mode mode() const;
607 void setMode(Mode mode);
608
610 unsigned int accessNumber() const;
612 void setAccessNumber(unsigned int can);
613
615 const M17ContactReference *contactRef() const;
621 M17Contact *contact() const;
623 bool setContact(M17Contact *c);
624
626 bool aprsEnabled() const;
628 void enableAPRS(bool enabled);
629
634
635public:
636 YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack());
637
638protected:
642 unsigned int _accessNumber;
649};
650
651
655{
656 Q_OBJECT
657
658protected:
661 explicit SelectedChannel();
662
663public:
665 virtual ~SelectedChannel();
666
667 bool copy(const ConfigItem &other);
668 ConfigItem *clone() const;
669
671 static SelectedChannel *get();
672
673protected:
676};
677
678
679
688{
689 Q_OBJECT
690
691public:
693 explicit ChannelList(QObject *parent=nullptr);
694
695 int add(ConfigObject *obj, int row=-1, bool unique=true);
696
698 Channel *channel(int idx) const;
700 DMRChannel *findDMRChannel(Frequency rx, Frequency tx, DMRChannel::TimeSlot ts, unsigned cc) const;
703
704public:
705 ConfigItem *allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack());
706};
707
708
709Q_DECLARE_OPERATORS_FOR_FLAGS(Channel::Types)
710
711#endif // CHANNEL_HH
void clear() override
Clears the config object.
Definition channel.cc:591
bool copy(const ConfigItem &other) override
Copies the given item into this one.
Definition channel.cc:573
Q_INVOKABLE AMChannel(QObject *parent=nullptr)
Constructs a new empty AM channel.
Definition channel.cc:565
ConfigItem * clone() const override
Clones this item.
Definition channel.cc:581
bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack()) override
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition channel.cc:608
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack()) override
Recursively serializes the configuration to YAML nodes.
Definition channel.cc:597
bool squelchDisabled() const
Returns true if the squelch is disabled.
Definition channel.cc:372
Level _squelch
Squelch.
Definition channel.hh:246
Level squelch
Specifies the squelch level for the channel.
Definition channel.hh:219
AnalogChannel(QObject *parent=nullptr)
Hidden constructor.
Definition channel.cc:353
void disableSquelch()
Disables the quelch.
Definition channel.cc:388
bool defaultSquelch() const
Returns true if the global default squelch level is used.
Definition channel.cc:368
void setSquelchDefault()
Sets the squelch to the global default value.
Definition channel.cc:392
bool setSquelch(Level squelch)
(Re-)Sets the squelch level [0,10].
Definition channel.cc:380
Implements the settings extension for DMR channels on AnyTone devices.
Definition anytone_extension.hh:204
Implements the settings extension for FM channels on AnyTone devices.
Definition anytone_extension.hh:133
ChannelList(QObject *parent=nullptr)
Constructs an empty channel list.
Definition channel.cc:1070
int add(ConfigObject *obj, int row=-1, bool unique=true)
Adds an element to the list.
Definition channel.cc:1077
ConfigItem * allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Allocates a member objects for the given YAML node.
Definition channel.cc:1122
Channel * channel(int idx) const
Gets the channel at the specified index.
Definition channel.cc:1086
DMRChannel * findDMRChannel(Frequency rx, Frequency tx, DMRChannel::TimeSlot ts, unsigned cc) const
Finds a digital channel with the given frequencies, time slot and color code.
Definition channel.cc:1093
FMChannel * findFMChannelByTxFreq(Frequency freq) const
Finds an analog channel with the given frequency.
Definition channel.cc:1111
The base class of all channels (analog and digital) of a codeplug configuration.
Definition channel.hh:38
ScanList * scanList() const
Returns the default scan list for the channel.
Definition channel.cc:248
bool link(const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
Links the given object to the rest of the codeplug using the given context.
Definition channel.cc:336
void setDefaultTimeout()
Sets the timeout to the global default timeout.
Definition channel.cc:184
Interval timeout
The transmit timeout in seconds.
Definition channel.hh:48
FrequencyOffset offsetFrequency() const
Returns the offset between tx and rx frequency of the channel in Hz.
Definition channel.cc:112
bool defaultTimeout() const
Returns true if the transmit timeout is specified by the global default value.
Definition channel.cc:158
ScanListReference * scanListRef
The scan list.
Definition channel.hh:52
TyTChannelExtension * tyt
The TyT channel extension.
Definition channel.hh:58
bool _defaultPower
If true, the channel uses the global power setting.
Definition channel.hh:191
Frequency _txFreq
The TX frequency in Hz.
Definition channel.hh:189
void setPower(Power power)
(Re-)Sets the power setting of the channel, overrides default power.
Definition channel.cc:139
Power power
The transmit power.
Definition channel.hh:46
OffsetShift offsetShift() const
Returns direction of offset if any.
Definition channel.cc:118
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition channel.hh:65
@ Low
Low power setting (e.g., 1W).
Definition channel.hh:69
@ Mid
Medium power setting (e.g., 2W, if available).
Definition channel.hh:68
@ High
High power setting (e.g, 5W).
Definition channel.hh:67
@ Max
Highest power setting (e.g. > 5W, if available).
Definition channel.hh:66
@ Min
Lowest power setting (e.g., <1W, if available).
Definition channel.hh:70
OffsetShift
Definition channel.hh:74
@ Positive
Positive offset between TX/RX frequencies.
Definition channel.hh:76
@ None
No Offset between TX/RX frequencies.
Definition channel.hh:75
@ Negative
Negative offset between TX/RX frequencies.
Definition channel.hh:77
TyTChannelExtension * tytChannelExtension() const
Returns the channel extension for TyT devices.
Definition channel.cc:279
void setTyTChannelExtension(TyTChannelExtension *ext)
Sets the TyT channel extension.
Definition channel.cc:283
void clear()
Clears the config object.
Definition channel.cc:63
bool voxDisabled() const
Returns true if the VOX is disabled.
Definition channel.cc:210
bool populate(YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition channel.cc:296
TyTChannelExtension * _tytChannelExtension
Owns the TyT channel extension object.
Definition channel.hh:206
OpenGD77ChannelExtension * _openGD77ChannelExtension
Owns the OpenGD77 channel extension object.
Definition channel.hh:204
void setDefaultPower()
Sets the channel to use the default power setting.
Definition channel.cc:148
Interval _txTimeOut
Transmit timeout.
Definition channel.hh:196
bool copy(const ConfigItem &other)
Copies the given item into this one.
Definition channel.cc:47
void disableTimeout()
Disables the transmit timeout.
Definition channel.cc:193
bool _rxOnly
RX only flag.
Definition channel.hh:198
bool rxOnly
If true, the channel is receive only.
Definition channel.hh:50
bool timeoutDisabled() const
Returns true if the transmit timeout is disabled.
Definition channel.cc:163
void setVOX(Level level)
Sets the VOX level [0-10].
Definition channel.cc:222
Channel(QObject *parent=nullptr)
Hidden constructor.
Definition channel.cc:20
ScanListReference * scanListRef()
Returns the reference to the scan list.
bool setRXOnly(bool enable)
Set, whether the channel is RX only.
Definition channel.cc:203
bool defaultVOX() const
Returns true if the VOX is specified by the global default value.
Definition channel.cc:214
bool defaultPower() const
Returns true if the channel uses the global default power setting.
Definition channel.cc:129
Frequency rxFrequency
The receive frequency of the channel in Hz.
Definition channel.hh:42
OpenGD77ChannelExtension * openGD77ChannelExtension() const
Returns the channel extension for the OpenGD77 firmware.
Definition channel.cc:262
bool setTXFrequency(Frequency freq)
(Re-)Sets the TX frequency of the channel in Hz.
Definition channel.cc:101
Level vox
The VOX setting.
Definition channel.hh:54
bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack())
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition channel.cc:312
void disableVOX()
Disables the VOX.
Definition channel.cc:233
void onReferenceModified()
Gets called whenever a referenced object is changed or deleted.
Definition channel.cc:257
Frequency _rxFreq
The RX frequency in Hz.
Definition channel.hh:187
void setOpenGD77ChannelExtension(OpenGD77ChannelExtension *ext)
Sets the OpenGD77 channel extension.
Definition channel.cc:266
bool setScanList(ScanList *list)
(Re-) Sets the default scan list for the channel.
Definition channel.cc:252
bool setTimeout(const Interval &dur)
(Re-)Sets the TX timeout (TOT) in seconds.
Definition channel.cc:173
Level _vox
Holds the VOX level.
Definition channel.hh:200
bool setRXFrequency(Frequency freq)
(Re-)Sets the RX frequency of the channel in Hz.
Definition channel.cc:85
void setVOXDefault()
Sets the VOX level to the default value.
Definition channel.cc:229
ScanListReference _scanlist
Default scan list of the channel.
Definition channel.hh:202
OpenGD77ChannelExtension * openGD77
The OpenGD77 channel extension.
Definition channel.hh:56
Type
Options for type selection flags.
Definition channel.hh:82
Frequency txFrequency
The transmit frequency of the channel in Hz.
Definition channel.hh:44
Power _power
The transmit power setting.
Definition channel.hh:193
Implements the generic extension for all channels configuring commercial features of DMR.
Definition commercial_extension.hh:35
Parse context for config objects.
Definition configobject.hh:43
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
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
Base class of all labeled and named objects.
Definition configobject.hh:192
ConfigObject(QObject *parent=nullptr)
Specifies the prefix for every ID assigned to every object during serialization.
Definition configobject.cc:1141
The config class, representing the codeplug configuration.
Definition config.hh:70
Common DMR channel extended settings.
Definition channel_extension.hh:64
Extension to the DigitalChannel class to implement an DMR channel.
Definition channel.hh:411
DMRChannelExtension * extended
The extended dmr channel settings.
Definition channel.hh:432
ConfigItem * clone() const
Clones this item.
Definition channel.cc:684
CommercialChannelExtension * commercial
The commercial channel extension.
Definition channel.hh:434
void setAnytoneChannelExtension(AnytoneDMRChannelExtension *ext)
Sets the AnyTone DMR channel extension.
Definition channel.cc:872
TimeSlot
Possible timeslots for digital channels.
Definition channel.hh:448
@ TS2
Time/repeater slot 2.
Definition channel.hh:450
@ TS1
Time/repeater slot 1.
Definition channel.hh:449
const GroupListReference * groupListRef() const
Returns a reference to the group list.
Definition channel.cc:730
void setAdmit(Admit admit)
(Re-)Sets the admit criterion for the channel.
Definition channel.cc:698
bool setTimeSlot(TimeSlot ts)
(Re-)Sets the time slot for the channel.
Definition channel.cc:723
const RoamingZoneReference * roamingRef() const
Returns a reference to the roamingRef zone.
Definition channel.cc:799
const DMRContactReference * contactRef() const
Returns a reference to the transmit contactRef.
Definition channel.cc:753
bool setRadioId(DMRRadioID *id)
Associates the given radio ID with this channel.
Definition channel.cc:836
bool setContact(DMRContact *c)
(Re-) Sets the default TX contact for this channel.
Definition channel.cc:768
TimeSlot timeSlot
The time slot of the channel.
Definition channel.hh:419
bool setColorCode(unsigned cc)
(Re-)Sets the color code for the channel.
Definition channel.cc:708
PositioningSystemReference * aprs
The positioning system.
Definition channel.hh:427
unsigned _colorCode
The channel color code.
Definition channel.hh:542
AnytoneDMRChannelExtension * _anytoneExtension
Owns the AnyTone DMR channel extension.
Definition channel.hh:561
Admit
Possible admit criteria of digital channels.
Definition channel.hh:440
@ Always
No admit criteria, allows one to transmit any time.
Definition channel.hh:441
@ Free
Transmit only if channel is free.
Definition channel.hh:442
@ ColorCode
Transmit if channel is free or differs given color code.
Definition channel.hh:443
void setCommercialExtension(CommercialChannelExtension *ext)
Sets the commercial channel extension.
Definition channel.cc:855
AnytoneDMRChannelExtension * anytoneChannelExtension() const
Returns the DMR channel extension for AnyTone devices.
Definition channel.cc:868
DMRRadioIDReference _radioId
Radio ID to use on this channel.
Definition channel.hh:554
Admit _admit
The admit criterion.
Definition channel.hh:540
const DMRRadioIDReference * radioIdRef() const
Returns the reference to the radio ID.
Definition channel.cc:821
PositioningSystemReference _posSystem
The GPS system.
Definition channel.hh:550
DMRChannelExtension * _extended
Owns the extended channel extension.
Definition channel.hh:557
GroupListReference * groupList
The rx group list.
Definition channel.hh:423
RoamingZoneReference * roaming
The roaming zone.
Definition channel.hh:429
DMRContactReference * contact
The tx contact.
Definition channel.hh:425
unsigned colorCode
The color code of the channel.
Definition channel.hh:417
CommercialChannelExtension * commercialExtension() const
Returns the extension for commercial features.
Definition channel.cc:851
void clear()
Clears the config object.
Definition channel.cc:670
Admit admit
The admit criterion of the channel.
Definition channel.hh:415
TimeSlot _timeSlot
The time slot for the channel.
Definition channel.hh:544
GroupListReference _rxGroup
The RX group list for this channel.
Definition channel.hh:546
bool setAPRS(PositionReportingSystem *sys)
Associates the GPS System with this channel.
Definition channel.cc:791
bool setRoaming(RoamingZone *zone)
Associates the given roaming zone with this channel.
Definition channel.cc:814
CommercialChannelExtension * _commercialExtension
Owns the commercial channel extension.
Definition channel.hh:559
const PositioningSystemReference * aprsRef() const
Returns a reference to the positioning system.
Definition channel.cc:776
DMRContactReference _txContact
The default TX contact.
Definition channel.hh:548
Q_INVOKABLE DMRChannel(QObject *parent=nullptr)
Constructs a new empty digital (DMR) channel.
Definition channel.cc:644
RoamingZoneReference _roaming
Roaming zone for the channel.
Definition channel.hh:552
bool setGroupList(RXGroupList *rxg)
(Re-)Sets the RX group list for the channel.
Definition channel.cc:745
DMRRadioIDReference * radioId
The radio ID.
Definition channel.hh:421
AnytoneDMRChannelExtension * anytone
The AnyTone DMR channel extension.
Definition channel.hh:436
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition channel.cc:885
Represents a reference to a DMR contact.
Definition configreference.hh:99
Represents a digital contact, that is a DMR number.
Definition contact.hh:141
Implements a reference to a radio ID.
Definition configreference.hh:263
Represents a DMR radio ID within the abstract config.
Definition radioid.hh:33
DigitalChannel(QObject *parent=nullptr)
Hidden constructor.
Definition channel.cc:628
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
Implements a reference to an APRS system.
Definition configreference.hh:241
Represents an APRS system within the generic config.
Definition gpssystem.hh:136
Common FM channel extended settings.
Definition channel_extension.hh:37
Extension to the AnalogChannel class to implement an analog FM channel.
Definition channel.hh:258
FMChannelExtension * _extended
Owns the extended settings.
Definition channel.hh:355
Bandwidth bandwidth
The band width of the channel.
Definition channel.hh:268
AnytoneFMChannelExtension * anytoneChannelExtension() const
Returns the FM channel extension for AnyTone devices.
Definition channel.cc:517
AnytoneFMChannelExtension * anytone
The AnyTone FM channel extension.
Definition channel.hh:275
bool setBandwidth(Bandwidth bw)
(Re-)Sets the bandwidth of the analog channel.
Definition channel.cc:484
SelectiveCall txTone
The TX tone (CTCSS/DSC).
Definition channel.hh:266
Admit _admit
Holds the admit criterion.
Definition channel.hh:345
Admit admit
The admit criterion of the channel.
Definition channel.hh:262
SelectiveCall rxTone
The RX tone (CTCSS/DSC).
Definition channel.hh:264
Bandwidth _bw
The channel bandwidth.
Definition channel.hh:351
bool copy(const ConfigItem &other)
Copies the given item into this one.
Definition channel.cc:414
Admit
Admit criteria of analog channel.
Definition channel.hh:280
@ Always
Allow always.
Definition channel.hh:281
@ Free
Allow when channel free.
Definition channel.hh:282
@ Tone
Allow when free or wrong ctcss/dcs tone is present.
Definition channel.hh:283
void setAdmit(Admit admit)
(Re-)Sets the admit criterion for the analog channel.
Definition channel.cc:452
ConfigItem * clone() const
Clones this item.
Definition channel.cc:426
SelectiveCall _rxTone
The RX CTCSS/DCS setting.
Definition channel.hh:347
const FMAPRSSystemReference * aprsRef() const
Returns the reference to the APRS system.
Definition channel.cc:491
Q_INVOKABLE FMChannel(QObject *parent=nullptr)
Constructs a new empty analog channel.
Definition channel.cc:402
bool setTXTone(SelectiveCall code)
(Re-)Sets the CTCSS/DCS TX tone, SIGNALING_NONE disables the TX tone.
Definition channel.cc:473
bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack())
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition channel.cc:545
SelectiveCall _txTone
The TX CTCSS/DCS setting.
Definition channel.hh:349
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition channel.cc:534
void setAPRS(FMAPRSSystem *sys)
Sets the APRS system.
Definition channel.cc:505
AnytoneFMChannelExtension * _anytoneExtension
Owns the AnyTone FM channel extension.
Definition channel.hh:357
Bandwidth
Possible bandwidth of an analog channel.
Definition channel.hh:288
@ Narrow
Narrow bandwidth (12.5kHz).
Definition channel.hh:289
@ Wide
Wide bandwidth (25kHz).
Definition channel.hh:290
bool setRXTone(SelectiveCall code)
(Re-)Sets the CTCSS/DCS RX tone, SIGNALING_NONE disables the RX tone.
Definition channel.cc:462
FMChannelExtension * extended
Common extended channel settings.
Definition channel.hh:273
void clear()
Clears the config object.
Definition channel.cc:436
FMAPRSSystemReference _aprsSystem
A reference to the APRS system used on the channel or nullptr if disabled.
Definition channel.hh:353
void setAnytoneChannelExtension(AnytoneFMChannelExtension *ext)
Sets the AnyTone FM channel extension.
Definition channel.cc:521
FMAPRSSystemReference * aprs
The APRS system.
Definition channel.hh:270
Implements a reference to a group list.
Definition configreference.hh:274
Represents a time interval.
Definition interval.hh:11
Some simple class implementing a [1-10] level setting.
Definition level.hh:15
Implements an M17 channel.
Definition channel.hh:568
bool setContact(M17Contact *c)
(Re-) Sets the default TX contact for this channel.
Definition channel.cc:989
M17ContactReference * contact
The transmit contact.
Definition channel.hh:574
void setEncryptionMode(EncryptionMode mode)
Sets the encryption mode of the channel.
Definition channel.cc:1015
Mode _mode
Holds the channel mode.
Definition channel.hh:640
const M17ContactReference * contactRef() const
Returns a reference to the transmit contact.
Definition channel.cc:966
void clear()
Clears the config object.
Definition channel.cc:919
unsigned int _accessNumber
Holds the channel access number.
Definition channel.hh:642
void setMode(Mode mode)
Sets the channel mode.
Definition channel.cc:944
M17ContactReference _txContact
The default TX contact.
Definition channel.hh:644
unsigned accessNumber
The channel access number.
Definition channel.hh:572
ConfigItem * clone() const
Clones this item.
Definition channel.cc:929
Mode mode
The channel mode.
Definition channel.hh:576
bool aprs
If enabled, positioning data is send along with voice and data.
Definition channel.hh:580
EncryptionMode _encryptionMode
Holds the encryption mode for the channel.
Definition channel.hh:648
void setContactRef(M17ContactReference *ref)
Sets the reference to the transmit contact.
Definition channel.cc:976
void enableAPRS(bool enabled)
Enables/disables APRS.
Definition channel.cc:1002
M17Channel(QObject *parent=nullptr)
Constructs a new empty M17 channel.
Definition channel.cc:899
bool _gpsEnabled
If true, positioning information is send alonside voice and data.
Definition channel.hh:646
bool aprsEnabled() const
Returns true if APRS is enabled.
Definition channel.cc:997
EncryptionMode encryptionMode
The encryption mode.
Definition channel.hh:578
EncryptionMode
Possible encryption modes.
Definition channel.hh:590
void setAccessNumber(unsigned int can)
Sets the channel access number (0-15).
Definition channel.cc:957
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition channel.cc:1023
Mode
Possible channel modes.
Definition channel.hh:584
Represents a reference to a M17 contact.
Definition configreference.hh:111
Represents an M17 contact.
Definition contact.hh:214
Implements the channel extensions for the OpenGD77 radios.
Definition opengd77_extension.hh:18
Base class of the position reporting systems, that is APRS and DMR position reporting system.
Definition gpssystem.hh:17
Implements a reference to a positioning system.
Definition configreference.hh:226
Generic representation of a RX group list.
Definition rxgrouplist.hh:14
Implements a reference to a roaming zone.
Definition configreference.hh:285
Represents a RoamingZone within the abstract device configuration.
Definition roamingzone.hh:15
Implements a reference to a scan list.
Definition configreference.hh:215
Generic representation of a scan list.
Definition scanlist.hh:15
static SelectedChannel * _instance
Holds the channel singleton instance.
Definition channel.hh:675
virtual ~SelectedChannel()
Destructor.
Definition channel.cc:1045
ConfigItem * clone() const
Clones this item.
Definition channel.cc:1055
bool copy(const ConfigItem &other)
Copies the given item into this one.
Definition channel.cc:1050
static SelectedChannel * get()
Constructs/gets the singleton instance.
Definition channel.cc:1060
SelectedChannel()
Constructs the "selected" channel.
Definition channel.cc:1039
Represents the TyT channel extension.
Definition tyt_extensions.hh:15
Helper type to represent frequency differences aka offsets.
Definition frequency.hh:69
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:107
Encodes a selective call.
Definition signaling.hh:13