|
libdrmconf 0.15.0
A library to program DMR radios.
|
Implements an M17 channel. More...
#include <channel.hh>


Public Types | |
| enum class | Mode { Voice , Data , VoiceAndData } |
| Possible channel modes. | |
| enum class | EncryptionMode { None , AES256 , Scrambled } |
| Possible encryption modes. | |
| Public Types inherited from Channel | |
| enum class | Power { Max , High , Mid , Low , Min } |
| Specifies the prefix for every ID assigned to every channel during serialization. More... | |
| enum class | OffsetShift { None , Positive , Negative } |
| enum class | Type { None =0 , DMR =1 , M17 =2 , FM =4 , AM =8 , Analog =FM|AM , Digital =DMR|M17 , All =Analog|Digital } |
| Options for type selection flags. | |
Public Member Functions | |
| M17Channel (QObject *parent=nullptr) | |
| Constructs a new empty M17 channel. | |
| M17Channel (const M17Channel &other, QObject *parent=nullptr) | |
| Copy constructor. | |
| ConfigItem * | clone () const |
| Clones this item. | |
| void | clear () |
| Clears the config object. | |
| Mode | mode () const |
| Returns the channel mode. | |
| void | setMode (Mode mode) |
| Sets the channel mode. | |
| unsigned int | accessNumber () const |
| Returns the channel access number. | |
| void | setAccessNumber (unsigned int can) |
| Sets the channel access number (0-15). | |
| const M17ContactReference * | contactRef () const |
| Returns a reference to the transmit contact. | |
| M17ContactReference * | contactRef () |
| Returns a reference to the transmit contact. | |
| void | setContactRef (M17ContactReference *ref) |
| Sets the reference to the transmit contact. | |
| M17Contact * | contact () const |
| Returns the default TX contact to call on this channel. | |
| bool | setContact (M17Contact *c) |
| (Re-) Sets the default TX contact for this channel. | |
| bool | aprsEnabled () const |
Returns true if APRS is enabled. | |
| void | enableAPRS (bool enabled) |
| Enables/disables APRS. | |
| EncryptionMode | encryptionMode () const |
| Returns the encryption mode of the channel. | |
| void | setEncryptionMode (EncryptionMode mode) |
| Sets the encryption mode of the channel. | |
| YAML::Node | serialize (const Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively serializes the configuration to YAML nodes. | |
| Public Member Functions inherited from DigitalChannel | |
| DigitalChannel (const DigitalChannel &other, QObject *parent=nullptr) | |
| Copy constructor. | |
| Public Member Functions inherited from Channel | |
| Q_ENUM (Type) | |
| Q_DECLARE_FLAGS (Types, Type) | |
| Q_FLAGS (Types) | |
| bool | copy (const ConfigItem &other) |
| Copies the given item into this one. | |
| Frequency | rxFrequency () const |
| Returns the RX frequency of the channel in Hz. | |
| bool | setRXFrequency (Frequency freq) |
| (Re-)Sets the RX frequency of the channel in Hz. | |
| Frequency | txFrequency () const |
| Returns the TX frequency of the channel in Hz. | |
| bool | setTXFrequency (Frequency freq) |
| (Re-)Sets the TX frequency of the channel in Hz. | |
| FrequencyOffset | offsetFrequency () const |
| Returns the offset between tx and rx frequency of the channel in Hz. | |
| OffsetShift | offsetShift () const |
| Returns direction of offset if any. | |
| bool | defaultPower () const |
Returns true if the channel uses the global default power setting. | |
| Power | power () const |
| Returns the power setting of the channel if the channel does not use the default power. | |
| void | setPower (Power power) |
| (Re-)Sets the power setting of the channel, overrides default power. | |
| void | setDefaultPower () |
| Sets the channel to use the default power setting. | |
| bool | defaultTimeout () const |
Returns true if the transmit timeout is specified by the global default value. | |
| bool | timeoutDisabled () const |
Returns true if the transmit timeout is disabled. | |
| Interval | timeout () const |
| Returns the TX timeout (TOT) in seconds. | |
| bool | setTimeout (const Interval &dur) |
| (Re-)Sets the TX timeout (TOT) in seconds. | |
| void | disableTimeout () |
| Disables the transmit timeout. | |
| void | setDefaultTimeout () |
| Sets the timeout to the global default timeout. | |
| bool | rxOnly () const |
Returns true, if the channel is RX only. | |
| bool | setRXOnly (bool enable) |
| Set, whether the channel is RX only. | |
| bool | voxDisabled () const |
Returns true if the VOX is disabled. | |
| bool | defaultVOX () const |
Returns true if the VOX is specified by the global default value. | |
| Level | vox () const |
| Returns the VOX level [0-10]. | |
| void | setVOX (Level level) |
| Sets the VOX level [0-10]. | |
| void | setVOXDefault () |
| Sets the VOX level to the default value. | |
| void | disableVOX () |
| Disables the VOX. | |
| const ScanListReference * | scanListRef () const |
| Returns the reference to the scan list. | |
| ScanListReference * | scanListRef () |
| Returns the reference to the scan list. | |
| ScanList * | scanList () const |
| Returns the default scan list for the channel. | |
| bool | setScanList (ScanList *list) |
| (Re-) Sets the default scan list for the channel. | |
| OpenGD77ChannelExtension * | openGD77ChannelExtension () const |
| Returns the channel extension for the OpenGD77 firmware. | |
| void | setOpenGD77ChannelExtension (OpenGD77ChannelExtension *ext) |
| Sets the OpenGD77 channel extension. | |
| TyTChannelExtension * | tytChannelExtension () const |
| Returns the channel extension for TyT devices. | |
| void | setTyTChannelExtension (TyTChannelExtension *ext) |
| Sets the TyT channel extension. | |
| bool | parse (const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Parses the given YAML node, updates the given object and updates the given context (IDs). | |
| bool | link (const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack()) |
| Links the given object to the rest of the codeplug using the given context. | |
| Public Member Functions inherited from ConfigObject | |
| virtual const QString & | name () const |
| Returns the name of the object. | |
| virtual void | setName (const QString &name) |
| Sets the name of the object. | |
| QString | idPrefix () const |
| Returns the ID prefix for this object. | |
| bool | label (Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively labels the config object. | |
| bool | parse (const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Parses the given YAML node, updates the given object and updates the given context (IDs). | |
| Public Member Functions inherited from ConfigItem | |
| virtual int | compare (const ConfigItem &other) const |
| Compares the items. | |
| virtual ConfigItem * | allocateChild (QMetaProperty &prop, const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack()) |
| Allocates an instance for the given property on the given YAML node. | |
| virtual const Config * | config () const |
Returns the config, the item belongs to or nullptr if not part of a config. | |
| virtual void | findItemsOfTypes (const QStringList &typeNames, QSet< ConfigItem * > &items) const |
| Searches the config tree to find all instances of the given type names. | |
| template<class Object> | |
| bool | is () const |
Returns true if this object is of class Object. | |
| template<class Object> | |
| const Object * | as () const |
| Casts this object to the given type. | |
| template<class Object> | |
| Object * | as () |
| Casts this object to the given type. | |
| bool | hasDescription () const |
Returns true if there is a class info "description" for this instance. | |
| bool | hasLongDescription () const |
Returns true if there is a class info "longDescription" for this instance. | |
| bool | hasDescription (const QMetaProperty &prop) const |
Returns true if there is a class info "[PropertyName]Description" for the given property. | |
| bool | hasLongDescription (const QMetaProperty &prop) const |
Returns true if there is a class info "[PropertyName]LongDescription" for the given property. | |
| QString | description () const |
| Returns the description of this instance if set by a class info. | |
| QString | longDescription () const |
| Returns the long description of this instance if set by a class info. | |
| QString | description (const QMetaProperty &prop) const |
| Returns the description of property if set by a class info. | |
| QString | longDescription (const QMetaProperty &prop) const |
| Returns the long description of property if set by a class info. | |
Protected Attributes | |
| Mode | _mode |
| Holds the channel mode. | |
| unsigned int | _accessNumber |
| Holds the channel access number. | |
| M17ContactReference | _txContact |
| The default TX contact. | |
| bool | _gpsEnabled |
If true, positioning information is send alonside voice and data. | |
| EncryptionMode | _encryptionMode |
| Holds the encryption mode for the channel. | |
| Protected Attributes inherited from Channel | |
| Frequency | _rxFreq |
| The RX frequency in Hz. | |
| Frequency | _txFreq |
| The TX frequency in Hz. | |
| bool | _defaultPower |
If true, the channel uses the global power setting. | |
| Power | _power |
| The transmit power setting. | |
| Interval | _txTimeOut |
| Transmit timeout. | |
| bool | _rxOnly |
| RX only flag. | |
| Level | _vox |
| Holds the VOX level. | |
| ScanListReference | _scanlist |
| Default scan list of the channel. | |
| OpenGD77ChannelExtension * | _openGD77ChannelExtension |
| Owns the OpenGD77 channel extension object. | |
| TyTChannelExtension * | _tytChannelExtension |
| Owns the TyT channel extension object. | |
| Protected Attributes inherited from ConfigObject | |
| QString | _name |
| Holds the name of the object. | |
Properties | |
| unsigned | accessNumber |
| The channel access number. | |
| M17ContactReference * | contact |
| The transmit contact. | |
| Mode | mode |
| The channel mode. | |
| EncryptionMode | encryptionMode |
| The encryption mode. | |
| bool | aprs |
| If enabled, positioning data is send along with voice and data. | |
| Properties inherited from Channel | |
| Frequency | rxFrequency |
| The receive frequency of the channel in Hz. | |
| Frequency | txFrequency |
| The transmit frequency of the channel in Hz. | |
| Power | power |
| The transmit power. | |
| Interval | timeout |
| The transmit timeout in seconds. | |
| bool | rxOnly |
| If true, the channel is receive only. | |
| ScanListReference * | scanListRef |
| The scan list. | |
| Level | vox |
| The VOX setting. | |
| OpenGD77ChannelExtension * | openGD77 |
| The OpenGD77 channel extension. | |
| TyTChannelExtension * | tyt |
| The TyT channel extension. | |
| Properties inherited from ConfigObject | |
| QString | name |
| The name of the object. | |
Additional Inherited Members | |
| Signals inherited from ConfigItem | |
| void | modified (ConfigItem *obj) |
| Gets emitted once the config object is modified. | |
| void | beginClear () |
| Gets emitted before clearing the item. | |
| void | endClear () |
| Gets emitted after clearing the item. | |
| Protected Slots inherited from Channel | |
| void | onReferenceModified () |
| Gets called whenever a referenced object is changed or deleted. | |
| Protected Member Functions inherited from DigitalChannel | |
| DigitalChannel (QObject *parent=nullptr) | |
| Hidden constructor. | |
| Protected Member Functions inherited from Channel | |
| Channel (QObject *parent=nullptr) | |
| Hidden constructor. | |
| Channel (const Channel &other, QObject *parent=nullptr) | |
| Copy constructor. | |
| bool | populate (YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively serializes the configuration to YAML nodes. | |
| Protected Member Functions inherited from ConfigObject | |
| ConfigObject (QObject *parent=nullptr) | |
| Specifies the prefix for every ID assigned to every object during serialization. | |
| ConfigObject (const QString &name, QObject *parent=nullptr) | |
| Hidden constructor. | |
| Protected Member Functions inherited from ConfigItem | |
| ConfigItem (QObject *parent=nullptr) | |
| Hidden constructor. | |
| Static Protected Member Functions inherited from ConfigObject | |
| static QString | findIdPrefix (const QMetaObject *meta) |
Helper to find the IdPrefix class info in the class hierarchy. | |
Implements an M17 channel.
|
virtual |
Clears the config object.
Reimplemented from Channel.
|
virtual |
Clones this item.
Implements ConfigItem.
|
virtual |
Recursively serializes the configuration to YAML nodes.
The complete configuration must be labeled first.
Reimplemented from ConfigItem.