Hello Kano,
the comment wasn't so silly, the major objective was related to the identification of a device in cgminer, so it also counts if the ID's are the same after a restart of cgminer. Means for GPU's it would depend if the ATI Lib provides the GPU's in the same order. I will just assume the lib would provide the GPU's in the same order, at least as long there is no additional GPU added/removed.
Another issue I'm facing is the mapping of ID's provided from cgminer between different API command. For "DEV" and "DEVDETAILS" cgminer provides an ID, but once with a detail type (BAS,BFL,ICA,AVA,....) and once with a generic type (GPU,PGA,ASC,....). Are the ID generated for each group separately or are they related. As example, I run an instance of cgminer with 2 ICA, 2 AVA and 2 BAS devices. If the ID's are related, I would expect following result:
DEV command:
Name=PGA,ID=0
Name=PGA,ID=1
Name=ASC,ID=2
Name=ASC,ID=3
Name=ASC,ID=4
Name=ASC,ID=5
DEVDETAILS command:
Name=ICA,ID=0
Name=ICA,ID=1
Name=AVA,ID=2
Name=AVA,ID=3
Name=BAS,ID=4
Name=BAS,ID=5
By this it would be easy to generate a mapping between these devices, as the ID is program wide unique. But if the ID is just unique for each group, I would expect following result.
DEV command:
Name=PGA,ID=0
Name=PGA,ID=1
Name=ASC,ID=0
Name=ASC,ID=1
Name=ASC,ID=2
Name=ASC,ID=3
DEVDETAILS command:
Name=ICA,ID=0
Name=ICA,ID=1
Name=AVA,ID=0
Name=AVA,ID=1
Name=BAS,ID=0
Name=BAS,ID=1
In this case I could just assume that I have to rely on the order of the devices in the Json. Unfortunately I cant test the case (and also don't have the appropiate C++ skills to analyze the source), I hope you can help me and explain how cgminer is handling the ID's, so that I can do the right mapping.
Many thanks in advance!