libdrmconf
0.12.0
A library to program DMR radios.
|
Represents the base class for the settings elements in all AnyTone codeplugs. More...
#include <anytone_codeplug.hh>
Classes | |
struct | Offset |
Internal used offsets within the element. More... | |
Public Types | |
enum class | AutoShutdown { Off = 0 , After10min = 1 , After30min = 2 , After60min = 3 , After120min = 4 } |
Possible automatic shutdown delays. | |
Public Member Functions | |
void | clear () |
Resets the general settings. | |
virtual bool | keyToneEnabled () const =0 |
Returns true , if the key tone is enabled. | |
virtual void | enableKeyTone (bool enable)=0 |
Enables/disables the key-tone. | |
virtual bool | displayFrequency () const |
Returns true if the radio displays frequecies instead of channels is enabled. | |
virtual void | enableDisplayFrequency (bool enable) |
Enables/disables the frequency display. | |
virtual bool | autoKeyLock () const |
Returns true if auto key-lock is enabled. | |
virtual void | enableAutoKeyLock (bool enable) |
Enables/disables auto key-lock. | |
virtual Interval | autoShutdownDelay () const |
Returns the auto-shutdown delay in minutes. | |
virtual void | setAutoShutdownDelay (Interval min) |
Sets the auto-shutdown delay in minutes. | |
virtual AnytoneBootSettingsExtension::BootDisplay | bootDisplay () const |
Returns the boot display mode. | |
virtual void | setBootDisplay (AnytoneBootSettingsExtension::BootDisplay mode) |
Sets the boot display mode. | |
virtual bool | bootPassword () const |
Returns true if boot password is enabled. | |
virtual void | enableBootPassword (bool enable) |
Enables/disables boot password. | |
virtual unsigned | squelchLevelA () const |
Squelch level of VFO A, (0=off). | |
virtual void | setSquelchLevelA (unsigned level) |
Returns the squelch level for VFO A, (0=off). | |
virtual unsigned | squelchLevelB () const |
Squelch level of VFO B, (0=off). | |
virtual void | setSquelchLevelB (unsigned level) |
Returns the squelch level for VFO B, (0=off). | |
virtual AnytoneSettingsExtension::VFOScanType | vfoScanType () const =0 |
Returns the VFO scan type. | |
virtual void | setVFOScanType (AnytoneSettingsExtension::VFOScanType type)=0 |
Sets the VFO scan type. | |
virtual unsigned | dmrMicGain () const =0 |
Returns the mirophone gain. | |
virtual void | setDMRMicGain (unsigned int gain)=0 |
Sets the microphone gain. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyAShort () const =0 |
Returns the key function for a short press on the function key 1/A. | |
virtual void | setFuncKeyAShort (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a short press on the function key 1/A. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyBShort () const =0 |
Returns the key function for a short press on the function key 2/B. | |
virtual void | setFuncKeyBShort (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a short press on the function key 2/B. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyCShort () const =0 |
Returns the key function for a short press on the function key 3/C. | |
virtual void | setFuncKeyCShort (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a short press on the function key 3/C. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKey1Short () const =0 |
Returns the key function for a short press on the function key 1. | |
virtual void | setFuncKey1Short (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a short press on the function key 1. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKey2Short () const =0 |
Returns the key function for a short press on the function key 2. | |
virtual void | setFuncKey2Short (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a short press on the function key 2. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyALong () const =0 |
Returns the key function for a long press on the function key 1. | |
virtual void | setFuncKeyALong (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a long press on the function key 1. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyBLong () const =0 |
Returns the key function for a long press on the function key 2. | |
virtual void | setFuncKeyBLong (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a long press on the function key 2. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKeyCLong () const =0 |
Returns the key function for a long press on the function key 3. | |
virtual void | setFuncKeyCLong (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a long press on the function key 3. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKey1Long () const =0 |
Returns the key function for a long press on the function key 1. | |
virtual void | setFuncKey1Long (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a long press on the function key 1. | |
virtual AnytoneKeySettingsExtension::KeyFunction | funcKey2Long () const =0 |
Returns the key function for a long press on the function key 2. | |
virtual void | setFuncKey2Long (AnytoneKeySettingsExtension::KeyFunction func)=0 |
Sets the key function for a long press on the function key 2. | |
virtual Interval | longPressDuration () const =0 |
Returns the long-press duration in ms. | |
virtual void | setLongPressDuration (Interval ms)=0 |
Sets the long-press duration in ms. | |
virtual bool | knobLock () const =0 |
Returns true if the knob is locked. | |
virtual void | enableKnobLock (bool enable)=0 |
Enables/disables the knob lock. | |
virtual bool | keypadLock () const =0 |
Returns true if the keypad is locked. | |
virtual void | enableKeypadLock (bool enable)=0 |
Enables/disables the keypad lock. | |
virtual bool | sidekeysLock () const =0 |
Returns true if the sidekeys are locked. | |
virtual void | enableSidekeysLock (bool enable)=0 |
Enables/disables the sidekeys lock. | |
virtual bool | keyLockForced () const =0 |
Returns true if the "professional" key is locked. | |
virtual void | enableKeyLockForced (bool enable)=0 |
Enables/disables the "professional" key lock. | |
virtual bool | vfoModeA () const =0 |
Returns true if the VFO A is in VFO mode. | |
virtual void | enableVFOModeA (bool enable)=0 |
Enables/disables VFO mode for VFO A. | |
virtual bool | vfoModeB () const =0 |
Returns true if the VFO B is in VFO mode. | |
virtual void | enableVFOModeB (bool enable)=0 |
Enables/disables VFO mode for VFO B. | |
virtual unsigned | memoryZoneA () const =0 |
Returns the memory zone for VFO A. | |
virtual void | setMemoryZoneA (unsigned zone)=0 |
Sets the memory zone for VFO A. | |
virtual unsigned | memoryZoneB () const =0 |
Returns the memory zone for VFO B. | |
virtual void | setMemoryZoneB (unsigned zone)=0 |
Sets the memory zone for VFO B. | |
virtual bool | recording () const =0 |
Returns true if recording is enabled. | |
virtual void | enableRecording (bool enable)=0 |
Enables/disables recording. | |
virtual unsigned | brightness () const =0 |
Returns the display brightness. | |
virtual void | setBrightness (unsigned level)=0 |
Sets the display brightness. | |
virtual bool | gps () const =0 |
Returns true if GPS is enabled. | |
virtual void | enableGPS (bool enable)=0 |
Enables/disables recording. | |
virtual bool | smsAlert () const =0 |
Returns true if SMS alert is enabled. | |
virtual void | enableSMSAlert (bool enable)=0 |
Enables/disables SMS alert. | |
virtual bool | activeChannelB () const =0 |
Returns true if the active channel is VFO B. | |
virtual void | enableActiveChannelB (bool enable)=0 |
Enables/disables VFO B as the active channel. | |
virtual bool | subChannel () const =0 |
Returns true if sub channel is enabled. | |
virtual void | enableSubChannel (bool enable)=0 |
Enables/disables sub channel. | |
virtual bool | callAlert () const =0 |
Returns true if call alert is enabled. | |
virtual void | enableCallAlert (bool enable)=0 |
Enables/disables call alert. | |
virtual QTimeZone | gpsTimeZone () const =0 |
Returns the GPS time zone. | |
virtual void | setGPSTimeZone (const QTimeZone &zone)=0 |
Sets the GPS time zone. | |
virtual bool | dmrTalkPermit () const =0 |
Returns true if the talk permit tone is enabled for digital channels. | |
virtual bool | fmTalkPermit () const =0 |
Returns true if the talk permit tone is enabled for digital channels. | |
virtual void | enableDMRTalkPermit (bool enable)=0 |
Enables/disables the talk permit tone for digital channels. | |
virtual void | enableFMTalkPermit (bool enable)=0 |
Enables/disables the talk permit tone for analog channels. | |
virtual bool | dmrResetTone () const =0 |
Returns true if the reset tone is enabled for digital calls. | |
virtual void | enableDMRResetTone (bool enable)=0 |
Enables/disables the reset tone for digital calls. | |
virtual bool | idleChannelTone () const =0 |
Returns true if the idle channel tone is enabled. | |
virtual void | enableIdleChannelTone (bool enable)=0 |
Enables/disables the idle channel tone. | |
virtual Interval | menuExitTime () const =0 |
Returns the menu exit time in seconds. | |
virtual void | setMenuExitTime (Interval intv)=0 |
Sets the menu exit time in seconds. | |
virtual bool | startupTone () const =0 |
Returns true if the startup tone is enabled. | |
virtual void | enableStartupTone (bool enable)=0 |
Enables/disables the startup tone. | |
virtual bool | callEndPrompt () const =0 |
Returns true if the call-end prompt is enabled. | |
virtual void | enableCallEndPrompt (bool enable)=0 |
Enables/disables the call-end prompt. | |
virtual unsigned | maxSpeakerVolume () const =0 |
Returns the maximum volume. | |
virtual void | setMaxSpeakerVolume (unsigned level)=0 |
Sets the maximum volume. | |
virtual bool | getGPSPosition () const =0 |
Returns true if get GPS position is enabled. | |
virtual void | enableGetGPSPosition (bool enable)=0 |
Enables/disables get GPS position. | |
virtual bool | volumeChangePrompt () const =0 |
Returns true if the volume change prompt is enabled. | |
virtual void | enableVolumeChangePrompt (bool enable)=0 |
Enables/disables the volume change prompt. | |
virtual AnytoneAutoRepeaterSettingsExtension::Direction | autoRepeaterDirectionA () const =0 |
Returns the auto repeater offset direction for VFO A. | |
virtual void | setAutoRepeaterDirectionA (AnytoneAutoRepeaterSettingsExtension::Direction dir)=0 |
Sets the auto-repeater offset direction for VFO A. | |
virtual AnytoneDisplaySettingsExtension::LastCallerDisplayMode | lastCallerDisplayMode () const =0 |
Returns the last-caller display mode. | |
virtual void | setLastCallerDisplayMode (AnytoneDisplaySettingsExtension::LastCallerDisplayMode mode)=0 |
Sets the last-caller display mode. | |
virtual bool | displayClock () const =0 |
Returns true if the clock is shown. | |
virtual void | enableDisplayClock (bool enable)=0 |
Enables/disables clock display. | |
virtual bool | enhanceAudio () const =0 |
Returns true if the audio is "enhanced". | |
virtual void | enableEnhancedAudio (bool enable)=0 |
Enables/disables "enhanced" audio. | |
virtual Frequency | minVFOScanFrequencyUHF () const =0 |
Returns the minimum VFO scan frequency for the UHF band in Hz. | |
virtual void | setMinVFOScanFrequencyUHF (Frequency hz)=0 |
Sets the minimum VFO scan frequency for the UHF band in Hz. | |
virtual Frequency | maxVFOScanFrequencyUHF () const =0 |
Returns the maximum VFO scan frequency for the UHF band in Hz. | |
virtual void | setMaxVFOScanFrequencyUHF (Frequency hz)=0 |
Sets the maximum VFO scan frequency for the UHF band in Hz. | |
virtual Frequency | minVFOScanFrequencyVHF () const =0 |
Returns the minimum VFO scan frequency for the VHF band in Hz. | |
virtual void | setMinVFOScanFrequencyVHF (Frequency hz)=0 |
Sets the minimum VFO scan frequency for the VHF band in Hz. | |
virtual Frequency | maxVFOScanFrequencyVHF () const =0 |
Returns the maximum VFO scan frequency for the VHF band in Hz. | |
virtual void | setMaxVFOScanFrequencyVHF (Frequency hz)=0 |
Sets the maximum VFO scan frequency for the VHF band in Hz. | |
virtual bool | hasAutoRepeaterOffsetFrequencyIndexUHF () const =0 |
Returns true if the auto-repeater offset frequency for UHF is set. | |
virtual unsigned | autoRepeaterOffsetFrequencyIndexUHF () const =0 |
Returns the auto-repeater offset frequency index for UHF. | |
virtual void | setAutoRepeaterOffsetFrequenyIndexUHF (unsigned idx)=0 |
Sets the auto-repeater offset frequency index for UHF. | |
virtual void | clearAutoRepeaterOffsetFrequencyIndexUHF ()=0 |
Clears the auto-repeater offset frequency index for UHF. | |
virtual bool | hasAutoRepeaterOffsetFrequencyIndexVHF () const =0 |
Returns true if the auto-repeater offset frequency for VHF is set. | |
virtual unsigned | autoRepeaterOffsetFrequencyIndexVHF () const =0 |
Returns the auto-repeater offset frequency index for UHF. | |
virtual void | setAutoRepeaterOffsetFrequenyIndexVHF (unsigned idx)=0 |
Sets the auto-repeater offset frequency index for VHF. | |
virtual void | clearAutoRepeaterOffsetFrequencyIndexVHF ()=0 |
Clears the auto-repeater offset frequency index for VHF. | |
virtual bool | showCurrentContact () const =0 |
Returns true if the current contact is shown. | |
virtual void | enableShowCurrentContact (bool enable)=0 |
Enables/disables display of current contact. | |
virtual void | callToneMelody (Melody &melody) const =0 |
Returns the call-tone melody. | |
virtual void | setCallToneMelody (const Melody &melody)=0 |
Sets the call-tone melody. | |
virtual void | idleToneMelody (Melody &melody) const =0 |
Returns the idle-tone melody. | |
virtual void | setIdleToneMelody (const Melody &melody)=0 |
Sets the idle-tone melody. | |
virtual void | resetToneMelody (Melody &melody) const =0 |
Returns the reset-tone melody. | |
virtual void | setResetToneMelody (const Melody &melody)=0 |
Sets the reset-tone melody. | |
virtual bool | defaultChannel () const =0 |
Returns true if the default boot channel is enabled. | |
virtual void | enableDefaultChannel (bool enable)=0 |
Enables/disables default boot channel. | |
virtual unsigned | defaultZoneIndexA () const =0 |
Returns the default zone index (0-based) for VFO A. | |
virtual void | setDefaultZoneIndexA (unsigned idx)=0 |
Sets the default zone (0-based) for VFO A. | |
virtual unsigned | defaultZoneIndexB () const =0 |
Returns the default zone index (0-based) for VFO B. | |
virtual void | setDefaultZoneIndexB (unsigned idx)=0 |
Sets the default zone (0-based) for VFO B. | |
virtual bool | defaultChannelAIsVFO () const =0 |
Returns true if the default channel for VFO A is VFO. | |
virtual unsigned | defaultChannelAIndex () const =0 |
Returns the default channel index for VFO A. More... | |
virtual void | setDefaultChannelAIndex (unsigned idx)=0 |
Sets the default channel index for VFO A. | |
virtual void | setDefaultChannelAToVFO ()=0 |
Sets the default channel for VFO A to be VFO. | |
virtual bool | defaultChannelBIsVFO () const =0 |
Returns true if the default channel for VFO B is VFO. | |
virtual unsigned | defaultChannelBIndex () const =0 |
Returns the default channel index for VFO B. More... | |
virtual void | setDefaultChannelBIndex (unsigned idx)=0 |
Sets the default channel index for VFO B. | |
virtual void | setDefaultChannelBToVFO ()=0 |
Sets the default channel for VFO B to be VFO. | |
virtual bool | displayCall () const =0 |
Returns true if the call is displayed instead of the name. | |
virtual void | enableDisplayCall (bool enable)=0 |
Enables/disables call display. | |
virtual AnytoneDisplaySettingsExtension::Color | callDisplayColor () const =0 |
Returns the display color for callsigns. | |
virtual void | setCallDisplayColor (AnytoneDisplaySettingsExtension::Color color)=0 |
Sets the display color for callsigns. | |
virtual bool | gpsUnitsImperial () const =0 |
Returns true if the GPS units are imperial. | |
virtual void | enableGPSUnitsImperial (bool enable)=0 |
Enables/disables imperial GPS units. | |
virtual Frequency | autoRepeaterMinFrequencyVHF () const =0 |
Returns the minimum frequency in Hz for the auto-repeater range in VHF band. | |
virtual void | setAutoRepeaterMinFrequencyVHF (Frequency Hz)=0 |
Sets the minimum frequency in Hz for the auto-repeater range in VHF band. | |
virtual Frequency | autoRepeaterMaxFrequencyVHF () const =0 |
Returns the maximum frequency in Hz for the auto-repeater range in VHF band. | |
virtual void | setAutoRepeaterMaxFrequencyVHF (Frequency Hz)=0 |
Sets the maximum frequency in Hz for the auto-repeater range in VHF band. | |
virtual Frequency | autoRepeaterMinFrequencyUHF () const =0 |
Returns the minimum frequency in Hz for the auto-repeater range in UHF band. | |
virtual void | setAutoRepeaterMinFrequencyUHF (Frequency Hz)=0 |
Sets the minimum frequency in Hz for the auto-repeater range in UHF band. | |
virtual Frequency | autoRepeaterMaxFrequencyUHF () const =0 |
Returns the maximum frequency in Hz for the auto-repeater range in UHF band. | |
virtual void | setAutoRepeaterMaxFrequencyUHF (Frequency Hz)=0 |
Sets the maximum frequency in Hz for the auto-repeater range in UHF band. | |
virtual AnytoneAutoRepeaterSettingsExtension::Direction | autoRepeaterDirectionB () const =0 |
Returns the auto-repeater direction for VFO B. | |
virtual void | setAutoRepeaterDirectionB (AnytoneAutoRepeaterSettingsExtension::Direction dir)=0 |
Sets the auto-repeater direction for VFO B. | |
virtual bool | showLastHeard () const =0 |
Returns true if the last heard is shown while pressing PTT. | |
virtual void | enableShowLastHeard (bool enable)=0 |
Enables/disables showing last heard. | |
virtual bool | keepLastCaller () const =0 |
Returns true if the last caller is kept when changing channel. | |
virtual void | enableKeepLastCaller (bool enable)=0 |
Enables/disables keeping the last caller when changing the channel. | |
virtual bool | fromConfig (const Flags &flags, Context &ctx) |
Encodes the general settings. | |
virtual bool | updateConfig (Context &ctx) |
Updates the abstract config from general settings. | |
virtual bool | linkSettings (RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack()) |
Links the general settings. | |
Public Member Functions inherited from Codeplug::Element | |
Element (const Element &other) | |
Copy constructor. | |
virtual | ~Element () |
Destructor. | |
Element & | operator= (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 the memsets the entire element to the given value. | |
bool | getBit (const Offset::BitOffset &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::BitOffset &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. | |
uint8_t | getUInt2 (unsigned offset, unsigned bit) const |
Reads a 2bit unsigned integer at the given byte- and 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 (unsigned offset, unsigned bit) const |
Reads a 3bit unsigned integer at the given byte- and 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 (unsigned offset, unsigned bit) const |
Reads a 4bit unsigned integer at the given byte- and 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 (unsigned offset, unsigned bit) const |
Reads a 5bit unsigned integer at the given byte- and bit-offset. | |
void | setUInt5 (unsigned offset, unsigned bit, uint8_t value) |
Stores a 5bit iunsinged nteger 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 (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. More... | |
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. More... | |
Protected Member Functions | |
GeneralSettingsElement (uint8_t *ptr, unsigned size) | |
Hidden constructor. | |
Protected Member Functions inherited from Codeplug::Element | |
Element (uint8_t *ptr, size_t size) | |
Hidden constructor. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Codeplug::Element | |
uint8_t * | _data |
Holds the pointer to the element. | |
size_t | _size |
Holds the size of the element. | |
Represents the base class for the settings elements in all AnyTone codeplugs.
This class only implements those few settings, common to all devices and encoded the same way. It also defines all common settings as interfaces.
Memory layout of encoded general settings (0xd0 bytes):
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 00 | Enable key tone | Display mode | Enable automatic key lock | Automatic shutdown time | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 04 | Unknown | Unknown | Boot display | Enable boot password | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 08 | Unknown | Squelch level VFO A | Squelch level VFO B | Power save mode | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0c | VOX sensitivity | VOX delay in 100+500*n ms | VFO scan type | MIC gain | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 10 | PF1 short press function | PF2 short press function | PF3 short press function | P1 short press function | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 14 | P2 short press function | Work mode A | Work mode B | Unknown ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 18 ... ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 1c ... | Work mode MEM zone A | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 20 | Work mode MEM zone B | Unknown | Enable recording | Unknown ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 24 ... | Display brightness | Backlight duration | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 28 | Enable GPS | Enable SMS alert | Unknown | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 2c | Work mode main channel set | Enable sub channel | Unknown | Enable call alert | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 30 | GPS Time zone | Talk permit tone | Digital call reset tone | VOX source | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 34 | Unknown | Idle channel tone | Menu exit time | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 38 | Unknown | Startup tone | Enable call end prompt | Max volume | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 3c | Unknown | GPS RX positions | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 40 | Unknown | PF1 long press function | PF2 long press function | PF3 long press function | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 44 | P1 long press function | P2 long press function | Long press duration | Enable Volume change prompt | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 48 | Auto repeater A direction | Unknown ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 4c ... | Display later caller | Unknown | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 50 | Unknown | Display clock | Max head phone volume | Unknown ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 54 | | Enable enhanced audio | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 58 | VFO Scan UHF minimum frequency in 10Hz, 32bit uint, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 5c | VFO Scan UHF maximum frequency in 10Hz, 32bit uint, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 60 | VFO Scan VHF minimum frequency in 10Hz, 32bit uint, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 64 | VFO Scan VHF maximum frequency in 10Hz, 32bit uint, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 68 | Auto rep. offset index UHF | Auto rep. offset index VHF | Unknown ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 6c ... ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 70 ... | Call tone frequency 1 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 74 | Call tone frequency 2 in Hz, little endian | Call tone frequency 3 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 78 | Call tone frequency 4 in Hz, little endian | Call tone frequency 5 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 7c | Call tone duration 1 in ms, little endian | Call tone duration 2 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 80 | Call tone duration 3 in ms, little endian | Call tone duration 4 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 84 | Call tone duration 5 in ms, little endian | Idle tone frequency 1 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 88 | Idle tone frequency 2 in Hz, little endian | Idle tone frequency 3 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 8c | Idle tone frequency 4 in Hz, little endian | Idle tone frequency 5 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 90 | Idle tone duration 1 in ms, little endian | Idle tone duration 2 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 94 | Idle tone duration 3 in ms, little endian | Idle tone duration 4 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 98 | Idle tone duration 5 in ms, little endian | Reset tone frequency 1 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 9c | Reset tone frequency 2 in Hz, little endian | Reset tone frequency 3 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ a0 | Reset tone frequency 4 in Hz, little endian | Reset tone frequency 5 in Hz, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ a4 | Reset tone duration 1 in ms, little endian | Reset tone duration 2 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ a8 | Reset tone duration 3 in ms, little endian | Reset tone duration 4 in ms, little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ac | Reset tone duration 5 in ms, little endian | Record delay in 200ms | Call display mode | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ b0 | Device specific settings ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ cc ... | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ Where: - GPS time zone: 00h=UTC-12, ..., 0Ch=UTC, ..., 19h=UTC+13
|
pure virtual |
Returns the default channel index for VFO A.
Must be within default zone. If 0xff, default channel is VFO.
Implemented in DMR6X2UVCodeplug::GeneralSettingsElement, D878UVCodeplug::GeneralSettingsElement, D868UVCodeplug::GeneralSettingsElement, and D578UVCodeplug::GeneralSettingsElement.
|
pure virtual |
Returns the default channel index for VFO B.
Must be within default zone. If 0xff, default channel is VFO.
Implemented in DMR6X2UVCodeplug::GeneralSettingsElement, D878UVCodeplug::GeneralSettingsElement, D868UVCodeplug::GeneralSettingsElement, and D578UVCodeplug::GeneralSettingsElement.