mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Const correctness, override keyword, a bunch of stuff..
This commit is contained in:
parent
4099d12d9a
commit
4a688b932a
@ -25,7 +25,7 @@ namespace hyperion
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
BlackBorderProcessor(Hyperion* hyperion, QObject* parent);
|
BlackBorderProcessor(Hyperion* hyperion, QObject* parent);
|
||||||
~BlackBorderProcessor();
|
~BlackBorderProcessor() override;
|
||||||
///
|
///
|
||||||
/// Return the current (detected) border
|
/// Return the current (detected) border
|
||||||
/// @return The current border
|
/// @return The current border
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
/// @param port port number on which to start listening for connections
|
/// @param port port number on which to start listening for connections
|
||||||
///
|
///
|
||||||
BoblightServer(Hyperion* hyperion, const QJsonDocument& config);
|
BoblightServer(Hyperion* hyperion, const QJsonDocument& config);
|
||||||
~BoblightServer();
|
~BoblightServer() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @return the port number on which this TCP listens for incoming connections
|
/// @return the port number on which this TCP listens for incoming connections
|
||||||
@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
/// @return true if server is active (bind to a port)
|
/// @return true if server is active (bind to a port)
|
||||||
///
|
///
|
||||||
bool active();
|
bool active() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
|
@ -44,7 +44,7 @@ class BonjourServiceBrowser : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
BonjourServiceBrowser(QObject *parent = 0);
|
BonjourServiceBrowser(QObject *parent = 0);
|
||||||
~BonjourServiceBrowser();
|
~BonjourServiceBrowser() override;
|
||||||
void browseForServiceType(const QString &serviceType);
|
void browseForServiceType(const QString &serviceType);
|
||||||
inline QList<BonjourRecord> currentRecords() const { return bonjourRecords; }
|
inline QList<BonjourRecord> currentRecords() const { return bonjourRecords; }
|
||||||
inline QString serviceType() const { return browsingType; }
|
inline QString serviceType() const { return browsingType; }
|
||||||
|
@ -45,13 +45,13 @@ class BonjourServiceRegister : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
BonjourServiceRegister(QObject *parent = 0);
|
BonjourServiceRegister(QObject *parent = 0);
|
||||||
~BonjourServiceRegister();
|
~BonjourServiceRegister() override;
|
||||||
|
|
||||||
void registerService(const QString& service, int port);
|
void registerService(const QString& service, int port);
|
||||||
void registerService(const BonjourRecord &record, quint16 servicePort, std::vector<std::pair<std::string, std::string>> txt = std::vector<std::pair<std::string, std::string>>());
|
void registerService(const BonjourRecord &record, quint16 servicePort, const std::vector<std::pair<std::string, std::string>>& txt = {});
|
||||||
inline BonjourRecord registeredRecord() const {return finalRecord; }
|
inline BonjourRecord registeredRecord() const { return finalRecord; }
|
||||||
|
|
||||||
quint16 getPort() const { return _port; };
|
quint16 getPort() const { return _port; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void error(DNSServiceErrorType error);
|
void error(DNSServiceErrorType error);
|
||||||
@ -69,8 +69,8 @@ private:
|
|||||||
QSocketNotifier *bonjourSocket;
|
QSocketNotifier *bonjourSocket;
|
||||||
BonjourRecord finalRecord;
|
BonjourRecord finalRecord;
|
||||||
|
|
||||||
// current port
|
// current port
|
||||||
quint16 _port = 0;
|
quint16 _port = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BONJOURSERVICEREGISTER_H
|
#endif // BONJOURSERVICEREGISTER_H
|
||||||
|
@ -44,8 +44,8 @@ class BonjourServiceResolver : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
BonjourServiceResolver(QObject *parent);
|
BonjourServiceResolver(QObject *parent);
|
||||||
~BonjourServiceResolver();
|
~BonjourServiceResolver() override;
|
||||||
|
|
||||||
bool resolveBonjourRecord(const BonjourRecord &record);
|
bool resolveBonjourRecord(const BonjourRecord &record);
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ class ColorOption: public Option
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
QColor _color;
|
QColor _color;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ColorOption(const QString &name,
|
ColorOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -31,9 +32,8 @@ public:
|
|||||||
: Option(other)
|
: Option(other)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual bool validate(Parser & parser, QString & value) override;
|
bool validate(Parser & parser, QString & value) override;
|
||||||
QColor getColor(Parser &parser)
|
QColor getColor(Parser &parser) const { return _color; }
|
||||||
{ return _color; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class ColorsOption: public Option
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
QList<QColor> _colors;
|
QList<QColor> _colors;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ColorsOption(const QString &name,
|
ColorsOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -20,6 +21,7 @@ public:
|
|||||||
)
|
)
|
||||||
: Option(name, description, valueName, defaultValue)
|
: Option(name, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ColorsOption(const QStringList &names,
|
ColorsOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
@ -27,13 +29,13 @@ public:
|
|||||||
)
|
)
|
||||||
: Option(names, description, valueName, defaultValue)
|
: Option(names, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ColorsOption(const QCommandLineOption &other)
|
ColorsOption(const QCommandLineOption &other)
|
||||||
: Option(other)
|
: Option(other)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual bool validate(Parser & parser, QString & value) override;
|
virtual bool validate(Parser & parser, QString & value) override;
|
||||||
QList<QColor> &getColors(Parser &parser)
|
QList<QColor> getColors(Parser &parser) const { return _colors; }
|
||||||
{ return _colors; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class ImageOption: public Option
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
QImage _image;
|
QImage _image;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImageOption(const QString &name,
|
ImageOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -20,6 +21,7 @@ public:
|
|||||||
)
|
)
|
||||||
: Option(name, description, valueName, defaultValue)
|
: Option(name, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ImageOption(const QStringList &names,
|
ImageOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
@ -27,13 +29,13 @@ public:
|
|||||||
)
|
)
|
||||||
: Option(names, description, valueName, defaultValue)
|
: Option(names, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ImageOption(const QCommandLineOption &other)
|
ImageOption(const QCommandLineOption &other)
|
||||||
: Option(other)
|
: Option(other)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual bool validate(Parser & parser, QString & value) override;
|
bool validate(Parser & parser, QString & value) override;
|
||||||
QImage &getImage(Parser &parser)
|
QImage& getImage(Parser &parser) { return _image; }
|
||||||
{ return _image; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class IntOption: public ValidatorOption
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
int _int;
|
int _int;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IntOption(const QString &name,
|
IntOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -19,18 +20,26 @@ public:
|
|||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
||||||
: ValidatorOption(name, description, valueName, defaultValue)
|
: ValidatorOption(name, description, valueName, defaultValue)
|
||||||
{ setValidator(new QIntValidator(minimum, maximum)); }
|
{
|
||||||
|
setValidator(new QIntValidator(minimum, maximum));
|
||||||
|
}
|
||||||
|
|
||||||
IntOption(const QStringList &names,
|
IntOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
||||||
: ValidatorOption(names, description, valueName, defaultValue)
|
: ValidatorOption(names, description, valueName, defaultValue)
|
||||||
{ setValidator(new QIntValidator(minimum, maximum)); }
|
{
|
||||||
|
setValidator(new QIntValidator(minimum, maximum));
|
||||||
|
}
|
||||||
|
|
||||||
IntOption(const QCommandLineOption &other,
|
IntOption(const QCommandLineOption &other,
|
||||||
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
int minimum = std::numeric_limits<int>::min(), int maximum = std::numeric_limits<int>::max())
|
||||||
: ValidatorOption(other)
|
: ValidatorOption(other)
|
||||||
{ setValidator(new QIntValidator(minimum, maximum)); }
|
{
|
||||||
|
setValidator(new QIntValidator(minimum, maximum));
|
||||||
|
}
|
||||||
|
|
||||||
int getInt(Parser &parser, bool *ok = 0, int base = 10);
|
int getInt(Parser &parser, bool *ok = 0, int base = 10);
|
||||||
int *getIntPtr(Parser &parser, bool *ok = 0, int base = 10);
|
int *getIntPtr(Parser &parser, bool *ok = 0, int base = 10);
|
||||||
|
@ -26,13 +26,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
Option(const QCommandLineOption &other);
|
Option(const QCommandLineOption &other);
|
||||||
virtual ~Option() = default;
|
|
||||||
|
|
||||||
virtual bool validate(Parser &parser, QString &value);
|
virtual bool validate(Parser &parser, QString &value);
|
||||||
QString name();
|
QString name() const;
|
||||||
QString getError();
|
QString getError() const;
|
||||||
QString value(Parser &parser);
|
QString value(Parser &parser) const;
|
||||||
const char* getCString(Parser &parser);
|
const char* getCString(Parser &parser) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString _error;
|
QString _error;
|
||||||
|
@ -93,9 +93,10 @@ public:
|
|||||||
return *option;
|
return *option;
|
||||||
}
|
}
|
||||||
|
|
||||||
Parser(QString description=QString())
|
Parser(const QString& description = QString())
|
||||||
{
|
{
|
||||||
if(description.size())setApplicationDescription(description);
|
if(description.size())
|
||||||
|
setApplicationDescription(description);
|
||||||
};
|
};
|
||||||
|
|
||||||
QCommandLineOption addHelpOption()
|
QCommandLineOption addHelpOption()
|
||||||
@ -116,53 +117,84 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
QString applicationDescription() const
|
QString applicationDescription() const
|
||||||
{ return _parser.applicationDescription(); }
|
{
|
||||||
|
return _parser.applicationDescription();
|
||||||
|
}
|
||||||
|
|
||||||
void clearPositionalArguments()
|
void clearPositionalArguments()
|
||||||
{ _parser.clearPositionalArguments(); }
|
{
|
||||||
|
_parser.clearPositionalArguments();
|
||||||
|
}
|
||||||
|
|
||||||
QString helpText() const
|
QString helpText() const
|
||||||
{ return _parser.helpText(); }
|
{
|
||||||
|
return _parser.helpText();
|
||||||
|
}
|
||||||
|
|
||||||
bool isSet(const QString &name) const
|
bool isSet(const QString &name) const
|
||||||
{ return _parser.isSet(name); }
|
{
|
||||||
|
return _parser.isSet(name);
|
||||||
|
}
|
||||||
|
|
||||||
bool isSet(const Option &option) const
|
bool isSet(const Option &option) const
|
||||||
{ return _parser.isSet(option); }
|
{
|
||||||
|
return _parser.isSet(option);
|
||||||
|
}
|
||||||
|
|
||||||
bool isSet(const Option *option) const
|
bool isSet(const Option *option) const
|
||||||
{ return _parser.isSet(*option); }
|
{
|
||||||
|
return _parser.isSet(*option);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList optionNames() const
|
QStringList optionNames() const
|
||||||
{ return _parser.optionNames(); }
|
{
|
||||||
|
return _parser.optionNames();
|
||||||
|
}
|
||||||
|
|
||||||
QStringList positionalArguments() const
|
QStringList positionalArguments() const
|
||||||
{ return _parser.positionalArguments(); }
|
{
|
||||||
|
return _parser.positionalArguments();
|
||||||
|
}
|
||||||
|
|
||||||
void setApplicationDescription(const QString &description)
|
void setApplicationDescription(const QString &description)
|
||||||
{ _parser.setApplicationDescription(description); }
|
{
|
||||||
|
_parser.setApplicationDescription(description);
|
||||||
|
}
|
||||||
|
|
||||||
void setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode singleDashWordOptionMode)
|
void setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode singleDashWordOptionMode)
|
||||||
{ _parser.setSingleDashWordOptionMode(singleDashWordOptionMode); }
|
{
|
||||||
|
_parser.setSingleDashWordOptionMode(singleDashWordOptionMode);
|
||||||
|
}
|
||||||
|
|
||||||
void showHelp(int exitCode = 0)
|
void showHelp(int exitCode = 0)
|
||||||
{ _parser.showHelp(exitCode); }
|
{
|
||||||
|
_parser.showHelp(exitCode);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList unknownOptionNames() const
|
QStringList unknownOptionNames() const
|
||||||
{ return _parser.unknownOptionNames(); }
|
{
|
||||||
|
return _parser.unknownOptionNames();
|
||||||
|
}
|
||||||
|
|
||||||
QString value(const QString &optionName) const
|
QString value(const QString &optionName) const
|
||||||
{ return _parser.value(optionName); }
|
{
|
||||||
|
return _parser.value(optionName);
|
||||||
|
}
|
||||||
|
|
||||||
QString value(const Option &option) const
|
QString value(const Option &option) const
|
||||||
{ return _parser.value(option); }
|
{
|
||||||
|
return _parser.value(option);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList values(const QString &optionName) const
|
QStringList values(const QString &optionName) const
|
||||||
{ return _parser.values(optionName); }
|
{
|
||||||
|
return _parser.values(optionName);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList values(const Option &option) const
|
QStringList values(const Option &option) const
|
||||||
{ return _parser.values(option); }
|
{
|
||||||
|
return _parser.values(option);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,14 @@ public:
|
|||||||
const QString &defaultValue = QString())
|
const QString &defaultValue = QString())
|
||||||
: ValidatorOption(name, description, valueName, defaultValue)
|
: ValidatorOption(name, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
RegularExpressionOption(const QStringList &names,
|
RegularExpressionOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
const QString &defaultValue = QString())
|
const QString &defaultValue = QString())
|
||||||
: ValidatorOption(names, description, valueName, defaultValue)
|
: ValidatorOption(names, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
RegularExpressionOption(const QCommandLineOption &other)
|
RegularExpressionOption(const QCommandLineOption &other)
|
||||||
: ValidatorOption(other)
|
: ValidatorOption(other)
|
||||||
{}
|
{}
|
||||||
@ -33,18 +35,26 @@ public:
|
|||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
const QRegularExpression &expression = QRegularExpression())
|
const QRegularExpression &expression = QRegularExpression())
|
||||||
: ValidatorOption(name, description, valueName, defaultValue)
|
: ValidatorOption(name, description, valueName, defaultValue)
|
||||||
{ setValidator(new QRegularExpressionValidator(expression)); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(expression));
|
||||||
|
}
|
||||||
|
|
||||||
RegularExpressionOption(const QStringList &names,
|
RegularExpressionOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
const QRegularExpression &expression = QRegularExpression())
|
const QRegularExpression &expression = QRegularExpression())
|
||||||
: ValidatorOption(names, description, valueName, defaultValue)
|
: ValidatorOption(names, description, valueName, defaultValue)
|
||||||
{ setValidator(new QRegularExpressionValidator(expression)); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(expression));
|
||||||
|
}
|
||||||
|
|
||||||
RegularExpressionOption(const QCommandLineOption &other,
|
RegularExpressionOption(const QCommandLineOption &other,
|
||||||
const QRegularExpression &expression = QRegularExpression())
|
const QRegularExpression &expression = QRegularExpression())
|
||||||
: ValidatorOption(other)
|
: ValidatorOption(other)
|
||||||
{ setValidator(new QRegularExpressionValidator(expression)); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(expression));
|
||||||
|
}
|
||||||
|
|
||||||
RegularExpressionOption(const QString &name,
|
RegularExpressionOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -52,18 +62,26 @@ public:
|
|||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
const QString &expression = QString())
|
const QString &expression = QString())
|
||||||
: ValidatorOption(name, description, valueName, defaultValue)
|
: ValidatorOption(name, description, valueName, defaultValue)
|
||||||
{ setValidator(new QRegularExpressionValidator(QRegularExpression(expression))); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(QRegularExpression(expression)));
|
||||||
|
}
|
||||||
|
|
||||||
RegularExpressionOption(const QStringList &names,
|
RegularExpressionOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
const QString &defaultValue = QString(),
|
const QString &defaultValue = QString(),
|
||||||
const QString &expression = QString())
|
const QString &expression = QString())
|
||||||
: ValidatorOption(names, description, valueName, defaultValue)
|
: ValidatorOption(names, description, valueName, defaultValue)
|
||||||
{ setValidator(new QRegularExpressionValidator(QRegularExpression(expression))); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(QRegularExpression(expression)));
|
||||||
|
}
|
||||||
|
|
||||||
RegularExpressionOption(const QCommandLineOption &other,
|
RegularExpressionOption(const QCommandLineOption &other,
|
||||||
const QString &expression = QString())
|
const QString &expression = QString())
|
||||||
: ValidatorOption(other)
|
: ValidatorOption(other)
|
||||||
{ setValidator(new QRegularExpressionValidator(QRegularExpression(expression))); }
|
{
|
||||||
|
setValidator(new QRegularExpressionValidator(QRegularExpression(expression)));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,6 @@ public:
|
|||||||
: Option(other), _switches(switches)
|
: Option(other), _switches(switches)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~SwitchOption() {}
|
|
||||||
|
|
||||||
const QMap<QString, T> &getSwitches() const { return _switches; }
|
const QMap<QString, T> &getSwitches() const { return _switches; }
|
||||||
virtual bool validate(Parser &parser, QString &switch_) override { return hasSwitch(switch_); }
|
virtual bool validate(Parser &parser, QString &switch_) override { return hasSwitch(switch_); }
|
||||||
bool hasSwitch(const QString &switch_) { return _switches.contains(switch_.toLower()); }
|
bool hasSwitch(const QString &switch_) { return _switches.contains(switch_.toLower()); }
|
||||||
|
@ -13,6 +13,7 @@ class ValidatorOption: public Option
|
|||||||
protected:
|
protected:
|
||||||
const QValidator *validator;
|
const QValidator *validator;
|
||||||
virtual void setValidator(const QValidator *validator);
|
virtual void setValidator(const QValidator *validator);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ValidatorOption(const QString &name,
|
ValidatorOption(const QString &name,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
@ -21,6 +22,7 @@ public:
|
|||||||
const QValidator *validator = nullptr)
|
const QValidator *validator = nullptr)
|
||||||
: Option(name, description, valueName, defaultValue), validator(validator)
|
: Option(name, description, valueName, defaultValue), validator(validator)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ValidatorOption(const QStringList &names,
|
ValidatorOption(const QStringList &names,
|
||||||
const QString &description = QString(),
|
const QString &description = QString(),
|
||||||
const QString &valueName = QString(),
|
const QString &valueName = QString(),
|
||||||
@ -28,6 +30,7 @@ public:
|
|||||||
const QValidator *validator = nullptr)
|
const QValidator *validator = nullptr)
|
||||||
: Option(names, description, valueName, defaultValue), validator(validator)
|
: Option(names, description, valueName, defaultValue), validator(validator)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ValidatorOption(const QCommandLineOption &other,
|
ValidatorOption(const QCommandLineOption &other,
|
||||||
const QValidator *validator = nullptr)
|
const QValidator *validator = nullptr)
|
||||||
: Option(other), validator(validator)
|
: Option(other), validator(validator)
|
||||||
|
@ -29,7 +29,6 @@ public:
|
|||||||
// create table columns
|
// create table columns
|
||||||
createTable(QStringList()<<"user TEXT"<<"password BLOB"<<"token BLOB"<<"salt BLOB"<<"comment TEXT"<<"id TEXT"<<"created_at TEXT"<<"last_use TEXT");
|
createTable(QStringList()<<"user TEXT"<<"password BLOB"<<"token BLOB"<<"salt BLOB"<<"comment TEXT"<<"id TEXT"<<"created_at TEXT"<<"last_use TEXT");
|
||||||
};
|
};
|
||||||
~AuthTable(){};
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Create a user record, if called on a existing user the auth is recreated
|
/// @brief Create a user record, if called on a existing user the auth is recreated
|
||||||
|
@ -27,7 +27,7 @@ class DBManager : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DBManager(QObject* parent = nullptr);
|
DBManager(QObject* parent = nullptr);
|
||||||
~DBManager();
|
~DBManager() override;
|
||||||
|
|
||||||
/// set root path
|
/// set root path
|
||||||
void setRootPath(const QString& rootPath);
|
void setRootPath(const QString& rootPath);
|
||||||
|
@ -27,9 +27,7 @@ public:
|
|||||||
|
|
||||||
// start/create the first Hyperion instance index 0
|
// start/create the first Hyperion instance index 0
|
||||||
createInstance();
|
createInstance();
|
||||||
|
|
||||||
};
|
};
|
||||||
~InstanceTable(){};
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Create a new Hyperion instance entry, the name needs to be unique
|
/// @brief Create a new Hyperion instance entry, the name needs to be unique
|
||||||
|
@ -23,13 +23,12 @@ public:
|
|||||||
setTable("meta");
|
setTable("meta");
|
||||||
createTable(QStringList()<<"uuid TEXT"<<"created_at TEXT");
|
createTable(QStringList()<<"uuid TEXT"<<"created_at TEXT");
|
||||||
};
|
};
|
||||||
~MetaTable(){};
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the uuid, if the uuid is not set it will be created
|
/// @brief Get the uuid, if the uuid is not set it will be created
|
||||||
/// @return The uuid
|
/// @return The uuid
|
||||||
///
|
///
|
||||||
inline const QString getUUID()
|
inline QString getUUID() const
|
||||||
{
|
{
|
||||||
QVector<QVariantMap> results;
|
QVector<QVariantMap> results;
|
||||||
getRecords(results, QStringList() << "uuid");
|
getRecords(results, QStringList() << "uuid");
|
||||||
|
@ -23,7 +23,6 @@ public:
|
|||||||
// create table columns
|
// create table columns
|
||||||
createTable(QStringList()<<"type TEXT"<<"config TEXT"<<"hyperion_inst INTEGER"<<"updated_at TEXT");
|
createTable(QStringList()<<"type TEXT"<<"config TEXT"<<"hyperion_inst INTEGER"<<"updated_at TEXT");
|
||||||
};
|
};
|
||||||
~SettingsTable(){};
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Create or update a settings record
|
/// @brief Create or update a settings record
|
||||||
|
@ -38,23 +38,23 @@ public:
|
|||||||
, const QJsonObject &args = QJsonObject()
|
, const QJsonObject &args = QJsonObject()
|
||||||
, const QString &imageData = ""
|
, const QString &imageData = ""
|
||||||
);
|
);
|
||||||
virtual ~Effect();
|
~Effect() override;
|
||||||
|
|
||||||
virtual void run();
|
void run() override;
|
||||||
|
|
||||||
int getPriority() const { return _priority; };
|
int getPriority() const { return _priority; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set manual interuption to true,
|
/// @brief Set manual interuption to true,
|
||||||
/// Note: DO NOT USE QThread::interuption!
|
/// Note: DO NOT USE QThread::interuption!
|
||||||
///
|
///
|
||||||
void requestInterruption() { _interupt = true; };
|
void requestInterruption() { _interupt = true; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if the interuption flag has been set
|
/// @brief Check if the interuption flag has been set
|
||||||
/// @return The flag state
|
/// @return The flag state
|
||||||
///
|
///
|
||||||
bool isInterruptionRequested() { return _interupt; };
|
bool isInterruptionRequested() { return _interupt; }
|
||||||
|
|
||||||
QString getScript() const { return _script; }
|
QString getScript() const { return _script; }
|
||||||
QString getName() const { return _name; }
|
QString getName() const { return _name; }
|
||||||
|
@ -27,17 +27,17 @@ class EffectEngine : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EffectEngine(Hyperion * hyperion);
|
EffectEngine(Hyperion * hyperion);
|
||||||
virtual ~EffectEngine();
|
~EffectEngine() override;
|
||||||
|
|
||||||
const std::list<EffectDefinition> & getEffects() const { return _availableEffects; };
|
std::list<EffectDefinition> getEffects() const { return _availableEffects; }
|
||||||
|
|
||||||
const std::list<ActiveEffectDefinition> & getActiveEffects();
|
std::list<ActiveEffectDefinition> getActiveEffects() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Get available schemas from EffectFileHandler
|
/// Get available schemas from EffectFileHandler
|
||||||
/// @return all schemas
|
/// @return all schemas
|
||||||
///
|
///
|
||||||
const std::list<EffectSchema> & getEffectSchemas();
|
std::list<EffectSchema> getEffectSchemas() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Save an effect with EffectFileHandler
|
/// @brief Save an effect with EffectFileHandler
|
||||||
@ -115,8 +115,6 @@ private:
|
|||||||
|
|
||||||
std::list<Effect *> _activeEffects;
|
std::list<Effect *> _activeEffects;
|
||||||
|
|
||||||
std::list<ActiveEffectDefinition> _availableActiveEffects;
|
|
||||||
|
|
||||||
std::list<ActiveEffectDefinition> _cachedActiveEffects;
|
std::list<ActiveEffectDefinition> _cachedActiveEffects;
|
||||||
|
|
||||||
Logger * _log;
|
Logger * _log;
|
||||||
|
@ -20,12 +20,12 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Get all available effects
|
/// @brief Get all available effects
|
||||||
///
|
///
|
||||||
const std::list<EffectDefinition> & getEffects() const { return _availableEffects; };
|
std::list<EffectDefinition> getEffects() const { return _availableEffects; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get all available schemas
|
/// @brief Get all available schemas
|
||||||
///
|
///
|
||||||
const std::list<EffectSchema> & getEffectSchemas() { return _effectSchemas; };
|
std::list<EffectSchema> getEffectSchemas() const { return _effectSchemas; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Save an effect
|
/// @brief Save an effect
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor
|
/// @brief Destructor
|
||||||
///
|
///
|
||||||
~FlatBufferConnection();
|
~FlatBufferConnection() override;
|
||||||
|
|
||||||
/// @brief Do not read reply messages from Hyperion if set to true
|
/// @brief Do not read reply messages from Hyperion if set to true
|
||||||
void setSkipReply(bool skip);
|
void setSkipReply(bool skip);
|
||||||
|
@ -21,7 +21,7 @@ class FlatBufferServer : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FlatBufferServer(const QJsonDocument& config, QObject* parent = nullptr);
|
FlatBufferServer(const QJsonDocument& config, QObject* parent = nullptr);
|
||||||
~FlatBufferServer();
|
~FlatBufferServer() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
|
@ -62,13 +62,13 @@ public:
|
|||||||
);
|
);
|
||||||
~V4L2Grabber() override;
|
~V4L2Grabber() override;
|
||||||
|
|
||||||
QRectF getSignalDetectionOffset()
|
QRectF getSignalDetectionOffset() const
|
||||||
{
|
{
|
||||||
return QRectF(_x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max);
|
return QRectF(_x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool getSignalDetectionEnabled() { return _signalDetectionEnabled; }
|
bool getSignalDetectionEnabled() const { return _signalDetectionEnabled; }
|
||||||
bool getCecDetectionEnabled() { return _cecDetectionEnabled; }
|
bool getCecDetectionEnabled() const { return _cecDetectionEnabled; }
|
||||||
|
|
||||||
int grabFrame(Image<ColorRgb> &);
|
int grabFrame(Image<ColorRgb> &);
|
||||||
|
|
||||||
@ -128,27 +128,27 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
///
|
///
|
||||||
QStringList getV4L2devices() override;
|
QStringList getV4L2devices() const override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
///
|
///
|
||||||
QString getV4L2deviceName(QString devicePath) override;
|
QString getV4L2deviceName(const QString& devicePath) const override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
///
|
///
|
||||||
QMultiMap<QString, int> getV4L2deviceInputs(QString devicePath) override;
|
QMultiMap<QString, int> getV4L2deviceInputs(const QString& devicePath) const override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
///
|
///
|
||||||
QStringList getResolutions(QString devicePath) override;
|
QStringList getResolutions(const QString& devicePath) const override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
///
|
///
|
||||||
QStringList getFramerates(QString devicePath) override;
|
QStringList getFramerates(const QString& devicePath) const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
@ -169,6 +169,7 @@ private:
|
|||||||
void getV4Ldevices();
|
void getV4Ldevices();
|
||||||
|
|
||||||
bool init();
|
bool init();
|
||||||
|
|
||||||
void uninit();
|
void uninit();
|
||||||
|
|
||||||
bool open_device();
|
bool open_device();
|
||||||
@ -250,12 +251,13 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString _deviceName;
|
QString _deviceName;
|
||||||
std::map<QString, QString> _v4lDevices;
|
std::map<QString, QString> _v4lDevices;
|
||||||
QMap<QString, V4L2Grabber::DeviceProperties> _deviceProperties;
|
QMap<QString, V4L2Grabber::DeviceProperties> _deviceProperties;
|
||||||
VideoStandard _videoStandard;
|
|
||||||
io_method _ioMethod;
|
VideoStandard _videoStandard;
|
||||||
int _fileDescriptor;
|
io_method _ioMethod;
|
||||||
std::vector<buffer> _buffers;
|
int _fileDescriptor;
|
||||||
|
std::vector<buffer> _buffers;
|
||||||
|
|
||||||
PixelFormat _pixelFormat;
|
PixelFormat _pixelFormat;
|
||||||
int _pixelDecimation;
|
int _pixelDecimation;
|
||||||
|
@ -18,8 +18,8 @@ public:
|
|||||||
int pixelDecimation );
|
int pixelDecimation );
|
||||||
~V4L2Wrapper() override;
|
~V4L2Wrapper() override;
|
||||||
|
|
||||||
bool getSignalDetectionEnable();
|
bool getSignalDetectionEnable() const;
|
||||||
bool getCecDetectionEnable();
|
bool getCecDetectionEnable() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
bool start() override;
|
bool start() override;
|
||||||
@ -30,7 +30,7 @@ public slots:
|
|||||||
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
||||||
void setSignalDetectionEnable(bool enable);
|
void setSignalDetectionEnable(bool enable);
|
||||||
void setCecDetectionEnable(bool enable);
|
void setCecDetectionEnable(bool enable);
|
||||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
void setDeviceVideoStandard(const QString& device, VideoStandard videoStandard);
|
||||||
void handleCecEvent(CECEvent event);
|
void handleCecEvent(CECEvent event);
|
||||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
||||||
|
|
||||||
|
@ -10,20 +10,20 @@ enum class VideoStandard {
|
|||||||
NO_CHANGE
|
NO_CHANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
inline VideoStandard parseVideoStandard(QString videoStandard)
|
inline VideoStandard parseVideoStandard(const QString& videoStandard)
|
||||||
{
|
{
|
||||||
// convert to lower case
|
// convert to lower case
|
||||||
videoStandard = videoStandard.toLower();
|
QString standard = videoStandard.toLower();
|
||||||
|
|
||||||
if (videoStandard == "pal")
|
if (standard == "pal")
|
||||||
{
|
{
|
||||||
return VideoStandard::PAL;
|
return VideoStandard::PAL;
|
||||||
}
|
}
|
||||||
else if (videoStandard == "ntsc")
|
else if (standard == "ntsc")
|
||||||
{
|
{
|
||||||
return VideoStandard::NTSC;
|
return VideoStandard::NTSC;
|
||||||
}
|
}
|
||||||
else if (videoStandard == "secam")
|
else if (standard == "secam")
|
||||||
{
|
{
|
||||||
return VideoStandard::SECAM;
|
return VideoStandard::SECAM;
|
||||||
}
|
}
|
||||||
|
@ -38,25 +38,25 @@ public:
|
|||||||
/// @brief Get the unique id (imported from removed class 'Stats')
|
/// @brief Get the unique id (imported from removed class 'Stats')
|
||||||
/// @return The unique id
|
/// @return The unique id
|
||||||
///
|
///
|
||||||
const QString &getID() const { return _uuid; };
|
QString getID() const { return _uuid; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check authorization is required according to the user setting
|
/// @brief Check authorization is required according to the user setting
|
||||||
/// @return True if authorization required else false
|
/// @return True if authorization required else false
|
||||||
///
|
///
|
||||||
bool isAuthRequired() const { return _authRequired; };
|
bool isAuthRequired() const { return _authRequired; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if authorization is required for local network connections
|
/// @brief Check if authorization is required for local network connections
|
||||||
/// @return True if authorization required else false
|
/// @return True if authorization required else false
|
||||||
///
|
///
|
||||||
bool isLocalAuthRequired() const { return _localAuthRequired; };
|
bool isLocalAuthRequired() const { return _localAuthRequired; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if authorization is required for local network connections for admin access
|
/// @brief Check if authorization is required for local network connections for admin access
|
||||||
/// @return True if authorization required else false
|
/// @return True if authorization required else false
|
||||||
///
|
///
|
||||||
bool isLocalAdminAuthRequired() const { return _localAdminAuthRequired; };
|
bool isLocalAdminAuthRequired() const { return _localAdminAuthRequired; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Reset Hyperion user
|
/// @brief Reset Hyperion user
|
||||||
@ -68,18 +68,18 @@ public:
|
|||||||
/// @brief Check if user auth is temporary blocked due to failed attempts
|
/// @brief Check if user auth is temporary blocked due to failed attempts
|
||||||
/// @return True on blocked and no further Auth requests will be accepted
|
/// @return True on blocked and no further Auth requests will be accepted
|
||||||
///
|
///
|
||||||
bool isUserAuthBlocked() { return (_userAuthAttempts.length() >= 10); };
|
bool isUserAuthBlocked() const { return (_userAuthAttempts.length() >= 10); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if token auth is temporary blocked due to failed attempts
|
/// @brief Check if token auth is temporary blocked due to failed attempts
|
||||||
/// @return True on blocked and no further Auth requests will be accepted
|
/// @return True on blocked and no further Auth requests will be accepted
|
||||||
///
|
///
|
||||||
bool isTokenAuthBlocked() { return (_tokenAuthAttempts.length() >= 25); };
|
bool isTokenAuthBlocked() const { return (_tokenAuthAttempts.length() >= 25); }
|
||||||
|
|
||||||
/// Pointer of this instance
|
/// Pointer of this instance
|
||||||
static AuthManager *manager;
|
static AuthManager *manager;
|
||||||
/// Get Pointer of this instance
|
/// Get Pointer of this instance
|
||||||
static AuthManager *getInstance() { return manager; };
|
static AuthManager *getInstance() { return manager; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
@ -164,19 +164,19 @@ public slots:
|
|||||||
/// @brief Get pending requests
|
/// @brief Get pending requests
|
||||||
/// @return All pending requests
|
/// @return All pending requests
|
||||||
///
|
///
|
||||||
QVector<AuthManager::AuthDefinition> getPendingRequests();
|
QVector<AuthManager::AuthDefinition> getPendingRequests() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the current valid token for user. Make sure this call is allowed!
|
/// @brief Get the current valid token for user. Make sure this call is allowed!
|
||||||
/// @param usr the defined user
|
/// @param usr the defined user
|
||||||
/// @return The token
|
/// @return The token
|
||||||
///
|
///
|
||||||
const QString getUserToken(const QString &usr = "Hyperion");
|
QString getUserToken(const QString &usr = "Hyperion") const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get all available token entries
|
/// @brief Get all available token entries
|
||||||
///
|
///
|
||||||
QVector<AuthManager::AuthDefinition> getTokenList();
|
QVector<AuthManager::AuthDefinition> getTokenList() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Handle settings update from Hyperion Settingsmanager emit
|
/// @brief Handle settings update from Hyperion Settingsmanager emit
|
||||||
|
@ -20,7 +20,7 @@ class ComponentRegister : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ComponentRegister(Hyperion* hyperion);
|
ComponentRegister(Hyperion* hyperion);
|
||||||
~ComponentRegister();
|
~ComponentRegister() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if a component is currently enabled
|
/// @brief Check if a component is currently enabled
|
||||||
@ -30,7 +30,7 @@ public:
|
|||||||
int isComponentEnabled(hyperion::Components comp) const;
|
int isComponentEnabled(hyperion::Components comp) const;
|
||||||
|
|
||||||
/// contains all components and their state
|
/// contains all components and their state
|
||||||
std::map<hyperion::Components, bool> getRegister() const { return _componentStates; };
|
std::map<hyperion::Components, bool> getRegister() const { return _componentStates; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
///
|
///
|
||||||
|
@ -22,7 +22,7 @@ class Grabber : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Grabber(QString grabberName = "", int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
|
Grabber(const QString& grabberName = "", int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set the video mode (2D/3D)
|
/// Set the video mode (2D/3D)
|
||||||
@ -119,35 +119,35 @@ public:
|
|||||||
/// @brief Get a list of all available V4L devices
|
/// @brief Get a list of all available V4L devices
|
||||||
/// @return List of all available V4L devices on success else empty List
|
/// @return List of all available V4L devices on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getV4L2devices() { return QStringList(); }
|
virtual QStringList getV4L2devices() const { return QStringList(); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the V4L device name
|
/// @brief Get the V4L device name
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return The name of the V4L device on success else empty String
|
/// @return The name of the V4L device on success else empty String
|
||||||
///
|
///
|
||||||
virtual QString getV4L2deviceName(QString devicePath) { return QString(); }
|
virtual QString getV4L2deviceName(const QString& /*devicePath*/) const { return QString(); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a name/index pair of supported device inputs
|
/// @brief Get a name/index pair of supported device inputs
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return multi pair of name/index on success else empty pair
|
/// @return multi pair of name/index on success else empty pair
|
||||||
///
|
///
|
||||||
virtual QMultiMap<QString, int> getV4L2deviceInputs(QString devicePath) { return QMultiMap<QString, int>(); }
|
virtual QMultiMap<QString, int> getV4L2deviceInputs(const QString& /*devicePath*/) const { return QMultiMap<QString, int>(); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a list of supported device resolutions
|
/// @brief Get a list of supported device resolutions
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return List of resolutions on success else empty List
|
/// @return List of resolutions on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getResolutions(QString devicePath) { return QStringList(); }
|
virtual QStringList getResolutions(const QString& /*devicePath*/) const { return QStringList(); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a list of supported device framerates
|
/// @brief Get a list of supported device framerates
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return List of framerates on success else empty List
|
/// @return List of framerates on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getFramerates(QString devicePath) { return QStringList(); }
|
virtual QStringList getFramerates(const QString& devicePath) const { return QStringList(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ImageResampler _imageResampler;
|
ImageResampler _imageResampler;
|
||||||
|
@ -29,9 +29,9 @@ class GrabberWrapper : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz = 0);
|
GrabberWrapper(const QString& grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz = 0);
|
||||||
|
|
||||||
virtual ~GrabberWrapper();
|
~GrabberWrapper() override;
|
||||||
|
|
||||||
static GrabberWrapper* instance;
|
static GrabberWrapper* instance;
|
||||||
static GrabberWrapper* getInstance(){ return instance; }
|
static GrabberWrapper* getInstance(){ return instance; }
|
||||||
@ -60,35 +60,35 @@ public:
|
|||||||
/// @brief Get a list of all available V4L devices
|
/// @brief Get a list of all available V4L devices
|
||||||
/// @return List of all available V4L devices on success else empty List
|
/// @return List of all available V4L devices on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getV4L2devices();
|
virtual QStringList getV4L2devices() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the V4L device name
|
/// @brief Get the V4L device name
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return The name of the V4L device on success else empty String
|
/// @return The name of the V4L device on success else empty String
|
||||||
///
|
///
|
||||||
virtual QString getV4L2deviceName(QString devicePath);
|
virtual QString getV4L2deviceName(const QString& devicePath) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a name/index pair of supported device inputs
|
/// @brief Get a name/index pair of supported device inputs
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return multi pair of name/index on success else empty pair
|
/// @return multi pair of name/index on success else empty pair
|
||||||
///
|
///
|
||||||
virtual QMultiMap<QString, int> getV4L2deviceInputs(QString devicePath);
|
virtual QMultiMap<QString, int> getV4L2deviceInputs(const QString& devicePath) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a list of supported device resolutions
|
/// @brief Get a list of supported device resolutions
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return List of resolutions on success else empty List
|
/// @return List of resolutions on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getResolutions(QString devicePath);
|
virtual QStringList getResolutions(const QString& devicePath) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a list of supported device framerates
|
/// @brief Get a list of supported device framerates
|
||||||
/// @param devicePath The device path
|
/// @param devicePath The device path
|
||||||
/// @return List of framerates on success else empty List
|
/// @return List of framerates on success else empty List
|
||||||
///
|
///
|
||||||
virtual QStringList getFramerates(QString devicePath);
|
virtual QStringList getFramerates(const QString& devicePath) const;
|
||||||
|
|
||||||
static QStringList availableGrabbers();
|
static QStringList availableGrabbers();
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ public slots:
|
|||||||
/// Returns the list with unique adjustment identifiers
|
/// Returns the list with unique adjustment identifiers
|
||||||
/// @return The list with adjustment identifiers
|
/// @return The list with adjustment identifiers
|
||||||
///
|
///
|
||||||
const QStringList & getAdjustmentIds() const;
|
QStringList getAdjustmentIds() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Returns the ColorAdjustment with the given identifier
|
/// Returns the ColorAdjustment with the given identifier
|
||||||
@ -233,15 +233,15 @@ public slots:
|
|||||||
|
|
||||||
/// Get the list of available effects
|
/// Get the list of available effects
|
||||||
/// @return The list of available effects
|
/// @return The list of available effects
|
||||||
const std::list<EffectDefinition> &getEffects() const;
|
std::list<EffectDefinition> getEffects() const;
|
||||||
|
|
||||||
/// Get the list of active effects
|
/// Get the list of active effects
|
||||||
/// @return The list of active effects
|
/// @return The list of active effects
|
||||||
const std::list<ActiveEffectDefinition> &getActiveEffects() const;
|
std::list<ActiveEffectDefinition> getActiveEffects() const;
|
||||||
|
|
||||||
/// Get the list of available effect schema files
|
/// Get the list of available effect schema files
|
||||||
/// @return The list of available effect schema files
|
/// @return The list of available effect schema files
|
||||||
const std::list<EffectSchema> &getEffectSchemas() const;
|
std::list<EffectSchema> getEffectSchemas() const;
|
||||||
|
|
||||||
/// #############
|
/// #############
|
||||||
/// PRIORITYMUXER
|
/// PRIORITYMUXER
|
||||||
@ -266,7 +266,7 @@ public slots:
|
|||||||
|
|
||||||
/// gets current state of automatic/priorized source selection
|
/// gets current state of automatic/priorized source selection
|
||||||
/// @return the state
|
/// @return the state
|
||||||
bool sourceAutoSelectEnabled();
|
bool sourceAutoSelectEnabled() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Returns the current priority
|
/// Returns the current priority
|
||||||
@ -309,7 +309,7 @@ public slots:
|
|||||||
|
|
||||||
/// gets the current json config object from SettingsManager
|
/// gets the current json config object from SettingsManager
|
||||||
/// @return json config
|
/// @return json config
|
||||||
const QJsonObject& getQJsonConfig() const;
|
QJsonObject getQJsonConfig() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Save a complete json config
|
/// @brief Save a complete json config
|
||||||
@ -317,7 +317,7 @@ public slots:
|
|||||||
/// @param correct If true will correct json against schema before save
|
/// @param correct If true will correct json against schema before save
|
||||||
/// @return True on success else false
|
/// @return True on success else false
|
||||||
///
|
///
|
||||||
bool saveSettings(QJsonObject config, bool correct = false);
|
bool saveSettings(const QJsonObject& config, bool correct = false);
|
||||||
|
|
||||||
/// ############
|
/// ############
|
||||||
/// COMPONENTREGISTER
|
/// COMPONENTREGISTER
|
||||||
@ -345,7 +345,7 @@ public slots:
|
|||||||
/// @param The component to test
|
/// @param The component to test
|
||||||
/// @return Component state
|
/// @return Component state
|
||||||
///
|
///
|
||||||
int isComponentEnabled(hyperion::Components comp);
|
int isComponentEnabled(hyperion::Components comp) const;
|
||||||
|
|
||||||
/// sets the methode how image is maped to leds at ImageProcessor
|
/// sets the methode how image is maped to leds at ImageProcessor
|
||||||
void setLedMappingType(int mappingType);
|
void setLedMappingType(int mappingType);
|
||||||
@ -402,10 +402,10 @@ signals:
|
|||||||
void forwardJsonMessage(QJsonObject);
|
void forwardJsonMessage(QJsonObject);
|
||||||
|
|
||||||
/// Signal which is emitted, when a new system proto image should be forwarded
|
/// Signal which is emitted, when a new system proto image should be forwarded
|
||||||
void forwardSystemProtoMessage(const QString, const Image<ColorRgb>);
|
void forwardSystemProtoMessage(const QString&, const Image<ColorRgb>&);
|
||||||
|
|
||||||
/// Signal which is emitted, when a new V4l proto image should be forwarded
|
/// Signal which is emitted, when a new V4l proto image should be forwarded
|
||||||
void forwardV4lProtoMessage(const QString, const Image<ColorRgb>);
|
void forwardV4lProtoMessage(const QString&, const Image<ColorRgb>&);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Is emitted from clients who request a videoMode change
|
/// @brief Is emitted from clients who request a videoMode change
|
||||||
|
@ -38,7 +38,7 @@ public slots:
|
|||||||
/// @param inst The instance to check
|
/// @param inst The instance to check
|
||||||
/// @return True when running else false
|
/// @return True when running else false
|
||||||
///
|
///
|
||||||
bool IsInstanceRunning(quint8 inst) { return _runningInstances.contains(inst); }
|
bool IsInstanceRunning(quint8 inst) const { return _runningInstances.contains(inst); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a Hyperion instance by index
|
/// @brief Get a Hyperion instance by index
|
||||||
@ -50,7 +50,7 @@ public slots:
|
|||||||
///
|
///
|
||||||
/// @brief Get instance data of all instaces in db + running state
|
/// @brief Get instance data of all instaces in db + running state
|
||||||
///
|
///
|
||||||
const QVector<QVariantMap> getInstanceData();
|
QVector<QVariantMap> getInstanceData() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Start a Hyperion instance
|
/// @brief Start a Hyperion instance
|
||||||
@ -172,7 +172,7 @@ private:
|
|||||||
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
||||||
/// @apram inst The instance to check
|
/// @apram inst The instance to check
|
||||||
///
|
///
|
||||||
bool isInstAllowed(quint8 inst) { return (inst > 0); }
|
bool isInstAllowed(quint8 inst) const { return (inst > 0); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Logger* _log;
|
Logger* _log;
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
///
|
///
|
||||||
ImageProcessor(const LedString& ledString, Hyperion* hyperion);
|
ImageProcessor(const LedString& ledString, Hyperion* hyperion);
|
||||||
|
|
||||||
~ImageProcessor();
|
~ImageProcessor() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Specifies the width and height of 'incomming' images. This will resize the buffer-image to
|
/// Specifies the width and height of 'incomming' images. This will resize the buffer-image to
|
||||||
@ -54,15 +54,15 @@ public:
|
|||||||
void setLedString(const LedString& ledString);
|
void setLedString(const LedString& ledString);
|
||||||
|
|
||||||
/// Returns starte of black border detector
|
/// Returns starte of black border detector
|
||||||
bool blackBorderDetectorEnabled();
|
bool blackBorderDetectorEnabled() const;
|
||||||
|
|
||||||
/// Returns the current _userMappingType, this may not be the current applied type!
|
/// Returns the current _userMappingType, this may not be the current applied type!
|
||||||
int getUserLedMappingType() { return _userMappingType; };
|
int getUserLedMappingType() const { return _userMappingType; }
|
||||||
|
|
||||||
/// Returns the current _mappingType
|
/// Returns the current _mappingType
|
||||||
int ledMappingType() { return _mappingType; };
|
int ledMappingType() const { return _mappingType; }
|
||||||
|
|
||||||
static int mappingTypeToInt(QString mappingType);
|
static int mappingTypeToInt(const QString& mappingType);
|
||||||
static QString mappingTypeToStr(int mappingType);
|
static QString mappingTypeToStr(int mappingType);
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -57,8 +57,8 @@ namespace hyperion
|
|||||||
///
|
///
|
||||||
unsigned height() const;
|
unsigned height() const;
|
||||||
|
|
||||||
unsigned horizontalBorder() { return _horizontalBorder; };
|
unsigned horizontalBorder() const { return _horizontalBorder; }
|
||||||
unsigned verticalBorder() { return _verticalBorder; };
|
unsigned verticalBorder() const { return _verticalBorder; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Determines the mean color for each led using the mapping the image given
|
/// Determines the mean color for each led using the mapping the image given
|
||||||
|
@ -20,7 +20,7 @@ enum class ColorOrder
|
|||||||
ORDER_RGB, ORDER_RBG, ORDER_GRB, ORDER_BRG, ORDER_GBR, ORDER_BGR
|
ORDER_RGB, ORDER_RBG, ORDER_GRB, ORDER_BRG, ORDER_GBR, ORDER_BGR
|
||||||
};
|
};
|
||||||
|
|
||||||
inline QString colorOrderToString(const ColorOrder colorOrder)
|
inline QString colorOrderToString(ColorOrder colorOrder)
|
||||||
{
|
{
|
||||||
switch (colorOrder)
|
switch (colorOrder)
|
||||||
{
|
{
|
||||||
|
@ -34,10 +34,10 @@ class MessageForwarder : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MessageForwarder(Hyperion* hyperion);
|
MessageForwarder(Hyperion* hyperion);
|
||||||
~MessageForwarder();
|
~MessageForwarder() override;
|
||||||
|
|
||||||
void addJsonSlave(QString slave);
|
void addJsonSlave(const QString& slave);
|
||||||
void addFlatbufferSlave(QString slave);
|
void addFlatbufferSlave(const QString& slave);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
///
|
///
|
||||||
|
@ -26,7 +26,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void addAdjustment(ColorAdjustment * adjustment);
|
void addAdjustment(ColorAdjustment * adjustment);
|
||||||
|
|
||||||
void setAdjustmentForLed(const QString& id, const unsigned startLed, unsigned endLed);
|
void setAdjustmentForLed(const QString& id, unsigned startLed, unsigned endLed);
|
||||||
|
|
||||||
bool verifyAdjustments() const;
|
bool verifyAdjustments() const;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public:
|
|||||||
/// Returns the identifier of all the unique ColorAdjustment
|
/// Returns the identifier of all the unique ColorAdjustment
|
||||||
///
|
///
|
||||||
/// @return The list with unique id's of the ColorAdjustment
|
/// @return The list with unique id's of the ColorAdjustment
|
||||||
const QStringList & getAdjustmentIds();
|
QStringList getAdjustmentIds() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Returns the pointer to the ColorAdjustment with the given id
|
/// Returns the pointer to the ColorAdjustment with the given id
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// Destructor
|
/// Destructor
|
||||||
///
|
///
|
||||||
~PriorityMuxer();
|
~PriorityMuxer() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Start/Stop the PriorityMuxer update timer; On disabled no priority and timeout updates will be performend
|
/// @brief Start/Stop the PriorityMuxer update timer; On disabled no priority and timeout updates will be performend
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Queue a manual push where muxer doesn't recognize them (e.g. continous single color pushes)
|
/// @brief Queue a manual push where muxer doesn't recognize them (e.g. continous single color pushes)
|
||||||
///
|
///
|
||||||
void queuePush(){ emit timeRunner(); };
|
void queuePush() { emit timeRunner(); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
///
|
///
|
||||||
@ -253,7 +253,7 @@ private:
|
|||||||
/// @brief Get the component of the given priority
|
/// @brief Get the component of the given priority
|
||||||
/// @return The component
|
/// @return The component
|
||||||
///
|
///
|
||||||
hyperion::Components getComponentOfPriority(int priority);
|
hyperion::Components getComponentOfPriority(int priority) const;
|
||||||
|
|
||||||
/// Logger instance
|
/// Logger instance
|
||||||
Logger* _log;
|
Logger* _log;
|
||||||
|
@ -29,7 +29,7 @@ public:
|
|||||||
/// @param The configuration
|
/// @param The configuration
|
||||||
///
|
///
|
||||||
JsonServer(const QJsonDocument& config);
|
JsonServer(const QJsonDocument& config);
|
||||||
~JsonServer();
|
~JsonServer() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @return the port number on which this TCP listens for incoming connections
|
/// @return the port number on which this TCP listens for incoming connections
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef LEDEVICEFACTORY_H
|
#ifndef LEDEVICEFACTORY_H
|
||||||
#define LEDEVICEFACTORY_H
|
#define LEDEVICEFACTORY_H
|
||||||
|
|
||||||
// LedDevice includes
|
class LedDevice;
|
||||||
#include <leddevice/LedDevice.h>
|
class QJsonObject;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The LedDeviceFactory is responsible for constructing 'LedDevices'
|
/// The LedDeviceFactory is responsible for constructing 'LedDevices'
|
||||||
@ -10,7 +10,6 @@
|
|||||||
class LedDeviceFactory
|
class LedDeviceFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Constructs a LedDevice based on the given configuration
|
/// Constructs a LedDevice based on the given configuration
|
||||||
///
|
///
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
/// @brief Get all available device schemas
|
/// @brief Get all available device schemas
|
||||||
/// @return device schemas
|
/// @return device schemas
|
||||||
///
|
///
|
||||||
static const QJsonObject getLedDeviceSchemas();
|
static QJsonObject getLedDeviceSchemas();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief add all device constructors to the map
|
/// @brief add all device constructors to the map
|
||||||
@ -50,22 +50,22 @@ public:
|
|||||||
/// @brief Get the current latch time of the ledDevice
|
/// @brief Get the current latch time of the ledDevice
|
||||||
/// @ return latch time in ms
|
/// @ return latch time in ms
|
||||||
///
|
///
|
||||||
int getLatchTime();
|
int getLatchTime() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the current active ledDevice type
|
/// @brief Get the current active ledDevice type
|
||||||
///
|
///
|
||||||
QString getActiveDeviceType();
|
QString getActiveDeviceType() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Return the last enable state
|
/// @brief Return the last enable state
|
||||||
///
|
///
|
||||||
bool enabled();
|
bool enabled() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the current colorOrder from device
|
/// @brief Get the current colorOrder from device
|
||||||
///
|
///
|
||||||
QString getColorOrder();
|
QString getColorOrder() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the number of LEDs from device
|
/// @brief Get the number of LEDs from device
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
/// @param timeout_ms The timeout in ms
|
/// @param timeout_ms The timeout in ms
|
||||||
/// @return The address+port of web-server or empty if timed out
|
/// @return The address+port of web-server or empty if timed out
|
||||||
///
|
///
|
||||||
const QString getFirstService(const searchType &type = searchType::STY_WEBSERVER,const QString &st = "urn:hyperion-project.org:device:basic:1", int timeout_ms = 3000);
|
QString getFirstService(const searchType &type = searchType::STY_WEBSERVER,const QString &st = "urn:hyperion-project.org:device:basic:1", int timeout_ms = 3000);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Discover services via ssdp.
|
/// @brief Discover services via ssdp.
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @return Discovered services as JSON-document
|
/// @return Discovered services as JSON-document
|
||||||
///
|
///
|
||||||
QJsonArray getServicesDiscoveredJson();
|
QJsonArray getServicesDiscoveredJson() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set the ssdp discovery address (HOST)
|
/// @brief Set the ssdp discovery address (HOST)
|
||||||
|
@ -16,11 +16,12 @@ class QNetworkConfigurationManager;
|
|||||||
/// UPnP 1.0: spec: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0.pdf
|
/// UPnP 1.0: spec: http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0.pdf
|
||||||
///
|
///
|
||||||
|
|
||||||
class SSDPHandler : public SSDPServer{
|
class SSDPHandler : public SSDPServer
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 jsonServerPort, const QString &name, QObject * parent = nullptr);
|
SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 jsonServerPort, const QString &name, QObject * parent = nullptr);
|
||||||
~SSDPHandler();
|
~SSDPHandler() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Sends BYE BYE and stop server
|
/// @brief Sends BYE BYE and stop server
|
||||||
|
@ -7,7 +7,8 @@ class QUdpSocket;
|
|||||||
///
|
///
|
||||||
/// @brief The SSDP Server sends and receives (parses) SSDP requests
|
/// @brief The SSDP Server sends and receives (parses) SSDP requests
|
||||||
///
|
///
|
||||||
class SSDPServer : public QObject {
|
class SSDPServer : public QObject
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -17,7 +18,7 @@ public:
|
|||||||
/// @param parent The parent object
|
/// @param parent The parent object
|
||||||
///
|
///
|
||||||
SSDPServer(QObject* parent = nullptr);
|
SSDPServer(QObject* parent = nullptr);
|
||||||
virtual ~SSDPServer();
|
~SSDPServer() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Prepare server after thread start
|
/// @brief Prepare server after thread start
|
||||||
@ -81,7 +82,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Get current flatbuffer server port
|
/// @brief Get current flatbuffer server port
|
||||||
///
|
///
|
||||||
quint16 getFlatBufPort() { return _fbsPort.toInt(); };
|
quint16 getFlatBufPort() const { return _fbsPort.toInt(); };
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief set new jsonserver server port
|
/// @brief set new jsonserver server port
|
||||||
@ -91,7 +92,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief get new jsonserver server port
|
/// @brief get new jsonserver server port
|
||||||
///
|
///
|
||||||
quint16 getJsonServerPort() { return _jssPort.toInt(); };
|
quint16 getJsonServerPort() const { return _jssPort.toInt(); };
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief set new hyperion name
|
/// @brief set new hyperion name
|
||||||
@ -101,7 +102,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief get hyperion name
|
/// @brief get hyperion name
|
||||||
///
|
///
|
||||||
QString getHyperionName() { return _name; };
|
QString getHyperionName() const { return _name; };
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -67,22 +67,22 @@ inline const char* componentToIdString(Components c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Components stringToComponent(QString component)
|
inline Components stringToComponent(const QString& component)
|
||||||
{
|
{
|
||||||
component = component.toUpper();
|
const QString cmp = component.toUpper();
|
||||||
if (component == "ALL") return COMP_ALL;
|
if (cmp == "ALL") return COMP_ALL;
|
||||||
if (component == "SMOOTHING") return COMP_SMOOTHING;
|
if (cmp == "SMOOTHING") return COMP_SMOOTHING;
|
||||||
if (component == "BLACKBORDER") return COMP_BLACKBORDER;
|
if (cmp == "BLACKBORDER") return COMP_BLACKBORDER;
|
||||||
if (component == "FORWARDER") return COMP_FORWARDER;
|
if (cmp == "FORWARDER") return COMP_FORWARDER;
|
||||||
if (component == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
|
if (cmp == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
|
||||||
if (component == "GRABBER") return COMP_GRABBER;
|
if (cmp == "GRABBER") return COMP_GRABBER;
|
||||||
if (component == "V4L") return COMP_V4L;
|
if (cmp == "V4L") return COMP_V4L;
|
||||||
if (component == "COLOR") return COMP_COLOR;
|
if (cmp == "COLOR") return COMP_COLOR;
|
||||||
if (component == "EFFECT") return COMP_EFFECT;
|
if (cmp == "EFFECT") return COMP_EFFECT;
|
||||||
if (component == "IMAGE") return COMP_IMAGE;
|
if (cmp == "IMAGE") return COMP_IMAGE;
|
||||||
if (component == "LEDDEVICE") return COMP_LEDDEVICE;
|
if (cmp == "LEDDEVICE") return COMP_LEDDEVICE;
|
||||||
if (component == "FLATBUFSERVER") return COMP_FLATBUFSERVER;
|
if (cmp == "FLATBUFSERVER") return COMP_FLATBUFSERVER;
|
||||||
if (component == "PROTOSERVER") return COMP_PROTOSERVER;
|
if (cmp == "PROTOSERVER") return COMP_PROTOSERVER;
|
||||||
return COMP_INVALID;
|
return COMP_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
namespace FileUtils {
|
namespace FileUtils {
|
||||||
|
|
||||||
QString getBaseName(QString sourceFile);
|
QString getBaseName(const QString& sourceFile);
|
||||||
QString getDirName(QString sourceFile);
|
QString getDirName(const QString& sourceFile);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief remove directory recursive given by path
|
/// @brief remove directory recursive given by path
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
|
|
||||||
void Message(LogLevel level, const char* sourceFile, const char* func, unsigned int line, const char* fmt, ...);
|
void Message(LogLevel level, const char* sourceFile, const char* func, unsigned int line, const char* fmt, ...);
|
||||||
void setMinLevel(LogLevel level) { _minLevel = static_cast<int>(level); }
|
void setMinLevel(LogLevel level) { _minLevel = static_cast<int>(level); }
|
||||||
LogLevel getMinLevel() { return static_cast<LogLevel>(int(_minLevel)); }
|
LogLevel getMinLevel() const { return static_cast<LogLevel>(int(_minLevel)); }
|
||||||
QString getName() const { return _name; }
|
QString getName() const { return _name; }
|
||||||
QString getAppName() const { return _appname; }
|
QString getAppName() const { return _appname; }
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
Logger(const QString & name="", LogLevel minLevel = INFO);
|
Logger(const QString & name="", LogLevel minLevel = INFO);
|
||||||
~Logger();
|
~Logger() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void write(const Logger::T_LOG_MESSAGE & message);
|
void write(const Logger::T_LOG_MESSAGE & message);
|
||||||
|
@ -25,13 +25,13 @@ public:
|
|||||||
/// @param local The local address of the socket (Differs based on NetworkAdapter IP or localhost)
|
/// @param local The local address of the socket (Differs based on NetworkAdapter IP or localhost)
|
||||||
/// @return True when allowed, else false
|
/// @return True when allowed, else false
|
||||||
///
|
///
|
||||||
bool accessAllowed(const QHostAddress& address, const QHostAddress& local);
|
bool accessAllowed(const QHostAddress& address, const QHostAddress& local) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check if address is in subnet of local
|
/// @brief Check if address is in subnet of local
|
||||||
/// @return True or false
|
/// @return True or false
|
||||||
///
|
///
|
||||||
bool isLocalAddress(const QHostAddress& address, const QHostAddress& local);
|
bool isLocalAddress(const QHostAddress& address, const QHostAddress& local) const;
|
||||||
|
|
||||||
static NetOrigin* getInstance(){ return instance; };
|
static NetOrigin* getInstance(){ return instance; };
|
||||||
static NetOrigin* instance;
|
static NetOrigin* instance;
|
||||||
|
@ -18,37 +18,37 @@ enum class PixelFormat {
|
|||||||
NO_CHANGE
|
NO_CHANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
inline PixelFormat parsePixelFormat(QString pixelFormat)
|
inline PixelFormat parsePixelFormat(const QString& pixelFormat)
|
||||||
{
|
{
|
||||||
// convert to lower case
|
// convert to lower case
|
||||||
pixelFormat = pixelFormat.toLower();
|
QString format = pixelFormat.toLower();
|
||||||
|
|
||||||
if (pixelFormat.compare("yuyv") )
|
if (format.compare("yuyv") )
|
||||||
{
|
{
|
||||||
return PixelFormat::YUYV;
|
return PixelFormat::YUYV;
|
||||||
}
|
}
|
||||||
else if (pixelFormat.compare("uyvy") )
|
else if (format.compare("uyvy") )
|
||||||
{
|
{
|
||||||
return PixelFormat::UYVY;
|
return PixelFormat::UYVY;
|
||||||
}
|
}
|
||||||
else if (pixelFormat.compare("bgr16") )
|
else if (format.compare("bgr16") )
|
||||||
{
|
{
|
||||||
return PixelFormat::BGR16;
|
return PixelFormat::BGR16;
|
||||||
}
|
}
|
||||||
else if (pixelFormat.compare("bgr24") )
|
else if (format.compare("bgr24") )
|
||||||
{
|
{
|
||||||
return PixelFormat::BGR24;
|
return PixelFormat::BGR24;
|
||||||
}
|
}
|
||||||
else if (pixelFormat.compare("rgb32") )
|
else if (format.compare("rgb32") )
|
||||||
{
|
{
|
||||||
return PixelFormat::RGB32;
|
return PixelFormat::RGB32;
|
||||||
}
|
}
|
||||||
else if (pixelFormat.compare("bgr32") )
|
else if (format.compare("bgr32") )
|
||||||
{
|
{
|
||||||
return PixelFormat::BGR32;
|
return PixelFormat::BGR32;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_JPEG_DECODER
|
#ifdef HAVE_JPEG_DECODER
|
||||||
else if (pixelFormat.compare("mjpeg") )
|
else if (format.compare("mjpeg") )
|
||||||
{
|
{
|
||||||
return PixelFormat::MJPEG;
|
return PixelFormat::MJPEG;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
namespace Process {
|
namespace Process {
|
||||||
|
|
||||||
void restartHyperion(bool asNewProcess=false);
|
void restartHyperion(bool asNewProcess=false);
|
||||||
QByteArray command_exec(QString cmd, QByteArray data="");
|
QByteArray command_exec(const QString& cmd, const QByteArray& data="");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ public:
|
|||||||
Profiler(const char* sourceFile, const char* func, unsigned int line);
|
Profiler(const char* sourceFile, const char* func, unsigned int line);
|
||||||
~Profiler();
|
~Profiler();
|
||||||
|
|
||||||
static void TimerStart(const QString stopWatchName, const char* sourceFile, const char* func, unsigned int line);
|
static void TimerStart(const QString& stopWatchName, const char* sourceFile, const char* func, unsigned int line);
|
||||||
static void TimerGetTime(const QString stopWatchName, const char* sourceFile, const char* func, unsigned int line);
|
static void TimerGetTime(const QString& stopWatchName, const char* sourceFile, const char* func, unsigned int line);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void initLogger();
|
static void initLogger();
|
||||||
|
@ -14,7 +14,6 @@ namespace RGBW {
|
|||||||
WHITE_OFF
|
WHITE_OFF
|
||||||
};
|
};
|
||||||
|
|
||||||
WhiteAlgorithm stringToWhiteAlgorithm(QString str);
|
WhiteAlgorithm stringToWhiteAlgorithm(const QString& str);
|
||||||
void Rgb_to_Rgbw(ColorRgb input, ColorRgbw * output, WhiteAlgorithm algorithm);
|
void Rgb_to_Rgbw(ColorRgb input, ColorRgbw * output, WhiteAlgorithm algorithm);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,16 +12,16 @@ enum class VideoMode
|
|||||||
VIDEO_3DTAB
|
VIDEO_3DTAB
|
||||||
};
|
};
|
||||||
|
|
||||||
inline VideoMode parse3DMode(QString videoMode)
|
inline VideoMode parse3DMode(const QString& videoMode)
|
||||||
{
|
{
|
||||||
// convert to upper case
|
// convert to upper case
|
||||||
videoMode = videoMode.toUpper();
|
const QString vm = videoMode.toUpper();
|
||||||
|
|
||||||
if (videoMode == "3DTAB")
|
if (vm == "3DTAB")
|
||||||
{
|
{
|
||||||
return VideoMode::VIDEO_3DTAB;
|
return VideoMode::VIDEO_3DTAB;
|
||||||
}
|
}
|
||||||
else if (videoMode == "3DSBS")
|
else if (vm == "3DSBS")
|
||||||
{
|
{
|
||||||
return VideoMode::VIDEO_3DSBS;
|
return VideoMode::VIDEO_3DSBS;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @return A list of error messages
|
/// @return A list of error messages
|
||||||
///
|
///
|
||||||
const QStringList & getMessages() const;
|
QStringList getMessages() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
|
@ -37,7 +37,7 @@ namespace settings {
|
|||||||
/// @param type The settings::type from enum
|
/// @param type The settings::type from enum
|
||||||
/// @return The settings type as string
|
/// @return The settings type as string
|
||||||
///
|
///
|
||||||
inline QString typeToString(const type& type)
|
inline QString typeToString(type type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,8 @@ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
|||||||
-subj /CN=hyperion-project.org
|
-subj /CN=hyperion-project.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WebServer : public QObject {
|
class WebServer : public QObject
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -494,7 +494,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
#if defined(ENABLE_V4L2)
|
#if defined(ENABLE_V4L2)
|
||||||
|
|
||||||
QJsonArray availableV4L2devices;
|
QJsonArray availableV4L2devices;
|
||||||
for (auto devicePath : GrabberWrapper::getInstance()->getV4L2devices())
|
for (const auto& devicePath : GrabberWrapper::getInstance()->getV4L2devices())
|
||||||
{
|
{
|
||||||
QJsonObject device;
|
QJsonObject device;
|
||||||
device["device"] = devicePath;
|
device["device"] = devicePath;
|
||||||
|
@ -89,8 +89,8 @@ void BlackBorderProcessor::handleCompStateChangeRequest(hyperion::Components com
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlackBorderProcessor::setHardDisable(bool disable) {
|
void BlackBorderProcessor::setHardDisable(bool disable)
|
||||||
|
{
|
||||||
if (disable)
|
if (disable)
|
||||||
{
|
{
|
||||||
_enabled = false;
|
_enabled = false;
|
||||||
|
@ -67,7 +67,7 @@ void BoblightServer::stop()
|
|||||||
_hyperion->setNewComponentState(COMP_BOBLIGHTSERVER, _server->isListening());
|
_hyperion->setNewComponentState(COMP_BOBLIGHTSERVER, _server->isListening());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BoblightServer::active()
|
bool BoblightServer::active() const
|
||||||
{
|
{
|
||||||
return _server->isListening();
|
return _server->isListening();
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ void BonjourServiceRegister::registerService(const QString& service, int port)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BonjourServiceRegister::registerService(const BonjourRecord &record, quint16 servicePort, std::vector<std::pair<std::string, std::string>> txt)
|
void BonjourServiceRegister::registerService(const BonjourRecord &record, quint16 servicePort, const std::vector<std::pair<std::string, std::string>>& txt)
|
||||||
{
|
{
|
||||||
if (dnssref)
|
if (dnssref)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,6 @@ Option::Option(const QStringList &names, const QString &description, const QStri
|
|||||||
: QCommandLineOption(names, description, valueName, defaultValue)
|
: QCommandLineOption(names, description, valueName, defaultValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
bool Option::validate(Parser & parser, QString &value)
|
bool Option::validate(Parser & parser, QString &value)
|
||||||
{
|
{
|
||||||
/* By default everything is accepted */
|
/* By default everything is accepted */
|
||||||
@ -22,22 +21,22 @@ Option::Option(const QCommandLineOption &other)
|
|||||||
: QCommandLineOption(other)
|
: QCommandLineOption(other)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
QString Option::value(Parser &parser)
|
QString Option::value(Parser &parser) const
|
||||||
{
|
{
|
||||||
return parser.value(*this);
|
return parser.value(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Option::name()
|
QString Option::name() const
|
||||||
{
|
{
|
||||||
return this->names().last();
|
return this->names().last();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Option::getError()
|
QString Option::getError() const
|
||||||
{
|
{
|
||||||
return this->_error;
|
return this->_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Option::getCString(Parser &parser)
|
const char* Option::getCString(Parser &parser) const
|
||||||
{
|
{
|
||||||
return value(parser).toLocal8Bit().constData();
|
return value(parser).toLocal8Bit().constData();
|
||||||
}
|
}
|
||||||
|
@ -61,9 +61,9 @@ QString EffectEngine::deleteEffect(const QString& effectName)
|
|||||||
return _effectFileHandler->deleteEffect(effectName);
|
return _effectFileHandler->deleteEffect(effectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<ActiveEffectDefinition> &EffectEngine::getActiveEffects()
|
std::list<ActiveEffectDefinition> EffectEngine::getActiveEffects() const
|
||||||
{
|
{
|
||||||
_availableActiveEffects.clear();
|
std::list<ActiveEffectDefinition> availableActiveEffects;
|
||||||
|
|
||||||
for (Effect * effect : _activeEffects)
|
for (Effect * effect : _activeEffects)
|
||||||
{
|
{
|
||||||
@ -73,13 +73,13 @@ const std::list<ActiveEffectDefinition> &EffectEngine::getActiveEffects()
|
|||||||
activeEffectDefinition.priority = effect->getPriority();
|
activeEffectDefinition.priority = effect->getPriority();
|
||||||
activeEffectDefinition.timeout = effect->getTimeout();
|
activeEffectDefinition.timeout = effect->getTimeout();
|
||||||
activeEffectDefinition.args = effect->getArgs();
|
activeEffectDefinition.args = effect->getArgs();
|
||||||
_availableActiveEffects.push_back(activeEffectDefinition);
|
availableActiveEffects.push_back(activeEffectDefinition);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _availableActiveEffects;
|
return availableActiveEffects;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<EffectSchema> & EffectEngine::getEffectSchemas()
|
std::list<EffectSchema> EffectEngine::getEffectSchemas() const
|
||||||
{
|
{
|
||||||
return _effectFileHandler->getEffectSchemas();
|
return _effectFileHandler->getEffectSchemas();
|
||||||
}
|
}
|
||||||
|
@ -65,8 +65,6 @@ public:
|
|||||||
return physicalAddress;
|
return physicalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IonBuffer(size_t bufferSize)
|
IonBuffer(size_t bufferSize)
|
||||||
: bufferSize(bufferSize)
|
: bufferSize(bufferSize)
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ int vc_dispmanx_display_get_info(int, DISPMANX_MODEINFO_T *vc_info)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DISPMANX_RESOURCE_HANDLE_T vc_dispmanx_resource_create(int,int width,int height, uint32_t *)
|
DISPMANX_RESOURCE_HANDLE_T vc_dispmanx_resource_create(int, int width, int height, uint32_t *)
|
||||||
{
|
{
|
||||||
return new DISPMANX_RESOURCE(width,height);
|
return new DISPMANX_RESOURCE(width,height);
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ int vc_dispmanx_snapshot(int, DISPMANX_RESOURCE_HANDLE_T resource, int vc_flags)
|
|||||||
if (__bcm_frame_counter < 25)
|
if (__bcm_frame_counter < 25)
|
||||||
{
|
{
|
||||||
color[0] = ColorRgba::WHITE;
|
color[0] = ColorRgba::WHITE;
|
||||||
color[1] = ColorRgba::RED;
|
0 color[1] = ColorRgba::RED;
|
||||||
color[2] = ColorRgba::BLUE;
|
color[2] = ColorRgba::BLUE;
|
||||||
color[3] = ColorRgba::GREEN;
|
color[3] = ColorRgba::GREEN;
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
V4L2Grabber::V4L2Grabber(const QString & device
|
V4L2Grabber::V4L2Grabber(const QString & device
|
||||||
, const unsigned width
|
, unsigned width
|
||||||
, const unsigned height
|
, unsigned height
|
||||||
, const unsigned fps
|
, unsigned fps
|
||||||
, const unsigned input
|
, unsigned input
|
||||||
, VideoStandard videoStandard
|
, VideoStandard videoStandard
|
||||||
, PixelFormat pixelFormat
|
, PixelFormat pixelFormat
|
||||||
, int pixelDecimation
|
, int pixelDecimation
|
||||||
@ -1368,7 +1368,7 @@ bool V4L2Grabber::setFramerate(int fps)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList V4L2Grabber::getV4L2devices()
|
QStringList V4L2Grabber::getV4L2devices() const
|
||||||
{
|
{
|
||||||
QStringList result = QStringList();
|
QStringList result = QStringList();
|
||||||
for (auto it = _deviceProperties.begin(); it != _deviceProperties.end(); ++it)
|
for (auto it = _deviceProperties.begin(); it != _deviceProperties.end(); ++it)
|
||||||
@ -1378,22 +1378,22 @@ QStringList V4L2Grabber::getV4L2devices()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString V4L2Grabber::getV4L2deviceName(QString devicePath)
|
QString V4L2Grabber::getV4L2deviceName(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
return _deviceProperties.value(devicePath).name;
|
return _deviceProperties.value(devicePath).name;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMultiMap<QString, int> V4L2Grabber::getV4L2deviceInputs(QString devicePath)
|
QMultiMap<QString, int> V4L2Grabber::getV4L2deviceInputs(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
return _deviceProperties.value(devicePath).inputs;
|
return _deviceProperties.value(devicePath).inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList V4L2Grabber::getResolutions(QString devicePath)
|
QStringList V4L2Grabber::getResolutions(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
return _deviceProperties.value(devicePath).resolutions;
|
return _deviceProperties.value(devicePath).resolutions;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList V4L2Grabber::getFramerates(QString devicePath)
|
QStringList V4L2Grabber::getFramerates(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
return _deviceProperties.value(devicePath).framerates;
|
return _deviceProperties.value(devicePath).framerates;
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
V4L2Wrapper::V4L2Wrapper(const QString &device,
|
V4L2Wrapper::V4L2Wrapper(const QString &device,
|
||||||
const unsigned grabWidth,
|
unsigned grabWidth,
|
||||||
const unsigned grabHeight,
|
unsigned grabHeight,
|
||||||
const unsigned fps,
|
unsigned fps,
|
||||||
const unsigned input,
|
unsigned input,
|
||||||
VideoStandard videoStandard,
|
VideoStandard videoStandard,
|
||||||
PixelFormat pixelFormat,
|
PixelFormat pixelFormat,
|
||||||
int pixelDecimation )
|
int pixelDecimation )
|
||||||
@ -85,7 +85,7 @@ void V4L2Wrapper::setSignalDetectionEnable(bool enable)
|
|||||||
_grabber.setSignalDetectionEnable(enable);
|
_grabber.setSignalDetectionEnable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool V4L2Wrapper::getSignalDetectionEnable()
|
bool V4L2Wrapper::getSignalDetectionEnable() const
|
||||||
{
|
{
|
||||||
return _grabber.getSignalDetectionEnabled();
|
return _grabber.getSignalDetectionEnabled();
|
||||||
}
|
}
|
||||||
@ -95,12 +95,12 @@ void V4L2Wrapper::setCecDetectionEnable(bool enable)
|
|||||||
_grabber.setCecDetectionEnable(enable);
|
_grabber.setCecDetectionEnable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool V4L2Wrapper::getCecDetectionEnable()
|
bool V4L2Wrapper::getCecDetectionEnable() const
|
||||||
{
|
{
|
||||||
return _grabber.getCecDetectionEnabled();
|
return _grabber.getCecDetectionEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void V4L2Wrapper::setDeviceVideoStandard(QString device, VideoStandard videoStandard)
|
void V4L2Wrapper::setDeviceVideoStandard(const QString& device, VideoStandard videoStandard)
|
||||||
{
|
{
|
||||||
_grabber.setDeviceVideoStandard(device, videoStandard);
|
_grabber.setDeviceVideoStandard(device, videoStandard);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ AuthManager::AuthDefinition AuthManager::createToken(const QString &comment)
|
|||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<AuthManager::AuthDefinition> AuthManager::getTokenList()
|
QVector<AuthManager::AuthDefinition> AuthManager::getTokenList() const
|
||||||
{
|
{
|
||||||
QVector<QVariantMap> vector = _authTable->getTokenList();
|
QVector<QVariantMap> vector = _authTable->getTokenList();
|
||||||
QVector<AuthManager::AuthDefinition> finalVec;
|
QVector<AuthManager::AuthDefinition> finalVec;
|
||||||
@ -79,7 +79,7 @@ QVector<AuthManager::AuthDefinition> AuthManager::getTokenList()
|
|||||||
return finalVec;
|
return finalVec;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString AuthManager::getUserToken(const QString &usr)
|
QString AuthManager::getUserToken(const QString &usr) const
|
||||||
{
|
{
|
||||||
QString tok = _authTable->getUserToken(usr);
|
QString tok = _authTable->getUserToken(usr);
|
||||||
return QString(_authTable->getUserToken(usr));
|
return QString(_authTable->getUserToken(usr));
|
||||||
@ -192,7 +192,7 @@ void AuthManager::handlePendingTokenRequest(const QString &id, bool accept)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<AuthManager::AuthDefinition> AuthManager::getPendingRequests()
|
QVector<AuthManager::AuthDefinition> AuthManager::getPendingRequests() const
|
||||||
{
|
{
|
||||||
QVector<AuthManager::AuthDefinition> finalVec;
|
QVector<AuthManager::AuthDefinition> finalVec;
|
||||||
for (const auto &entry : _pendingRequests)
|
for (const auto &entry : _pendingRequests)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <hyperion/Grabber.h>
|
#include <hyperion/Grabber.h>
|
||||||
|
|
||||||
|
Grabber::Grabber(const QString& grabberName, int width, int height, int cropLeft, int cropRight, int cropTop, int cropBottom)
|
||||||
Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int cropRight, int cropTop, int cropBottom)
|
|
||||||
: _imageResampler()
|
: _imageResampler()
|
||||||
, _useImageResampler(true)
|
, _useImageResampler(true)
|
||||||
, _videoMode(VideoMode::VIDEO_2D)
|
, _videoMode(VideoMode::VIDEO_2D)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
GrabberWrapper* GrabberWrapper::instance = nullptr;
|
GrabberWrapper* GrabberWrapper::instance = nullptr;
|
||||||
|
|
||||||
GrabberWrapper::GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz)
|
GrabberWrapper::GrabberWrapper(const QString& grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz)
|
||||||
: _grabberName(grabberName)
|
: _grabberName(grabberName)
|
||||||
, _timer(new QTimer(this))
|
, _timer(new QTimer(this))
|
||||||
, _updateInterval_ms(1000/updateRate_Hz)
|
, _updateInterval_ms(1000/updateRate_Hz)
|
||||||
@ -201,7 +201,7 @@ void GrabberWrapper::tryStart()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList GrabberWrapper::getV4L2devices()
|
QStringList GrabberWrapper::getV4L2devices() const
|
||||||
{
|
{
|
||||||
if(_grabberName.startsWith("V4L"))
|
if(_grabberName.startsWith("V4L"))
|
||||||
return _ggrabber->getV4L2devices();
|
return _ggrabber->getV4L2devices();
|
||||||
@ -209,7 +209,7 @@ QStringList GrabberWrapper::getV4L2devices()
|
|||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GrabberWrapper::getV4L2deviceName(QString devicePath)
|
QString GrabberWrapper::getV4L2deviceName(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
if(_grabberName.startsWith("V4L"))
|
if(_grabberName.startsWith("V4L"))
|
||||||
return _ggrabber->getV4L2deviceName(devicePath);
|
return _ggrabber->getV4L2deviceName(devicePath);
|
||||||
@ -217,7 +217,7 @@ QString GrabberWrapper::getV4L2deviceName(QString devicePath)
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QMultiMap<QString, int> GrabberWrapper::getV4L2deviceInputs(QString devicePath)
|
QMultiMap<QString, int> GrabberWrapper::getV4L2deviceInputs(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
if(_grabberName.startsWith("V4L"))
|
if(_grabberName.startsWith("V4L"))
|
||||||
return _ggrabber->getV4L2deviceInputs(devicePath);
|
return _ggrabber->getV4L2deviceInputs(devicePath);
|
||||||
@ -225,7 +225,7 @@ QMultiMap<QString, int> GrabberWrapper::getV4L2deviceInputs(QString devicePath)
|
|||||||
return QMultiMap<QString, int>();
|
return QMultiMap<QString, int>();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList GrabberWrapper::getResolutions(QString devicePath)
|
QStringList GrabberWrapper::getResolutions(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
if(_grabberName.startsWith("V4L"))
|
if(_grabberName.startsWith("V4L"))
|
||||||
return _ggrabber->getResolutions(devicePath);
|
return _ggrabber->getResolutions(devicePath);
|
||||||
@ -233,7 +233,7 @@ QStringList GrabberWrapper::getResolutions(QString devicePath)
|
|||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList GrabberWrapper::getFramerates(QString devicePath)
|
QStringList GrabberWrapper::getFramerates(const QString& devicePath) const
|
||||||
{
|
{
|
||||||
if(_grabberName.startsWith("V4L"))
|
if(_grabberName.startsWith("V4L"))
|
||||||
return _ggrabber->getFramerates(devicePath);
|
return _ggrabber->getFramerates(devicePath);
|
||||||
|
@ -255,7 +255,7 @@ QJsonDocument Hyperion::getSetting(settings::type type) const
|
|||||||
return _settingsManager->getSetting(type);
|
return _settingsManager->getSetting(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Hyperion::saveSettings(QJsonObject config, bool correct)
|
bool Hyperion::saveSettings(const QJsonObject& config, bool correct)
|
||||||
{
|
{
|
||||||
return _settingsManager->saveSettings(config, correct);
|
return _settingsManager->saveSettings(config, correct);
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ bool Hyperion::setVisiblePriority(int priority)
|
|||||||
return _muxer.setPriority(priority);
|
return _muxer.setPriority(priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Hyperion::sourceAutoSelectEnabled()
|
bool Hyperion::sourceAutoSelectEnabled() const
|
||||||
{
|
{
|
||||||
return _muxer.isSourceAutoSelectEnabled();
|
return _muxer.isSourceAutoSelectEnabled();
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ std::map<hyperion::Components, bool> Hyperion::getAllComponents() const
|
|||||||
return _componentRegister.getRegister();
|
return _componentRegister.getRegister();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Hyperion::isComponentEnabled(hyperion::Components comp)
|
int Hyperion::isComponentEnabled(hyperion::Components comp) const
|
||||||
{
|
{
|
||||||
return _componentRegister.isComponentEnabled(comp);
|
return _componentRegister.isComponentEnabled(comp);
|
||||||
}
|
}
|
||||||
@ -396,7 +396,7 @@ end:
|
|||||||
_muxer.queuePush();
|
_muxer.queuePush();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList & Hyperion::getAdjustmentIds() const
|
QStringList Hyperion::getAdjustmentIds() const
|
||||||
{
|
{
|
||||||
return _raw2ledAdjustment->getAdjustmentIds();
|
return _raw2ledAdjustment->getAdjustmentIds();
|
||||||
}
|
}
|
||||||
@ -464,22 +464,22 @@ QString Hyperion::deleteEffect(const QString& effectName)
|
|||||||
return _effectEngine->deleteEffect(effectName);
|
return _effectEngine->deleteEffect(effectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<EffectDefinition> & Hyperion::getEffects() const
|
std::list<EffectDefinition> Hyperion::getEffects() const
|
||||||
{
|
{
|
||||||
return _effectEngine->getEffects();
|
return _effectEngine->getEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<ActiveEffectDefinition> & Hyperion::getActiveEffects() const
|
std::list<ActiveEffectDefinition> Hyperion::getActiveEffects() const
|
||||||
{
|
{
|
||||||
return _effectEngine->getActiveEffects();
|
return _effectEngine->getActiveEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::list<EffectSchema> & Hyperion::getEffectSchemas() const
|
std::list<EffectSchema> Hyperion::getEffectSchemas() const
|
||||||
{
|
{
|
||||||
return _effectEngine->getEffectSchemas();
|
return _effectEngine->getEffectSchemas();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QJsonObject& Hyperion::getQJsonConfig() const
|
QJsonObject Hyperion::getQJsonConfig() const
|
||||||
{
|
{
|
||||||
return _settingsManager->getSettings();
|
return _settingsManager->getSettings();
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ Hyperion* HyperionIManager::getHyperionInstance(quint8 instance)
|
|||||||
return _runningInstances.value(0);
|
return _runningInstances.value(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVector<QVariantMap> HyperionIManager::getInstanceData()
|
QVector<QVariantMap> HyperionIManager::getInstanceData() const
|
||||||
{
|
{
|
||||||
QVector<QVariantMap> instances = _instanceTable->getAllInstances();
|
QVector<QVariantMap> instances = _instanceTable->getAllInstances();
|
||||||
for( auto & entry : instances)
|
for( auto & entry : instances)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
using namespace hyperion;
|
using namespace hyperion;
|
||||||
|
|
||||||
// global transform method
|
// global transform method
|
||||||
int ImageProcessor::mappingTypeToInt(QString mappingType)
|
int ImageProcessor::mappingTypeToInt(const QString& mappingType)
|
||||||
{
|
{
|
||||||
if (mappingType == "unicolor_mean" )
|
if (mappingType == "unicolor_mean" )
|
||||||
return 1;
|
return 1;
|
||||||
@ -99,7 +99,7 @@ void ImageProcessor::setBlackbarDetectDisable(bool enable)
|
|||||||
_borderProcessor->setHardDisable(enable);
|
_borderProcessor->setHardDisable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ImageProcessor::blackBorderDetectorEnabled()
|
bool ImageProcessor::blackBorderDetectorEnabled() const
|
||||||
{
|
{
|
||||||
return _borderProcessor->enabled();
|
return _borderProcessor->enabled();
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ void MessageForwarder::handlePriorityChanges(quint8 priority)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageForwarder::addJsonSlave(QString slave)
|
void MessageForwarder::addJsonSlave(const QString& slave)
|
||||||
{
|
{
|
||||||
QStringList parts = slave.split(":");
|
QStringList parts = slave.split(":");
|
||||||
if (parts.size() != 2)
|
if (parts.size() != 2)
|
||||||
@ -185,7 +185,7 @@ void MessageForwarder::addJsonSlave(QString slave)
|
|||||||
_jsonSlaves << slave;
|
_jsonSlaves << slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageForwarder::addFlatbufferSlave(QString slave)
|
void MessageForwarder::addFlatbufferSlave(const QString& slave)
|
||||||
{
|
{
|
||||||
QStringList parts = slave.split(":");
|
QStringList parts = slave.split(":");
|
||||||
if (parts.size() != 2)
|
if (parts.size() != 2)
|
||||||
|
@ -67,7 +67,7 @@ bool MultiColorAdjustment::verifyAdjustments() const
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList & MultiColorAdjustment::getAdjustmentIds()
|
QStringList MultiColorAdjustment::getAdjustmentIds() const
|
||||||
{
|
{
|
||||||
return _adjustmentIds;
|
return _adjustmentIds;
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ PriorityMuxer::InputInfo PriorityMuxer::getInputInfo(int priority) const
|
|||||||
return elemIt.value();
|
return elemIt.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
hyperion::Components PriorityMuxer::getComponentOfPriority(int priority)
|
hyperion::Components PriorityMuxer::getComponentOfPriority(int priority) const
|
||||||
{
|
{
|
||||||
return _activeInputs[priority].componentId;
|
return _activeInputs[priority].componentId;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ bool SettingsManager::saveSettings(QJsonObject config, bool correct)
|
|||||||
Warning(_log,"Fixing json data!");
|
Warning(_log,"Fixing json data!");
|
||||||
config = schemaChecker.getAutoCorrectedConfig(config);
|
config = schemaChecker.getAutoCorrectedConfig(config);
|
||||||
|
|
||||||
for (auto & schemaError : schemaChecker.getMessages())
|
for (const auto & schemaError : schemaChecker.getMessages())
|
||||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,21 +35,21 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -57,7 +57,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void LedDeviceWrapper::createLedDevice(const QJsonObject& config)
|
|||||||
thread->start();
|
thread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QJsonObject LedDeviceWrapper::getLedDeviceSchemas()
|
QJsonObject LedDeviceWrapper::getLedDeviceSchemas()
|
||||||
{
|
{
|
||||||
// make sure the resources are loaded (they may be left out after static linking)
|
// make sure the resources are loaded (they may be left out after static linking)
|
||||||
Q_INIT_RESOURCE(LedDeviceSchemas);
|
Q_INIT_RESOURCE(LedDeviceSchemas);
|
||||||
@ -118,21 +118,21 @@ const LedDeviceRegistry& LedDeviceWrapper::getDeviceMap()
|
|||||||
return _ledDeviceMap;
|
return _ledDeviceMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LedDeviceWrapper::getLatchTime()
|
int LedDeviceWrapper::getLatchTime() const
|
||||||
{
|
{
|
||||||
int value = 0;
|
int value = 0;
|
||||||
QMetaObject::invokeMethod(_ledDevice, "getLatchTime", Qt::BlockingQueuedConnection, Q_RETURN_ARG(int, value));
|
QMetaObject::invokeMethod(_ledDevice, "getLatchTime", Qt::BlockingQueuedConnection, Q_RETURN_ARG(int, value));
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LedDeviceWrapper::getActiveDeviceType()
|
QString LedDeviceWrapper::getActiveDeviceType() const
|
||||||
{
|
{
|
||||||
QString value = 0;
|
QString value = 0;
|
||||||
QMetaObject::invokeMethod(_ledDevice, "getActiveDeviceType", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QString, value));
|
QMetaObject::invokeMethod(_ledDevice, "getActiveDeviceType", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QString, value));
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LedDeviceWrapper::getColorOrder()
|
QString LedDeviceWrapper::getColorOrder() const
|
||||||
{
|
{
|
||||||
QString value;
|
QString value;
|
||||||
QMetaObject::invokeMethod(_ledDevice, "getColorOrder", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QString, value));
|
QMetaObject::invokeMethod(_ledDevice, "getColorOrder", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QString, value));
|
||||||
@ -146,7 +146,7 @@ unsigned int LedDeviceWrapper::getLedCount() const
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDeviceWrapper::enabled()
|
bool LedDeviceWrapper::enabled() const
|
||||||
{
|
{
|
||||||
return _enabled;
|
return _enabled;
|
||||||
}
|
}
|
||||||
|
@ -43,14 +43,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// Destructor of the LedDevice; closes the output device if it is open
|
/// Destructor of the LedDevice; closes the output device if it is open
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceHyperionUsbasp() override;
|
~LedDeviceHyperionUsbasp() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Closes the output device.
|
/// Closes the output device.
|
||||||
/// Includes switching-off the device and stopping refreshes
|
/// Includes switching-off the device and stopping refreshes
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
@ -67,7 +67,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return Zero on success else negative
|
/// @return Zero on success else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb>& ledValues) override;
|
int write(const std::vector<ColorRgb>& ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Test if the device is a Hyperion Usbasp device
|
/// Test if the device is a Hyperion Usbasp device
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LedDevice
|
/// @brief Destructor of the LedDevice
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceLightpack() override;
|
~LedDeviceLightpack() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the LED-device
|
/// @brief Constructs the LED-device
|
||||||
@ -50,28 +50,28 @@ public:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn off the Nanoleaf device.
|
/// @brief Power-/turn off the Nanoleaf device.
|
||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
virtual bool powerOff() override;
|
bool powerOff() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -100,7 +100,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LedDevice
|
/// @brief Destructor of the LedDevice
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceMultiLightpack() override;
|
~LedDeviceMultiLightpack() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the LED-device
|
/// @brief Constructs the LED-device
|
||||||
@ -49,28 +49,28 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn off the Nanoleaf device.
|
/// @brief Power-/turn off the Nanoleaf device.
|
||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
virtual bool powerOff() override;
|
bool powerOff() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
|
@ -34,7 +34,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -42,7 +42,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEDEVICEPAINTTPACK_H
|
#endif // LEDEVICEPAINTTPACK_H
|
||||||
|
@ -37,7 +37,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -45,7 +45,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEDEVICERAWHID_H
|
#endif // LEDEVICERAWHID_H
|
||||||
|
@ -158,14 +158,17 @@ int ProviderHID::writeBytes(unsigned size, const uint8_t * data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle first error
|
// Handle first error
|
||||||
if(ret < 0){
|
if(ret < 0)
|
||||||
|
{
|
||||||
Error(_log,"Failed to write to HID device.");
|
Error(_log,"Failed to write to HID device.");
|
||||||
|
|
||||||
// Try again
|
// Try again
|
||||||
if(_useFeature){
|
if(_useFeature)
|
||||||
|
{
|
||||||
ret = hid_send_feature_report(_deviceHandle, ledData, size + 1);
|
ret = hid_send_feature_report(_deviceHandle, ledData, size + 1);
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
ret = hid_write(_deviceHandle, ledData, size + 1);
|
ret = hid_write(_deviceHandle, ledData, size + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +180,6 @@ int ProviderHID::writeBytes(unsigned size, const uint8_t * data)
|
|||||||
_deviceHandle = nullptr;
|
_deviceHandle = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,14 +26,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LedDevice
|
/// @brief Destructor of the LedDevice
|
||||||
///
|
///
|
||||||
virtual ~ProviderHID() override;
|
~ProviderHID() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Discover HIB (USB) devices available (for configuration).
|
/// @brief Discover HIB (USB) devices available (for configuration).
|
||||||
///
|
///
|
||||||
/// @return A JSON structure holding a list of devices found
|
/// @return A JSON structure holding a list of devices found
|
||||||
///
|
///
|
||||||
virtual QJsonObject discover() override;
|
QJsonObject discover() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -43,21 +43,21 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Write the given bytes to the HID-device
|
/// @brief Write the given bytes to the HID-device
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LedDevice
|
/// @brief Destructor of the LedDevice
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceAtmoOrb() override;
|
~LedDeviceAtmoOrb() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the LED-device
|
/// @brief Constructs the LED-device
|
||||||
@ -51,21 +51,21 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -73,7 +73,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ int LedDeviceFadeCandy::close()
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDeviceFadeCandy::isConnected()
|
bool LedDeviceFadeCandy::isConnected() const
|
||||||
{
|
{
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
if ( _client != nullptr )
|
if ( _client != nullptr )
|
||||||
@ -204,7 +204,7 @@ int LedDeviceFadeCandy::transferData()
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LedDeviceFadeCandy::sendSysEx(uint8_t systemId, uint8_t commandId, QByteArray msg)
|
int LedDeviceFadeCandy::sendSysEx(uint8_t systemId, uint8_t commandId, const QByteArray& msg)
|
||||||
{
|
{
|
||||||
if ( isConnected() )
|
if ( isConnected() )
|
||||||
{
|
{
|
||||||
|
@ -62,21 +62,21 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device.
|
/// @brief Opens the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -84,7 +84,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// @return True, if connection established
|
/// @return True, if connection established
|
||||||
///
|
///
|
||||||
bool isConnected();
|
bool isConnected() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Transfer current opc_data buffer to opc server
|
/// @brief Transfer current opc_data buffer to opc server
|
||||||
@ -122,7 +122,7 @@ private:
|
|||||||
/// @param[in] commandId id of command
|
/// @param[in] commandId id of command
|
||||||
/// @param[in] msg the sysEx message
|
/// @param[in] msg the sysEx message
|
||||||
/// @return amount bytes written, -1 if failed
|
/// @return amount bytes written, -1 if failed
|
||||||
int sendSysEx(uint8_t systemId, uint8_t commandId, QByteArray msg);
|
int sendSysEx(uint8_t systemId, uint8_t commandId, const QByteArray& msg);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Sends the configuration to fadecandy cserver
|
/// @brief Sends the configuration to fadecandy cserver
|
||||||
|
@ -513,7 +513,7 @@ bool LedDeviceNanoleaf::powerOff()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LedDeviceNanoleaf::getOnOffRequest (bool isOn ) const
|
QString LedDeviceNanoleaf::getOnOffRequest(bool isOn) const
|
||||||
{
|
{
|
||||||
QString state = isOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
QString state = isOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
||||||
return QString( "{\"%1\":{\"%2\":%3}}" ).arg(STATE_ON, STATE_ONOFF_VALUE, state);
|
return QString( "{\"%1\":{\"%2\":%3}}" ).arg(STATE_ON, STATE_ONOFF_VALUE, state);
|
||||||
@ -614,7 +614,7 @@ int LedDeviceNanoleaf::write(const std::vector<ColorRgb> & ledValues)
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string LedDeviceNanoleaf:: uint8_vector_to_hex_string( const std::vector<uint8_t>& buffer ) const
|
std::string LedDeviceNanoleaf::uint8_vector_to_hex_string(const std::vector<uint8_t>& buffer) const
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::hex << std::setfill('0');
|
ss << std::hex << std::setfill('0');
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LED-device
|
/// @brief Destructor of the LED-device
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceNanoleaf() override;
|
~LedDeviceNanoleaf() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the LED-device
|
/// @brief Constructs the LED-device
|
||||||
@ -51,7 +51,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @return A JSON structure holding a list of devices found
|
/// @return A JSON structure holding a list of devices found
|
||||||
///
|
///
|
||||||
virtual QJsonObject discover() override;
|
QJsonObject discover() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the Nanoleaf device's resource properties
|
/// @brief Get the Nanoleaf device's resource properties
|
||||||
@ -68,7 +68,7 @@ public:
|
|||||||
/// @param[in] params Parameters to query device
|
/// @param[in] params Parameters to query device
|
||||||
/// @return A JSON structure holding the device's properties
|
/// @return A JSON structure holding the device's properties
|
||||||
///
|
///
|
||||||
virtual QJsonObject getProperties(const QJsonObject& params) override;
|
QJsonObject getProperties(const QJsonObject& params) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Send an update to the Nanoleaf device to identify it.
|
/// @brief Send an update to the Nanoleaf device to identify it.
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @param[in] params Parameters to address device
|
/// @param[in] params Parameters to address device
|
||||||
///
|
///
|
||||||
virtual void identify(const QJsonObject& params) override;
|
void identify(const QJsonObject& params) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -108,21 +108,21 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
//////
|
//////
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn on the Nanoleaf device.
|
/// @brief Power-/turn on the Nanoleaf device.
|
||||||
///
|
///
|
||||||
/// @brief Store the device's original state.
|
/// @brief Store the device's original state.
|
||||||
///
|
///
|
||||||
virtual bool powerOn() override;
|
bool powerOn() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn off the Nanoleaf device.
|
/// @brief Power-/turn off the Nanoleaf device.
|
||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
virtual bool powerOff() override;
|
bool powerOff() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ bool LedDevicePhilipsHueBridge::init(const QJsonObject &deviceConfig)
|
|||||||
return isInitOK;
|
return isInitOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDevicePhilipsHueBridge::initRestAPI(const QString &hostname, int port, const QString &token )
|
bool LedDevicePhilipsHueBridge::initRestAPI(const QString &hostname, int port, const QString &token)
|
||||||
{
|
{
|
||||||
bool isInitOK = false;
|
bool isInitOK = false;
|
||||||
|
|
||||||
@ -403,12 +403,12 @@ int LedDevicePhilipsHueBridge::close()
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int *LedDevicePhilipsHueBridge::getCiphersuites()
|
const int *LedDevicePhilipsHueBridge::getCiphersuites() const
|
||||||
{
|
{
|
||||||
return SSL_CIPHERSUITES;
|
return SSL_CIPHERSUITES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LedDevicePhilipsHueBridge::log(const char* msg, const char* type, ...)
|
void LedDevicePhilipsHueBridge::log(const char* msg, const char* type, ...) const
|
||||||
{
|
{
|
||||||
const size_t max_val_length = 1024;
|
const size_t max_val_length = 1024;
|
||||||
char val[max_val_length];
|
char val[max_val_length];
|
||||||
@ -544,17 +544,17 @@ void LedDevicePhilipsHueBridge::setGroupMap(const QJsonDocument &doc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QMap<quint16,QJsonObject>& LedDevicePhilipsHueBridge::getLightMap()
|
QMap<quint16,QJsonObject> LedDevicePhilipsHueBridge::getLightMap() const
|
||||||
{
|
{
|
||||||
return _lightsMap;
|
return _lightsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QMap<quint16,QJsonObject>& LedDevicePhilipsHueBridge::getGroupMap()
|
QMap<quint16,QJsonObject> LedDevicePhilipsHueBridge::getGroupMap() const
|
||||||
{
|
{
|
||||||
return _groupsMap;
|
return _groupsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LedDevicePhilipsHueBridge::getGroupName(quint16 groupId)
|
QString LedDevicePhilipsHueBridge::getGroupName(quint16 groupId) const
|
||||||
{
|
{
|
||||||
QString groupName;
|
QString groupName;
|
||||||
if( _groupsMap.contains( groupId ) )
|
if( _groupsMap.contains( groupId ) )
|
||||||
@ -569,7 +569,7 @@ QString LedDevicePhilipsHueBridge::getGroupName(quint16 groupId)
|
|||||||
return groupName;
|
return groupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonArray LedDevicePhilipsHueBridge::getGroupLights(quint16 groupId)
|
QJsonArray LedDevicePhilipsHueBridge::getGroupLights(quint16 groupId) const
|
||||||
{
|
{
|
||||||
QJsonArray groupLights;
|
QJsonArray groupLights;
|
||||||
// search user groupid inside _groupsMap and create light if found
|
// search user groupid inside _groupsMap and create light if found
|
||||||
@ -599,13 +599,13 @@ QJsonArray LedDevicePhilipsHueBridge::getGroupLights(quint16 groupId)
|
|||||||
return groupLights;
|
return groupLights;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDevicePhilipsHueBridge::checkApiError(const QJsonDocument &response )
|
bool LedDevicePhilipsHueBridge::checkApiError(const QJsonDocument &response)
|
||||||
{
|
{
|
||||||
bool apiError = false;
|
bool apiError = false;
|
||||||
QString errorReason;
|
QString errorReason;
|
||||||
|
|
||||||
QString strJson(response.toJson(QJsonDocument::Compact));
|
QString strJson(response.toJson(QJsonDocument::Compact));
|
||||||
DebugIf(verbose, _log, "Reply: [%s]", strJson.toUtf8().constData() );
|
DebugIf(verbose, _log, "Reply: [%s]", strJson.toUtf8().constData());
|
||||||
|
|
||||||
QVariantList rspList = response.toVariant().toList();
|
QVariantList rspList = response.toVariant().toList();
|
||||||
if ( !rspList.isEmpty() )
|
if ( !rspList.isEmpty() )
|
||||||
@ -662,7 +662,7 @@ QJsonDocument LedDevicePhilipsHueBridge::setGroupState(unsigned int groupId, boo
|
|||||||
return post( QString("%1/%2").arg( API_GROUPS ).arg( groupId ), QString("{\"%1\":{\"%2\":%3}}").arg( API_STREAM, API_STREAM_ACTIVE, active ) );
|
return post( QString("%1/%2").arg( API_GROUPS ).arg( groupId ), QString("{\"%1\":{\"%2\":%3}}").arg( API_STREAM, API_STREAM_ACTIVE, active ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDevicePhilipsHueBridge::isStreamOwner(const QString &streamOwner)
|
bool LedDevicePhilipsHueBridge::isStreamOwner(const QString &streamOwner) const
|
||||||
{
|
{
|
||||||
return ( streamOwner != "" && streamOwner == _username );
|
return ( streamOwner != "" && streamOwner == _username );
|
||||||
}
|
}
|
||||||
@ -1254,13 +1254,13 @@ bool LedDevicePhilipsHue::setStreamGroupState(bool state)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray LedDevicePhilipsHue::prepareStreamData()
|
QByteArray LedDevicePhilipsHue::prepareStreamData() const
|
||||||
{
|
{
|
||||||
QByteArray msg;
|
QByteArray msg;
|
||||||
msg.reserve(static_cast<int>(sizeof(HEADER) + sizeof(PAYLOAD_PER_LIGHT) * _lights.size()));
|
msg.reserve(static_cast<int>(sizeof(HEADER) + sizeof(PAYLOAD_PER_LIGHT) * _lights.size()));
|
||||||
msg.append((const char*)HEADER, sizeof(HEADER));
|
msg.append((const char*)HEADER, sizeof(HEADER));
|
||||||
|
|
||||||
for (PhilipsHueLight& light : _lights)
|
for (const PhilipsHueLight& light : _lights)
|
||||||
{
|
{
|
||||||
CiColor lightC = light.getColor();
|
CiColor lightC = light.getColor();
|
||||||
quint64 R = lightC.x * 0xffff;
|
quint64 R = lightC.x * 0xffff;
|
||||||
|
@ -208,13 +208,13 @@ public:
|
|||||||
|
|
||||||
void setLightState(unsigned int lightId = 0, const QString &state = "");
|
void setLightState(unsigned int lightId = 0, const QString &state = "");
|
||||||
|
|
||||||
const QMap<quint16,QJsonObject>& getLightMap();
|
QMap<quint16,QJsonObject> getLightMap() const;
|
||||||
|
|
||||||
const QMap<quint16,QJsonObject>& getGroupMap();
|
QMap<quint16,QJsonObject> getGroupMap() const;
|
||||||
|
|
||||||
QString getGroupName(quint16 groupId = 0);
|
QString getGroupName(quint16 groupId = 0) const;
|
||||||
|
|
||||||
QJsonArray getGroupLights(quint16 groupId = 0);
|
QJsonArray getGroupLights(quint16 groupId = 0) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -226,21 +226,21 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the Hue-Bridge device and its SSL-connection
|
/// @brief Opens the Hue-Bridge device and its SSL-connection
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the Hue-Bridge device and its SSL-connection
|
/// @brief Closes the Hue-Bridge device and its SSL-connection
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Check, if Hue API response indicate error
|
/// @brief Check, if Hue API response indicate error
|
||||||
@ -264,12 +264,12 @@ protected:
|
|||||||
QJsonDocument getGroupState( unsigned int groupId );
|
QJsonDocument getGroupState( unsigned int groupId );
|
||||||
QJsonDocument setGroupState( unsigned int groupId, bool state);
|
QJsonDocument setGroupState( unsigned int groupId, bool state);
|
||||||
|
|
||||||
bool isStreamOwner(const QString &streamOwner);
|
bool isStreamOwner(const QString &streamOwner) const;
|
||||||
bool initMaps();
|
bool initMaps();
|
||||||
|
|
||||||
void log(const char* msg, const char* type, ...);
|
void log(const char* msg, const char* type, ...) const;
|
||||||
|
|
||||||
const int * getCiphersuites() override;
|
const int * getCiphersuites() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the LED-device
|
/// @brief Destructor of the LED-device
|
||||||
///
|
///
|
||||||
virtual ~LedDevicePhilipsHue();
|
~LedDevicePhilipsHue();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the LED-device
|
/// @brief Constructs the LED-device
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @return A JSON structure holding a list of devices found
|
/// @return A JSON structure holding a list of devices found
|
||||||
///
|
///
|
||||||
virtual QJsonObject discover() override;
|
QJsonObject discover() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the Hue Bridge device's resource properties
|
/// @brief Get the Hue Bridge device's resource properties
|
||||||
@ -348,7 +348,7 @@ public:
|
|||||||
/// @param[in] params Parameters to query device
|
/// @param[in] params Parameters to query device
|
||||||
/// @return A JSON structure holding the device's properties
|
/// @return A JSON structure holding the device's properties
|
||||||
///
|
///
|
||||||
virtual QJsonObject getProperties(const QJsonObject& params) override;
|
QJsonObject getProperties(const QJsonObject& params) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Send an update to the device to identify it.
|
/// @brief Send an update to the device to identify it.
|
||||||
@ -357,7 +357,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @param[in] params Parameters to address device
|
/// @param[in] params Parameters to address device
|
||||||
///
|
///
|
||||||
virtual void identify(const QJsonObject& params) override;
|
void identify(const QJsonObject& params) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the number of LEDs supported by the device.
|
/// @brief Get the number of LEDs supported by the device.
|
||||||
@ -378,7 +378,7 @@ public slots:
|
|||||||
///
|
///
|
||||||
/// Includes switching-off the device and stopping refreshes.
|
/// Includes switching-off the device and stopping refreshes.
|
||||||
///
|
///
|
||||||
virtual void stop() override;
|
void stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -388,21 +388,21 @@ protected:
|
|||||||
/// @param deviceConfig Device's configuration in JSON
|
/// @param deviceConfig Device's configuration in JSON
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Opens the output device
|
/// @brief Opens the output device
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is ready), else negative
|
/// @return Zero on success (i.e. device is ready), else negative
|
||||||
///
|
///
|
||||||
virtual int open() override;
|
int open() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Closes the output device.
|
/// @brief Closes the output device.
|
||||||
///
|
///
|
||||||
/// @return Zero on success (i.e. device is closed), else negative
|
/// @return Zero on success (i.e. device is closed), else negative
|
||||||
///
|
///
|
||||||
virtual int close() override;
|
int close() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -410,7 +410,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb>& ledValues) override;
|
int write(const std::vector<ColorRgb>& ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Switch the LEDs on.
|
/// @brief Switch the LEDs on.
|
||||||
@ -421,7 +421,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
//virtual bool switchOn() override;
|
//bool switchOn() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Switch the LEDs off.
|
/// @brief Switch the LEDs off.
|
||||||
@ -432,7 +432,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool switchOff() override;
|
bool switchOff() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn on the LED-device.
|
/// @brief Power-/turn on the LED-device.
|
||||||
@ -441,7 +441,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool powerOn() override;
|
bool powerOn() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn off the LED-device.
|
/// @brief Power-/turn off the LED-device.
|
||||||
@ -451,7 +451,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool powerOff() override;
|
bool powerOff() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Store the device's original state.
|
/// @brief Store the device's original state.
|
||||||
@ -460,7 +460,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
virtual bool storeState() override;
|
bool storeState() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Restore the device's original state.
|
/// @brief Restore the device's original state.
|
||||||
@ -470,7 +470,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool restoreState() override;
|
bool restoreState() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ private:
|
|||||||
|
|
||||||
void stopBlackTimeoutTimer();
|
void stopBlackTimeoutTimer();
|
||||||
|
|
||||||
QByteArray prepareStreamData();
|
QByteArray prepareStreamData() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
bool _switchOffOnBlack;
|
bool _switchOffOnBlack;
|
||||||
|
@ -34,7 +34,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -42,7 +42,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
int _tpm2_max;
|
int _tpm2_max;
|
||||||
int _tpm2ByteCount;
|
int _tpm2ByteCount;
|
||||||
|
@ -67,7 +67,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -75,7 +75,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Generate Art-Net communication header
|
/// @brief Generate Art-Net communication header
|
||||||
|
@ -112,7 +112,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -120,7 +120,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Generate E1.31 communication header
|
/// @brief Generate E1.31 communication header
|
||||||
|
@ -35,7 +35,7 @@ private:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -43,7 +43,7 @@ private:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
QList<int> _ids;
|
QList<int> _ids;
|
||||||
QByteArray _message;
|
QByteArray _message;
|
||||||
|
@ -34,7 +34,7 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -42,7 +42,7 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEDEVICEUDPRAW_H
|
#endif // LEDEVICEUDPRAW_H
|
||||||
|
@ -111,7 +111,7 @@ bool LedDeviceWled::init(const QJsonObject &deviceConfig)
|
|||||||
return isInitOK;
|
return isInitOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LedDeviceWled::initRestAPI(const QString &hostname, int port )
|
bool LedDeviceWled::initRestAPI(const QString &hostname, int port)
|
||||||
{
|
{
|
||||||
Debug(_log, "");
|
Debug(_log, "");
|
||||||
bool isInitOK = false;
|
bool isInitOK = false;
|
||||||
@ -128,7 +128,7 @@ bool LedDeviceWled::initRestAPI(const QString &hostname, int port )
|
|||||||
return isInitOK;
|
return isInitOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LedDeviceWled::getOnOffRequest (bool isOn ) const
|
QString LedDeviceWled::getOnOffRequest(bool isOn) const
|
||||||
{
|
{
|
||||||
QString state = isOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
QString state = isOn ? STATE_VALUE_TRUE : STATE_VALUE_FALSE;
|
||||||
return QString( "{\"%1\":%2}" ).arg( STATE_ON, state);
|
return QString( "{\"%1\":%2}" ).arg( STATE_ON, state);
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Destructor of the WLED-device
|
/// @brief Destructor of the WLED-device
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceWled() override;
|
~LedDeviceWled() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Constructs the WLED-device
|
/// @brief Constructs the WLED-device
|
||||||
@ -39,7 +39,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @return A JSON structure holding a list of devices found
|
/// @return A JSON structure holding a list of devices found
|
||||||
///
|
///
|
||||||
virtual QJsonObject discover() override;
|
QJsonObject discover() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the WLED device's resource properties
|
/// @brief Get the WLED device's resource properties
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
/// @param[in] params Parameters to query device
|
/// @param[in] params Parameters to query device
|
||||||
/// @return A JSON structure holding the device's properties
|
/// @return A JSON structure holding the device's properties
|
||||||
///
|
///
|
||||||
virtual QJsonObject getProperties(const QJsonObject& params) override;
|
QJsonObject getProperties(const QJsonObject& params) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Send an update to the WLED device to identify it.
|
/// @brief Send an update to the WLED device to identify it.
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @param[in] params Parameters to address device
|
/// @param[in] params Parameters to address device
|
||||||
///
|
///
|
||||||
virtual void identify(const QJsonObject& params) override;
|
void identify(const QJsonObject& params) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ protected:
|
|||||||
/// @param[in] deviceConfig the JSON device configuration
|
/// @param[in] deviceConfig the JSON device configuration
|
||||||
/// @return True, if success
|
/// @return True, if success
|
||||||
///
|
///
|
||||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
bool init(const QJsonObject &deviceConfig) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Writes the RGB-Color values to the LEDs.
|
/// @brief Writes the RGB-Color values to the LEDs.
|
||||||
@ -87,21 +87,21 @@ protected:
|
|||||||
/// @param[in] ledValues The RGB-color per LED
|
/// @param[in] ledValues The RGB-color per LED
|
||||||
/// @return Zero on success, else negative
|
/// @return Zero on success, else negative
|
||||||
///
|
///
|
||||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn on the WLED device.
|
/// @brief Power-/turn on the WLED device.
|
||||||
///
|
///
|
||||||
/// @brief Store the device's original state.
|
/// @brief Store the device's original state.
|
||||||
///
|
///
|
||||||
virtual bool powerOn() override;
|
bool powerOn() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Power-/turn off the WLED device.
|
/// @brief Power-/turn off the WLED device.
|
||||||
///
|
///
|
||||||
/// @return True if success
|
/// @return True if success
|
||||||
///
|
///
|
||||||
virtual bool powerOff() override;
|
bool powerOff() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user