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. Length of Octet String Type

length of octet string type

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 youserj , 26 August, 2020
Forums
Gurux.DLMS

Hi, Mikko. Does existing limit in length octet string type, example in name of week profile table?

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

Hi,

Hi,

It depends on the meter. DLMS standard doesn't set the max length.
In general speaking, there is a max length. Example week profile table it might be sometimes very small, only a few bytes.

BR,
Mikko

youserj

5 years 9 months ago

thank's. Why does the Python

thank's. Why does the Python version sometimes use the ByteArray object as an octet string and sometimes use str?

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

Hi,

Hi,

There are few reasons for this. Can you give an example so I'm sure that I'm answering your question?

BR,
Mikko

youserj

5 years 9 months ago

in object ActivityCalendar

in object ActivityCalendar attribute calendar_name is type string and this time field week_profile_name is type bytearray, however in DLMS its both has types an octet string

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

Hi,

Hi,

They are converted to an octet string when communicating with the device. Is your week_profile or calendar name non ASCII string?

BR,
Mikko

youserj

5 years 9 months ago

all right. both attributes

all right. both attributes are ASCII, which is convenient. simple i want understand struct of python objects in gurux.

Profile picture for user Kurumi

Kurumi

5 years 9 months ago

Hi,

Hi,

It's nicer to see "Summertime" than "53 75 6D 6D 65 72 74 69 6D 65". For this reason, values are shown as a string if possible. Some people want to use names like 0x1 and 0x2. In that case, values as shown as a hex string "01".

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