By rahul.singh@ra…, 24 January, 2019 Forums Gurux DLMS for Java void readScalerAndUnits() throws Exception { GXDLMSObjectCollection objs = dlms.getObjects() .getObjects(new ObjectType[] { ObjectType.REGISTER, ObjectType.DEMAND_REGISTER, ObjectType.EXTENDED_REGISTER }); try { if (dlms.getNegotiatedConformance() .contains(Conformance.MULTIPLE_REFERENCES)) { List<Entry<GXDLMSObject, Integer>> list = new ArrayList<Entry<GXDLMSObject, Integer>>(); for (GXDLMSObject it : objs) { if (it instanceof GXDLMSRegister) { list.add(new GXSimpleEntry<GXDLMSObject, Integer>(it, 3)); } if (it instanceof GXDLMSDemandRegister) { list.add(new GXSimpleEntry<GXDLMSObject, Integer>(it, 4)); } } readList(list); } Unable to add readList . i amd using sample client java . Please Help Getting Null object in readScalerAndUnits() method Hi, On what row you are getting this error? Have you made any changes? BR, Mikko Hi Mikko Hi Mikko Am not getting any error . it just data in ReadAll() Method we can only able to read AssociativeView . Getting Null object in readScalerAndUnits() method Hi, I believe that you have connected using Authentication None. Some meters don't return any registers with that authentication. You need to change authentication to Low or High and try again. You can test this with GXDLMSDirector. BR, Mikko Hi Mikko, Hi Mikko, static int getParameters(String[] args, Settings settings) { GXNet net = null; settings.client.setInterfaceType(InterfaceType.HDLC); settings.client.setUseLogicalNameReferencing(true); settings.media = new GXNet(); net = (GXNet) settings.media; net.setHostName("192.168.54.32"); net.setPort(Integer.parseInt("1234")); settings.client.setPassword("ABCD0001".getBytes()); settings.iec = false; settings.client.setAuthentication(Authentication.valueOfString("Low")); settings.client.setClientAddress(Integer.parseInt("29")); settings.client.setServerAddress(Integer.parseInt("01")); return 0; } i have used authentyication = LOw Somewhere else i need to mention . I am using Gurux java client example Getting Null object in readScalerAndUnits() method Hi, Is list empty of what exactly is the problem? BR, Mikko Yes list is empty for Yes list is empty for readandscal. Yes list is empty for Yes list is empty for readandscal. Getting Null object in readScalerAndUnits() method Hi, If the list is empty there are no registers. Try to connect using higher authentication level. I believe that you are using authentication level None. BR, Mikko Am Using LOW Authentication Am Using LOW Authentication Tried With settings.client.setAuthentication(Authentication.valueOfString("LOW")); 1. settings.client.setPassword("ABCD0001".getBytes("ASCII")); 2. settings.client.setPassword("ABCD0001".getBytes()); 3. settings.client.setPassword("ABCD0001"); Am Using LOW Authentication Am Using LOW Authentication Tried With settings.client.setAuthentication(Authentication.valueOfString("LOW")); 1. settings.client.setPassword("ABCD0001".getBytes("ASCII")); 2. settings.client.setPassword("ABCD0001".getBytes()); 3. settings.client.setPassword("ABCD0001"); Getting Null object in readScalerAndUnits() method Hi, Try to connect with High Authentication. Problem is that there are no register objects in the association view. BR, Mikko Log in or register to post comments
Getting Null object in readScalerAndUnits() method Hi, On what row you are getting this error? Have you made any changes? BR, Mikko
Hi Mikko Hi Mikko Am not getting any error . it just data in ReadAll() Method we can only able to read AssociativeView .
Getting Null object in readScalerAndUnits() method Hi, I believe that you have connected using Authentication None. Some meters don't return any registers with that authentication. You need to change authentication to Low or High and try again. You can test this with GXDLMSDirector. BR, Mikko
Hi Mikko, Hi Mikko, static int getParameters(String[] args, Settings settings) { GXNet net = null; settings.client.setInterfaceType(InterfaceType.HDLC); settings.client.setUseLogicalNameReferencing(true); settings.media = new GXNet(); net = (GXNet) settings.media; net.setHostName("192.168.54.32"); net.setPort(Integer.parseInt("1234")); settings.client.setPassword("ABCD0001".getBytes()); settings.iec = false; settings.client.setAuthentication(Authentication.valueOfString("Low")); settings.client.setClientAddress(Integer.parseInt("29")); settings.client.setServerAddress(Integer.parseInt("01")); return 0; } i have used authentyication = LOw Somewhere else i need to mention . I am using Gurux java client example
Getting Null object in readScalerAndUnits() method Hi, Is list empty of what exactly is the problem? BR, Mikko
Getting Null object in readScalerAndUnits() method Hi, If the list is empty there are no registers. Try to connect using higher authentication level. I believe that you are using authentication level None. BR, Mikko
Am Using LOW Authentication Am Using LOW Authentication Tried With settings.client.setAuthentication(Authentication.valueOfString("LOW")); 1. settings.client.setPassword("ABCD0001".getBytes("ASCII")); 2. settings.client.setPassword("ABCD0001".getBytes()); 3. settings.client.setPassword("ABCD0001");
Am Using LOW Authentication Am Using LOW Authentication Tried With settings.client.setAuthentication(Authentication.valueOfString("LOW")); 1. settings.client.setPassword("ABCD0001".getBytes("ASCII")); 2. settings.client.setPassword("ABCD0001".getBytes()); 3. settings.client.setPassword("ABCD0001");
Getting Null object in readScalerAndUnits() method Hi, Try to connect with High Authentication. Problem is that there are no register objects in the association view. BR, Mikko
Getting Null object in readScalerAndUnits() method
Hi,
On what row you are getting this error? Have you made any changes?
BR,
Mikko
Hi Mikko
Hi Mikko
Am not getting any error .
it just data in ReadAll() Method we can only able to read AssociativeView .
Getting Null object in readScalerAndUnits() method
Hi,
I believe that you have connected using Authentication None. Some meters don't return any registers with that authentication. You need to change authentication to Low or High and try again.
You can test this with GXDLMSDirector.
BR,
Mikko
Hi Mikko,
Hi Mikko,
static int getParameters(String[] args, Settings settings) {
GXNet net = null;
settings.client.setInterfaceType(InterfaceType.HDLC);
settings.client.setUseLogicalNameReferencing(true);
settings.media = new GXNet();
net = (GXNet) settings.media;
net.setHostName("192.168.54.32");
net.setPort(Integer.parseInt("1234"));
settings.client.setPassword("ABCD0001".getBytes());
settings.iec = false;
settings.client.setAuthentication(Authentication.valueOfString("Low"));
settings.client.setClientAddress(Integer.parseInt("29"));
settings.client.setServerAddress(Integer.parseInt("01"));
return 0;
}
i have used authentyication = LOw
Somewhere else i need to mention .
I am using Gurux java client example
Getting Null object in readScalerAndUnits() method
Hi,
Is list empty of what exactly is the problem?
BR,
Mikko
Yes list is empty for
Yes list is empty for readandscal.
Yes list is empty for
Yes list is empty for readandscal.
Getting Null object in readScalerAndUnits() method
Hi,
If the list is empty there are no registers. Try to connect using higher authentication level.
I believe that you are using authentication level None.
BR,
Mikko
Am Using LOW Authentication
Am Using LOW Authentication
Tried With
settings.client.setAuthentication(Authentication.valueOfString("LOW"));
1. settings.client.setPassword("ABCD0001".getBytes("ASCII"));
2. settings.client.setPassword("ABCD0001".getBytes());
3. settings.client.setPassword("ABCD0001");
Am Using LOW Authentication
Am Using LOW Authentication
Tried With
settings.client.setAuthentication(Authentication.valueOfString("LOW"));
1. settings.client.setPassword("ABCD0001".getBytes("ASCII"));
2. settings.client.setPassword("ABCD0001".getBytes());
3. settings.client.setPassword("ABCD0001");
Getting Null object in readScalerAndUnits() method
Hi,
Try to connect with High Authentication. Problem is that there are no register objects in the association view.
BR,
Mikko