to complement addPublicVariableEventHandler.
removePublicVariableEventHandler "PVname"
this way it would be possible to use unique PVs to communicate with clients from the server, for increased security.
to complement addPublicVariableEventHandler.
removePublicVariableEventHandler "PVname"
this way it would be possible to use unique PVs to communicate with clients from the server, for increased security.
can you not do
func = compilefinal "code";
"var" addpublicvariableeventhandler func?
EDIT yep, you can't, just checked, the code can be overwritten
yea 'add'PublicVariableEventhandler isn't really adding a PV, its more a 'set' command. You can overwrite/remove eventhandler with
"MyEH" addPublicVariableEventhandler {};
Probably is it still in the cache of the client/server but who knows.
Maybe is it better to request a 'setPublicVariableEventhandler' that can't be overwriten like a compileFinal function.
Please add this command, to remove it. If not possible to prevent re-writing of the code, then we need the ability to simply remove it after use.
#Bump
A lot of time is gone since reporting this important security issue, nothing done, please add this in further versions!
Was thinking about this again today. If BIS engine code or internal scripts makes use of this command there may be a reason to not (yet) provide clients the ability.