LibDMRConf  0.5.0
A library to program DMR radios.
Public Types | Public Member Functions | Public Attributes | List of all members
RD5RCodeplug::channel_t Struct Reference

Represents a configured channel within the codeplug. More...

#include <rd5r_codeplug.hh>

Public Types

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...
 
enum  Bandwidth { BW_12_5_KHZ = 0, BW_25_KHZ = 1 }
 Bandwidth of channel. More...
 
enum  Power { POWER_HIGH = 1, POWER_LOW = 0 }
 Transmit power for channel. More...
 

Public Member Functions

 channel_t ()
 Constructor.
 
bool isValid () const
 Returns true if the channel is valid.
 
void clear ()
 Clears the channel settings.
 
double getRXFrequency () const
 Returns the RX frequency in MHz.
 
void setRXFrequency (double f)
 Sets the RX frequency in MHz.
 
double getTXFrequency () const
 Returns the TX frequency in MHz.
 
void setTXFrequency (double f)
 Sets the TX frequency in MHz.
 
QString getName () const
 Returns the channel name.
 
void setName (const QString &name)
 Sets the channel name.
 
Signaling::Code getRXTone () const
 Returns the CTCSS RX tone.
 
void setRXTone (Signaling::Code code)
 Sets the CTCSS RX tone.
 
Signaling::Code getTXTone () const
 Returns the CTCSS TX tone.
 
void setTXTone (Signaling::Code code)
 Sets the CTCSS TX tone.
 
ChanneltoChannelObj () const
 Constructs a Channel object from this codeplug channel.
 
void fromChannelObj (const Channel *c, const Config *conf)
 Resets this codeplug channel from the given Channel object.
 
bool linkChannelObj (Channel *c, const CodeplugContext &ctx) const
 Links a previously constructed Channel object to other object within the generic configuration, for example scan lists etc.
 

Public Attributes

uint8_t name [16]
 Channel Name 16 x ASCII 0xff terminated.
 
uint32_t rx_frequency
 RX Frequency, 8 digits BCD.
 
uint32_t tx_frequency
 TX Frequency, 8 digits BCD.
 
uint8_t channel_mode
 Mode analog or digital.
 
uint16_t _unused25
 Unknown set to 0.
 
uint8_t tot
 TOT x 15sec, [0,33], 0-Infinite.
 
uint8_t tot_rekey_delay
 TOT Rekey Delay in seconds [0,255].
 
uint8_t admit_criteria
 Admit Criteria, Always, Channel Free or Color Code.
 
uint8_t _unused30
 Unknown set to 0x50.
 
uint8_t scan_list_index
 Scan List index + 1, 0=None.
 
uint16_t ctcss_dcs_receive
 CTCSS/DCS decode, 4 digits BCD or 0xffff=disabled.
 
uint16_t ctcss_dcs_transmit
 CTCSS/DCS encode, 4 digits BCD or 0xffff=disabled.
 
uint8_t _unused36
 Unkown set to 0.
 
uint8_t tx_signaling_syst
 TX signaling system index+1, 0=Off.
 
uint8_t _unused38
 Unknown set to 0.
 
uint8_t rx_signaling_syst
 RX signaling system index+1, 0=Off.
 
uint8_t _unused40
 Unknown set to 0x16.
 
uint8_t privacy_group
 Privacy Group, 0=None, 1=53474c39.
 
uint8_t colorcode_tx
 Transmit color code [0,15].
 
uint8_t group_list_index
 RX group list index+1, 0=None.
 
uint8_t colorcode_rx
 Receive color code [0,15].
 
uint8_t emergency_system_index
 Emergency system index+1, 0=None.
 
uint16_t contact_name_index
 Transmit contact index+1.
 
uint8_t _unused48_0: 6
 Unknown, set to 0.
 
uint8_t emergency_alarm_ack: 1
 Emergency alarm ACK.
 
uint8_t data_call_conf: 1
 Data call confirmed.
 
uint8_t private_call_conf: 1
 Private call confirmed.
 
uint8_t _unused49_1: 3
 Unknown, set to 0.
 
uint8_t privacy: 1
 Privacy: Off or On.
 
uint8_t _unused49_5: 1
 Unknown set to 0.
 
uint8_t repeater_slot2: 1
 Repeater time slot, 0=slot1 or 1=slot2.
 
uint8_t _unused49_7: 1
 Unknown set to 0.
 
uint8_t dcdm: 1
 Dual capacity direct mode enable.
 
uint8_t _unused50_1: 4
 Unknown set to 0.
 
uint8_t non_ste_frequency: 1
 Non STE = Frequency.
 
uint8_t _unused50_6: 2
 Unknown set to 0.
 
uint8_t _unused51_0: 1
 Unknown set to 0.
 
uint8_t bandwidth: 1
 Bandwidth 12.5 or 25 kHz.
 
uint8_t rx_only: 1
 RX only enable.
 
uint8_t talkaround: 1
 Allow talkaround, default 0.
 
uint8_t _unused51_4: 2
 Unknown 0.
 
uint8_t vox: 1
 VOX Enable.
 
uint8_t power: 1
 Power Low or High.
 
uint8_t _unused52 [3]
 Unknown set to 0.
 
uint8_t squelch
 Squelch level [0,9].
 

Detailed Description

Represents a configured channel within the codeplug.

Please note that channels are organized in banks, see RD5RCodeplug::bank_t for details.

Memmory layout of encoded channel:

     0                               8                               16                              24
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00 | Name, 16 x 1byte ASCII encoded, 0xff terminated text                                                                       ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0c  ...                                                                                                                            |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10 | RX Frequency in MHz encoded as 8-digits BCD like MMMkkkhh                                                                     |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
14 | TX Frequency in MHz encoded as 8-digits BCD like MMMkkkhh                                                                     |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
18 | Mode 0=analog, 1digital       | Unused set to 0                                               | TX timeout (TOT) N x 15s      |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1c | TOT rekey delay in s          | Admit 0=always, 1=free, 2=CC  | !!! Unknown set to 0x50 !!!   | Scan-list index +1            |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
20 | RX CTCSS/DCS                                                  | TX CTCSS/DCS                                                  |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
24 | Unused set to 0x00            | TX signaling index +1         | Unused set to 0x00            | RX signaling index +1         |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
28 | !!! Unknown set to 0x16 !!!   | Privacy Grp 0=None, 1=53474c39| TX Color code [0,15]          | RX group-list index +1        |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2c | RX Color code [0,15]          | Emergency sys. index +1       | TX contact index +1                                           |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
30 |EAC|DCC| 0   0   0   0   0   0 | 0 |SLT| 0 |PRV| 0   0   0 |PCC| 0   0 |STE| 0   0   0   0 |DCM|PWR|VOX| 0   0 |TLK|RXO|BW | 0 |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
34 | Unused set to 0x00            | Unused set to 0x00            | Unused set to 0x00            | Squelch [0..9]                |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
where
EAC = Emergency alarm ACK; DCC = Data call confirmed; SLT = Repeater slot {1,2}; PRV = Privacy enabled; PCC = Private call confirmed;
STE = Non STE is frequency(?!?); DCM = Dual capacity direct mode enable; PWR = Power; VOX = Voice operated switch wnable;
TLK = Allow talkaround; RXO = RX only; BW = Bandwidth;

Member Enumeration Documentation

◆ Admit

Possible admit criteria.

Enumerator
ADMIT_ALWAYS 

Allow always.

ADMIT_CH_FREE 

Allow TX on channel free.

ADMIT_COLOR 

Allow TX on matching color-code.

◆ Bandwidth

Bandwidth of channel.

Enumerator
BW_12_5_KHZ 

12.5kHz (default on DMR)

BW_25_KHZ 

25kHz

◆ Mode

Possible channel types.

Enumerator
MODE_ANALOG 

Analog channel, aka FM.

MODE_DIGITAL 

Digital channel, aka DMR.

◆ Power

Transmit power for channel.

Enumerator
POWER_HIGH 

High power, 5W.

POWER_LOW 

Low power, 1W.

◆ PrivacyGroup

Possible privacy groups, not used in ham radio.

Enumerator
PRIVGR_NONE 

No privacy group, default.

PRIVGR_53474C39 

Privacy group 53474C39 (wtf?).


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