First of all thank you for the inconvenience it may cause.
We are trying to send / simulate a meter which sends a push setup object with a compact data with the buffer with the corresponding pdu. We simulate a secure send using GXDLMSSecureNotify. The problem is that the structure that generates us is the following:
This does not correspond to what the Blue Book says about the compact data object. Since the buffer attribute should be an OctetString and not be within a structure.
BLUE BOOK (Class_id = 62)
----------
Attribute description
compact_buffer: Contains the values of the attributes captured as an octet-string.
When the data captured is of type octet-string, bit-string, visible-string, utf8-string or array the length is also included here.
My question is: Is there a way to prevent it from going inside a structure? Is it a bug?
Thank you very much in advance for the help and the response.
var compactData = new GXDLMSCompactData(GasEchoObisCodes.CompactDataPs10)
{
Version = 1,
CaptureMethod = CaptureMethod.Implicit,
CaptureObjects =
{
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTime),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.Mprn),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(3, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSGSMDiagnostic(GasEchoObisCodes.SignalQuality),
new GXDLMSCaptureObject(6, 3)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTimeStartOfGasDay),
new GXDLMSCaptureObject(2, 1)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.TotalRecordedVolume),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.RemainingBatteryCapacity),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.LoadSurveyProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.GasEchoEventsProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogPriorId),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogLastId),
new GXDLMSCaptureObject(2, 0))
Hi,
I'm sorry that it takes so long. The data is correct.
You are sending compact data in the data notification message and for this reason, it's inside of the structure. I changed your data here so it's easier to read.
Here we have two objects in compact data:
GXDLMSCompactData compactData = new GXDLMSCompactData();
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(1, 0)));
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(2, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(3, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(2, 0)));
In Push message we are sending attributes 3 and 2.
Gurux Translator Response
Gurux Translator Response
Hi,
Hi,
I believe that you are using C#? Can you show how you are adding capture objects before sending data?
BR,
Mikko
Of course Mikko. This is an
Of course Mikko. This is an example:
var compactData = new GXDLMSCompactData(GasEchoObisCodes.CompactDataPs10)
{
Version = 1,
CaptureMethod = CaptureMethod.Implicit,
CaptureObjects =
{
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTime),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.Mprn),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSDisconnectControl(GasEchoObisCodes.OutputControlState),
new GXDLMSCaptureObject(3, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSGSMDiagnostic(GasEchoObisCodes.SignalQuality),
new GXDLMSCaptureObject(6, 3)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.UnixTimeStartOfGasDay),
new GXDLMSCaptureObject(2, 1)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.TotalRecordedVolume),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(GasEchoObisCodes.RemainingBatteryCapacity),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.LoadSurveyProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSProfileGeneric(GasEchoObisCodes.GasEchoEventsProfile),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogPriorId),
new GXDLMSCaptureObject(2, 0)),
new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSData(GasEchoObisCodes.EventLogLastId),
new GXDLMSCaptureObject(2, 0))
}
Hi,
Hi,
I'm sorry that it takes so long. The data is correct.
You are sending compact data in the data notification message and for this reason, it's inside of the structure. I changed your data here so it's easier to read.
Here we have two objects in compact data:
GXDLMSCompactData compactData = new GXDLMSCompactData();
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(1, 0)));
compactData.CaptureObjects.Add(new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(clock, new GXDLMSCaptureObject(2, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(3, 0)));
p.PushObjectList.Add(new KeyValuePair<GXDLMSObject, GXDLMSCaptureObject>(compactData, new GXDLMSCaptureObject(2, 0)));
In Push message we are sending attributes 3 and 2.
Generated data is here:
http://www.gurux.fi/GuruxDLMSTranslator?translate=00010001001000440FC00…
I hope this helps you.
BR,
Mikko