Menu

#13 How to keep TCPMasterConnection open when method s closed

v1.1
open
nobody
None
5
2011-03-17
2011-03-17
No

Hi All,

I have a Class where there is a method for creating a swing GUI which in turns pass some data (ip address, port, etc) to a method where the TCPMasterConnection object is used to establish the connection with a Slave.

The Slave I am connecting to by using this java application needs the connection to remain open after setting up a holding register its initialization value if I want to control other devices. The proble is that once I finish using the method the connection drops and then I am unable to control the other devices.

Is there anyway to create an instance of the TCPMasterConnection that could help me out to overcome this problem? I found something interesting about singletons but it is not easy for me to understand how it works and if it could me out to solve the problem.

Regards,

Carlos Enrique Liendo

Discussion


Log in to post a comment.

MongoDB Logo MongoDB