Added the possibility to set effect arguments over json

Former-commit-id: 4bc2920c04853e549c712ec70492371b14d20877
This commit is contained in:
johan
2013-12-01 14:09:01 +01:00
parent ae148afba9
commit 515ae3e8c0
12 changed files with 95 additions and 30 deletions

View File

@@ -15,6 +15,9 @@
#include <hyperion/LedDevice.h>
#include <hyperion/PriorityMuxer.h>
// Effect engine includes
#include <effectengine/EffectDefinition.h>
// Forward class declaration
class HsvTransform;
class ColorTransform;
@@ -102,7 +105,7 @@ public:
/// Get the list of available effects
/// @return The list of available effects
std::list<std::string> getEffects() const;
const std::list<EffectDefinition> &getEffects() const;
public slots:
///
@@ -153,6 +156,12 @@ public slots:
/// @param timout The timeout of the effect (after the timout, the effect will be cleared)
int setEffect(const std::string & effectName, int priority, int timeout = -1);
/// Run the specified effect on the given priority channel and optionally specify a timeout
/// @param effectName Name of the effec to run
/// @param priority The priority channel of the effect
/// @param timout The timeout of the effect (after the timout, the effect will be cleared)
int setEffect(const std::string & effectName, const Json::Value & args, int priority, int timeout = -1);
public:
static LedDevice * createDevice(const Json::Value & deviceConfig);
static ColorOrder createColorOrder(const Json::Value & deviceConfig);