1 #ifndef ROAMINGCHANNEL_HH
2 #define ROAMINGCHANNEL_HH
18 Q_CLASSINFO(
"IdPrefix",
"rch")
Parse context for config objects.
Definition: configobject.hh:48
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
List class for config objects.
Definition: configobject.hh:349
Base class of all labeled and named objects.
Definition: configobject.hh:199
Extension to the DigitalChannel class to implement an DMR channel.
Definition: channel.hh:354
TimeSlot
Possible timeslots for digital channels.
Definition: channel.hh:389
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Represents the list of roaming channels within the abstract device configuration.
Definition: roamingchannel.hh:99
RoamingChannel * channel(int idx) const
Returns the roaming channel at the given index.
Definition: roamingchannel.cc:219
RoamingChannelList(QObject *parent=nullptr)
Constructor.
Definition: roamingchannel.cc:212
ConfigItem * allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Allocates a member objects for the given YAML node.
Definition: roamingchannel.cc:233
int add(ConfigObject *obj, int row=-1, bool unique=true)
Adds an element to the list.
Definition: roamingchannel.cc:226
Represents a roaming channel.
Definition: roamingchannel.hh:16
bool _overrideColorCode
If true, the color code of the channel gets overridden by the one specified in _colorCode.
Definition: roamingchannel.hh:85
bool timeSlotOverridden() const
Returns true, if the time slot of the channel gets overridden.
Definition: roamingchannel.cc:88
DMRChannel::TimeSlot timeSlot
If overrideTimeSlot is true, specifies the time slot.
Definition: roamingchannel.hh:31
unsigned int _colorCode
If _overrideColorCode is true, specifies the color code.
Definition: roamingchannel.hh:87
bool _overrideTimeSlot
If true, the time slot of the channel gets overridden by the one specified in _timeSlot.
Definition: roamingchannel.hh:89
Frequency _rxFrequency
Holds the RX frequency in Hz.
Definition: roamingchannel.hh:81
void setColorCode(unsigned int cc)
Sets the color code.
Definition: roamingchannel.cc:79
void clear()
Clears the config object.
Definition: roamingchannel.cc:22
bool overrideTimeSlot
If true, the time slot of the channel gets overridden by the one specified in timeSlot.
Definition: roamingchannel.hh:29
Frequency rxFrequency
Holds the RX frequency in Hz.
Definition: roamingchannel.hh:21
ConfigItem * clone() const
Clones this item.
Definition: roamingchannel.cc:30
static RoamingChannel * fromDMRChannel(DMRChannel *ch, DMRChannel *ref=nullptr)
Helper method to construct a Roaming channel from a given DMR channel.
Definition: roamingchannel.cc:111
Frequency _txFrequency
Holds the TX frequency in Hz.
Definition: roamingchannel.hh:83
Frequency txFrequency
Holds the TX frequency in Hz.
Definition: roamingchannel.hh:23
bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err)
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition: roamingchannel.cc:130
void setRXFrequency(Frequency f)
Sets the RX frquency in Hz.
Definition: roamingchannel.cc:44
bool populate(YAML::Node &node, const Context &context, const ErrorStack &err)
Recursively serializes the configuration to YAML nodes.
Definition: roamingchannel.cc:187
void setTXFrequency(Frequency f)
Sets the TX frquency in Hz.
Definition: roamingchannel.cc:56
bool overrideColorCode
If true, the color code of the channel gets overridden by the one specified in colorCode.
Definition: roamingchannel.hh:25
unsigned int colorCode
If overrideColorCode is true, specifies the color code.
Definition: roamingchannel.hh:27
Q_INVOKABLE RoamingChannel(QObject *parent=nullptr)
Default constructor for a roaming channel.
Definition: roamingchannel.cc:7
void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition: roamingchannel.cc:103
bool colorCodeOverridden() const
Returns true, if the color code of the channel gets overridden.
Definition: roamingchannel.cc:64
DMRChannel::TimeSlot _timeSlot
If _overrideTimeSlot is true, specifies the time slot.
Definition: roamingchannel.hh:91
Helper type to encode frequencies without any rounding error.
Definition: frequency.hh:11