on another note, does ANYONE know how I may be able to SAVE certain state information?
Eg: I'd like to be able to read a device's database, then it's delta. SAVE it's delta for future comparison..possibly in the Child itself??
I really don't want to have to create a file and save it there..
>> on another note, does ANYONE know how I may be able to SAVE certain state information?
First, if the data you want to store for a child device is the unique address or id that the parent uses to identify that child, you should use the device data: DEVICEDATA_PortChannel_Number_CONST 12 This is the standard. So, for a light switch that is controlled by an X10 controller, that device data is something like C8. If the light switch is part of an EIB system, it may be: 10.37.1. And so on.
Now assume you need some special device data for your light switch that is totally unique to Insteon, and is separate from or in addition to the standard id that the switch has (which is device data 12). Let's call this "Insteon Status". The usual way is to go into the device template (say generic on/off switch) and add a device data ("Insteon Status"), and set the 'set by device' to true. I don't recommend this, though, because the device templates for the child devices (like lights) are shared by all the interfaces (ZWave, EIB, etc.). You don't want to add this to the template because then it will be there for all non-Insteon light switches too. The best solution is to set the device data for devices in code without defining it in device template. For example, add a new record to Device Data "Insteon Status". The next time pluto2cpp generates the header pluto_main/Define_DeviceData.h there will be a #define for it. Then in your Insteon interface, call the Command_Impl::SetDeviceDataInDB, passing in the device id and the new #define for your device data. This will set it in the database, but this won't force it into the template, so it won't effect EIB and others. Each time the router reloads and you get your pointer to the Insteon Device (DeviceData_Impl) you can call: m_mapParameters_Find with your device data to get the value. That will get the value that was in the database when the router was last reloaded. This is best, since you probably are keeping a copy of the current value in memory. if you don't and need to do a database hit to retrieve the current value you already set, call m_pEvent->GetDeviceDataFromDatabase() (from Event_Impl.h)