Hello community
I would like to collaborate me with a problem:
I 'm implementing a SCADA system with a WSDL Web Service, and I have a Ctrl Manager that receive notifications of the Web Service each second, noting that I had to create a Ctrl Extension to connect and implement the necessary functions from the Web Service, I use the GSOAP Library to perform this action, suddenly the Ctrl Manager blocks without reason ( Pass to state 3) ,the time that this problem can occur is highly variable, it can occur in 3 minutes as 3 days.
I Hope that you can help with this problem
Thanks
Problem with Ctrl Manager
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Problem with Ctrl Manager
When a manager goes into "blocking" state, it means it did not call the Manager::dispatch() method since more than 30 seconds.
Obviously your code hinders the manager to reach the manager main loop.
Find out where the manager is when this happens (attach a debugger and interrupt it when it happens)
Obviously your code hinders the manager to reach the manager main loop.
Find out where the manager is when this happens (attach a debugger and interrupt it when it happens)
- jeissonsierrac
- Posts:62
- Joined: Wed Jun 03, 2015 9:37 pm
Re: Problem with Ctrl Manager
Hello Martin, thanks for your help, the manager blocks when I call the function of the Ctrl Manager, this function is GetNotifications and allows to recieve notifications from the web service, I create this function in the Ctrl Extension using GSOAP, this function has 2 parameters, ID of subscriber and the time which the function is open to receive the notification, I determine the time by 1 second. When i interrupt this part of the Mangaer, i Cant receive notifications, on the other hand, the manager doesn´t block, I attach the part of the code 

- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Problem with Ctrl Manager
To continue the managers main loop you could use implement 'WaitCond' class, which executes the time costly function in a separate thread.
- jeissonsierrac
- Posts:62
- Joined: Wed Jun 03, 2015 9:37 pm
Re: Problem with Ctrl Manager
¿Could you give me an example how I can use the waitCond? Because in the help doc I cant find an example, also it says that first I must declare a CtrlThread class
Thanks
Thanks
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Problem with Ctrl Manager
You could take a look at 'X-File 5 - The Extension' in the Lab section. It contains some information regarding this subject.
If the help of this document is not sufficient you could follow an API training or hire someone to help you with this.
If the help of this document is not sufficient you could follow an API training or hire someone to help you with this.