logo

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Vladimir Gonchar  
#1 Posted : Tuesday, February 24, 2015 1:41:40 PM(UTC)
Vladimir Gonchar

Rank: Member

Joined: 12/1/2014(UTC)
Posts: 19

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

How to set timeout on IUaConnection::GetEndpoint?

Thank you.





Offline Patrick Griffiths  
#2 Posted : Tuesday, February 24, 2015 1:55:04 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Hi Vladimir,

There are two overloads of GetEndpoints. One of them accepts a networkTimeout parameter.

HTH,
Patrick
Offline Vladimir Gonchar  
#3 Posted : Tuesday, February 24, 2015 2:28:40 PM(UTC)
Vladimir Gonchar

Rank: Member

Joined: 12/1/2014(UTC)
Posts: 19

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Matrikon OPC UA SDK API Reference Manual (1.0.0.25082) shows only one function:


static bool Mtk::Ua::ClientSDK::IUaConnection::GetEndpoints ( const wchar_t * url,
const Mtk::Ua::Stack::IUaStringArray & localeIds,
const Mtk::Ua::Stack::IUaStringArray & profileUris,
Mtk::Ua::Stack::IEndpointDescriptionArray & foundEndpoints,
Mtk::General::IResult & result
)

Am I missing something?
Offline Patrick Griffiths  
#4 Posted : Tuesday, February 24, 2015 2:37:47 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Vladimir,

Can you check the IUaConnection.h header to see if the other overload is there?

Thanks,
Patrick
Offline Vladimir Gonchar  
#5 Posted : Tuesday, February 24, 2015 2:53:56 PM(UTC)
Vladimir Gonchar

Rank: Member

Joined: 12/1/2014(UTC)
Posts: 19

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Only one function is available in IUaConnection.h:

static bool GetEndpoints(const wchar_t* url, const Mtk::Ua::Stack::IUaStringArray& localeIds,
const Mtk::Ua::Stack::IUaStringArray& profileUris,
Mtk::Ua::Stack::IEndpointDescriptionArray& foundEndpoints,
Mtk::General::IResult& result);
Offline Patrick Griffiths  
#6 Posted : Tuesday, February 24, 2015 3:59:25 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Ok, I had to go back and check the released version. Unfortunately, the overload taking a networkTimeout is a new addition. It'll be in the next release. The call does have a default timeout, but it's quite long. As a workaround you could execute the GetEndpoints() in it's own thread and do a timed wait. If it doesn't return within the timeout interval just let the initiating thread move on and set a flag telling the GetEndpoints() thread to ignore any results and exit when GetEndpoints() finally does return. Whatever you do, don't kill the thread. That's pure evil.

HTH,
Patrick
Offline Vladimir Gonchar  
#7 Posted : Tuesday, February 24, 2015 4:12:24 PM(UTC)
Vladimir Gonchar

Rank: Member

Joined: 12/1/2014(UTC)
Posts: 19

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Already did that way. :)

Thank you very much for your help.
Please let me know then the new(or beta) version will be released.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Matrikon Subscribe  |   Matrikon Unsubscribe  |   Global Unsubscribe  |   Privacy Statement  |   Do Not Sell My Personal Information   |   Cookie Notice