libdrmconf 0.13.3
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 unsigned int fmMicGain() const;
179 virtual void setFMMicGain(unsigned int 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
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 protected:
231 struct Offset {
233 static constexpr unsigned int bluetoothEnable() { return 0x0016; }
234 static constexpr unsigned int internalMicEnable() { return 0x0017; }
235 static constexpr unsigned int internalSpeakerEnable() { return 0x0018; }
236 static constexpr unsigned int bluetoothMicGain() { return 0x0019; }
237 static constexpr unsigned int bluetoothSpeakerGain() { return 0x001a; }
238 static constexpr unsigned int bluetoothHoldDuration() { return 0x001b; }
239 static constexpr unsigned int bluetoothHoldDelay() { return 0x001c; }
240 static constexpr unsigned int bluetoothPTTLatch() { return 0x001d; }
241 static constexpr unsigned int bluetoothPTTSleepTimeout() { return 0x001e; }
242 static constexpr unsigned int fmIdleTone() { return 0x001f; }
243 static constexpr unsigned int fmMicGain() { return 0x0020; }
244 static constexpr unsigned int totWarningTone() { return 0x0021; }
245 static constexpr unsigned int atpc() { return 0x0022; }
246 static constexpr unsigned int gnss() { return 0x0023; }
247 static constexpr unsigned int displayChannelIndex() { return 0x0024; }
248 static constexpr unsigned int wxAlarm() { return 0x0026; }
249 static constexpr unsigned int fixedLocationIndex() { return 0x0027; }
250 static constexpr unsigned int satPower() { return 0x0028; }
251 static constexpr unsigned int satSquelch() { return 0x0029; }
253 };
254 };
255
256
259 {
260 protected:
262 APRSFilterElement(uint8_t *ptr, size_t size);
263
264 public:
266 APRSFilterElement(uint8_t *ptr);
267
268 void clear() override;
269 bool isValid() const override;
270
272 static constexpr unsigned int size() { return 0x08; }
273
275 virtual QString call() const;
277 virtual void setCall(const QString &call);
278
280 virtual unsigned int ssid() const;
282 virtual void setSSID(unsigned int ssid);
283
284 public:
286 struct Limit: public Element::Limit {
288 static constexpr unsigned int call() { return 6; }
289 };
290
291 protected:
293 struct Offset: public Element::Offset {
295 static constexpr unsigned int valid() { return 0x0000; }
296 static constexpr unsigned int call() { return 0x0001; }
297 static constexpr unsigned int ssid() { return 0x0007; }
299 };
300 };
301
302
305 {
306 protected:
308 GPSRoamingZoneElement(uint8_t *ptr, size_t size);
309
310 public:
312 GPSRoamingZoneElement(uint8_t *ptr);
313
315 static constexpr unsigned int size() { return 0x0020; }
316
317 void clear() override;
318 bool isValid() const override;
319
321 virtual bool hasRoamingZoneIndex() const;
323 virtual unsigned int roamingZoneIndex() const;
325 virtual void setRoamingZoneIndex(unsigned int idx);
327 virtual void clearRoamingZoneIndex();
328
330 virtual QGeoCoordinate coordinate() const;
332 virtual void setCoordinate(const QGeoCoordinate &coor);
333
335 virtual unsigned int radius() const;
337 virtual void setRadius(unsigned int radius);
338
339 protected:
341 struct Offset: Element::Offset {
343 static constexpr unsigned int valid() { return 0x0000; }
344 static constexpr unsigned int zoneIndex() { return 0x0001; }
345 static constexpr unsigned int latDegrees() { return 0x0002; }
346 static constexpr unsigned int latMinutes() { return 0x0003; }
347 static constexpr unsigned int latSeconds() { return 0x0004; }
348 static constexpr unsigned int latHemisphere() { return 0x0005; }
349 static constexpr unsigned int lonDegrees() { return 0x0006; }
350 static constexpr unsigned int lonMinutes() { return 0x0007; }
351 static constexpr unsigned int lonSeconds() { return 0x0008; }
352 static constexpr unsigned int lonHemisphere() { return 0x0009; }
353 static constexpr unsigned int radius() { return 0x000c; }
355 };
356 };
357
358
359public:
361 explicit DMR6X2UV2Codeplug(const QString &label, QObject *parent=nullptr);
362
363public:
365 explicit DMR6X2UV2Codeplug(QObject *parent=nullptr);
366
367public:
371 static constexpr unsigned int aprsFilter() { return 32; }
373 static constexpr unsigned int gpsRoamingZones() { return 32; }
374 };
375
376protected:
377 void allocateUpdated() override;
378 void allocateForEncoding() override;
379 void allocateForDecoding() override;
380
381 bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override;
382 bool createElements(Context &ctx, const ErrorStack &err=ErrorStack()) override;
383
384 void allocateGeneralSettings() override;
385 bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override;
386 bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override;
387 bool linkGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override;
388
389protected:
393 static constexpr unsigned int aprsFilterBank() { return 0x02501800; }
394 static constexpr unsigned int gpsRoamingZones() { return 0x02504000; }
396 };
397};
398
399#endif // DMR6X2UV2CODEPLUG_HH
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition anytone_codeplug.cc:4480
GPSMode
Possible GPS modes.
Definition anytone_settingsextension.hh:1524
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:61
Base class for all codeplug contexts.
Definition codeplug.hh:291
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:745
static constexpr unsigned int size()
The size of the element.
Definition dmr6x2uv2_codeplug.hh:272
APRSFilterElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:707
virtual void setCall(const QString &call)
Sets the callsign.
Definition dmr6x2uv2_codeplug.cc:739
virtual QString call() const
Returns the call.
Definition dmr6x2uv2_codeplug.cc:734
virtual void setSSID(unsigned int ssid)
Sets the SSID.
Definition dmr6x2uv2_codeplug.cc:750
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:451
virtual void setBluetoothSpeakerGain(unsigned int gain)
Sets the bluetooth speaker gain.
Definition dmr6x2uv2_codeplug.cc:348
virtual void setFMMicGain(unsigned int gain)
Sets the FM mic gain [1-10].
Definition dmr6x2uv2_codeplug.cc:439
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:542
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:515
virtual Interval bluetoothPTTSleepTimeout() const
Returns the bluetooth PTT sleep timeout.
Definition dmr6x2uv2_codeplug.cc:408
virtual AnytoneGPSSettingsExtension::GPSMode gnss() const
Returns enabled GNSSs.
Definition dmr6x2uv2_codeplug.cc:468
virtual unsigned int satSquelchLevel() const
Returns the squelch level for satellite mode [0,1-10], 0=open.
Definition dmr6x2uv2_codeplug.cc:573
virtual bool fmIdleToneEnabled() const
Returns true if the FM channel idle tone is enabled.
Definition dmr6x2uv2_codeplug.cc:423
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:457
bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the config.
Definition dmr6x2uv2_codeplug.cc:586
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:577
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:462
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:499
virtual void setGNSS(AnytoneGPSSettingsExtension::GPSMode gnss)
Sets enabled GNSSs.
Definition dmr6x2uv2_codeplug.cc:479
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:536
bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Link config from settings extension.
Definition dmr6x2uv2_codeplug.cc:689
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:504
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:553
virtual void setFixedLocationIndex(unsigned int idx)
Sets the fixed location index.
Definition dmr6x2uv2_codeplug.cc:531
virtual unsigned int fixedLocationIndex() const
Returns the fixed location index.
Definition dmr6x2uv2_codeplug.cc:526
virtual bool totWarningToneEnabled() const
Returns true, if transmit timeout warning tone is enabled.
Definition dmr6x2uv2_codeplug.cc:446
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:521
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Update config from settings.
Definition dmr6x2uv2_codeplug.cc:638
virtual unsigned int fmMicGain() const
Returns the FM mic gain [1-10].
Definition dmr6x2uv2_codeplug.cc:434
virtual bool wxAlarmEnabled() const
Returns true if the weather alarm is enabled.
Definition dmr6x2uv2_codeplug.cc:510
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:818
virtual QGeoCoordinate coordinate() const
Returns the center of the roaming zone.
Definition dmr6x2uv2_codeplug.cc:805
virtual unsigned int roamingZoneIndex() const
Returns the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:789
virtual unsigned int radius() const
Returns the radius in unknown units.
Definition dmr6x2uv2_codeplug.cc:832
virtual void setRoamingZoneIndex(unsigned int idx)
Sets the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:794
virtual void clearRoamingZoneIndex()
Clears the roaming zone index.
Definition dmr6x2uv2_codeplug.cc:799
GPSRoamingZoneElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:760
static constexpr unsigned int size()
Size of the element.
Definition dmr6x2uv2_codeplug.hh:315
virtual bool hasRoamingZoneIndex() const
Returns true, if a roaming zone is set.
Definition dmr6x2uv2_codeplug.cc:784
virtual void setRadius(unsigned int radius)
Sets the radius in unknown units.
Definition dmr6x2uv2_codeplug.cc:837
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:886
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Decodes the general settings section.
Definition dmr6x2uv2_codeplug.cc:916
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:877
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:860
DMR6X2UV2Codeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition dmr6x2uv2_codeplug.cc:846
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
Encodes the general settings section.
Definition dmr6x2uv2_codeplug.cc:901
void allocateForEncoding() override
Allocate all code-plug elements that are defined through the common Config.
Definition dmr6x2uv2_codeplug.cc:866
void allocateForDecoding() override
Allocate all code-plug elements that must be downloaded for decoding.
Definition dmr6x2uv2_codeplug.cc:871
bool linkGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Link the general settings.
Definition dmr6x2uv2_codeplug.cc:931
void allocateGeneralSettings() override
Allocates general settings memory section.
Definition dmr6x2uv2_codeplug.cc:895
Implements some settings extension for the BTECH DMR-6X2UV.
Definition dmr6x2uv_codeplug.hh:506
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:2323
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 internal used offsets within the element.
Definition d868uv_codeplug.hh:578
Some limits for the element.
Definition dmr6x2uv2_codeplug.hh:286
static constexpr unsigned int call()
Maximum call sign length.
Definition dmr6x2uv2_codeplug.hh:288
Internal Offsets.
Definition dmr6x2uv2_codeplug.hh:293
Some internal offset within the codeplug element.
Definition dmr6x2uv2_codeplug.hh:231
Internal offsets.
Definition dmr6x2uv2_codeplug.hh:341
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:369
static constexpr unsigned int gpsRoamingZones()
Maximum number of GPS roaming zones.
Definition dmr6x2uv2_codeplug.hh:373
static constexpr unsigned int aprsFilter()
Maximum number of APRS receive filters.
Definition dmr6x2uv2_codeplug.hh:371
Some offsets within the codeplug.
Definition dmr6x2uv2_codeplug.hh:391
Some limits for the codeplug.
Definition dmr6x2uv_codeplug.hh:1141
Some internal used offsets within the codeplug.
Definition dmr6x2uv_codeplug.hh:1156