Warning, /sdk/cutehmi/extensions/CuteHMI/Modbus.4/dev/design-choices.md is written in an unsupported language. File is not indexed.
0001 ## AbstractDevice API 0002 0003 AbstractDevice uses JSON objects for requests and replies. 0004 0005 Using JSON instead of full blown objects has an advantage for an API to be light-weight, flexible and it fits naturally into 0006 QML/JavaScript. The drawbacks may seem to be a performance overhead, but JSON objects are implicitly shared in Qt, so it should not 0007 be a problem in most cases. Another problem is type safety, but this can be compensated with validation and sanitization. 0008 JSON-based API also offers interesting possibilities in terms of forwarding it to web REST API. 0009 0010 Resolution: positive. 0011 0012 ## Request id 0013 0014 AbstractDevice uses strings generated by QUuid class for request ids. 0015 0016 The rationale was that requests may be stored in database or logs and that multiple instances of application may share these data 0017 stores. The request could be further associated with action of a particular user and in such case id could act as a globally unique 0018 key. 0019 0020 The cost is of course performance. It seems that simple static integer counter would do the job. 0021 0022 Resolution: doubtful. 0023