|
libdrmconf 0.13.3
A library to program DMR radios.
|
VFO Channel representation within the binary codeplug. More...
#include <opengd77base_codeplug.hh>


Public Types | |
| enum class | OffsetMode { Off = 0 , Positive = 1 , Negative = 2 } |
| Possible offset frequency modes. More... | |
| enum class | StepSize { SS2_5kHz = 0 , SS5kHz = 1 , SS6_25kHz = 2 , SS10kHz = 3 , SS12_5kHz = 4 , SS20kHz = 5 , SS30kHz = 6 , SS50kHz = 7 } |
| Possible tuning step sizes. More... | |
| Public Types inherited from OpenGD77BaseCodeplug::ChannelElement | |
| enum | Mode { MODE_ANALOG = 0 , MODE_DIGITAL = 1 } |
| Possible channel types. More... | |
| enum class | Alias { None = 0 , APRS = 1 , Text = 2 , Both = 3 } |
| Alias to transmit. | |
| enum class | SquelchMode { Global , Open , Normal , Closed } |
| Possible squelch modes. | |
Public Member Functions | |
| VFOChannelElement (uint8_t *ptr) | |
| Constructor. | |
| void | clear () |
| Resets the channel. | |
| QString | name () const |
| The VFO channel has no name. | |
| void | setName (const QString &name) |
| The VFO channel has no name. | |
| virtual double | stepSize () const |
| Returns the tuning step-size in kHz. | |
| virtual void | setStepSize (double kHz) |
| Sets the tuning step-size in kHz. | |
| virtual OffsetMode | offsetMode () const |
| Returns the transmit frequency offset mode. | |
| virtual double | txOffset () const |
| Returns the transmit frequency offset. | |
| virtual void | setTXOffset (double f) |
| Sets the transmit frequency offset in MHz. | |
| virtual void | setOffsetMode (OffsetMode mode) |
| Sets the transmit frequency offset mode. | |
| Public Member Functions inherited from OpenGD77BaseCodeplug::ChannelElement | |
| ChannelElement (uint8_t *ptr) | |
| Constructs a channel from the given memory. | |
| virtual | ~ChannelElement () |
| Destructor. | |
| virtual Frequency | rxFrequency () const |
| Returns the RX frequency of the channel. | |
| virtual void | setRXFrequency (const Frequency &freq) |
| Sets the RX frequency of the channel. | |
| virtual Frequency | txFrequency () const |
| Returns the TX frequency of the channel. | |
| virtual void | setTXFrequency (const Frequency &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 bool | globalPower () const |
Returns true if the power-setting is global. | |
| virtual Channel::Power | power () const |
| Returns the power setting of the channel. | |
| virtual void | setPower (Channel::Power pwr) |
| Sets the power setting of the channel. | |
| virtual void | clearPower () |
| Clears the power setting. | |
| virtual Interval | transmitTimeout () const |
| Returns the transmit timeout. | |
| virtual void | setTransmitTimeout (const Interval &interval) |
| Sets a transmit timeout. | |
| virtual bool | hasFixedPosition () const |
Returns true, if a fixed position is set for the channel. | |
| virtual QGeoCoordinate | fixedPosition () const |
| Returns the fixed position. | |
| virtual void | setFixedPosition (const QGeoCoordinate &coordinate) |
| Sets the fixed position for this channel. | |
| virtual void | clearFixedPosition () |
| Resets the fixed position. | |
| virtual SelectiveCall | rxTone () const |
| Returns the RX subtone. | |
| virtual void | setRXTone (const SelectiveCall &code) |
| Sets the RX subtone. | |
| virtual SelectiveCall | txTone () const |
| Returns the TX subtone. | |
| virtual void | setTXTone (const SelectiveCall &code) |
| Sets the TX subtone. | |
| virtual bool | isSimplex () const |
Returns true if the channel is set to simplex. | |
| virtual void | enableSimplex (bool enable) |
| Sets the channel to simplex. | |
| virtual bool | powerSave () const |
Returns true, if the power-save feature is enabled. | |
| virtual void | enablePowerSave (bool enable) |
| Enables/disables power-save. | |
| virtual bool | beep () const |
Returns true, if the "beep" is enabled. | |
| virtual void | enableBeep (bool enable) |
| Enables/disables "the beep". | |
| virtual bool | hasDMRId () const |
Returns true if the global DMR ID is overridden. | |
| virtual unsigned int | dmrId () const |
| Returns the DMR ID for this channel. | |
| virtual void | setDMRId (unsigned int id) |
| Sets the DMR ID for this channel. | |
| virtual void | clearDMRId () |
| Resets the DMR ID for this channel to the global one. | |
| virtual bool | hasGroupList () const |
Returns true if a group list is set. | |
| virtual unsigned | groupListIndex () const |
| Returns the group-list index. | |
| virtual void | setGroupListIndex (unsigned index) |
| Sets the group-list index. | |
| virtual void | clearGroupListIndex () |
| Clears the group list index. | |
| virtual unsigned | colorCode () const |
| Returns the color code. | |
| virtual void | setColorCode (unsigned cc) |
| Sets thecolor code. | |
| virtual bool | hasAPRSIndex () const |
Returns true, if the APRS system index is set. | |
| virtual unsigned int | aprsIndex () const |
| Returns the APRS system index. | |
| virtual void | setAPRSIndex (unsigned int index) |
| Sets the APRS system index. | |
| virtual void | clearAPRSIndex () |
| Resets the APRS system index. | |
| virtual bool | hasTXContact () const |
Returns true, if the TX contact is set. | |
| virtual unsigned int | txContactIndex () const |
| Returns the TX contact index. | |
| virtual void | setTXContactIndex (unsigned int index) |
| Sets the TX contact index. | |
| virtual void | clearTXContact () |
| Clears the TX contact index. | |
| virtual OpenGD77ChannelExtension::TalkerAlias | aliasTimeSlot1 () const |
| Returns the alias transmitted on time slot 1. | |
| virtual void | setAliasTimeSlot1 (OpenGD77ChannelExtension::TalkerAlias alias) |
| Sets the alias transmitted on time slot 1. | |
| virtual OpenGD77ChannelExtension::TalkerAlias | aliasTimeSlot2 () const |
| Returns the alias transmitted on time slot 2. | |
| virtual void | setAliasTimeSlot2 (OpenGD77ChannelExtension::TalkerAlias alias) |
| Sets the alias transmitted on time slot 2. | |
| 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 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 | skipScan () const |
Returns true if channel is skipped in a scan. | |
| virtual void | enableSkipScan (bool enable) |
| Enables/disables skipping in scan. | |
| virtual bool | skipZoneScan () const |
Returns true if channel is skipped in zone scan. | |
| virtual void | enableSkipZoneScan (bool enable) |
| Enables/disables skipping in zone scan. | |
| virtual bool | vox () const |
Returns true if VOX is enabled. | |
| virtual void | enableVOX (bool enable) |
| Enables/disables VOX. | |
| virtual SquelchMode | squelchMode () const |
| Returns the squelch mode. | |
| virtual unsigned int | squelchLevel () const |
| Returns the squelch level. | |
| virtual void | setSquelch (SquelchMode mode, unsigned int level) |
| Set the squelch level and mode. | |
| virtual Channel * | decode (Context &ctx, const ErrorStack &err=ErrorStack()) const |
Constructs a generic Channel object from the codeplug channel. | |
| virtual bool | link (Channel *c, Context &ctx, const ErrorStack &err=ErrorStack()) const |
| Links a previously constructed channel to the rest of the configuration. | |
| virtual bool | encode (const Channel *c, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Initializes this codeplug channel from the given generic configuration. | |
| 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::Bit &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::Bit &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. | |
| void | clearBit (const Offset::Bit &offset) |
| Clears a specific bit. | |
| uint8_t | getUInt2 (const Offset::Bit &offset) const |
| Reads a 2bit unsigned integer at the given bit-offset. | |
| uint8_t | getUInt2 (unsigned offset, unsigned bit) const |
| Reads a 2bit unsigned integer at the given byte- and bit-offset. | |
| void | setUInt2 (const Offset::Bit &offset, uint8_t value) |
| Stores a 2bit unsigned integer at the given 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 (const Offset::Bit &offset) const |
| Reads a 3bit unsigned integer at the given bit-offset. | |
| uint8_t | getUInt3 (unsigned offset, unsigned bit) const |
| Reads a 3bit unsigned integer at the given byte- and bit-offset. | |
| void | setUInt3 (const Offset::Bit &offset, uint8_t value) |
| Stores a 3bit unsigned integer at the given 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 (const Offset::Bit &offset) const |
| Reads a 4bit unsigned integer at the given bit-offset. | |
| uint8_t | getUInt4 (unsigned offset, unsigned bit) const |
| Reads a 4bit unsigned integer at the given byte- and bit-offset. | |
| void | setUInt4 (const Offset::Bit &offset, uint8_t value) |
| Stores a 4bit unsigned integer at the given 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 (const Offset::Bit &offset) const |
| Reads a 5bit 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 (const Offset::Bit &offset, uint8_t value) |
| Stores a 5bit unsigned integer at the given byte- and bit-offset. | |
| void | setUInt5 (unsigned offset, unsigned bit, uint8_t value) |
| Stores a 5bit unsigned integer at the given byte- and bit-offset. | |
| uint8_t | getUInt6 (const Offset::Bit &offset) const |
| Reads a 6bit unsigned integer 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 (const Offset::Bit &offset, uint8_t value) |
| Stores 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. | |
| 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. | |
Protected Member Functions | |
| VFOChannelElement (uint8_t *ptr, unsigned size) | |
| Hidden constructor. | |
| Protected Member Functions inherited from OpenGD77BaseCodeplug::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. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from OpenGD77BaseCodeplug::ChannelElement | |
| static constexpr unsigned int | size () |
| The size of the channel. | |
| Protected Attributes inherited from Codeplug::Element | |
| uint8_t * | _data |
| Holds the pointer to the element. | |
| size_t | _size |
| Holds the size of the element. | |
VFO Channel representation within the binary codeplug.
Each channel requires 0x38b:
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) | Unused, set to 0x00 | Transmit timeout | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 1c | Transmit timeout rekey | Admit criterion | Unknown, set to 0x50 | Scan list index (+1) | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 20 | CTCSS/DCS RX | CTCSS/DCS TX | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 24 | Unused, set to 0x00 | TX DTMF system index (+1) | Unused set to 0x00 | RX DTMF system index (+1) | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 28 | Unused, set to 0x00 | Privacy group index | 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|PWR|VOX|ASE|LWK|TLK|RXO|BW |SQT| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 34 | Offset Frequency in 1kHz, 4-digit BCD, little endian | StepSize |OffsDir| 0 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, ASE = Autoscan enable, LWK = Lone worker enable, TLK = Talk around enable, RXO = RX only, BW = Band width, SQT = Squelch type OffsDir = Offset direction, 0=none, 1=+, 2=-,
|
strong |
|
strong |
|
virtual |
Resets the channel.
Reimplemented from OpenGD77BaseCodeplug::ChannelElement.
|
virtual |
The VFO channel has no name.
Reimplemented from OpenGD77BaseCodeplug::ChannelElement.
|
virtual |
The VFO channel has no name.
Reimplemented from OpenGD77BaseCodeplug::ChannelElement.