XML format change
Jef Driesen
jefdriesen at telenet.be
Mon Dec 24 02:12:26 PST 2012
On 23-12-12 19:06, Linus Torvalds wrote:
> - I really think you should index the dive computer nickname not by
> "deviceid", but by the <model,deviceid> tuple. I'm not at all
> convinced that the deviceid is unique across models: I think that
> libdivecomputer tends to use something like a serial number, and who
> knows if two different models might not have overlapping serial
> numbers.
>
> So the nickname should be something like
>
> <divecomputer model='Suunto Vyper Air' deviceid='abc' nickname='my
> computer' />
>
> which would also (I think) be nice documentation for the user in case
> you end up deleting all the dives that actually use that computer...
Yes, libdivecomputer provides both the model number and serial number. There is
indeed no guarantee that the serial number is unique across different models. So
you should definitely be using both.
Actually you should also take into account the libdivecomputer backend type,
because just the model number and serial number tuple might overlap with those
from other backends. But if you encode the model as the full device name (e.g.
Suunto Vyper Air) and not just the model number, then you are already doing that
of course.
Jef
More information about the subsurface
mailing list