The use case:
The object "Machine" on server "A" has a method "Start". This method should start all parts of a big machine. Each part of the machine has its own OPC UA server. So when method "Machine.Start" on server "A" is called, it calls the method "Device.Start" on server "B" and "C".
If auditing is enabled, the audit entry id used when calling "Machine.Start" on server "A" should be forwarded to the calls of "Device.Start" on server "B" and "C". Right?
This is no problem to implement. But it is also possible that server "A" controls a device directly, therefore it uses the internal client to call "Device.Start". And there I can not foward the audit entry id (ServerManager::call has no argument for that).
- Can I somehow pass the audit entry id to the internal client?
- Can I use a "normal" client to connect to the local server? Instead of the internal client, not in a second application. I can test if that works, but I can not figure out which side effects that could have.
Audit entry id with internal client
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Audit entry id with internal client
Hello PaBra,
in version V1.6 of the SDK you can't pass the AuditEntryId to the internal client.
There are plans to add overloads to the methods avaialble in the ServerManager that take ServiceContext as a parameter in a future release.
Till then you need to solve this task in the application. Using a UaClient to connect to your own server would work but that's not the efficient way to do it.
Instead of using the internal client you can call the method directly in your code.
in version V1.6 of the SDK you can't pass the AuditEntryId to the internal client.
There are plans to add overloads to the methods avaialble in the ServerManager that take ServiceContext as a parameter in a future release.
Till then you need to solve this task in the application. Using a UaClient to connect to your own server would work but that's not the efficient way to do it.
Instead of using the internal client you can call the method directly in your code.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Full Member
- Posts: 5
- Joined: 23 Oct 2018, 07:28
Re: Audit entry id with internal client
But that removes the "unified" from the access, so I would have to check in the machine implementation if the device is local or not at every method call. Now the only difference would be the type OPC UA client I use to access the device. I tried to connect with a real client to the local server, works without any problems. An at this part of my application, the overhead is not an issue (the machine is not started every 100ms)Support Team wrote:Using a UaClient to connect to your own server would work but that's not the efficient way to do it.
Instead of using the internal client you can call the method directly in your code.
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Audit entry id with internal client
Hello PaBra,
if this sequence is not called often I don't see any issue with using a "real" client.
if this sequence is not called often I don't see any issue with using a "real" client.
Best regards
Unified Automation Support Team
Unified Automation Support Team