<p dir="ltr"></p>
<p dir="ltr"><br>
Hi, </p>
<p dir="ltr"></p>
<p dir="ltr">I didn’t had much spare time in the last weeks, but I kept thinking about the idea of representing repetitive dives on libdivecomputer<br>
</p>
<p dir="ltr"><br>
Initially I wrote a simple spreadsheets to summarize the pros and cons of </p>
<p dir="ltr"> possible </p>
<p dir="ltr">approaches</p>
<p dir="ltr">. Colors represents the “severity” of a drawback or of an impact and are my guesses. </p>
<p dir="ltr">We may use it to confront ideas.</p>
<p dir="ltr">Generally speaking I think that the API </p>
<p dir="ltr">should really</p>
<p dir="ltr"> include a way to pass free-form data to the </p>
<p dir="ltr">app, while right now everything is codified in the "least common multiple" of all the DC capabilities. </p>
<p dir="ltr">It may seems a weird thing to do, but consider that</p>
<p dir="ltr"> each dc may have specific information which the </p>
<p dir="ltr">user (who chooses and bought that DC)</p>
<p dir="ltr"> may want to be represented on the profile.</p>
<p dir="ltr">I am thinking about alarms and statistics, and also the whole “subdive” stuff. </p>
<p dir="ltr"><br>
It could be a good idea to introduce some kind of USER_EVENT (or USER_SAMPLE) with name, type (int, float, bool, string) and value fields. </p>
<p dir="ltr"></p>
<p dir="ltr">Parsers should use the USER_EVENT to report info which the app may choose to skip, draw as it is or elaborate.<br>
</p>
<p dir="ltr"><br>
Then we may define policies on such events. Such that 'alarms name shall start with "AL_'" or similar to hint the apps.</p>
<p dir="ltr"><br>
This would be, in my opinion, a </p>
<p dir="ltr">progressive and </p>
<p dir="ltr">low-impact</p>
<p dir="ltr"> way</p>
<p dir="ltr"> to improve flexibility of the API.</p>
<p dir="ltr"></p>
<p dir="ltr">Referring to the attached table, such change would allow for a simple a straight forward implementation of the workaround</p>
<p dir="ltr"> for the drawbacks of the “Merge Subdives” approach or for the whole “report session and dives in an unstructured way” stuff. </p>
<p dir="ltr"> </p>
<p dir="ltr">Let me know what do you think about it.</p>
<p dir="ltr">G</p>