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. Multiple ProfileGeneric In The Same GXDLMSPushSetup Object

Multiple ProfileGeneric in the same GXDLMSPushSetup object

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 JoseT , 23 November, 2020
Forums
Known problems

Hi,

I'm trying to simulate a meter push event using C#.

I've created a PushSetup and a ProfileGeneric. Then I've added the PushSetup and three times the ProfileGeneric to a GXDLMSPushSetup object. The problem appears when I check the XML. I got the pushSetupId correctly and the first Profile as an Array (as expected), and the other two profiles as Structures (does not make sense to me).

Do you know why I am not retrieving the pushSetup and three Profiles as arrays?

Kindly regards,

SAMPLES:
------------------------------------------------------------------------------
C# Code:
var p = new GXDLMSPushSetup("0.21.25.9.0.255");
var pushSetupId = new GXDLMSData("0.0.0.0.0.0");
pushSetupId.SetDataType(2, DataType.OctetString);
pushSetupId.Value = new byte[] { 0, 21, 25, 9, 0, 255 };
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(pushSetupId, new GXDLMSCaptureObject(2, 0)));

var pg1 = new GXDLMSProfileGeneric("0.0.99.98.30.255");
var dataTime1 = new GXDateTime(GetDateTime());
dataTime1.Skip = DateTimeSkips.Devitation;
pg1.CaptureObjects = new List<GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>>
{
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSClock("0.0.1.0.0.255"), new GXDLMSCaptureObject(2,0))
};
pg1.Buffer.Add(new object[] { dataTime1 });

p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(pg1, new GXDLMSCaptureObject(2, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(pg1, new GXDLMSCaptureObject(2, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(pg1, new GXDLMSCaptureObject(2, 0)));

------------------------------------------------------------------------------
XML result:
<VARVALUE_CS>
<composite_value>
<VARVALUE_CS>
<composite_value />
<value_p>ABUZCQD/</value_p>
<valType>9</valType>
<valLength>6</valLength>
</VARVALUE_CS>
<VARVALUE_CS>
<composite_value>
<VARVALUE_CS>
<composite_value>
<VARVALUE_CS>
<composite_value />
<value_p>B+QLFwEOABNWgAAA</value_p>
<valType>9</valType>
<valLength>12</valLength>
</VARVALUE_CS>
</composite_value>
<value_p />
<valType>2</valType>
<valLength>1</valLength>
</VARVALUE_CS>
</composite_value>
<value_p />
<valType>1</valType>
<valLength>1</valLength>
</VARVALUE_CS>
<VARVALUE_CS>
<composite_value>
<VARVALUE_CS>
<composite_value />
<value_p>B+QLFwEOABNWgAAA</value_p>
<valType>9</valType>
<valLength>12</valLength>
</VARVALUE_CS>
</composite_value>
<value_p />
<valType>2</valType>
<valLength>1</valLength>
</VARVALUE_CS>
<VARVALUE_CS>
<composite_value>
<VARVALUE_CS>
<composite_value />
<value_p>B+QLFwEOABNWgAAA</value_p>
<valType>9</valType>
<valLength>12</valLength>
</VARVALUE_CS>
</composite_value>
<value_p />
<valType>2</valType>
<valLength>1</valLength>
</VARVALUE_CS>
</composite_value>
<value_p />
<valType>2</valType>
<valLength>4</valLength>
</VARVALUE_CS>
------------------------------------------------------------------------------

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96

New forum topics

  • Connecting to meter using Wrapper
  • DLMS Server / Meter emulation in Golang library
  • Unknown Baudrate
  • negative indexing for custom method/attribute
  • System title
More

Who's new

  • obedph10
  • FERRUM 26
  • Splin
  • Carlos Ely
  • Sandeep Bajaniya
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin