1#ifndef D168UV_CODEPLUG_HH
2#define D168UV_CODEPLUG_HH
6#include "d878uv_codeplug.hh"
7#include "d878uv_codeplug.hh"
8#include "d878uv_codeplug.hh"
9#include "d878uv_codeplug.hh"
66 static uint8_t
encode(
const QTimeZone& zone);
68 static QTimeZone
decode(uint8_t code);
90 RadioName = 0, CustomText = 1
98 static constexpr unsigned int size() {
return 0x100; }
105 static constexpr unsigned int talkerAliasType() {
return 0x0001; }
119 static constexpr unsigned int size() {
return 0x0090; }
121 void clear()
override;
124 virtual QString
name(
unsigned int n)
const;
126 virtual void setName(
unsigned int n,
const QString &
name);
133 static constexpr unsigned int nameLength() {
return 16; }
140 static constexpr unsigned int names() {
return 0x0003; }
141 static constexpr unsigned int betweenNames() {
return Limit::nameLength() + 1; }
148 explicit D168UVCodeplug(
const QString &label, QObject *parent =
nullptr);
169 static constexpr unsigned int fixedLocationNames() {
return 0x02504800; }
170 static constexpr unsigned int unknown_25c2000() {
return 0x025c2000; }
171 static constexpr unsigned int unknown_25c2c80() {
return 0x025c2c80; }
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition anytone_codeplug.cc:4533
The base class of all channels (analog and digital) of a codeplug configuration.
Definition channel.hh:38
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
Channel * toChannelObj(Context &ctx) const override
Constructs a Channel object from this element.
Definition d168uv_codeplug.cc:28
bool fromChannelObj(const Channel *c, Context &ctx) override
Encodes the given channel object.
Definition d168uv_codeplug.cc:44
ChannelElement(uint8_t *ptr)
Constructor.
Definition d168uv_codeplug.cc:10
virtual bool dmrCRCDisabled() const
Returns true if the CRC check for DMR channels is disabled.
Definition d168uv_codeplug.cc:17
virtual void disableDMRCRC(bool disable)
Disables DMR CRC check.
Definition d168uv_codeplug.cc:22
TalkerAliasType
Encoding of possible talker-alias types.
Definition d168uv_codeplug.hh:89
ExtendedSettingsElement(uint8_t *ptr)
Constructor.
Definition d168uv_codeplug.cc:110
bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
Encodes the settings from the config.
Definition d168uv_codeplug.cc:117
virtual QString name(unsigned int n) const
Returns the n-th name.
Definition d168uv_codeplug.cc:144
static constexpr unsigned int size()
Size of the element.
Definition d168uv_codeplug.hh:119
virtual void setName(unsigned int n, const QString &name)
Sets the n-th name.
Definition d168uv_codeplug.cc:151
FixedLocationNamesElement(uint8_t *ptr)
Constructor.
Definition d168uv_codeplug.cc:131
void setGPSTimeZone(const QTimeZone &zone) override
Sets the GPS time zone.
Definition d168uv_codeplug.cc:101
QTimeZone gpsTimeZone() const override
Returns the GPS time zone.
Definition d168uv_codeplug.cc:96
GeneralSettingsElement(uint8_t *ptr)
Constructor.
Definition d168uv_codeplug.cc:88
bool encodeChannels(const Flags &flags, Context &ctx, const ErrorStack &err) override
Encode channels into codeplug.
Definition d168uv_codeplug.cc:189
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
Encodes the general settings section.
Definition d168uv_codeplug.cc:258
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Decodes the general settings section.
Definition d168uv_codeplug.cc:268
D168UVCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition d168uv_codeplug.cc:162
void allocateUpdated() override
Allocate all code-plug elements that must be written back to the device to maintain a working codeplu...
Definition d168uv_codeplug.cc:176
bool createChannels(Context &ctx, const ErrorStack &err) override
Create channels from codeplug.
Definition d168uv_codeplug.cc:207
bool linkGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack()) override
Link the general settings.
Definition d168uv_codeplug.cc:278
bool linkChannels(Context &ctx, const ErrorStack &err) override
Link channels.
Definition d168uv_codeplug.cc:233
Represents the actual channel encoded within the binary D878UV codeplug.
Definition d878uv_codeplug.hh:93
General settings extension element for the D878UV.
Definition d878uv_codeplug.hh:914
static constexpr unsigned int size()
Returns the size of the element.
Definition d878uv_codeplug.hh:937
Represents the general config of the radio within the D878UV binary codeplug.
Definition d878uv_codeplug.hh:322
D878UVCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition d878uv_codeplug.cc:3935
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
Generic representation of a RX group list.
Definition rxgrouplist.hh:14
Generic representation of a scan list.
Definition scanlist.hh:15
Represents a zone within the generic configuration.
Definition zone.hh:15
Some internal offsets.
Definition d168uv_codeplug.hh:49
Definition d168uv_codeplug.hh:103
Some limits.
Definition d168uv_codeplug.hh:130
static constexpr unsigned int nameCount()
Number of names.
Definition d168uv_codeplug.hh:132
Some internal offsets.
Definition d168uv_codeplug.hh:138
Device specific time zones.
Definition d168uv_codeplug.hh:63
static QTimeZone decode(uint8_t code)
Decodes time zone.
Definition d168uv_codeplug.cc:72
static QVector< QTimeZone > _timeZones
Vector of possible time-zones.
Definition d168uv_codeplug.hh:62
static uint8_t encode(const QTimeZone &zone)
Encodes time zone.
Definition d168uv_codeplug.cc:78
Internal used offsets within the codeplug.
Definition d168uv_codeplug.hh:167
Internal used offsets within the channel element.
Definition d878uv_codeplug.hh:234
Some limits.
Definition d878uv_codeplug.hh:1991
Internal offsets within the codeplug.
Definition d878uv_codeplug.hh:2001