libdrmconf
0.12.0
A library to program DMR radios.
|
Implements a VFO channel for TyT radios. More...
#include <uv390_codeplug.hh>
Public Member Functions | |
VFOChannelElement (uint8_t *ptr) | |
Constructor from pointer to memory. | |
virtual | ~VFOChannelElement () |
Destructor. | |
QString | name () const |
Returns the name of this channel. | |
void | setName (const QString &txt) |
Sets the name of this channel. | |
virtual unsigned | stepSize () const |
Returns the step-size for the VFO channel. | |
virtual void | setStepSize (unsigned ss_hz) |
Sets the step-size for the VFO channel in Hz. | |
Public Member Functions inherited from UV390Codeplug::ChannelElement | |
ChannelElement (uint8_t *ptr) | |
Constructs a channel from the given memory. | |
void | clear () |
Clears/resets the channel and therefore disables it. | |
virtual TyTChannelExtension::InCallCriterion | inCallCriteria () const |
Returns the in-call criterion for this channel. | |
virtual void | setInCallCriteria (TyTChannelExtension::InCallCriterion crit) |
Sets the in-call criterion for this channel. | |
virtual TyTChannelExtension::KillTone | turnOffFreq () const |
Returns the remote turn-off/kill frequency for this channel. | |
virtual void | setTurnOffFreq (TyTChannelExtension::KillTone freq) |
Sets the remote turn-off/kill frequency for this channel. | |
virtual unsigned | squelch () const |
Returns the squelch level [0-10]. | |
virtual void | setSquelch (unsigned value) |
Sets the squelch level [0-10]. | |
virtual Channel::Power | power () const |
Returns the power of this channel. | |
virtual void | setPower (Channel::Power pwr) |
Sets the power of this channel. | |
virtual bool | allowInterrupt () const |
Returns true if the channel allows interruption enabled. | |
virtual void | enableAllowInterrupt (bool enable) |
Enables/disables interruption for this channel. | |
virtual bool | dualCapacityDirectMode () const |
Returns true if the channel has dual-capacity direct mode enabled. | |
virtual void | enableDualCapacityDirectMode (bool enable) |
Enables/disables dual-capacity direct mode for this channel. | |
virtual bool | dcdmLeader () const |
Returns true if the radio acts as the leader for this DCDM channel. | |
virtual void | enableDCDMLeader (bool enable) |
Enables/disables this radio to be the leader for this DCDM channel. | |
virtual Channel * | toChannelObj (const ErrorStack &err=ErrorStack()) const |
Constructs a generic Channel object from the codeplug channel. | |
virtual void | fromChannelObj (const Channel *c, Context &ctx) |
Initializes this codeplug channel from the given generic configuration. | |
Public Member Functions inherited from TyTCodeplug::ChannelElement | |
ChannelElement (uint8_t *ptr) | |
Constructs a channel from the given memory. | |
virtual | ~ChannelElement () |
Destructor. | |
bool | isValid () const |
Returns true if channel is valid/enabled. | |
virtual Mode | mode () const |
Returns the mode of the channel. | |
virtual void | setMode (Mode setMode) |
Sets the mode of the channel. | |
virtual FMChannel::Bandwidth | bandwidth () const |
Returns the bandwidth of the (analog) channel. | |
virtual void | setBandwidth (FMChannel::Bandwidth bw) |
Sets the bandwidth of the (analog) channel. | |
virtual bool | autoScan () const |
Returns true if the channel has auto scan enabled. | |
virtual void | enableAutoScan (bool enable) |
Enables/disables auto scan for this channel. | |
virtual bool | loneWorker () const |
Returns true if the channel has lone worker enabled. | |
virtual void | enableLoneWorker (bool enable) |
Enables/disables lone worker for this channel. | |
virtual bool | talkaround () const |
Returns true if the channel has talkaround enabled. | |
virtual void | enableTalkaround (bool enable) |
Enables/disables talkaround for this channel. | |
virtual bool | rxOnly () const |
Returns true if the channel has rx only enabled. | |
virtual void | enableRXOnly (bool enable) |
Enables/disables rx only for this channel. | |
virtual DMRChannel::TimeSlot | timeSlot () const |
Returns the time slot of this channel. | |
virtual void | setTimeSlot (DMRChannel::TimeSlot ts) |
Sets the time slot of this channel. | |
virtual uint8_t | colorCode () const |
Returns the color code of this channel. | |
virtual void | setColorCode (uint8_t ts) |
Sets the color code of this channel. | |
virtual uint8_t | privacyIndex () const |
Returns the index of the privacy system (key). | |
virtual void | setPrivacyIndex (uint8_t ts) |
Sets the index of the privacy system (key). | |
virtual PrivacyType | privacyType () const |
Returns the type of the privacy system. | |
virtual void | setPrivacyType (PrivacyType type) |
Sets the type of the privacy system. | |
virtual bool | privateCallConfirm () const |
Returns true if the channel has private call confirmation enabled. | |
virtual void | enablePrivateCallConfirm (bool enable) |
Enables/disables private call confirmation for this channel. | |
virtual bool | dataCallConfirm () const |
Returns true if the channel has data call confirmation enabled. | |
virtual void | enableDataCallConfirm (bool enable) |
Enables/disables data call confirmation for this channel. | |
virtual TyTChannelExtension::RefFrequency | rxRefFrequency () const |
Returns some weird reference frequency setting for reception. | |
virtual void | setRXRefFrequency (TyTChannelExtension::RefFrequency ref) |
Sets some weird reference frequency setting for reception. | |
virtual TyTChannelExtension::RefFrequency | txRefFrequency () const |
Returns some weird reference frequency setting for transmission. | |
virtual void | setTXRefFrequency (TyTChannelExtension::RefFrequency ref) |
Sets some weird reference frequency setting for transmission. | |
virtual bool | emergencyAlarmACK () const |
Returns true if the channel has alarm confirmation enabled. | |
virtual void | enableEmergencyAlarmACK (bool enable) |
Enables/disables alarm confirmation for this channel. | |
virtual bool | displayPTTId () const |
Returns true if the channel has display PTT ID enabled. | |
virtual void | enableDisplayPTTId (bool enable) |
Enables/disables PTT ID display for this channel. | |
virtual bool | vox () const |
Returns true if the channel has VOX enabled. | |
virtual void | enableVOX (bool enable) |
Enables/disables VOX for this channel. | |
virtual Admit | admitCriterion () const |
Returns the admit criterion for this channel. | |
virtual void | setAdmitCriterion (Admit admit) |
Sets the admit criterion for this channel. | |
virtual uint16_t | contactIndex () const |
Returns the transmit contact index (+1) for this channel. | |
virtual void | setContactIndex (uint16_t idx) |
Sets the transmit contact index (+1) for this channel. | |
virtual unsigned | txTimeOut () const |
Returns the transmit time-out in seconds. | |
virtual void | setTXTimeOut (unsigned tot) |
Sets the transmit time-out in seconds. | |
virtual uint8_t | txTimeOutRekeyDelay () const |
Returns the transmit time-out re-key delay in seconds. | |
virtual void | setTXTimeOutRekeyDelay (uint8_t delay) |
Sets the transmit time-out re-key delay in seconds. | |
virtual uint8_t | emergencySystemIndex () const |
Returns the emergency system index (+1) for this channel. | |
virtual void | setEmergencySystemIndex (uint8_t idx) |
Sets the emergency system index (+1) for this channel. | |
virtual uint8_t | scanListIndex () const |
Returns the scan-list index (+1) for this channel. | |
virtual void | setScanListIndex (uint8_t idx) |
Sets the scan-list index (+1) for this channel. | |
virtual uint8_t | groupListIndex () const |
Returns the RX group list index (+1) for this channel. | |
virtual void | setGroupListIndex (uint8_t idx) |
Sets the RX group list index (+1) for this channel. | |
virtual uint8_t | positioningSystemIndex () const |
Returns the positioning system index (+1) for this channel. | |
virtual void | setPositioningSystemIndex (uint8_t idx) |
Sets the positioning system index (+1) for this channel. | |
virtual bool | dtmfDecode (uint8_t idx) const |
Returns true if the channel has DTMF decoding enabled. | |
virtual void | setDTMFDecode (uint8_t idx, bool enable) |
Enables/disables DTMF decoding this channel. | |
virtual uint32_t | rxFrequency () const |
Returns the RX frequency in Hz. | |
virtual void | setRXFrequency (uint32_t Hz) |
Sets the RX frequency in Hz. | |
virtual uint32_t | txFrequency () const |
Returns the TX frequency in Hz. | |
virtual void | setTXFrequency (uint32_t Hz) |
Sets the TX frequency in Hz. | |
virtual Signaling::Code | rxSignaling () const |
Returns the CTCSS/DSC signaling for RX. | |
virtual void | setRXSignaling (Signaling::Code code) |
Sets the CTCSS/DSC signaling for RX. | |
virtual Signaling::Code | txSignaling () const |
Returns the CTCSS/DSC signaling for TX. | |
virtual void | setTXSignaling (Signaling::Code code) |
Sets the CTCSS/DSC signaling for TX. | |
virtual uint8_t | rxSignalingSystemIndex () const |
Returns the signaling system index (+1) for RX. | |
virtual void | setRXSignalingSystemIndex (uint8_t idx) |
Sets the signaling system index (+1) for RX. | |
virtual uint8_t | txSignalingSystemIndex () const |
Returns the signaling system index (+1) for TX. | |
virtual void | setTXSignalingSystemIndex (uint8_t idx) |
Sets the signaling system index (+1) for TX. | |
virtual bool | txGPSInfo () const |
Returns true if the channel transmits GPS information enabled. | |
virtual void | enableTXGPSInfo (bool enable) |
Enables/disables transmission of GPS information for this channel. | |
virtual bool | rxGPSInfo () const |
Returns true if the channel receives GPS information enabled. | |
virtual void | enableRXGPSInfo (bool enable) |
Enables/disables reception of GPS information for this channel. | |
virtual bool | linkChannelObj (Channel *c, Context &ctx, const ErrorStack &err=ErrorStack()) const |
Links a previously constructed channel to the rest of the configuration. | |
Public Member Functions inherited from Codeplug::Element | |
Element (const Element &other) | |
Copy constructor. | |
virtual | ~Element () |
Destructor. | |
Element & | operator= (const Element &other) |
Copy assignment. | |
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... | |
Protected Member Functions | |
VFOChannelElement (uint8_t *ptr, size_t size) | |
Constructor from pointer to memory. | |
Protected Member Functions inherited from UV390Codeplug::ChannelElement | |
ChannelElement (uint8_t *ptr, size_t size) | |
Constructs a channel from the given memory. | |
Protected Member Functions inherited from TyTCodeplug::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... | |
Additional Inherited Members | |
Public Types inherited from TyTCodeplug::ChannelElement | |
enum | Mode { MODE_ANALOG = 1 , MODE_DIGITAL = 2 } |
Possible modes for the channel, i.e. 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 | Admit { ADMIT_ALWAYS = 0 , ADMIT_CH_FREE = 1 , ADMIT_TONE = 2 , ADMIT_COLOR = 3 } |
TX Admit criterion. 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 a VFO channel for TyT radios.
This class is an extension of the normal ChannelElement that only implements the step-size feature and encodes it where the name used to be. Thus the memory layout and size is identical to the normal channel.