hyperion.ng
Public Member Functions | List of all members
JsonConnection Class Reference

Connection class to setup an connection to the hyperion server and execute commands. More...

#include <JsonConnection.h>

Public Member Functions

 JsonConnection (const QString &address, bool printJson)
 Constructor. More...
 
 ~JsonConnection ()
 Destructor.
 
void setColor (std::vector< QColor > color, int priority, int duration)
 Set all leds to the specified color. More...
 
void setImage (QImage &image, int priority, int duration)
 Set the leds according to the given image (assume the image is stretched to the display size) More...
 
void setEffect (const QString &effectName, const QString &effectArgs, int priority, int duration)
 Start the given effect. More...
 
void createEffect (const QString &effectName, const QString &effectScript, const QString &effectArgs)
 Create a effect configuration file (.json) More...
 
void deleteEffect (const QString &effectName)
 Delete a effect configuration file (.json) More...
 
QString getServerInfo ()
 Retrieve a list of all occupied priority channels. More...
 
QString getSysInfo ()
 Retrieve system info. More...
 
void clear (int priority)
 Clear the given priority channel. More...
 
void clearAll ()
 Clear all priority channels.
 
void setComponentState (const QString &component, const bool state)
 Enable/Disable components during runtime. More...
 
void setSource (int priority)
 Set current active priority channel and deactivate auto source switching. More...
 
void setSourceAutoSelect ()
 Enables auto source, if disabled prio by manual selecting input source.
 
QString getConfig (std::string type)
 Print the current loaded Hyperion configuration file.
 
void setConfig (const QString &jsonString)
 Write JSON Value(s) to the actual loaded configuration file. More...
 
void setAdjustment (const QString &adjustmentId, const QColor &redAdjustment, const QColor &greenAdjustment, const QColor &blueAdjustment, const QColor &cyanAdjustment, const QColor &magentaAdjustment, const QColor &yellowAdjustment, const QColor &blackAdjustment, const QColor &whiteAdjustment, double *gammaR, double *gammaG, double *gammaB, int *backlightThreshold, int *backlightColored, int *brightness, int *brightnessC)
 Set the color adjustment of the leds. More...
 
void setLedMapping (QString mappingType)
 sets the image to leds mapping type More...
 
void setVideoMode (QString videoMode)
 

Detailed Description

Connection class to setup an connection to the hyperion server and execute commands.

Constructor & Destructor Documentation

§ JsonConnection()

JsonConnection::JsonConnection ( const QString &  address,
bool  printJson 
)

Constructor.

Parameters
addressThe address of the Hyperion server (for example "192.168.0.32:19444)
printJsonBoolean indicating if the sent and received json is written to stdout

Member Function Documentation

§ clear()

void JsonConnection::clear ( int  priority)

Clear the given priority channel.

Parameters
priorityThe priority

§ createEffect()

void JsonConnection::createEffect ( const QString &  effectName,
const QString &  effectScript,
const QString &  effectArgs 
)

Create a effect configuration file (.json)

Parameters
effectNameThe name of the effect
effectScriptThe name of the Python effect file
effectArgsThe arguments of the effect

§ deleteEffect()

void JsonConnection::deleteEffect ( const QString &  effectName)

Delete a effect configuration file (.json)

Parameters
effectNameThe name of the effect

§ getServerInfo()

QString JsonConnection::getServerInfo ( )

Retrieve a list of all occupied priority channels.

Returns
String with the server info

§ getSysInfo()

QString JsonConnection::getSysInfo ( )

Retrieve system info.

Returns
String with the sys info

§ setAdjustment()

void JsonConnection::setAdjustment ( const QString &  adjustmentId,
const QColor &  redAdjustment,
const QColor &  greenAdjustment,
const QColor &  blueAdjustment,
const QColor &  cyanAdjustment,
const QColor &  magentaAdjustment,
const QColor &  yellowAdjustment,
const QColor &  blackAdjustment,
const QColor &  whiteAdjustment,
double *  gammaR,
double *  gammaG,
double *  gammaB,
int *  backlightThreshold,
int *  backlightColored,
int *  brightness,
int *  brightnessC 
)

Set the color adjustment of the leds.

Note
Note that providing a NULL will leave the settings on the server unchanged
Parameters
adjustmentIdThe identifier of the correction to set
redAdjustmentThe red channel adjustment values
greenAdjustmentThe green channel adjustment values
blueAdjustmentThe blue channel adjustment values
gammaThe gamma value
backlightThresholdThe threshold aka backlight
brightnessThe threshold aka upper brightness limit

§ setColor()

void JsonConnection::setColor ( std::vector< QColor >  color,
int  priority,
int  duration 
)

Set all leds to the specified color.

Parameters
colorThe color
priorityThe priority
durationThe duration in milliseconds

§ setComponentState()

void JsonConnection::setComponentState ( const QString &  component,
const bool  state 
)

Enable/Disable components during runtime.

Parameters
componentThe component [SMOOTHING, BLACKBORDER, FORWARDER, UDPLISTENER, BOBLIGHT_SERVER, GRABBER]
stateThe state of the component [true | false]

§ setConfig()

void JsonConnection::setConfig ( const QString &  jsonString)

Write JSON Value(s) to the actual loaded configuration file.

Parameters
jsonStringThe JSON String(s) to write
createSpecifies whether the nonexistent json string to be created

§ setEffect()

void JsonConnection::setEffect ( const QString &  effectName,
const QString &  effectArgs,
int  priority,
int  duration 
)

Start the given effect.

Parameters
effectNameThe name of the effect
effectArgsThe arguments to use instead of the default ones
priorityThe priority
durationThe duration in milliseconds

§ setImage()

void JsonConnection::setImage ( QImage &  image,
int  priority,
int  duration 
)

Set the leds according to the given image (assume the image is stretched to the display size)

Parameters
imageThe image
priorityThe priority
durationThe duration in milliseconds

§ setLedMapping()

void JsonConnection::setLedMapping ( QString  mappingType)

sets the image to leds mapping type

Parameters
mappingTypeled mapping type

§ setSource()

void JsonConnection::setSource ( int  priority)

Set current active priority channel and deactivate auto source switching.

Parameters
priorityThe priority

The documentation for this class was generated from the following files: