Dear Team,
I developed OPC UA Client using OPC Labs QUICK OPC Tools.
the OPC UA server configuration as below
endpoint : opc.tcp://OPCUASVRPC:26080/UA/FlsOPCServer
security: None
identity: Anonymous
here is my OPC UA Client code
FileObj.LogWriter($"Creating end point descriptor with anonymous identity");
UAEndpointDescriptor endpointDescriptor =
((UAEndpointDescriptor)"opc.tcp://OPCUASVRPC:26080/UA/FlsOPCServer")
.WithAnonymousIdentity();
var client = new EasyUAClient();
UANodeDescriptor[] UANodeDescriptorList = new UANodeDescriptor[GloabalVariables.TagCollection.Count];
FileObj.LogWriter($"Creating EndNode descriptor");
for (int i = 0; i < UANodeDescriptorList.Length; i++)
UANodeDescriptorList[i] = "ns=2;s=" + DomainName + GloabalVariables.TagCollection[i];
ValueResult[] ValueResultArray1 = client.ReadMultipleValues(endpointDescriptor, UANodeDescriptorList);
foreach (ValueResult valueResult in ValueResultArray1)
{
if (valueResult.Succeeded)
{
Console.WriteLine("Value: {0} - {1}", GloabalVariables.TagCollection[k], valueResult.Value);
GloabalVariables.ItemBuffer.Add(GloabalVariables.AliasCollection[k]);
GloabalVariables.ValueBuffer.Add(valueResult.Value);
}
else
{
Console.WriteLine("*** Failure: {0}", valueResult.ErrorMessageBrief);
}
}
Would you please confirm for me, is this code is enough for communicating with the Anonymous OPC UA Server?
If I Missed out on anything, please share the details to communicate with the OPC server with anonymous.
with regards,
senthil