Hi All.
I have a problem when modifying the driver.
Let's assume we have two parameters.
- param1 (takes values from 1 to 100), read from the device via snmp
- param2 (takes values 0, 1), read from the device via snmp
I would like param1 to take negative values when param2 = 1 (param1 = from -1 to -100) and positive values when param2 = 0 (param1 = from 1 to 100)
It seems like a simple thing, but I can't do it by trigger (change) - action on the param1 parameter and multiply by -1 with param2 = 1 because it will create an infinite loop
I can't do it using QAction for param1 as a trigger, because protocol.SetParameter on param1, because it also loops.
Thanks for any reply 🙂
Br.
Jarek
Hi Jaroslaw,
I remember having issues with infinite loops as well when I first started working on driver development. What you need to do in that case is create a write parameter with setter="true" and do your sets on that parameter. If you plan on using write parameter only for your logic and don't want to show it to user you can just set RTDisplay to false.
Cheers