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

  • 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