Hi guys,
I would like to know how can I use the [Connection State] parameter (parameter ID 65045) in the [Connection Info] table on the GENERAL PARAMETERS page of the element inside the protocol to trigger an action when the status is "Disconnected".
Thanks in advance,
Hi,
That is possible by triggering with a QAction on that parameter id with the row true attribute: (tested with DataMiner version 10.1.6.0)
QAction id="65045" encoding="csharp" triggers="65045" row="true"
In that QAction to get the row that triggered it by calling:
string rowKey = protocol.RowKey();
Use that rowKey to know the actual value of the connection state:
string connState = Convert.ToString(protocol.GetParameterIndexByKey(65034, rowKey, 4));
That connState can have the following values:
0 = Responding
1 = Not Responding
2 = Undefined
3 = Connected
4 = Disconnected
Value "4" will probably be the one that you'll be interested in as that stands for "Disconnected".
Thank you so much!!