Hi Dojo,
I'm working on a connector and it currently executes a protocol.SetParameterIndexByKey() to a cell in a table. The table successfully updates and the cell is updated, but the cell I am writing to belongs to a read/write column with @snmpsetandget but no SNMP set/get is done. Directly writing to the cell via clicking the togglebutton for it does indeed cause the SNMP set and get actions to be executed. Both actions individually work but I expect to trigger the SNMPSetAndGet with SetParameterIndexByKey(). Perhaps I am going about it wrong.
Do SetParameter methods trigger SNMPSetandGet if the read parameter is being set? Or if it doesn't, is there a better way to go about causing a set and get to happen from QAction?
Hi Joshua,
The logic from 'snmpSetAndGet' will only be triggered by using the 'write' parameter from the table. If you set the value from the QAction, I'm assuming you are writing to the 'read' parameter instead. As a result this will not trigger the SNMP set.
If you need to trigger the logic from the QAction it might be good to make use of a normal write param with 'options="snmpSet" ' and combining it with a parameter that holds the instance. You can find an example here. This way you should be able to set the instance and then the value on this write parameter instead. This should then execute the set.
NOTE: Even though the value will immediately be set in the table, this will not automatically do a get after the set, so you would need to trigger a way to repoll the value afterwards if you want to be sure the value is applied on the actual device
Hi Robin,
Thank you for the response, I will follow that example and do a new separate parameter for snmpset and also for instance along with the get.