libdrmconf
0.12.0
A library to program DMR radios.
|
Implements the OpenGD77 specific channel. More...
#include <opengd77_codeplug.hh>
Public Types | |
typedef OpenGD77ChannelExtension::Power | Power |
Reuse Power enum from extension. | |
Public Types inherited from GD77Codeplug::ChannelElement | |
enum | ARTSMode { ARTS_OFF = 0 , ARTS_TX = 1 , ARTS_RX = 2 , ARTS_BOTH = 3 } |
ARTS send. | |
enum | STEAngle { STE_FREQUENCY = 0 , STE_120DEG = 1 , STE_180DEG = 2 , STE_240DEG = 3 } |
STE angle. More... | |
enum | PTTId { PTTID_OFF = 0 , PTTID_START = 1 , PTTID_END = 2 , PTTID_BOTH = 3 } |
PTT ID send. | |
Public Types inherited from RadioddityCodeplug::ChannelElement | |
enum | Mode { MODE_ANALOG = 0 , MODE_DIGITAL = 1 } |
Possible channel types. More... | |
enum | Admit { ADMIT_ALWAYS = 0 , ADMIT_CH_FREE = 1 , ADMIT_COLOR = 2 } |
Possible admit criteria. More... | |
enum | PrivacyGroup { PRIVGR_NONE = 0 , PRIVGR_53474C39 = 1 } |
Possible privacy groups, not used in ham radio. More... | |
Public Member Functions | |
ChannelElement (uint8_t *ptr) | |
Constructor. | |
void | clear () |
Resets the channel. | |
Channel::Power | power () const |
Returns the power setting of the channel. | |
void | setPower (Channel::Power power) |
Sets the power setting of the channel. | |
virtual bool | scanZoneSkip () const |
If true , the scan zone skip is enabled. | |
virtual void | enableScanZoneSkip (bool enable) |
Enables/disables scan zone skip. | |
virtual bool | scanAllSkip () const |
If true , the scan all skip is enabled. | |
virtual void | enableScanAllSkip (bool enable) |
Enables/disables scan all skip. | |
virtual Power | extendedPower () const |
Returns extended power settings. | |
virtual void | setExtendedPower (Power power) |
Sets extended power. | |
virtual bool | squelchIsDefault () const |
Returns true if the squelch is set to radio wide default. | |
virtual unsigned | squelch () const |
Returns the quelch value [0-10]. More... | |
virtual void | setSquelch (unsigned squelch) |
Sets the squelch value. | |
virtual void | setSquelchDefault () |
Sets the squelch to radio wide default. | |
virtual bool | hasRadioId () const |
Returns true if the channel specific radio ID is set. | |
virtual unsigned | radioId () const |
Returns the radio ID for the channel. More... | |
virtual void | setRadioId (unsigned id) |
Sets and enables the radio ID for the channel. | |
virtual void | clearRadioId () |
Clears the radio ID. | |
Channel * | toChannelObj (Context &ctx) const |
Constructs a generic Channel object from the codeplug channel. | |
bool | linkChannelObj (Channel *c, Context &ctx) const |
Links a previously constructed channel to the rest of the configuration. | |
bool | fromChannelObj (const Channel *c, Context &ctx) |
Initializes this codeplug channel from the given generic configuration. | |
bool | autoscan () const |
Overridden, reused in OpenGD77. | |
void | enableAutoscan (bool enable) |
Overridden, reused in OpenGD77. | |
bool | loneWorker () const |
Overridden, reused in OpenGD77. | |
void | enableLoneWorker (bool enable) |
Overridden, reused in OpenGD77. | |
unsigned | rxSignalingIndex () const |
Overridden, reused in OpenGD77. | |
void | setRXSignalingIndex (unsigned idx) |
Overridden, reused in OpenGD77. | |
PrivacyGroup | privacyGroup () const |
Overridden, reused in OpenGD77. | |
void | setPrivacyGroup (PrivacyGroup grp) |
Overridden, reused in OpenGD77. | |
Public Member Functions inherited from GD77Codeplug::ChannelElement | |
ChannelElement (uint8_t *ptr) | |
Constructor. | |
virtual ARTSMode | artsMode () const |
Returns the ARTS mode. | |
virtual void | setARTSMode (ARTSMode mode) |
Sets the ARTS mode. | |
virtual STEAngle | steAngle () const |
Returns the STE angle. | |
virtual void | setSTEAngle (STEAngle angle) |
Sets the STE angle. | |
virtual PTTId | pttIDMode () const |
Returns the PTT ID mode. | |
virtual void | setPTTIDMode (PTTId mode) |
Sets the PTT ID mode. | |
virtual bool | squelchIsTight () const |
Returns true if the squech type is tight. | |
virtual void | enableTightSquelch (bool enable) |
Enables/disables tight squelch. | |
Public Member Functions inherited from RadioddityCodeplug::ChannelElement | |
ChannelElement (uint8_t *ptr) | |
Constructs a channel from the given memory. | |
virtual | ~ChannelElement () |
Destructor. | |
virtual QString | name () const |
Returns the name of the channel. | |
virtual void | setName (const QString &n) |
Sets the name of the channel. | |
virtual uint32_t | rxFrequency () const |
Returns the RX frequency of the channel. | |
virtual void | setRXFrequency (uint32_t freq) |
Sets the RX frequency of the channel. | |
virtual uint32_t | txFrequency () const |
Returns the TX frequency of the channel. | |
virtual void | setTXFrequency (uint32_t freq) |
Sets the TX frequency of the channel. | |
virtual Mode | mode () const |
Returns the channel mode. | |
virtual void | setMode (Mode mode) |
Sets the channel mode. | |
virtual unsigned | txTimeOut () const |
Returns the TX timeout in seconds. More... | |
virtual void | setTXTimeOut (unsigned tot) |
Sets the TX timeout in seconds. More... | |
virtual unsigned | txTimeOutRekeyDelay () const |
Returns the transmit time-out re-key delay in seconds. | |
virtual void | setTXTimeOutRekeyDelay (unsigned delay) |
Sets the transmit time-out re-key delay in seconds. | |
virtual Admit | admitCriterion () const |
Returns the admit criterion. | |
virtual void | setAdmitCriterion (Admit admit) |
Sets the admit criterion. | |
virtual bool | hasScanList () const |
Returns true if a scan list is set. | |
virtual unsigned | scanListIndex () const |
Returns the scan list index (+1). | |
virtual void | setScanListIndex (unsigned index) |
Sets the scan list index (+1). | |
virtual Signaling::Code | rxTone () const |
Returns the RX subtone. | |
virtual void | setRXTone (Signaling::Code code) |
Sets the RX subtone. | |
virtual Signaling::Code | txTone () const |
Returns the TX subtone. | |
virtual void | setTXTone (Signaling::Code code) |
Sets the TX subtone. | |
virtual unsigned | txSignalingIndex () const |
Returns TX signaling index (+1). | |
virtual void | setTXSignalingIndex (unsigned index) |
Sets TX signaling index (+1). | |
virtual unsigned | txColorCode () const |
Returns the TX color code. | |
virtual void | setTXColorCode (unsigned cc) |
Sets the TX color code. | |
virtual bool | hasGroupList () const |
Returns true if a group list is set. | |
virtual unsigned | groupListIndex () const |
Returns the group-list index (+1). | |
virtual void | setGroupListIndex (unsigned index) |
Sets the group-list index (+1). | |
virtual unsigned | rxColorCode () const |
Returns the RX color code. | |
virtual void | setRXColorCode (unsigned cc) |
Sets the RX color code. | |
virtual bool | hasEmergencySystem () const |
Returns true if an emergency system is set. | |
virtual unsigned | emergencySystemIndex () const |
Returns the emergency system index (+1). | |
virtual void | setEmergencySystemIndex (unsigned index) |
Sets the emergency system index (+1). | |
virtual bool | hasContact () const |
Returns true if a TX contact is set. | |
virtual unsigned | contactIndex () const |
Returns the transmit contact index (+1). | |
virtual void | setContactIndex (unsigned index) |
Sets the transmit contact index (+1). | |
virtual bool | dataCallConfirm () const |
Returns true if data-call-confirm is enabled. | |
virtual void | enableDataCallConfirm (bool enable) |
Enables/disables data-call-confirm. | |
virtual bool | emergencyAlarmACK () const |
Returns true if emergency alarm ACK is enabled. | |
virtual void | enableEmergencyAlarmACK (bool enable) |
Enables/disables emergency alarm ACK. | |
virtual bool | privateCallConfirm () const |
Returns true if private-call-confirm is enabled. | |
virtual void | enablePrivateCallConfirm (bool enable) |
Enables/disables private-call-confirm. | |
virtual bool | privacyEnabled () const |
Returns true if privacy is enabled. | |
virtual void | enablePrivacy (bool enable) |
Enables/disables privacy. | |
virtual DMRChannel::TimeSlot | timeSlot () const |
Returns the time slot of the channel. | |
virtual void | setTimeSlot (DMRChannel::TimeSlot ts) |
Sets the time slot of the channel. | |
virtual bool | dualCapacityDirectMode () const |
Returns true if the dual-capacity direct mode is enabled. | |
virtual void | enableDualCapacityDirectMode (bool enable) |
Enables/disables the dual-capacity direct mode. | |
virtual bool | nonSTEFrequency () const |
Returns true if non-STE is frequency (?!). | |
virtual void | enableNonSTEFrequency (bool enable) |
Enables/disables non-STE is frequency (?!). | |
virtual FMChannel::Bandwidth | bandwidth () const |
Returns the bandwidth. | |
virtual void | setBandwidth (FMChannel::Bandwidth bw) |
Sets the bandwidth. | |
virtual bool | rxOnly () const |
Returns true if RX only is enabled. | |
virtual void | enableRXOnly (bool enable) |
Enables/disables RX only. | |
virtual bool | talkaround () const |
Returns true if talkaround is enabled. | |
virtual void | enableTalkaround (bool enable) |
Enables/disables talkaround. | |
virtual bool | vox () const |
Returns true if VOX is enabled. | |
virtual void | enableVOX (bool enable) |
Enables/disables VOX. | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from GD77Codeplug::ChannelElement | |
ChannelElement (uint8_t *ptr, size_t size) | |
Hidden Constructor. | |
Protected Member Functions inherited from RadioddityCodeplug::ChannelElement | |
ChannelElement (uint8_t *ptr, size_t size) | |
Constructs a channel from the given memory. | |
Protected Member Functions inherited from Codeplug::Element | |
Element (uint8_t *ptr, size_t size) | |
Hidden constructor. More... | |
Protected Attributes inherited from Codeplug::Element | |
uint8_t * | _data |
Holds the pointer to the element. | |
size_t | _size |
Holds the size of the element. | |
Implements the OpenGD77 specific channel.
Encoding of channel:
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, 16 x ASCII, 0xff terminated ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0c ... | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 10 | RX Frequency, 8 x BCD digits, little-endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 14 | TX Frequency, 8 x BCD digits, little-endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 18 | Mode (Analog/Digital) | Power [0-10] | Unused, set to 0. | Transmit timeout in 15s | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 1c | TOT rekey delay in sec. | Admit criterion | Unknown, set to 0x50 | Scan list index (+1) 0=None. | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 20 | CTCSS/DCS RX, 4-digit BCD little endian, 0xffff=off. | CTCSS/DCS TX, 4-digit BCD little endian, 0xffff=off. | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 24 | Unused, set to 0x00 | TX DTMF system index |RID| Unused set to 0 | Radio ID, 24bit big-endian ... +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 28 ... | TX color-code | RX group list index (+1) | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 2c | RX color code | Emergency system index (+1) | Contact index (+1), little endian | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 30 |DCC|EAA| 0 0 0 0 | ARTS | 0 |SLT| 0 |PRV| 0 0 0 |PCC| STE |NFS| 0 | PTTId | 0 |DCD| 0 |VOX|SZS|SAS|TLK|RXO|BW |SQT| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 34 | Unused set to 0 | Squelch in 5%, 0=default | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ RID = Channel radio ID enable, default=0. DCC = Data call confirm, EAA = Emergency Alarm ACK, SLT = Repeater slot, PRV = Privacy Enable, PCC = Private call confirm, NSF = Non-STE Frequency, DCD = Direct call dual capacity mode, PWR = Power, SZS = Scan zone skip enable, default=off. Was "auto scan enable" in orig. GD77. SAS = Scan all skip enable, default=off. Was "lone worker enable" in orig. GD77. TLK = Talk around enable, RXO = RX only, BW = Band width, SQT = Squelch type
|
virtual |
Returns the radio ID for the channel.
Only valid if hasRadioId()
returns true
.
|
virtual |
Returns the quelch value [0-10].
0=open, 10=closed.