libdrmconf 0.14.1
A library to program DMR radios.
Loading...
Searching...
No Matches
dmr6x2uv2_codeplug.hh
1#ifndef DMR6X2UV2CODEPLUG_HH
2#define DMR6X2UV2CODEPLUG_HH
3
4#include "dmr6x2uv_codeplug.hh"
5#include "d878uv_codeplug.hh"
6
7
16{
17 Q_OBJECT
18
19protected:
20public:
26 {
27 protected:
29 struct KeyFunction {
30 public:
35
36 protected:
38 typedef enum {
39 Off = 0x00, Voltage = 0x01, Power = 0x02, Repeater = 0x03, Reverse = 0x04,
40 Encryption = 0x05, Call = 0x06, VOX = 0x07, ToggleVFO = 0x08, SubPTT = 0x09,
41 Scan = 0x0a, WFM = 0x0b, Alarm = 0x0c, RecordSwitch = 0x0d, Record = 0x0e, SMS = 0x0f,
42 Dial = 0x10, GPSInformation = 0x11, Monitor = 0x12, ToggleMainChannel = 0x13, HotKey1 = 0x14,
43 HotKey2 = 0x15, HotKey3 = 0x16, HotKey4 = 0x17, HotKey5 = 0x18, HotKey6 = 0x19,
44 WorkAlone = 0x1a, SkipChannel = 0x1b, DMRMonitor = 0x1c, SubChannel = 0x1d,
45 PriorityZone = 0x1e, VFOScan = 0x1f, MICSoundQuality = 0x20, LastCallReply = 0x21,
46 ChannelType = 0x22, SimplexRepeater = 0x23, Ranging = 0x24, ChannelRanging = 0x25,
47 MaxVolume = 0x26, Slot = 0x27, Squelch = 0x28, Roaming = 0x29, Zone = 0x2a, RoamingSet = 0x2b,
48 Mute = 0x02c, CtcssDcsSet=0x2d, APRSType = 0x2e, APRSSet = 0x2f, TBSTSend = 0x30,
49 BluetoothToggle = 0x31, GPSToggle = 0x32, ChannelName = 0x33, APRSSend = 0x34,
50 APRSInfo = 0x35, GPSRoaming = 0x36, CTCSSScan = 0x37, DIMShut = 0x38, SatellitePredict = 0x39
52 };
53
54 protected:
56 GeneralSettingsElement(uint8_t *ptr, unsigned size);
57
58 public:
60 explicit GeneralSettingsElement(uint8_t *ptr);
61
63 static constexpr unsigned int size() { return 0x00e0; }
64
85
86 bool fromConfig(const Flags &flags, Context &ctx);
87 bool updateConfig(Context &ctx);
88
89 protected:
95
96 };
97
98
101 {
102 public:
103 enum class GNSS {
104 GPS=0, BeiDou=1, Both=2
105 };
106
107 enum class ChannelIndexDisplay {
108 GlobalIndex = 0, IndexWithinZone = 1
109 };
110
111 enum class Power {
112 Low = 0, Medium = 1, High = 2, Turbo = 3
113 };
114
115 protected:
117 ExtendedSettingsElement(uint8_t *ptr, unsigned size);
118
119 public:
121 explicit ExtendedSettingsElement(uint8_t *ptr);
122
124 static constexpr unsigned int size() { return 0x0030; }
125
127 virtual bool bluetoothEnabled() const;
129 virtual void enableBluetooth(bool enable);
130
132 virtual bool internalMicEnabled() const;
134 virtual void enableInternalMic(bool enable);
135
137 virtual bool internalSpeakerEnabled() const;
139 virtual void enableInternalSpeaker(bool enable);
140
142 virtual unsigned int bluetoothMicGain() const;
144 virtual void setBluetoothMicGain(unsigned int gain);
145
147 virtual unsigned int bluetoothSpeakerGain() const;
149 virtual void setBluetoothSpeakerGain(unsigned int gain);
150
152 virtual Interval bluetoothHoldDuration() const;
154 virtual void setBluetoothHoldDuration(const Interval &dur);
155
157 virtual Interval bluetoothHoldDelay() const;
159 virtual void setBluetoothHoldDelay(const Interval &dur);
160
162 virtual bool bluetoothPTTLatchEnabled() const;
164 virtual void enableBluetoothPTTLatch(bool enable);
165
167 virtual Interval bluetoothPTTSleepTimeout() const;
169 virtual void setBluetoothPTTSleepTimeout(const Interval &dur);
170
172 virtual bool fmIdleToneEnabled() const;
174 virtual void enableFMIdleTone(bool enable);
175
177 virtual Level fmMicGain() const;
179 virtual void setFMMicGain(Level gain);
180
182 virtual bool totWarningToneEnabled() const;
184 virtual void enableTOTWarningTone(bool enable);
185
187 virtual bool atpcEnabled() const;
189 virtual void enableATPC(bool enable);
190
192 virtual GNSSSettings::Systems gnss() const;
194 virtual void setGNSS(GNSSSettings::Systems gnss);
195
197 virtual ChannelIndexDisplay channelIndexDisplay() const;
199 virtual void setChannelIndexDisplay(ChannelIndexDisplay mode);
200
202 virtual bool wxAlarmEnabled() const;
204 virtual void enableWXAlarm(bool enable);
205
207 virtual bool locationSourceGNSS() const;
209 virtual unsigned int fixedLocationIndex() const;
211 virtual void setFixedLocationIndex(unsigned int idx);
213 virtual void setLocationSourceGNSS();
214
216 virtual Channel::Power satPower() const;
218 virtual void setSatPower(Channel::Power power);
219
221 virtual unsigned int satSquelchLevel() const;
223 virtual void setSatSquelchLevel(unsigned int level);
224
225 bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
226 bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
227 bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack());
228
229 public:
232 static constexpr Range<unsigned int> micGain() { return {0,4}; }
233 };
234
235 protected:
237 struct Offset {
239 static constexpr unsigned int bluetoothEnable() { return 0x0016; }
240 static constexpr unsigned int internalMicEnable() { return 0x0017; }
241 static constexpr unsigned int internalSpeakerEnable() { return 0x0018; }
242 static constexpr unsigned int bluetoothMicGain() { return 0x0019; }
243 static constexpr unsigned int bluetoothSpeakerGain() { return 0x001a; }
244 static constexpr unsigned int bluetoothHoldDuration() { return 0x001b; }
245 static constexpr unsigned int bluetoothHoldDelay() { return 0x001c; }
246 static constexpr unsigned int bluetoothPTTLatch() { return 0x001d; }
247 static constexpr unsigned int bluetoothPTTSleepTimeout() { return 0x001e; }
248 static constexpr unsigned int fmIdleTone() { return 0x001f; }
249 static constexpr unsigned int fmMicGain() { return 0x0020; }
250 static constexpr unsigned int totWarningTone() { return 0x0021; }
251 static constexpr unsigned int atpc() { return 0x0022; }
252 static constexpr unsigned int gnss() { return 0x0023; }
253 static constexpr unsigned int displayChannelIndex() { return 0x0024; }
254 static constexpr unsigned int wxAlarm() { return 0x0026; }
255 static constexpr unsigned int fixedLocationIndex() { return 0x0027; }
256 static constexpr unsigned int satPower() { return 0x0028; }
257 static constexpr unsigned int satSquelch() { return 0x0029; }
259 };
260 };
261
262
265 {
266 protected:
268 APRSFilterElement(uint8_t *ptr, size_t size);
269
270 public:
272 APRSFilterElement(uint8_t *ptr);
273
274 void clear() override;
275 bool isValid() const override;
276
278 static constexpr unsigned int size() { return 0x08; }
279
281 virtual QString call() const;
283 virtual void setCall(const QString &call);
284
286 virtual unsigned int ssid() const;
288 virtual void setSSID(unsigned int ssid);
289
290 public:
292 struct Limit: public Element::Limit {
294 static constexpr unsigned int call() { return 6; }
295 };
296
297 protected:
299 struct Offset: public Element::Offset {
301 static constexpr unsigned int valid() { return 0x0000; }
302 static constexpr unsigned int call() { return 0x0001; }
303 static constexpr unsigned int ssid() { return 0x0007; }
305 };
306 };
307
308
311 {
312 protected:
314 GPSRoamingZoneElement(uint8_t *ptr, size_t size);
315
316 public:
318 GPSRoamingZoneElement(uint8_t *ptr);
319
321 static constexpr unsigned int size() { return 0x0020; }
322
323 void clear() override;
324 bool isValid() const override;
325
327 virtual bool hasRoamingZoneIndex() const;
329 virtual unsigned int roamingZoneIndex() const;
331 virtual void setRoamingZoneIndex(unsigned int idx);
333 virtual void clearRoamingZoneIndex();
334
336 virtual QGeoCoordinate coordinate() const;
338 virtual void setCoordinate(const QGeoCoordinate &coor);
339
341 virtual unsigned int radius() const;
343 virtual void setRadius(unsigned int radius);
344
345 protected:
347 struct Offset: Element::Offset {
349 static constexpr unsigned int valid() { return 0x0000; }
350 static constexpr unsigned int zoneIndex() { return 0x0001; }
351 static constexpr unsigned int latDegrees() { return 0x0002; }
352 static constexpr unsigned int latMinutes() { return 0x0003; }
353 static constexpr unsigned int latSeconds() { return 0x0004; }
354 static constexpr unsigned int latHemisphere() { return 0x0005; }
355 static constexpr unsigned int lonDegrees() { return 0x0006; }
356 static constexpr unsigned int lonMinutes() { return 0x0007; }
357 static constexpr unsigned int lonSeconds() { return 0x0008; }
358 static constexpr unsigned int lonHemisphere() { return 0x0009; }
359 static constexpr unsigned int radius() { return 0x000c; }
361 };
362 };
363
364
365public:
367 explicit DMR6X2UV2Codeplug(const QString &label, QObject *parent=nullptr);
368
369public:
371 explicit DMR6X2UV2Codeplug(QObject *parent=nullptr);
372
373public:
377 static constexpr unsigned int aprsFilter() { return 32; }
379 static constexpr unsigned int gpsRoamingZones() { return 32; }
380 };
381
382protected:
383 void allocateUpdated() override;
384 void allocateForEncoding() override;
385 void allocateForDecoding() override;
386
387 bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override;
388 bool createElements(Context &ctx, const ErrorStack &err=ErrorStack()) override;
389
390 void allocateGeneralSettings() override;
391 bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override;
392 bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override;
393 bool linkGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override;
394
395protected:
399 static constexpr unsigned int aprsFilterBank() { return 0x02501800; }
400 static constexpr unsigned int gpsRoamingZones() { return 0x02504000; }
402 };
403};
404
405#endif // DMR6X2UV2CODEPLUG_HH
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition anytone_codeplug.cc:4417
KeyFunction
All possible key functions.
Definition anytone_settingsextension.hh:267
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition channel.hh:64
Base class for all codeplug contexts.
Definition codeplug.hh:331
Represents the abstract base class of all codeplug elements.
Definition codeplug.hh:65
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:24
uint32_t size() const
Returns the total size of the DFU file.
Definition dfufile.cc:52
virtual unsigned int ssid() const
Returns the SSID.
Definition dmr6x2uv2_codeplug.cc:734
static constexpr unsigned int size()
The size of the element.
Definition dmr6x2uv2_codeplug.hh:278
APRSFilterElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:696
virtual void setCall(const QString &call)
Sets the callsign.
Definition dmr6x2uv2_codeplug.cc:728
virtual QString call() const
Returns the call.
Definition dmr6x2uv2_codeplug.cc:723
virtual void setSSID(unsigned int ssid)
Sets the SSID.
Definition dmr6x2uv2_codeplug.cc:739
virtual Level fmMicGain() const
Returns the FM mic gain [1-10].
Definition dmr6x2uv2_codeplug.cc:434
virtual void enableBluetoothPTTLatch(bool enable)
Enable/disable bluetooth PTT latch.
Definition dmr6x2uv2_codeplug.cc:402
virtual void enableInternalSpeaker(bool enable)
Enables/disables the internal speaker additionally to the bluetooth output.
Definition dmr6x2uv2_codeplug.cc:327
virtual void enableTOTWarningTone(bool enable)
Enables/disables transmit timeout warning tone.
Definition dmr6x2uv2_codeplug.cc:450
virtual void setFMMicGain(Level gain)
Sets the FM mic gain [1-10].
Definition dmr6x2uv2_codeplug.cc:439
virtual void setBluetoothSpeakerGain(unsigned int gain)
Sets the bluetooth speaker gain.
Definition dmr6x2uv2_codeplug.cc:348
virtual void enableInternalMic(bool enable)
Enables/disables the internal mic additionally to the bluetooth input.
Definition dmr6x2uv2_codeplug.cc:316
virtual Interval bluetoothHoldDuration() const
Returns the hold duration.
Definition dmr6x2uv2_codeplug.cc:354
virtual Channel::Power satPower() const
Returns the power setting for satellite mode.
Definition dmr6x2uv2_codeplug.cc:530
virtual bool internalMicEnabled() const
Returns true, if the internal mic is enabled additionally to the bluetooth input.
Definition dmr6x2uv2_codeplug.cc:311
virtual void enableWXAlarm(bool enable)
Enables/disables the weather alarm.
Definition dmr6x2uv2_codeplug.cc:503
virtual Interval bluetoothPTTSleepTimeout() const
Returns the bluetooth PTT sleep timeout.
Definition dmr6x2uv2_codeplug.cc:408
virtual unsigned int satSquelchLevel() const
Returns the squelch level for satellite mode [0,1-10], 0=open.
Definition dmr6x2uv2_codeplug.cc:561
virtual void setGNSS(GNSSSettings::Systems gnss)
Sets enabled GNSSs.
Definition dmr6x2uv2_codeplug.cc:476
virtual bool fmIdleToneEnabled() const
Returns true if the FM channel idle tone is enabled.
Definition dmr6x2uv2_codeplug.cc:423
virtual GNSSSettings::Systems gnss() const
Returns enabled GNSSs.
Definition dmr6x2uv2_codeplug.cc:466
static constexpr unsigned int size()
Returns the size of the element.
Definition dmr6x2uv2_codeplug.hh:124
virtual bool atpcEnabled() const
Returns true, if ATPC is enabled.
Definition dmr6x2uv2_codeplug.cc:456
bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the config.
Definition dmr6x2uv2_codeplug.cc:574
virtual unsigned int bluetoothSpeakerGain() const
Returns the bluetooth speaker gain.
Definition dmr6x2uv2_codeplug.cc:343
virtual unsigned int bluetoothMicGain() const
Returns the bluetooth mic gain.
Definition dmr6x2uv2_codeplug.cc:332
virtual void setBluetoothPTTSleepTimeout(const Interval &dur)
Sets the bluetooth PTT sleep timeout.
Definition dmr6x2uv2_codeplug.cc:414
virtual void setSatSquelchLevel(unsigned int level)
Sets the squelch level for satellite mode [0,1-10], 0=open.
Definition dmr6x2uv2_codeplug.cc:565
virtual void enableBluetooth(bool enable)
Enables/disables bluetooth.
Definition dmr6x2uv2_codeplug.cc:305
virtual Interval bluetoothHoldDelay() const
Returns the hold delay.
Definition dmr6x2uv2_codeplug.cc:380
virtual bool bluetoothEnabled() const
Returns true, if bluetooth is enabled.
Definition dmr6x2uv2_codeplug.cc:300
virtual void enableATPC(bool enable)
Enables/disables ATPC.
Definition dmr6x2uv2_codeplug.cc:461
ExtendedSettingsElement(uint8_t *ptr, unsigned size)
Hidden Constructor.
Definition dmr6x2uv2_codeplug.cc:286
virtual ChannelIndexDisplay channelIndexDisplay() const
Returns the channel index display mode.
Definition dmr6x2uv2_codeplug.cc:487
virtual void setBluetoothMicGain(unsigned int gain)
Sets the bluetooth mic gain.
Definition dmr6x2uv2_codeplug.cc:337
virtual void setLocationSourceGNSS()
Sets the location source to GNSS.
Definition dmr6x2uv2_codeplug.cc:524
bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Link config from settings extension.
Definition dmr6x2uv2_codeplug.cc:678
virtual bool bluetoothPTTLatchEnabled() const
Returns true, if PTT latches.
Definition dmr6x2uv2_codeplug.cc:397
virtual void setChannelIndexDisplay(ChannelIndexDisplay mode)
Sets the channel index display mode.
Definition dmr6x2uv2_codeplug.cc:492
virtual void setBluetoothHoldDelay(const Interval &dur)
Sets the hold duration.
Definition dmr6x2uv2_codeplug.cc:388
virtual void enableFMIdleTone(bool enable)
Enables/disables FM channel idle tone.
Definition dmr6x2uv2_codeplug.cc:428
virtual void setSatPower(Channel::Power power)
Sets the power level for satellite mode.
Definition dmr6x2uv2_codeplug.cc:541
virtual void setFixedLocationIndex(unsigned int idx)
Sets the fixed location index.
Definition dmr6x2uv2_codeplug.cc:519
virtual unsigned int fixedLocationIndex() const
Returns the fixed location index.
Definition dmr6x2uv2_codeplug.cc:514
virtual bool totWarningToneEnabled() const
Returns true, if transmit timeout warning tone is enabled.
Definition dmr6x2uv2_codeplug.cc:445
virtual bool internalSpeakerEnabled() const
Returns true, if the internal speaker is enabled additionally to the bluetooth output.
Definition dmr6x2uv2_codeplug.cc:322
virtual bool locationSourceGNSS() const
Returns true if the location is taken from GNSS, otherwise a fixed location is used.
Definition dmr6x2uv2_codeplug.cc:509
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Update config from settings.
Definition dmr6x2uv2_codeplug.cc:627
virtual bool wxAlarmEnabled() const
Returns true if the weather alarm is enabled.
Definition dmr6x2uv2_codeplug.cc:498
virtual void setBluetoothHoldDuration(const Interval &dur)
Sets the hold duration.
Definition dmr6x2uv2_codeplug.cc:367
virtual void setCoordinate(const QGeoCoordinate &coor)
Sets the center of the roaming zone.
Definition dmr6x2uv2_codeplug.cc:807
virtual QGeoCoordinate coordinate() const
Returns the center of the roaming zone.
Definition dmr6x2uv2_codeplug.cc:794
virtual unsigned int roamingZoneIndex() const
Returns the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:778
virtual unsigned int radius() const
Returns the radius in unknown units.
Definition dmr6x2uv2_codeplug.cc:821
virtual void setRoamingZoneIndex(unsigned int idx)
Sets the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:783
virtual void clearRoamingZoneIndex()
Clears the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:788
GPSRoamingZoneElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:749
static constexpr unsigned int size()
Size of the element.
Definition dmr6x2uv2_codeplug.hh:321
virtual bool hasRoamingZoneIndex() const
Returns true, if a roaming zone is set.
Definition dmr6x2uv2_codeplug.cc:773
virtual void setRadius(unsigned int radius)
Sets the radius in unknown units.
Definition dmr6x2uv2_codeplug.cc:826
AnytoneKeySettingsExtension::KeyFunction funcKeyCLong() const
Returns the key function for a long press on the function key 3.
Definition dmr6x2uv2_codeplug.cc:222
AnytoneKeySettingsExtension::KeyFunction funcKey1Long() const
Returns the key function for a long press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:231
void setFuncKeyCShort(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a short press on the function key 3/C.
Definition dmr6x2uv2_codeplug.cc:181
void setFuncKeyBLong(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a long press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:217
AnytoneKeySettingsExtension::KeyFunction funcKeyBLong() const
Returns the key function for a long press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:213
void setFuncKey1Long(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a long press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:235
void setFuncKeyALong(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a long press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:208
void setFuncKeyBShort(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a short press on the function key 2/B.
Definition dmr6x2uv2_codeplug.cc:172
bool fromConfig(const Flags &flags, Context &ctx)
Encodes the general settings.
Definition dmr6x2uv2_codeplug.cc:250
AnytoneKeySettingsExtension::KeyFunction funcKeyAShort() const
Returns the key function for a short press on the function key 1/A.
Definition dmr6x2uv2_codeplug.cc:159
AnytoneKeySettingsExtension::KeyFunction funcKeyCShort() const
Returns the key function for a short press on the function key 3/C.
Definition dmr6x2uv2_codeplug.cc:177
AnytoneKeySettingsExtension::KeyFunction funcKeyALong() const
Returns the key function for a long press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:204
AnytoneKeySettingsExtension::KeyFunction funcKey2Long() const
Returns the key function for a long press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:240
GeneralSettingsElement(uint8_t *ptr, unsigned size)
Hidden Constructor.
Definition dmr6x2uv2_codeplug.cc:146
AnytoneKeySettingsExtension::KeyFunction funcKey2Short() const
Returns the key function for a short press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:195
AnytoneKeySettingsExtension::KeyFunction funcKey1Short() const
Returns the key function for a short press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:186
void setFuncKeyAShort(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a short press on the function key 1/A.
Definition dmr6x2uv2_codeplug.cc:163
void setFuncKey2Short(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a short press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:199
bool updateConfig(Context &ctx)
Updates the abstract config from general settings.
Definition dmr6x2uv2_codeplug.cc:264
void setFuncKey1Short(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a short press on the function key 1.
Definition dmr6x2uv2_codeplug.cc:190
void setFuncKeyCLong(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a long press on the function key 3.
Definition dmr6x2uv2_codeplug.cc:226
static constexpr unsigned int size()
Returns the size of the element.
Definition dmr6x2uv2_codeplug.hh:63
void setFuncKey2Long(AnytoneKeySettingsExtension::KeyFunction func)
Sets the key function for a long press on the function key 2.
Definition dmr6x2uv2_codeplug.cc:244
AnytoneKeySettingsExtension::KeyFunction funcKeyBShort() const
Returns the key function for a short press on the function key 2/B.
Definition dmr6x2uv2_codeplug.cc:168
bool createElements(Context &ctx, const ErrorStack &err=ErrorStack()) override
Creates all config objects from the downloaded codeplug.
Definition dmr6x2uv2_codeplug.cc:875
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Decodes the general settings section.
Definition dmr6x2uv2_codeplug.cc:905
bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
Encodes the given config (via context) to the binary codeplug.
Definition dmr6x2uv2_codeplug.cc:866
void allocateUpdated() override
Allocate all code-plug elements that must be written back to the device to maintain a working codeplu...
Definition dmr6x2uv2_codeplug.cc:849
DMR6X2UV2Codeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:835
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
Encodes the general settings section.
Definition dmr6x2uv2_codeplug.cc:890
void allocateForEncoding() override
Allocate all code-plug elements that are defined through the common Config.
Definition dmr6x2uv2_codeplug.cc:855
void allocateForDecoding() override
Allocate all code-plug elements that must be downloaded for decoding.
Definition dmr6x2uv2_codeplug.cc:860
bool linkGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Link the general settings.
Definition dmr6x2uv2_codeplug.cc:920
void allocateGeneralSettings() override
Allocates general settings memory section.
Definition dmr6x2uv2_codeplug.cc:884
Implements some settings extension for the BTECH DMR-6X2UV.
Definition dmr6x2uv_codeplug.hh:511
General settings element for the DMR-6X2UV.
Definition dmr6x2uv_codeplug.hh:73
DMR6X2UVCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition dmr6x2uv_codeplug.cc:2367
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
Some simple class implementing a [1-10] level setting.
Definition level.hh:15
Holds a range of values [min, max].
Definition codeplug.hh:94
Some internal used offsets within the element.
Definition d868uv_codeplug.hh:436
Some limits for the element.
Definition dmr6x2uv2_codeplug.hh:292
static constexpr unsigned int call()
Maximum call sign length.
Definition dmr6x2uv2_codeplug.hh:294
Internal Offsets.
Definition dmr6x2uv2_codeplug.hh:299
Some limits.
Definition dmr6x2uv2_codeplug.hh:231
static constexpr Range< unsigned int > micGain()
Valid mic gain settings.
Definition dmr6x2uv2_codeplug.hh:232
Some internal offset within the codeplug element.
Definition dmr6x2uv2_codeplug.hh:237
Internal offsets.
Definition dmr6x2uv2_codeplug.hh:347
Device specific encoding of the key functions.
Definition dmr6x2uv2_codeplug.hh:29
KeyFunctionCode
Device specific key functions.
Definition dmr6x2uv2_codeplug.hh:38
static uint8_t encode(AnytoneKeySettingsExtension::KeyFunction tone)
Encodes key function.
Definition dmr6x2uv2_codeplug.cc:14
static AnytoneKeySettingsExtension::KeyFunction decode(uint8_t code)
Decodes key function.
Definition dmr6x2uv2_codeplug.cc:79
Some internal used offsets within the element.
Definition dmr6x2uv2_codeplug.hh:91
Some limits for the codeplug.
Definition dmr6x2uv2_codeplug.hh:375
static constexpr unsigned int gpsRoamingZones()
Maximum number of GPS roaming zones.
Definition dmr6x2uv2_codeplug.hh:379
static constexpr unsigned int aprsFilter()
Maximum number of APRS receive filters.
Definition dmr6x2uv2_codeplug.hh:377
Some offsets within the codeplug.
Definition dmr6x2uv2_codeplug.hh:397
Some limits for entries.
Definition dmr6x2uv_codeplug.hh:631
Some limits for the codeplug.
Definition dmr6x2uv_codeplug.hh:1152
Some internal used offsets within the codeplug.
Definition dmr6x2uv_codeplug.hh:1167