libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
D168UVCodeplug::ExtendedSettingsElement Class Reference

Represents the extended settings within the D168UV codeplug. More...

#include <d168uv_codeplug.hh>

Inheritance diagram for D168UVCodeplug::ExtendedSettingsElement:
Collaboration diagram for D168UVCodeplug::ExtendedSettingsElement:

Classes

struct  Offset

Public Member Functions

 ExtendedSettingsElement (uint8_t *ptr)
 Constructor.
bool fromConfig (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) override
 Encodes the settings from the config.
Public Member Functions inherited from D878UVCodeplug::ExtendedSettingsElement
 ExtendedSettingsElement (uint8_t *ptr)
 Constructor.
void clear ()
 Resets the settings.
virtual bool sendTalkerAlias () const
 Returns true if the talker alias is sent.
virtual void enableSendTalkerAlias (bool enable)
 Enables/disables sending the talker alias.
virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource () const
 Returns the talker alias source.
virtual void setTalkerAliasSource (AnytoneDMRSettingsExtension::TalkerAliasSource mode)
 Sets the talker alias source.
virtual DMRSettings::TalkerAliasEncoding talkerAliasEncoding () const
 Returns the talker alias encoding.
virtual void setTalkerAliasEncoding (DMRSettings::TalkerAliasEncoding encoding)
 Sets the talker alias encoding.
virtual bool bluetoothPTTLatch () const
 Returns true if the BT PTT latch is enabled.
virtual void enableBluetoothPTTLatch (bool enable)
 Enables/disables bluetooth PTT latch.
virtual bool infiniteBluetoothPTTSleepDelay () const
 Returns true if the bluetooth PTT sleep delay is disabled (infinite).
virtual Interval bluetoothPTTSleepDelay () const
 Returns the bluetooth PTT sleep delay in minutes, 0=off.
virtual void setBluetoothPTTSleepDelay (Interval delay)
 Sets the bluetooth PTT sleep delay in minutes.
virtual void setInfiniteBluetoothPTTSleepDelay ()
 Sets the bluetooth PTT sleep delay to infinite/disabled.
virtual bool hasAutoRepeaterUHF2OffsetIndex () const
 Returns true if the auto repeater UHF 2 offset index is set.
virtual unsigned autoRepeaterUHF2OffsetIndex () const
 Returns the index of the UHF 2 offset frequency.
virtual void setAutoRepeaterUHF2OffsetIndex (unsigned idx)
 Sets the index of the UHF 2 offset frequency.
virtual void clearAutoRepeaterUHF2OffsetIndex ()
 Clears the auto repeater UHF 2 offset frequency index.
virtual bool hasAutoRepeaterVHF2OffsetIndex () const
 Returns true if the auto repeater VHF 2 offset index is set.
virtual unsigned autoRepeaterVHF2OffsetIndex () const
 Returns the index of the VHF 2 offset frequency.
virtual void setAutoRepeaterVHF2OffsetIndex (unsigned idx)
 Sets the index of the VHF 2 offset frequency.
virtual void clearAutoRepeaterVHF2OffsetIndex ()
 Clears the auto repeater VHF 2 offset frequency index.
virtual Frequency autoRepeaterVHF2MinFrequency () const
 Returns the minimum frequency in Hz for the auto-repeater VHF 2 band.
virtual void setAutoRepeaterVHF2MinFrequency (Frequency hz)
 Sets the minimum frequency in Hz for the auto-repeater VHF 2 band.
virtual Frequency autoRepeaterVHF2MaxFrequency () const
 Returns the maximum frequency in Hz for the auto-repeater VHF 2 band.
virtual void setAutoRepeaterVHF2MaxFrequency (Frequency hz)
 Sets the maximum frequency in Hz for the auto-repeater VHF 2 band.
virtual Frequency autoRepeaterUHF2MinFrequency () const
 Returns the minimum frequency in Hz for the auto-repeater UHF 2 band.
virtual void setAutoRepeaterUHF2MinFrequency (Frequency hz)
 Sets the minimum frequency in Hz for the auto-repeater UHF 2 band.
virtual Frequency autoRepeaterUHF2MaxFrequency () const
 Returns the maximum frequency in Hz for the auto-repeater UHF 2 band.
virtual void setAutoRepeaterUHF2MaxFrequency (Frequency hz)
 Sets the maximum frequency in Hz for the auto-repeater UHF 2 band.
virtual GNSSSettings::Systems gnss () const
 Returns the GPS mode.
virtual void setGNSS (GNSSSettings::Systems mode)
 Sets the GPS mode.
virtual Interval steDuration () const
 Returns the STE (squelch tail elimination) duration.
virtual void setSTEDuration (Interval dur)
 Sets the STE (squelch tail elimination) duration.
virtual bool infiniteManDialGroupCallHangTime () const
 Returns true if the manual dialed group call hang time is infinite.
virtual Interval manDialGroupCallHangTime () const
 Returns the manual dial group call hang time.
virtual void setManDialGroupCallHangTime (Interval dur)
 Sets the manual dial group call hang time.
virtual void setManDialGroupCallHangTimeInfinite ()
 Sets the manual dial group call hang time to infinite.
virtual bool infiniteManDialPrivateCallHangTime () const
 Returns true if the manual dialed private call hang time is infinite.
virtual Interval manDialPrivateCallHangTime () const
 Returns the manual dial private call hang time.
virtual void setManDialPrivateCallHangTime (Interval dur)
 Sets the manual dial private call hang time.
virtual void setManDialPrivateCallHangTimeInfinite ()
 Sets the manual dial private call hang time to infinite.
AnytoneDisplaySettingsExtension::Color channelBNameColor () const
 Returns the color of the channel name for VFO B.
void setChannelBNameColor (AnytoneDisplaySettingsExtension::Color color)
 Sets the channel name color for the VFO B.
virtual AnytoneDMRSettingsExtension::EncryptionType encryption () const
 Returns the encryption mode.
virtual void setEncryption (AnytoneDMRSettingsExtension::EncryptionType mode)
 Sets the encryption mode.
virtual bool totNotification () const
 Returns true if the transmit timeout notification is enabled.
virtual void enableTOTNotification (bool enable)
 Enables/disables transmit timeout notification.
virtual bool atpc () const
 Returns true if the ATPC (Adaptiv Transmission Power Control) is enabled.
virtual void enableATPC (bool enable)
 Enables/disables the ATPC (Adaptiv Transmission Power Control).
AnytoneDisplaySettingsExtension::Color zoneANameColor () const
 Returns the color of the zone name for VFO A.
void setZoneANameColor (AnytoneDisplaySettingsExtension::Color color)
 Sets the zone name color for the VFO A.
AnytoneDisplaySettingsExtension::Color zoneBNameColor () const
 Returns the color of the zone name for VFO B.
void setZoneBNameColor (AnytoneDisplaySettingsExtension::Color color)
 Sets the zone name color for the VFO B.
virtual bool resetAutoShutdownOnCall () const
 Returns true if the auto-shutdown timer is reset on a call.
virtual void enableResetAutoShutdownOnCall (bool enable)
 Enables/disables reset on call of the auto-shutdown timer.
virtual bool showColorCode () const
 Returns true if the color code is shown.
virtual void enableShowColorCode (bool enable)
 Enables/disables display of color code.
virtual bool showTimeSlot () const
 Returns true if the time slot is shown.
virtual void enableShowTimeSlot (bool enable)
 Enables/disables display of time slot.
virtual bool showChannelType () const
 Returns true if the channel type is shown.
virtual void enableShowChannelType (bool enable)
 Enables/disables display of channel type.
virtual bool fmIdleTone () const
 Returns true if the FM idle channel tone is enabled.
virtual void enableFMIdleTone (bool enable)
 Enables/disables FM idle channel tone.
virtual AnytoneDisplaySettingsExtension::DateFormat dateFormat () const
 Returns the date format.
virtual void setDateFormat (AnytoneDisplaySettingsExtension::DateFormat format)
 Sets the date format.
virtual Level fmMicGain () const
 Returns the FM Mic gain [1,10].
virtual void setFMMicGain (Level gain)
 Sets the analog mic gain [1,10].
virtual bool gpsRoaming () const
 Returns true if the GPS roaming is enabled.
virtual void enableGPSRoaming (bool enable)
 Enables/disables GPS roaming.
virtual void callEndToneMelody (Melody &melody) const
 Returns the call-end tone melody.
virtual void setCallEndToneMelody (const Melody &melody)
 Sets the call-end tone melody.
virtual void allCallToneMelody (Melody &melody) const
 Returns the all-call tone melody.
virtual void setAllCallToneMelody (const Melody &melody)
 Sets the all-call tone melody.
virtual bool updateConfig (Context &ctx, const ErrorStack &err)
 Update config from settings.
virtual bool linkConfig (Context &ctx, const ErrorStack &err)
 Link config from settings extension.
Public Member Functions inherited from Codeplug::Element
 Element (const Element &other)
 Copy constructor.
virtual ~Element ()
 Destructor.
Elementoperator= (const Element &other)
 Copy assignment.
virtual bool isValid () const
 Returns true if the pointer is not null.
bool fill (uint8_t value, unsigned offset=0, int size=-1)
 Fills memsets the entire element to the given value.
bool getBit (const Offset::Bit &offset) const
 Reads a specific bit at the given byte-offset.
bool getBit (unsigned offset, unsigned bit) const
 Reads a specific bit at the given byte-offset.
void setBit (const Offset::Bit &offset, bool value=true)
 Sets a specific bit at the given byte-offset.
void setBit (unsigned offset, unsigned bit, bool value=true)
 Sets a specific bit at the given byte-offset.
void clearBit (unsigned offset, unsigned bit)
 Clears a specific bit at the given byte-offset.
void clearBit (const Offset::Bit &offset)
 Clears a specific bit.
uint8_t getUInt2 (const Offset::Bit &offset) const
 Reads a 2bit unsigned integer at the given bit-offset.
uint8_t getUInt2 (unsigned offset, unsigned bit) const
 Reads a 2bit unsigned integer at the given byte- and bit-offset.
void setUInt2 (const Offset::Bit &offset, uint8_t value)
 Stores a 2bit unsigned integer at the given bit-offset.
void setUInt2 (unsigned offset, unsigned bit, uint8_t value)
 Stores a 2bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt3 (const Offset::Bit &offset) const
 Reads a 3bit unsigned integer at the given bit-offset.
uint8_t getUInt3 (unsigned offset, unsigned bit) const
 Reads a 3bit unsigned integer at the given byte- and bit-offset.
void setUInt3 (const Offset::Bit &offset, uint8_t value)
 Stores a 3bit unsigned integer at the given bit-offset.
void setUInt3 (unsigned offset, unsigned bit, uint8_t value)
 Stores a 3bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt4 (const Offset::Bit &offset) const
 Reads a 4bit unsigned integer at the given bit-offset.
uint8_t getUInt4 (unsigned offset, unsigned bit) const
 Reads a 4bit unsigned integer at the given byte- and bit-offset.
void setUInt4 (const Offset::Bit &offset, uint8_t value)
 Stores a 4bit unsigned integer at the given bit-offset.
void setUInt4 (unsigned offset, unsigned bit, uint8_t value)
 Stores a 4bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt5 (const Offset::Bit &offset) const
 Reads a 5bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt5 (unsigned offset, unsigned bit) const
 Reads a 5bit unsigned integer at the given byte- and bit-offset.
void setUInt5 (const Offset::Bit &offset, uint8_t value)
 Stores a 5bit unsigned integer at the given byte- and bit-offset.
void setUInt5 (unsigned offset, unsigned bit, uint8_t value)
 Stores a 5bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt6 (const Offset::Bit &offset) const
 Reads a 6bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt6 (unsigned offset, unsigned bit) const
 Reads a 6bit unsigned integer at the given byte- and bit-offset.
void setUInt6 (const Offset::Bit &offset, uint8_t value)
 Stores a 6bit unsigned integer at the given byte- and bit-offset.
void setUInt6 (unsigned offset, unsigned bit, uint8_t value)
 Stores a 6bit unsigned integer at the given byte- and bit-offset.
uint8_t getUInt8 (unsigned offset) const
 Reads a 8bit unsigned integer at the given byte- and bit-offset.
void setUInt8 (unsigned offset, uint8_t value)
 Reads a 8bit unsigned integer at the given byte- and bit-offset.
int8_t getInt8 (unsigned offset) const
 Reads a 8bit signed integer at the given byte- and bit-offset.
void setInt8 (unsigned offset, int8_t value)
 Reads a 8bit signed integer at the given byte- and bit-offset.
uint16_t getUInt16_be (unsigned offset) const
 Reads a 16bit big-endian unsigned integer at the given byte-offset.
uint16_t getUInt16_le (unsigned offset) const
 Reads a 16bit little-endian unsigned integer at the given byte-offset.
void setUInt16_be (unsigned offset, uint16_t value)
 Stores a 16bit big-endian unsigned integer at the given byte-offset.
void setUInt16_le (unsigned offset, uint16_t value)
 Stores a 16bit little-endian unsigned integer at the given byte-offset.
uint32_t getUInt24_be (unsigned offset) const
 Reads a 24bit big-endian unsigned integer at the given byte-offset.
uint32_t getUInt24_le (unsigned offset) const
 Reads a 24bit little-endian unsigned integer at the given byte-offset.
void setUInt24_be (unsigned offset, uint32_t value)
 Stores a 24bit big-endian unsigned integer at the given byte-offset.
void setUInt24_le (unsigned offset, uint32_t value)
 Stores a 24bit little-endian unsigned integer at the given byte-offset.
uint32_t getUInt32_be (unsigned offset) const
 Reads a 32bit big-endian unsigned integer at the given byte-offset.
uint32_t getUInt32_le (unsigned offset) const
 Reads a 32bit little-endian unsigned integer at the given byte-offset.
void setUInt32_be (unsigned offset, uint32_t value)
 Stores a 32bit big-endian unsigned integer at the given byte-offset.
void setUInt32_le (unsigned offset, uint32_t value)
 Stores a 32bit little-endian unsigned integer at the given byte-offset.
uint64_t getUInt64_be (unsigned offset) const
 Reads a 64bit big-endian unsigned integer at the given byte-offset.
uint64_t getUInt64_le (unsigned offset) const
 Reads a 64bit little-endian unsigned integer at the given byte-offset.
void setUInt64_be (unsigned offset, uint64_t value)
 Stores a 64bit big-endian unsigned integer at the given byte-offset.
void setUInt64_le (unsigned offset, uint64_t value)
 Stores a 64bit little-endian unsigned integer at the given byte-offset.
uint8_t getBCD2 (unsigned offset) const
 Reads a 2-digit (1-byte/8bit) BDC value in big-endian at the given byte-offset.
void setBCD2 (unsigned offset, uint8_t value)
 Stores a 2-digit (1-byte/8bit) BDC value in big-endian at the given byte-offset.
uint16_t getBCD4_be (unsigned offset) const
 Reads a 4-digit (2-byte/16bit) BDC value in big-endian at the given byte-offset.
void setBCD4_be (unsigned offset, uint16_t value)
 Stores a 4-digit (2-byte/16bit) BDC value in big-endian at the given byte-offset.
uint16_t getBCD4_le (unsigned offset) const
 Reads a 4-digit (2-byte/16bit) BDC value in little-endian at the given byte-offset.
void setBCD4_le (unsigned offset, uint16_t value)
 Stores a 4-digit (1-byte/16bit) BDC value in little-endian at the given byte-offset.
uint32_t getBCD8_be (unsigned offset) const
 Reads a 8-digit (4-byte/32bit) BDC value in big-endian at the given byte-offset.
void setBCD8_be (unsigned offset, uint32_t value)
 Stores a 8-digit (4-byte/32bit) BDC value in big-endian at the given byte-offset.
uint32_t getBCD8_le (unsigned offset) const
 Reads a 8-digit (4-byte/32bit) BDC value in little-endian at the given byte-offset.
void setBCD8_le (unsigned offset, uint32_t value)
 Stores a 8-digit (4-byte/32bit) BDC value in little-endian at the given byte-offset.
QString readASCII (unsigned offset, unsigned maxlen, uint8_t eos=0x00) const
 Reads up to maxlen ASCII chars at the given byte-offset using eos as the string termination char.
void writeASCII (unsigned offset, const QString &txt, unsigned maxlen, uint8_t eos=0x00)
 Stores up to maxlen ASCII chars at the given byte-offset using eos as the string termination char.
QString readUnicode (unsigned offset, unsigned maxlen, uint16_t eos=0x0000) const
 Reads up to maxlen unicode chars at the given byte-offset using eos as the string termination char.
void writeUnicode (unsigned offset, const QString &txt, unsigned maxlen, uint16_t eos=0x0000)
 Stores up to maxlen unicode chars at the given byte-offset using eos as the string termination char.

Static Public Member Functions

static constexpr unsigned int size ()
Static Public Member Functions inherited from D878UVCodeplug::ExtendedSettingsElement
static constexpr unsigned int size ()
 Returns the size of the element.

Protected Types

enum class  TalkerAliasType { RadioName = 0 , CustomText = 1 }
 Encoding of possible talker-alias types. More...
Protected Types inherited from D878UVCodeplug::ExtendedSettingsElement
enum class  GNSS {
  GPS = 0 , Beidou = 1 , GPS_Beidou = 2 , Glonass = 3 ,
  GPS_Glonass = 4 , Beidou_Glonass = 5 , GPS_Beidou_Glonass = 6
}
 Encoding of possible GNSSs. More...
enum class  TalkerAliasEncoding { ISO8 = 0 , ISO7 = 1 , Unicode = 2 }
 Talker alias encoding.

Additional Inherited Members

Protected Member Functions inherited from D878UVCodeplug::ExtendedSettingsElement
 ExtendedSettingsElement (uint8_t *ptr, unsigned size)
 Hidden Constructor.
Protected Member Functions inherited from AnytoneCodeplug::ExtendedSettingsElement
 ExtendedSettingsElement (uint8_t *ptr, unsigned size)
 Hidden constructor.
Protected Member Functions inherited from Codeplug::Element
 Element (uint8_t *ptr, size_t size)
 Hidden constructor.
Protected Attributes inherited from Codeplug::Element
uint8_t * _data
 Holds the pointer to the element.
size_t _size
 Holds the size of the element.

Detailed Description

Represents the extended settings within the D168UV codeplug.

This covers the CPS version 1.07.

Member Enumeration Documentation

◆ TalkerAliasType

Encoding of possible talker-alias types.

That is the text being sent as talker alias.

Member Function Documentation

◆ fromConfig()

bool D168UVCodeplug::ExtendedSettingsElement::fromConfig ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
overridevirtual

Encodes the settings from the config.

Reimplemented from D878UVCodeplug::ExtendedSettingsElement.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/d168uv_codeplug.hh
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/d168uv_codeplug.cc