Reading data from Pictory
-
- Posts: 11
- Joined: 07 Apr 2020, 16:34
Instead of using "piTest -r Input_1", I was wondering if there is a simple c code that can also get this value from my pictory?
Yes, have a look at the source code of piTest and the Tutorial 13 – PiTest source code.
-
- Posts: 11
- Joined: 07 Apr 2020, 16:34
Hi Dirk, thank you so much for your help as always.
In this case, I need a switch to work like this. Is there a code where I can just read the data from Pictory?
In this case, I need a switch to work like this. Is there a code where I can just read the data from Pictory?
Hi.The piCtory basically saves a RevPi device configuration as a config.rsc file which is actually a JSON file located at /var/www/pictory/projects/_config.rsc.
The name for inputs/outputs are all stored in this file.A JSON parser is needed to read this data. The kernel module piControl at startup parses this JSON file to load the configuration and variable names.
Sample tree view of config.rsc file: Regards,
Amar
The name for inputs/outputs are all stored in this file.A JSON parser is needed to read this data. The kernel module piControl at startup parses this JSON file to load the configuration and variable names.
Sample tree view of config.rsc file: Regards,
Amar
KUNBUS
-
- Posts: 11
- Joined: 07 Apr 2020, 16:34
Hello, thank you very much for the help.. I have tried some codes but I always have the same error. Does anyone know what is happening?
Error: piControlGetVariableInfo() returned 14 for variable ' '
Error: piControlGetVariableInfo() returned 14 for variable ' '
Hi melissamariab, The error means that the variable could not be found.
Have a look at the implementation of "piControl" in the Git Hub repository.
Have a look at the implementation of "piControl" in the Git Hub repository.