|
hyperion.ng
|
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) |
Connection class to setup an connection to the hyperion server and execute commands.
| JsonConnection::JsonConnection | ( | const QString & | address, |
| bool | printJson | ||
| ) |
Constructor.
| address | The address of the Hyperion server (for example "192.168.0.32:19444) |
| printJson | Boolean indicating if the sent and received json is written to stdout |
| void JsonConnection::clear | ( | int | priority | ) |
Clear the given priority channel.
| priority | The priority |
| void JsonConnection::createEffect | ( | const QString & | effectName, |
| const QString & | effectScript, | ||
| const QString & | effectArgs | ||
| ) |
Create a effect configuration file (.json)
| effectName | The name of the effect |
| effectScript | The name of the Python effect file |
| effectArgs | The arguments of the effect |
| void JsonConnection::deleteEffect | ( | const QString & | effectName | ) |
Delete a effect configuration file (.json)
| effectName | The name of the effect |
| QString JsonConnection::getServerInfo | ( | ) |
Retrieve a list of all occupied priority channels.
| QString JsonConnection::getSysInfo | ( | ) |
Retrieve system info.
| 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.
| adjustmentId | The identifier of the correction to set |
| redAdjustment | The red channel adjustment values |
| greenAdjustment | The green channel adjustment values |
| blueAdjustment | The blue channel adjustment values |
| gamma | The gamma value |
| backlightThreshold | The threshold aka backlight |
| brightness | The threshold aka upper brightness limit |
| void JsonConnection::setColor | ( | std::vector< QColor > | color, |
| int | priority, | ||
| int | duration | ||
| ) |
Set all leds to the specified color.
| color | The color |
| priority | The priority |
| duration | The duration in milliseconds |
| void JsonConnection::setComponentState | ( | const QString & | component, |
| const bool | state | ||
| ) |
Enable/Disable components during runtime.
| component | The component [SMOOTHING, BLACKBORDER, FORWARDER, UDPLISTENER, BOBLIGHT_SERVER, GRABBER] |
| state | The state of the component [true | false] |
| void JsonConnection::setConfig | ( | const QString & | jsonString | ) |
Write JSON Value(s) to the actual loaded configuration file.
| jsonString | The JSON String(s) to write |
| create | Specifies whether the nonexistent json string to be created |
| void JsonConnection::setEffect | ( | const QString & | effectName, |
| const QString & | effectArgs, | ||
| int | priority, | ||
| int | duration | ||
| ) |
Start the given effect.
| effectName | The name of the effect |
| effectArgs | The arguments to use instead of the default ones |
| priority | The priority |
| duration | The duration in milliseconds |
| 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)
| image | The image |
| priority | The priority |
| duration | The duration in milliseconds |
| void JsonConnection::setLedMapping | ( | QString | mappingType | ) |
sets the image to leds mapping type
| mappingType | led mapping type |
| void JsonConnection::setSource | ( | int | priority | ) |
Set current active priority channel and deactivate auto source switching.
| priority | The priority |
1.8.12