How do I create and recall presets?

Hey,
I have successfully created an user interface to control bitwig. Now I'm wondering how I can create presets inside open stage control, which

  • a) get and save the values of my widgets and
  • b) send those values to the corresponding widgets and addresses when I want to recall a certain preset.
    Is that possible and how would I go about creating such a system?

Thank you

Best

Benni