Background: I am writing an interface device to support the Phidgets Interface Kit. Primary concern is responding to Analogue sensor changes, communicating with the device using their web service interface. I am using the generic sensor devices that already exist. The code for the device is quite straightforward as the API is fairly comprehensive and maps well to a LMCE device.

Problem: I would like to add an optional property to the sensors which is 'tolerance'. This would basically limit the value changes that would trigger the sending of the "sensor tripped" event that I am sending.

This means that I need to iterate the child devices that have been setup, retrieve the property value if it is set and call an API before I "attach" the device.

It seems that child devices are attached dynamically to their parent device fairly late in the startup lifecycle for a device, which means I am struggling to find somewhere where I can put the above code.

I have tried the code in ; getConfig() connect() postConnect() [ which seems to get called before connect from initial testing ]

Perhaps I need to implement a certain command in processCommandsForChild which occurs when it it created/attached to parent?? This would be fine, expect I am unaware of what command.

Just hoping someone might have some insight of ideas i have not thought of. I assumed there would be other interface devices that do something similar but from my investigations I can't find anything.

My next steps, assuming someone doesn't point me a different way, are;* Look through the Command_Impl.cpp code more thoroughly as it seems to control the sequence of a lot of the startup calls* Look through code for some other devices that might do something similar (currently looked at CM11A, EIB, gc100 )* Investigate handling the child commands that might be called??

Feel free to provide comments.

Darren

ps: Still looking for direction on how I will add the device template that I have developed (and changed ones) back to the build as per a previous post.....