Multiple ProfileGeneric in the same GXDLMSPushSetup object

1 post / 0 new
JoseT
Multiple ProfileGeneric in the same GXDLMSPushSetup object

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>
------------------------------------------------------------------------------