AdvancedHMI Software
General Category => Support Questions => Topic started by: AAN160 on December 27, 2015, 12:07:04 PM
-
Is there a way to access the subscription list for each driver? Currently I am just looking to get the modbus tcp sub list. I found it in modbus base but how can I access it at run time. I will most likely put it in a listbox at run time on a click event.
thanks
-
In ModbusBase.vb, go to about line 290 and look for this code:
Private SubscriptionList As New List(Of SubscriptionInfo)
and change the Private to Public
You can then see the list
for i=0 to ModbusTCPCom1.SubscriptionList.Count-1
Console.WriteLine(ModbusTCPCom1.SubscriptionList(i).Address.Address)
Next
-
Thank for the reply archie, but I have already tried that. It says "Subscriptionlist cannot expose type modbusbase.subscriptioninfo in name space advancedhmidrivers through class modbusbase".
-
Go 2 more lines down and make this Public also:
Private Structure SubscriptionInfo