Problem with Ctrl Manager

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
6 posts • Page 1 of 1
jeissonsierrac
Posts:62
Joined: Wed Jun 03, 2015 9:37 pm

Problem with Ctrl Manager

Post by jeissonsierrac »

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

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Problem with Ctrl Manager

Post by mkoller »

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)

jeissonsierrac
Posts:62
Joined: Wed Jun 03, 2015 9:37 pm

Re: Problem with Ctrl Manager

Post by jeissonsierrac »

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 Image
Attachments
CodeCtrlManager.png

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Problem with Ctrl Manager

Post by Gertjan van Schijndel »

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

Post by jeissonsierrac »

¿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 :)

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Problem with Ctrl Manager

Post by Gertjan van Schijndel »

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.

6 posts • Page 1 of 1