StreamDevice
StreamDevice copied to clipboard
Support setting local variables through info items
The % redirection parameter often breaks the layering, as record names are required within the protocol file.
Redirection targets can be set through protocol parameters, but - especially for protocols that return a whole bunch of values - this can make database links completely unreadable.
Idea: Allow setting local StreamDevice variables (scope: protocol) through info items. A record in the database could do something like
info(stream:varLINK1, "myotherrecord.A")
info(stream:varSTATUS, "mystatusrecord")
and the protocol could
out "VAL?";
in "%("$LINK1")f,%("$STATUS")i";
Advantage: all record names stay in the database; the protocol file can use redirections and still be application agnostic.
I am willing to work on this, if we can agree on the general idea and interface.