Re: [Libphidget-devel] serial numbers
Status: Alpha
Brought to you by:
jstrohm
|
From: Jack S. <js...@ja...> - 2002-09-12 12:46:43
|
On Thu, 2002-09-12 at 02:18, Vadim Tkachenko wrote: > According to fit...@ph...: > > > > Just a thought: why does the serial number have to be a number, no > > > matter how coded? Give you an example: az93c12 - what's wrong with this > > > number? > > > > No good reason, it just happened this way. The first piece of working > > sample code I got my hands on did it this way, so that's what I do. > > > > > What's the primary purpose of the serial number? Let me guess: unique > > > identifier? > > > > Yup. > > Then, the string serves as good as the number, though you can a) add more > significant information to it (like, the release variations, or specific > options included into an instance of a phidget), b) extend the address space > (though this is rather theoretical at this moment). > > How much of the existing code will break if the serial happens to be a > malformed number? The code won't really break, but you won't have a valid unique Identify and so might generate an exception when looking for the device (not found because it couldn't locate the device). Converting serial number to a string isn't that difficult, but I don't think it is necessary right now. |