libdrmconf  0.10.4
A library to program DMR radios.
Public Member Functions | Protected Types | Protected Member Functions | List of all members
OpenRTXCodeplug::ZoneElement Class Reference

The binary encoding of a zone. More...

#include <openrtx_codeplug.hh>

Inheritance diagram for OpenRTXCodeplug::ZoneElement:
Inheritance graph
[legend]
Collaboration diagram for OpenRTXCodeplug::ZoneElement:
Collaboration graph
[legend]

Public Member Functions

 ZoneElement (uint8_t *ptr)
 Constructor.
 
void clear ()
 Resets the zone.
 
bool isValid () const
 Returns true if the zone is valid.
 
virtual QString name () const
 Returns the zone name.
 
virtual void setName (const QString &name)
 Sets the name of the zone.
 
virtual unsigned int channelCount () const
 Returns the number of channels in zone.
 
virtual void setChannelCount (unsigned int n)
 Sets the number of channels in zone.
 
virtual unsigned int channelIndex (unsigned int n) const
 Returns the n-th channel index.
 
virtual void setChannelIndex (unsigned int n, unsigned int idx)
 Sets the n-th channel index.
 
virtual ZonetoZoneObj (Context &ctx) const
 Constructs a generic Zone object from this codeplug zone.
 
virtual bool linkZoneObj (Zone *zone, Context &ctx, bool putInB, const ErrorStack &err=ErrorStack()) const
 Links a previously constructed Zone object to the rest of the configuration. More...
 
virtual void fromZoneObjA (const Zone *zone, Context &ctx)
 Resets this codeplug zone representation from the given generic Zone object.
 
virtual void fromZoneObjB (const Zone *zone, Context &ctx)
 Resets this codeplug zone representation from the given generic Zone object.
 

Protected Types

enum  Offsets { OffsetName = 0x00 , OffsetCount = 0x20 , OffsetChannel = 0x22 , StringLength = 0x20 }
 Just defines the offsets with the element.
 

Protected Member Functions

 ZoneElement (uint8_t *ptr, unsigned size)
 Hidden constructor.
 

Detailed Description

The binary encoding of a zone.

Binary representation (variable size):

     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 | Name, 32 x ASCII, 0-pad                                                                                                    ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1c  ...                                                                                                                            |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
20 | Number of channels, uint16_t, little endian                   | Channel Index 0, uint32_t, little endian                   ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
24  ...                                                            | Channel Index 1, uint32_t, little endian                   ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
28  ...                                                            | ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

Member Function Documentation

◆ linkZoneObj()

bool OpenRTXCodeplug::ZoneElement::linkZoneObj ( Zone zone,
Context ctx,
bool  putInB,
const ErrorStack err = ErrorStack() 
) const
virtual

Links a previously constructed Zone object to the rest of the configuration.

That is linking to the referred channels.


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