libdrmconf  0.9.0
A library to program DMR radios.
Public Member Functions | Protected Member Functions | List of all members
TyTCodeplug::ZoneExtElement Class Reference

Extended zone data. More...

#include <tyt_codeplug.hh>

Inheritance diagram for TyTCodeplug::ZoneExtElement:
Inheritance graph
[legend]
Collaboration diagram for TyTCodeplug::ZoneExtElement:
Collaboration graph
[legend]

Public Member Functions

 ZoneExtElement (uint8_t *ptr)
 Constructor.
 
virtual ~ZoneExtElement ()
 Destructor.
 
void clear ()
 Abstract method to reset the element within the codeplug. More...
 
virtual uint16_t memberIndexA (uint n) const
 Returns the n-th member index of the channel list for A.
 
virtual void setMemberIndexA (uint n, uint16_t idx)
 Sets the n-th member index of the channel list for A.
 
virtual uint16_t memberIndexB (uint n) const
 Returns the n-th member index of the channel list for B.
 
virtual void setMemberIndexB (uint n, uint16_t idx)
 Returns the n-th member index of the channel list for B.
 
virtual bool fromZoneObj (const Zone *zone, Context &ctx)
 Encodes the given zone.
 
virtual bool linkZoneObj (Zone *zone, Context &ctx)
 Links the given zone object. More...
 
- Public Member Functions inherited from Codeplug::Element
 Element (const Element &other)
 Copy constructor.
 
virtual ~Element ()
 Destructor.
 
virtual bool isValid () const
 Returns true if the pointer is not null.
 
bool getBit (uint offset, uint bit) const
 Reads a specific bit at the given byte-offset.
 
void setBit (uint offset, uint bit, bool value=true)
 Sets a specific bit at the given byte-offset.
 
void clearBit (uint offset, uint bit)
 Clears a specific bit at the given byte-offset.
 
uint8_t getUInt2 (uint offset, uint bit) const
 Reads a 2bit unsinged integer at the given byte- and bit-offset.
 
void setUInt2 (uint offset, uint bit, uint8_t value)
 Stores a 2bit unsinged integer at the given byte- and bit-offset.
 
uint8_t getUInt3 (uint offset, uint bit) const
 Reads a 3bit unsinged integer at the given byte- and bit-offset.
 
void setUInt3 (uint offset, uint bit, uint8_t value)
 Stores a 3bit unsinged integer at the given byte- and bit-offset.
 
uint8_t getUInt4 (uint offset, uint bit) const
 Reads a 4bit unsinged integer at the given byte- and bit-offset.
 
void setUInt4 (uint offset, uint bit, uint8_t value)
 Stores a 4bit unsinged integer at the given byte- and bit-offset.
 
uint8_t getUInt5 (uint offset, uint bit) const
 Reads a 5bit unsinged integer at the given byte- and bit-offset.
 
void setUInt5 (uint offset, uint bit, uint8_t value)
 Stores a 5bit iunsinged nteger at the given byte- and bit-offset.
 
uint8_t getUInt6 (uint offset, uint bit) const
 Reads a 6bit unsinged integer at the given byte- and bit-offset.
 
void setUInt6 (uint offset, uint bit, uint8_t value)
 Stores a 6bit unsinged integer at the given byte- and bit-offset.
 
uint8_t getUInt8 (uint offset) const
 Reads a 8bit unsinged integer at the given byte- and bit-offset.
 
void setUInt8 (uint offset, uint8_t value)
 Reads a 8bit unsinged integer at the given byte- and bit-offset.
 
int8_t getInt8 (uint offset) const
 Reads a 8bit signed integer at the given byte- and bit-offset.
 
void setInt8 (uint offset, int8_t value)
 Reads a 8bit signed integer at the given byte- and bit-offset.
 
uint16_t getUInt16_be (uint offset) const
 Reads a 16bit big-endian unsinged integer at the given byte-offset.
 
uint16_t getUInt16_le (uint offset) const
 Reads a 16bit little-endian unsinged integer at the given byte-offset.
 
void setUInt16_be (uint offset, uint16_t value)
 Stores a 16bit big-endian unsinged integer at the given byte-offset.
 
void setUInt16_le (uint offset, uint16_t value)
 Stores a 16bit little-endian unsinged integer at the given byte-offset.
 
uint32_t getUInt24_be (uint offset) const
 Reads a 24bit big-endian unsinged integer at the given byte-offset.
 
uint32_t getUInt24_le (uint offset) const
 Reads a 24bit little-endian unsinged integer at the given byte-offset.
 
void setUInt24_be (uint offset, uint32_t value)
 Stores a 24bit big-endian unsinged integer at the given byte-offset.
 
void setUInt24_le (uint offset, uint32_t value)
 Stores a 24bit little-endian unsinged integer at the given byte-offset.
 
uint32_t getUInt32_be (uint offset) const
 Reads a 32bit big-endian unsinged integer at the given byte-offset.
 
uint32_t getUInt32_le (uint offset) const
 Reads a 32bit little-endian unsinged integer at the given byte-offset.
 
void setUInt32_be (uint offset, uint32_t value)
 Stores a 32bit big-endian unsinged integer at the given byte-offset.
 
void setUInt32_le (uint offset, uint32_t value)
 Stores a 32bit little-endian unsinged integer at the given byte-offset.
 
uint8_t getBCD2 (uint offset) const
 Reads a 2-digit (1-byte/8bit) BDC value in big-endian at the given byte-offset.
 
void setBCD2 (uint 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 (uint offset) const
 Reads a 4-digit (2-byte/16bit) BDC value in big-endian at the given byte-offset.
 
void setBCD4_be (uint 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 (uint offset) const
 Reads a 4-digit (2-byte/16bit) BDC value in little-endian at the given byte-offset.
 
void setBCD4_le (uint 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 (uint offset) const
 Reads a 8-digit (4-byte/32bit) BDC value in big-endian at the given byte-offset.
 
void setBCD8_be (uint 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 (uint offset) const
 Reads a 8-digit (4-byte/32bit) BDC value in little-endian at the given byte-offset.
 
void setBCD8_le (uint offset, uint32_t value)
 Stores a 8-digit (4-byte/32bit) BDC value in little-endian at the given byte-offset.
 
QString readASCII (uint offset, uint maxlen, uint8_t eos=0x00) const
 Reads upto maxlen ASCII chars at the given byte-offset using eos as the string termination char.
 
void writeASCII (uint offset, const QString &txt, uint maxlen, uint8_t eos=0x00)
 Stores upto maxlen ASCII chars at the given byte-offset using eos as the string termination char. More...
 
QString readUnicode (uint offset, uint maxlen, uint16_t eos=0x0000) const
 Reads upto maxlen unicode chars at the given byte-offset using eos as the string termination char.
 
void writeUnicode (uint offset, const QString &txt, uint maxlen, uint16_t eos=0x0000)
 Stores upto maxlen unicode chars at the given byte-offset using eos as the string termination char. More...
 

Protected Member Functions

 ZoneExtElement (uint8_t *ptr, size_t size)
 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.
 

Detailed Description

Extended zone data.

The zone definition ZoneElement contains only a single set of 16 channels. For each zone definition, there is a zone extension which extends a zone to zwo sets of 64 channels each.

Memory layout of encoded zone extension:

     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 | Member Channel index+1 16 VFO A                               |                                                            ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
5c  ...                                                            | Member Channel index+1 63 VFO A                               |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
60 | Member Channel index+1 00 VFO B                               |                                                            ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
dc  ...                                                            | Member Channel index+1 63 VFO B                               |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

Member Function Documentation

◆ clear()

void TyTCodeplug::ZoneExtElement::clear ( )
virtual

Abstract method to reset the element within the codeplug.

Any device specific element should implement this method.

Reimplemented from Codeplug::Element.

◆ linkZoneObj()

bool TyTCodeplug::ZoneExtElement::linkZoneObj ( Zone zone,
Context ctx 
)
virtual

Links the given zone object.

Thant is, extends channel list A and populates channel list B.


The documentation for this class was generated from the following files: