Alright, I have completed implementing the RegisterVUIDs and SetDVAL methods, though I am not sure what the best way to describe the protocol is, so here's my take at it with words:
In order to receive notifications of the current values of things, each user interface session must register the VINT Unique ID numbers (VUIDs) of each Value Interpreter they are interested in getting the current value of and any subsequent updates for the duration of the Websockets connection (session.) This is accomplished by sending one or more RegisterVUIDs JSON objects to the Websockets connection, with an array of integers as the value for the RegisterVUIDs object. For example:
{"RegisterVUIDs":[1,5,9]}
Decider will acknowledge this message by registering the current session as being interested in the given VINT values, and will send the current values and Device Status values of each VINT that was registered as JSON objects. Note: There is a stub function in Decider that will check the permission of the current user (once this feature is implemented) which could inhibit one or more VINTs from returning its status.
{"VintValues":[{"VUID":1,"DeviceStatus":1,"Value":1000}]}
{"VintValues":[{"VUID":5,"DeviceStatus":1,"Value":1000}]}
{"VintValues":[{"VUID":9,"DeviceStatus":1,"Value":1000}]}
Any subsequent updates to registered VINT values will be sent to the client as JSON objects in this fashion. If the device that supplies the VINT value goes offline (Decider loses communication with the Venturii Module through which that device is communicating, or the Venturii Module itself loses communication with the physical device) the Device Status will change from 1 to 0 (offline) and the value should be considered at best "Last Known Value" or more accurately "Indeterminate" . It will be up to the user interface to decorate the representation of this data source in a manner suitably indicating its loss of communication.
SetDVAL works in a similar manner: If the client (usually at the direction of the user) wishes to change the value of any Value Interpreter, a SetDVAL JSON object must be created and sent to Decider. Multiple VINTs can have their desired values set in the same command, the SetDVAL method must contain an array of at least one object, and that object must be comprised of two members: A vuid member whose value is an integer representing the VUID number of the Value Interpreter to change the Desired Value of, and a value member whose value may be a double, a float, an integer or a string representation of any numeric format, and represents the value the user wishes to set this particular Value Interpreter to. For example:
{"SetDVAL":[{"vuid":1,"value":"1000"}]}
Decider will attempt to effect this change, but will only send a VintValues object if the value of the VINT actually changed from it's previous value.