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.
|
|
|
|
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
|
|
|
|
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?
|
|
|
|
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
|
|
|
|
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);
|
|
|
|
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
|
|
|
|
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.