To save custom data, that's more than a single variable, you can use the blob data type. This is basically custom data of any size you want, containing any format you want. The scope3 source code uses a blob data type to store information. In this case it sending the waveform data to the GUI. In your case you may want to do it the other way round, send the data from the GUI.