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

Represents a single channel (analog or digital) within the codeplug. More...

#include <uv390_codeplug.hh>

Public Types

enum  Mode { MODE_ANALOG = 1, MODE_DIGITAL = 2 }
 Possible channel modes. More...
 
enum  Bandwidth { BW_12_5_KHZ = 0, BW_20_KHZ = 1, BW_25_KHZ = 2 }
 Bandwidth of the channel. More...
 
enum  PrivacyType { PRIV_NONE = 0, PRIV_BASIC = 1, PRIV_ENHANCED = 2 }
 Possible privacy types. More...
 
enum  RefFrequency { REF_LOW = 0, REF_MEDIUM = 1, REF_HIGH = 2 }
 I have absolutely no idea what this means.
 
enum  Admit { ADMIT_ALWAYS = 0, ADMIT_CH_FREE = 1, ADMIT_TONE = 2, ADMIT_COLOR = 3 }
 TX Admit criterion. More...
 
enum  InCall { INCALL_ALWAYS = 0, INCALL_ADMIT = 1, INCALL_TXINT = 2 }
 Again, I have no idea.
 
enum  TurnOffFreq { TURNOFF_NONE = 3, TURNOFF_259_2HZ = 0, TURNOFF_55_2HZ = 1 }
 Turn-off tone frequency. More...
 
enum  DCDM { DCDM_LEADER = 0, DCDM_MS = 1 }
 Dual-capacity direct mode. More...
 
enum  Power { POWER_HIGH = 3, POWER_LOW = 0, POWER_MIDDLE = 2 }
 Possible power settings. More...
 

Public Member Functions

 channel_t ()
 Constructor, also clears the struct.
 
void clear ()
 Clears and invalidates the channel.
 
bool isValid () const
 Returns true if the channel is valid.
 
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 name of the radio.
 
void setName (const QString &name)
 Sets the name of the radio.
 
Signaling::Code getRXTone () const
 Returns the RX CTCSS tone.
 
void setRXTone (Signaling::Code code)
 Sets the RX CTCSS tone.
 
Signaling::Code getTXTone () const
 Returns the TX CTCSS tone.
 
void setTXTone (Signaling::Code code)
 Sets the TX CTCSS tone.
 
ChanneltoChannelObj () const
 Constructs a generic Channel object from the codeplug channel.
 
bool linkChannelObj (Channel *c, Config *conf) const
 Links a previously constructed channel to the rest of the configuration.
 
void fromChannelObj (const Channel *c, const Config *conf)
 Initializes this codeplug channel from the given generic configuration.
 

Public Attributes

uint8_t channel_mode: 2
 Channel Mode: 1=Analog or 2=Digital, default=Analog.
 
uint8_t bandwidth: 2
 Bandwidth: 0=12.5kHz, 1=20kHz or 2=25kHz, default = 0.
 
uint8_t autoscan: 1
 Autoscan: 0=disable, 1=enable, default=0.
 
uint8_t _unused0_1: 1
 Reserved = 1.
 
uint8_t _unused0_2: 1
 Reserved = 1.
 
uint8_t lone_worker: 1
 Lone Worker: 0=disable, 1=enable, default=0.
 
uint8_t allow_talkaround: 1
 Allow Talkaround: 0=on, 1=off, default=1 (off)
 
uint8_t rx_only: 1
 RX Only: 0=off, 1=on, default=0.
 
uint8_t time_slot: 2
 Repeater slot: 2=TS2, 1=TS1, default=1.
 
uint8_t color_code: 4
 ColorCode [0..15], default=1.
 
uint8_t privacy_no: 4
 Privacy No. (+1): 1...16 ???, default=0.
 
uint8_t privacy: 2
 Privacy: 0=None, 1=Basic or 2=Enhanced, default=0.
 
uint8_t private_call_conf: 1
 Private Call Confirmed, default=0.
 
uint8_t data_call_conf: 1
 Data Call Confirmed, default=0.
 
uint8_t rx_ref_frequency: 2
 RX Ref Frequency: 0=Low, 1=Medium, 2=High, default=0.
 
uint8_t _unused3_2: 1
 Unknown = 0 ???, default = 0.
 
uint8_t emergency_alarm_ack: 1
 Emergency Alarm Ack, default = 0.
 
uint8_t _unused3_4: 3
 Unknown 0b110 ???
 
uint8_t display_pttid_dis: 1
 Display PTT ID (inverted), default = 1.
 
uint8_t tx_ref_frequency: 2
 TX Ref Frequency: 0=Low, 1=Medium, 2=High, default=0.
 
uint8_t _unused4_2: 2
 Unknow = 0b01.
 
uint8_t vox: 1
 VOX Enable, 0=Disable, 1=Enable, default = 0.
 
uint8_t _unused4_5: 1
 Reserved = 1.
 
uint8_t admit_criteria: 2
 Admit Criteria: 0=Always, 1=Channel Free or 2=Correct CTS/DCS, 3=Colorcode, default=0.
 
uint8_t _unused5_0: 4
 Reserved = 0b0000 ???
 
uint8_t in_call_criteria: 2
 In Call Criteria: 0=Always, 1=Follow Admit Criteria, 2=TX Interrupt, default=0.
 
uint8_t turn_off_freq: 2
 Non-QT/DQT Turn-off Freq.: 3=none, 0=259.2Hz, 1=55.2Hz, default=3.
 
uint16_t contact_name_index
 Contact Name index. 0=none or contact index+1, default=0.
 
uint8_t tot: 6
 TOT x 15sec, 0-Infinite, 1=15s, etc, 37=555s, default=0.
 
uint8_t _unused8_6: 2
 Unknown = 0b00 ???
 
uint8_t tot_rekey_delay
 TOT Rekey Delay in seconds, default=0.
 
uint8_t emergency_system_index
 Emergency System, 0=none or system index+2, default=0.
 
uint8_t scan_list_index
 Scan List, 0=none or scan-list index+1, default=0.
 
uint8_t group_list_index
 Group List, 0=none or group-list index+1, default=0.
 
uint8_t gps_system
 GPS System, 0=none, GPS-system index+1, default=0.
 
uint8_t dtmf_decode1: 1
 DTMF decode 1. 0=off, 1=on.
 
uint8_t dtmf_decode2: 1
 DTMF decode 2. 0=off, 1=on.
 
uint8_t dtmf_decode3: 1
 DTMF decode 3. 0=off, 1=on.
 
uint8_t dtmf_decode4: 1
 DTMF decode 4. 0=off, 1=on.
 
uint8_t dtmf_decode5: 1
 DTMF decode 5. 0=off, 1=on.
 
uint8_t dtmf_decode6: 1
 DTMF decode 6. 0=off, 1=on.
 
uint8_t dtmf_decode7: 1
 DTMF decode 7. 0=off, 1=on.
 
uint8_t dtmf_decode8: 1
 DTMF decode 8. 0=off, 1=on, default=0.
 
uint8_t squelch
 Squelch: 0...9, default=1.
 
uint32_t rx_frequency
 RX Frequency: 8 digits BCD, default=0x00000040.
 
uint32_t tx_frequency
 TX Frequency: 8 digits BCD, default=0x00000040.
 
uint16_t ctcss_dcs_receive
 CTCSS/DCS Dec: 4 digits BCD, 0xffff = None, default=0xffff.
 
uint16_t ctcss_dcs_transmit
 CTCSS/DCS Enc: 4 digits BCD, 0xffff = None, default=0xffff.
 
uint8_t rx_signaling_syst
 Rx Signaling System: Off, DTMF-1...4, default = 0.
 
uint8_t tx_signaling_syst
 Tx Signaling System: Off, DTMF-1...4, default = 0.
 
uint8_t power: 2
 Power: Low, Middle, High, default=high.
 
uint8_t _unused30_2: 6
 0b111111
 
uint8_t send_gps_info: 1
 Send GSP Info (inv): 0=Send, 1=Disabled, default=1.
 
uint8_t recv_gps_info: 1
 Recv. GSP Info (inv): 0=Recv., 1=Disabled, default=1.
 
uint8_t allow_interrupt: 1
 Allow interrupt (inv): 0=Allow, 1=Disabled, default=1.
 
uint8_t dcdm_switch_dis: 1
 DCDM switch (inverted), default=1.
 
uint8_t leader_ms: 1
 Leader/MS: Leader or MS, default=1.
 
uint8_t _unused31_5: 3
 Reserved = 0b111.
 
union {
   uint16_t   name [16]
 Channel Name (16 x Unicode), default=0x0000.
 
   uint16_t   step: 8
 Step size in 2.5kHz steps [0-9] (VFO mode), 0=2.5kHz, 1=5kHz, ..., 9=50kHz.
 
   uint16_t   _unused33_0: 8
 Unused set to 0xff in VFO mode.
 
}; 
 

Detailed Description

Represents a single channel (analog or digital) within the codeplug.

Memmory layout of encoded channel:

     0                               8                               16                              24
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00 |LWK| 1   1 |ASC| BandW | ChMod |   ColorCode   |TimeSlt|RXO|ALT|    PrivNo     | Priv  |PCC|DCC|RXFreqR| 0 |EAA| 1   1   0 |DPD|
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
04 |AdimtCr| 1 |VOX| 0   1 |TXFreqR|TOffFre|InCallC| 0   0   0   0 | TX Contact name index + 1                                     |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
08 | 0   0 |      Tx Timeout       |    Tx Timeout Rekey Delay     | Emergency System index + 1    | Scan List index + 1           |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0c | RX Group List index + 1       | GPS System index +1           | DTMF decode bitmap            | Squelch [0..9]                |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10 | RX Frequency, 8 digits BCD                                                                                                    |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
14 | TX Frequency, 8 digits BCD                                                                                                    |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
18 | RX CTCSS/DCS                                                  | TX CTCSS/DCS                                                  |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1c | RX Signaling System index +1  | TX Signaling System index +1  | 1   1   1   1   1   1 | Power | 1   1   1 |LMS|DCD|ALI|RXG|TXG|
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
20 | Name 16 x 16bit unicode characters / Stepsize (byte 0x20)                                                                  ...
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
3c  ...                                                                                                                            |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

Member Enumeration Documentation

◆ Admit

TX Admit criterion.

Enumerator
ADMIT_ALWAYS 

Always allow TX.

ADMIT_CH_FREE 

Allow TX if channel is free.

ADMIT_TONE 

Allow TX if CTCSS tone matches.

ADMIT_COLOR 

Allow TX if color-code matches.

◆ Bandwidth

Bandwidth of the channel.

Enumerator
BW_12_5_KHZ 

12.5 kHz narrow, (default for binary channels).

BW_20_KHZ 

20 kHz (really?)

BW_25_KHZ 

25kHz wide.

◆ DCDM

Dual-capacity direct mode.

Uses both time-slots in simplex operation. Not used in ham radio.

◆ Mode

Possible channel modes.

Enumerator
MODE_ANALOG 

Analog channel.

MODE_DIGITAL 

Digital channel.

◆ Power

Possible power settings.

Enumerator
POWER_HIGH 

High = 5W.

POWER_LOW 

Low = 1W.

POWER_MIDDLE 

Middle = ?W.

◆ PrivacyType

Possible privacy types.

Enumerator
PRIV_NONE 

No privacy.

PRIV_BASIC 

Basic privacy.

PRIV_ENHANCED 

Enhenced privacy.

◆ TurnOffFreq

Turn-off tone frequency.

This radio has a feature that allows to disable radios remotely by sending a specific tone. Certainly not a feature used in ham-radio.

Enumerator
TURNOFF_NONE 

Turn-off disabled. Default!

TURNOFF_259_2HZ 

Turn-off on 259.2Hz tone.

TURNOFF_55_2HZ 

Turn-off on 55.2Hz tone.


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