Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- convert eventargs in delphi
convert eventargs in delphi
I actually worked on this earlier when we discussed it. And, unfortunately, it turned out that I was wrong - it looks like that is not possible to do it with the current QuickOPC version.
The reason for it is minor, but critical: The serialization/deserialization works on "streams". The stream interfaces are properly exposed to COM from .NET, but the actual concrete stream objects have no default constructors and therefore cannot be created from COM.
It would be relatively easy to add COM-exposed .NET objects to QuickOPC that would enable the creation of streams from COM. But it would be an API/feature change that we never do into a released version - only into a new version.
So, if you are interested and can wait, I can put it into the plan and we will expose this functionality in QuickOPC 2018.2 or 2018.3. But currently, it seems impossible.
Regards
Please Log in or Create an account to join the conversation.
You write me that if i have problem to Serialize/unserialize eventargs You help me to do It. Can You make a Simple example in Delphi?
Thanks
Please Log in or Create an account to join the conversation.
Moreover, I now understand what you meant by mentioning TServerEventDispatch. It appears to be a memory leak caused by Delphi, though.
I wrote down what I have found so far, and the recommended approaches - including sample code. It is in the Knowledge Base article here: kb.opclabs.com/Reference_counting_in_Delphi .
Best regards
Please Log in or Create an account to join the conversation.
Problem now that _EasyUaClient don t have OnDataChangeNotification event..... So i can t riceive data from subscription.... Any idea?
Please Log in or Create an account to join the conversation.
Can you, in the meantime, try the following?
1. Replace "write: TEasyUAClient;" by "write: _EasyUAClient;", AND
2. Remove "write.Free; write := nil;".
Doesn't that get rid of the memory leak?
Best regards
Please Log in or Create an account to join the conversation.
Install fastmm in Delphi debug show Memory leak
Create new form
create button in a form
Onclick
Insert
var
write: TEasyUAClient;
begin
write := TEasyUAClient.Create(nil);
try
try
write.WriteValue('opc.tcp://127.0.0.1/49320/,NodeId,Value);
except
end;
finally
write.Free;
write := nil;
end;
Close app and You have memoryleak
If You Press 100 times button u have 100x memoryleak
Nodeid = insert Ur nodeid
Value = insert Ur value
Please Log in or Create an account to join the conversation.
Maybe you can send a piece of code that shows what you have in mind and how you are using it.
Best regards
Please Log in or Create an account to join the conversation.
When I create a TEasyUAClient
and when close app and free TEasyUaClient
it doesn t free TServerEventDispatch
so How can I free TServerEventDispatch in Delphi?
Thank you very much
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
eventargs := CoEasyUADataChangeNotificationEventArgs.Create;
eventargs.Arguments := CoEasyUAMonitoredItemArguments.Create;
eventargs.Arguments.NodeDescriptor := CoUANodeDescriptor.Create;
eventargs.AttributeData := CoUaAttributeData.create;
eventargs.AttributeData.StatusCode := CoUaStatusCode.Create;
if I use freeandnil(eventargs) I have exception error
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- convert eventargs in delphi