Callback in WFM

Implementation issues for callbacks

Purpose

Get access to WFM and SCR functionality in UI code.
Read and write WFM scope variables.
Call WFM defined functions.
Use SCR agents.

Restrictions

Ensure proper return of original UI() call.
Check for (or block ?) reentrancy.
Don't use WFM if it can be done in UI().
Keep overhead (e.g. serial connection) in mind.

Implementation options


Syntactical issues

First approach WFM(wfm-code) is bad because it will lead to WFM(SCR(...)). Having WFM() is a good idea, but we also need SCR() to make it transparent.