Hello,
I would recommend you the following chapters containing general information concerning this programming aspect:
Integrating with the device
Implementing a Device Interface
The documentation explains, for example, that a value like data_GUI could be represented by a Device Property.
Also here in the Ask forum you can find different threads addressing the question how to exchange data between GUI and device. Possibly, one the threads matches your application case.
I hope it helps you further.
Best regards
Paul Banach