libdrmconf
0.12.0
A library to program DMR radios.
|
Extends the TyTCodeplug::MenuSettingsElement
to implement the MD-390 specific menu settings.
More...
#include <md390_codeplug.hh>
Public Member Functions | |
MenuSettingsElement (uint8_t *ptr) | |
Constructor. | |
void | clear () |
Abstract method to reset the element within the codeplug. More... | |
virtual bool | gpsInformation () const |
Returns true if GPS information is enabled. | |
virtual void | enableGPSInformation (bool enable) |
Enables/disables GPS information menu. | |
bool | fromConfig (const Config *config) |
Encodes the menu settings. | |
bool | updateConfig (Config *config) |
Updates config from menu settings. | |
Public Member Functions inherited from TyTCodeplug::MenuSettingsElement | |
MenuSettingsElement (uint8_t *ptr) | |
Constructor. | |
virtual | ~MenuSettingsElement () |
Destructor. | |
void | clear () |
Abstract method to reset the element within the codeplug. More... | |
virtual bool | menuHangtimeIsInfinite () const |
Returns true if the menu hang time is infinite. | |
virtual unsigned | menuHangtime () const |
Returns the menu hang time in seconds. | |
virtual void | setMenuHangtime (unsigned sec) |
Sets the menu hang time in seconds. | |
virtual void | infiniteMenuHangtime () |
Sets the menu hang time to be infinite. | |
virtual bool | textMessage () const |
Returns true if text message menu is enabled. | |
virtual void | enableTextMessage (bool enable) |
Enables/disables text message menu. | |
virtual bool | callAlert () const |
Returns true if call alert menu is enabled. | |
virtual void | enableCallAlert (bool enable) |
Enables/disables call alert menu. | |
virtual bool | contactEditing () const |
Returns true if contact editing is enabled. | |
virtual void | enableContactEditing (bool enable) |
Enables/disables contact editing. | |
virtual bool | manualDial () const |
Returns true if manual dial is enabled. | |
virtual void | enableManualDial (bool enable) |
Enables/disables manual dial. | |
virtual bool | remoteRadioCheck () const |
Returns true if contact radio-check menu is enabled. | |
virtual void | enableRemoteRadioCheck (bool enable) |
Enables/disables contact radio-check menu. | |
virtual bool | remoteMonitor () const |
Returns true if remote monitor menu is enabled. | |
virtual void | enableRemoteMonitor (bool enable) |
Enables/disables remote monitor menu. | |
virtual bool | remoteRadioEnable () const |
Returns true if radio enable menu is enabled. | |
virtual void | enableRemoteRadioEnable (bool enable) |
Enables/disables radio enable menu. | |
virtual bool | remoteRadioDisable () const |
Returns true if radio disable menu is enabled. | |
virtual void | enableRemoteRadioDisable (bool enable) |
Enables/disables radio disable menu. | |
virtual bool | scan () const |
Returns true if scan menu is enabled. | |
virtual void | enableScan (bool enable) |
Enables/disables scan menu. | |
virtual bool | scanListEditing () const |
Returns true if edit scan-list menu is enabled. | |
virtual void | enableScanListEditing (bool enable) |
Enables/disables edit scan-list menu. | |
virtual bool | callLogMissed () const |
Returns true if call-log missed menu is enabled. | |
virtual void | enableCallLogMissed (bool enable) |
Enables/disables call-log missed menu. | |
virtual bool | callLogAnswered () const |
Returns true if call-log answered menu is enabled. | |
virtual void | enableCallLogAnswered (bool enable) |
Enables/disables call-log answered menu. | |
virtual bool | callLogOutgoing () const |
Returns true if call-log outgoing menu is enabled. | |
virtual void | enableCallLogOutgoing (bool enable) |
Enables/disables call-log outgoing menu. | |
virtual bool | talkaround () const |
Returns true if talkaround menu is enabled. | |
virtual void | enableTalkaround (bool enable) |
Enables/disables talkaround menu. | |
virtual bool | alertTone () const |
Returns true if tone/alert menu is enabled. | |
virtual void | enableAlertTone (bool enable) |
Enables/disables tone/alert menu. | |
virtual bool | power () const |
Returns true if power menu is enabled. | |
virtual void | enablePower (bool enable) |
Enables/disables power menu. | |
virtual bool | backlight () const |
Returns true if backlight menu is enabled. | |
virtual void | enableBacklight (bool enable) |
Enables/disables backlight menu. | |
virtual bool | bootScreen () const |
Returns true if intro screen menu is enabled. | |
virtual void | enableBootScreen (bool enable) |
Enables/disables intro screen menu. | |
virtual bool | keypadLock () const |
Returns true if keypad lock menu is enabled. | |
virtual void | enableKeypadLock (bool enable) |
Enables/disables keypad lock menu. | |
virtual bool | ledIndicator () const |
Returns true if LED indicator menu is enabled. | |
virtual void | enableLEDIndicator (bool enable) |
Enables/disables LED indicator menu. | |
virtual bool | squelch () const |
Returns true if squelch menu is enabled. | |
virtual void | enableSquelch (bool enable) |
Enables/disables squelch menu. | |
virtual bool | vox () const |
Returns true if VOX menu is enabled. | |
virtual void | enableVOX (bool enable) |
Enables/disables VOX menu. | |
virtual bool | password () const |
Returns true if password menu is enabled. | |
virtual void | enablePassword (bool enable) |
Enables/disables password menu. | |
virtual bool | displayMode () const |
Returns true if display mode menu is enabled. | |
virtual void | enableDisplayMode (bool enable) |
Enables/disables display mode menu. | |
virtual bool | radioProgramming () const |
Returns true if program radio menu is enabled. | |
virtual void | enableRadioProgramming (bool enable) |
Enables/disables program radio menu. | |
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 | |
MenuSettingsElement (uint8_t *ptr, size_t size) | |
Hidden constructor. | |
Protected Member Functions inherited from TyTCodeplug::MenuSettingsElement | |
MenuSettingsElement (uint8_t *ptr, size_t 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. | |
Extends the TyTCodeplug::MenuSettingsElement
to implement the MD-390 specific menu settings.
Memory layout of the settings (size 0x0010 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 | Menu hang time (sec) |RDS|REN|RMO|RCK|MDL|CED|CAL|TXT|ToA|TlA|CLO|CLA|CLM|ESL|SCN| 1 |VOX| 0 |SQL|LED|KPL|INS|BKL|PWR| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 04 | 1 | 1 | 1 |GPI| 1 |PRG|DSM|PWD| Unused, set to 0xff ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0c ... | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ where: RDS = Show radio disable; REN = Show radio enable; RMO = Show remote monitor; RCK = Show radio check; MDL = Show manual dial; CED = Show contact edit; CAL = Show call alert; TXT = Show text message; ToA = Show tone or Alert; TlA = Show talkaround; CLO = Show call-log outgoing, CLA = Show call-log answered; CLM = Show call-log missed; ESL = Show edit scan list; SCN = Show scan menu; VOX = Show VOX settings; SQL = Show squelch settings; LED = Show LED indicator menu; KPL = Show keypad lock; INS = Show intro screen; BKL = Show backlight; PWR = Show power settings; RSW = Show record switch; GPI = Hide GPS information; GPS = Hide GPS settings; PRG = Hide radio program menu; DSM = Show Display mode settings; PWD = Show password settings; NWZ = Show new zone menu; ZNS = Show zone settings; TXM = Show TX mode settings; MHT = Show menu hang time; PCM = Show private-call match settings; GCM = Show group-call match settings; NSL = Show new scan list menu; EDZ = Show edit zone menu;
|
virtual |
Abstract method to reset the element within the codeplug.
Any device specific element should implement this method.
Reimplemented from Codeplug::Element.