Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Writing White Listed Devices

Writing White Listed Devices

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By fbasile , 17 November, 2017
Forums
Gurux DLMS for Java

Hi,
I would to write the attribute 2 of the object "White Listed Devices". This value attribute, according to the documentation, is an "array of a structure" of 4 elements (octet-string, unsigned, long-unsigned, usigned), how should I do it? This is my sample code:

GXDLMSObject whiteListDevicesListObject = new GXDLMSObject();
whiteListDevicesListObject.setLogicalName(OBIS_WHITE_LISTED_DEVICES);
whiteListDevicesListObject.setDataType(2, DataType.STRUCTURE);

//Here I should set the object value

byte[][] whiteListDevicesList = client.write(whiteListDevicesListObject, 2);
GXReplyData whiteListDevicesReply = new GXReplyData();
readDataBlock(whiteListDevicesList, whiteListDevicesReply);

Thanks a lot,
Regards

Francesco

Profile picture for user Kurumi

Kurumi

8 years 6 months ago

Writing White Listed Devices

Hi Francesco,

Structures are little complicated. At the moment you can't do this on Java.
Reason for this is that there are no unsigned data types in Java. This will cause that we can't get data type from the array objects.
We have tried to find the solution to this and I believe that we have now the answer for this.
We'll check this and release it begin of next month if it works.

BR,

Mikko

fbasile

8 years 6 months ago

Hi Kurumi,

Hi Kurumi,
thanks as always for your immediate reply.
In your C# library (since C# has "unsigned int") "structures" data type are implemented? And another question: I saw that neither "compact arrays" in Java library are implemented, in the C# one have been implemented?

Regards,

Francesco

Profile picture for user Kurumi

Kurumi

8 years 5 months ago

Writing White Listed Devices

Hi Francesco,

If you are using C# you can do this. Compact arrays are not implemented at the moment because w don't have any meter that is using them.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin