Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Reg: Doubt in FindServersOnNetworkResponse() API of Milo

It looks like you specified a serverCapabilityFilter of "LDS", so this LDS is only returning other LDS servers it knows about, and that's only itself.

On Thu, Jun 18, 2020 at 1:34 AM J Dhanasekar <jdhanasekar@xxxxxxxxxxxxxxxxxx> wrote:
Hi Milo,

I have implemented FindServerOnNetwork() like this,

UInteger startingRecordId = UInteger.valueOf(0);
UInteger maxRecordsToReturn = UInteger.valueOf(0);
String[] serverCapabilityFilter = new String[]{"LDS"};
UaStackClient stackClient = client.getStackClient();
client.connect().get();
RequestHeader reqHead = stackClient.newRequestHeader(
client.getSession().get().getAuthenticationToken()
);
FindServersOnNetworkRequest myServOnNetReq = new FindServersOnNetworkRequest(reqHead,startingRecordId,maxRecordsToReturn,serverCapabilityFilter);
FindServersOnNetworkResponse myServOnNetRes= (FindServersOnNetworkResponse) stackClient.sendRequest(myServOnNetReq).get();

After running the program, I am getting output like this,


FindServersOnNetworkResponse{
ResponseHeader=
ResponseHeader
{
Timestamp=DateTime{utcTime=132368706172341250, javaDate=Wed Jun 17 18:00:17 IST 2020},
RequestHandle=4,
ServiceResult=StatusCode{name=Good, value=0x00000000, quality=good},
ServiceDiagnostics=null,
StringTable=null,
AdditionalHeader=ExtensionObject{encoded=ByteString{bytes=null}, encodingId=NodeId{ns=0, id=0}}},
LastCounterResetTime=DateTime{utcTime=132368633219396840, javaDate=Wed Jun 17 15:58:41 IST 2020},
Servers=[
ServerOnNetwork{RecordId=0, ServerName=LDS-quanta, DiscoveryUrl=opc.tcp://quanta:4840, ServerCapabilities=[LDS]},
ServerOnNetwork{RecordId=2, ServerName=UA Local Discovery Server on BLRB1DT166.VTPPL.COM, DiscoveryUrl=opc.tcp://BLRB1DT166.VTPPL.COM:4840, ServerCapabilities=[LDS]}
]}


As OPC 4 spec , FindServerOnNetwork() should  provide servers known to DiscoverServer. But I am getting only details about DiscoveryServer , not servers known to DiscoveryServer. 

image.png


Please correct me, If I misunderstood the concept. 
Or, Please help me to retrieve list of server from DiscoveryServer

Thanks,
Dhanasekar
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top