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. Node
  3. Compact Array Data In DLMS.C

Compact Array data in DLMS.C

By Pablo1610 , 11 July, 2023
Forums
Gurux.DLMS

Hi,

I was wondering how to build a compact array object with the C libraries.
The object it is a DLMS_OBJECT_TYPE_DATA and the value it is a compact array composed of 7 others DLMS_OBJECT_TYPE_DATA values. I think I haven't seen any example about the compact array.

Also, maybe it is enough to initialize it as an array, and then change the type to compact array, but I'm not sure about this.

This is the code now:

gxData OscWave;
gxTarget CAPTURE_OBJECT[8] = { 0 };

if((ret = INIT_OBJECT(OscWave, DLMS_OBJECT_TYPE_DATA, ln11)) == 0)
{

ARR_ATTACH(OscWave.value, CAPTURE_OBJECT, 8);
CAPTURE_OBJECT[0].target = BASE(instantVRlast);
CAPTURE_OBJECT[0].attributeIndex = 2;
CAPTURE_OBJECT[0].dataIndex = 0;
CAPTURE_OBJECT[1].target = BASE(instantIRlast);
CAPTURE_OBJECT[1].attributeIndex = 2;
CAPTURE_OBJECT[1].dataIndex = 0;
CAPTURE_OBJECT[2].target = BASE(instantVSlast);
CAPTURE_OBJECT[2].attributeIndex = 2;
CAPTURE_OBJECT[2].dataIndex = 0;
CAPTURE_OBJECT[3].target = BASE(instantISlast);
CAPTURE_OBJECT[3].attributeIndex = 2;
CAPTURE_OBJECT[3].dataIndex = 0; //todo completar este
CAPTURE_OBJECT[4].target = BASE(instantVTlast);
CAPTURE_OBJECT[4].attributeIndex = 2;
CAPTURE_OBJECT[4].dataIndex = 0;
CAPTURE_OBJECT[5].target = BASE(instantITlast);
CAPTURE_OBJECT[5].attributeIndex = 2;
CAPTURE_OBJECT[5].dataIndex = 0;
CAPTURE_OBJECT[6].target = BASE(instantINlast);
CAPTURE_OBJECT[6].attributeIndex = 2;
CAPTURE_OBJECT[6].dataIndex = 0;
CAPTURE_OBJECT[7].target = BASE(LSDigChStatus);
CAPTURE_OBJECT[7].attributeIndex = 2;
CAPTURE_OBJECT[7].dataIndex = 0;
OscWave.value.vt = DLMS_DATA_TYPE_COMPACT_ARRAY;
OscWave.capacity = 12800;
}

Thanks,
Pablo

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

Hi Pablo, The compact array…

Hi Pablo,

The compact array example is not implemented for ANSI C at the moment. I'll add it to the work list. We try to implement it this week and release on next.

BR,
Mikko

Pablo1610

2 years 10 months ago

Hi, Is there any update…

Hi,

Is there any update regarding this kind of object?

Best,
Pablo

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101

New forum topics

  • Equator Billiard | WA 083148835648
  • Corado Perfect Cues (Servis stik billiard & Jual dan Beli Stik Biliiard) | WA 083148835648
  • Zetaverse Billiard | WA 083148835648
  • Tokobilliard.id Tobil | WA 083148835648
  • Victorian | WA 083148835648
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin