By youserj , 18 August, 2020 Forums Gurux.DLMS maybe only for Python: 1: 7E A0 29 03 21 54 AD 92 E6 E6 00 C3 01 C1 00 0B 00 00 0B 00 00 FF 01 01 01 01 02 03 12 00 05 09 05 07 E4 09 1C 01 11 05 7F FD 7E <ActionRequest> <ActionRequestNormal> <InvokeIdAndPriority Value="C1" /> <MethodDescriptor> <!-- SpecialDaysTable --> <ClassId Value="000B" /> <!-- 0.0.11.0.0.255 --> <InstanceId Value="00000B0000FF" /> <MethodId Value="01" /> </MethodDescriptor> <MethodInvocationParameters> <Array Qty="01" > <Structure Qty="03" > <UInt16 Value="0005" /> <!-- 28.09.2020 --> <OctetString Value="07E4091C01" /> <UInt8 Value="05" /> </Structure> </Array> </MethodInvocationParameters> </ActionRequestNormal> </ActionRequest> 2: 7E A0 11 21 03 74 85 BC E6 E7 00 C7 01 C1 03 00 94 9E 7E <ActionResponse> <ActionResponseNormal> <InvokeIdAndPriority Value="C1" /> <Result Value="ReadWriteDenied" /> </ActionResponseNormal> </ActionResponse> method insert in SpecialDayTable add array type of entry's to PDU, but 62056-62 only one entry may be in method. Or me mistake? #method insert2 is Right #method insert2 is Right #method insert is wrong def insert(self, client, entries): bb = GXByteBuffer() bb.setUInt8(DataType.ARRAY) _GXCommon.setObjectCount(len(entries), bb) for entry in entries: bb.setUInt8(DataType.STRUCTURE) bb.setUInt8(3) _GXCommon.setData(None, bb, DataType.UINT16, entry.index) _GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date) _GXCommon.setData(None, bb, DataType.UINT8, entry.dayId) return client.method(self, 1, bb.array(), DataType.ARRAY) def insert2(self, client, entry): bb = GXByteBuffer() bb.setUInt8(DataType.STRUCTURE) bb.setUInt8(3) _GXCommon.setData(None, bb, DataType.UINT16, entry.index) _GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date) _GXCommon.setData(None, bb, DataType.UINT8, entry.dayId) return client.method(self, 1, bb.array(), DataType.ARRAY) Hi, Hi, The current implementation is correct. You can add an array of entries. From BB: array spec_day_entry BR, Mikko in my BB ver 7.0: array spec in my BB ver 7.0: array spec_day_entry is the Attribute description to write all; Method description: Inserts a new entry in the table -> entry spec_day_entry Hi, Hi, I'm sorry. My mistake. This is fixed tomorrow. BR, Mikko glad was to seen you Mikko glad was to seen you Mikko Hi, Hi, This is fixed. Get the latest version. BR, Mikko
#method insert2 is Right #method insert2 is Right #method insert is wrong def insert(self, client, entries): bb = GXByteBuffer() bb.setUInt8(DataType.ARRAY) _GXCommon.setObjectCount(len(entries), bb) for entry in entries: bb.setUInt8(DataType.STRUCTURE) bb.setUInt8(3) _GXCommon.setData(None, bb, DataType.UINT16, entry.index) _GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date) _GXCommon.setData(None, bb, DataType.UINT8, entry.dayId) return client.method(self, 1, bb.array(), DataType.ARRAY) def insert2(self, client, entry): bb = GXByteBuffer() bb.setUInt8(DataType.STRUCTURE) bb.setUInt8(3) _GXCommon.setData(None, bb, DataType.UINT16, entry.index) _GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date) _GXCommon.setData(None, bb, DataType.UINT8, entry.dayId) return client.method(self, 1, bb.array(), DataType.ARRAY)
Hi, Hi, The current implementation is correct. You can add an array of entries. From BB: array spec_day_entry BR, Mikko
in my BB ver 7.0: array spec in my BB ver 7.0: array spec_day_entry is the Attribute description to write all; Method description: Inserts a new entry in the table -> entry spec_day_entry
#method insert2 is Right
#method insert2 is Right
#method insert is wrong
def insert(self, client, entries):
bb = GXByteBuffer()
bb.setUInt8(DataType.ARRAY)
_GXCommon.setObjectCount(len(entries), bb)
for entry in entries:
bb.setUInt8(DataType.STRUCTURE)
bb.setUInt8(3)
_GXCommon.setData(None, bb, DataType.UINT16, entry.index)
_GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date)
_GXCommon.setData(None, bb, DataType.UINT8, entry.dayId)
return client.method(self, 1, bb.array(), DataType.ARRAY)
def insert2(self, client, entry):
bb = GXByteBuffer()
bb.setUInt8(DataType.STRUCTURE)
bb.setUInt8(3)
_GXCommon.setData(None, bb, DataType.UINT16, entry.index)
_GXCommon.setData(None, bb, DataType.OCTET_STRING, entry.date)
_GXCommon.setData(None, bb, DataType.UINT8, entry.dayId)
return client.method(self, 1, bb.array(), DataType.ARRAY)
Hi,
Hi,
The current implementation is correct. You can add an array of entries.
From BB:
array spec_day_entry
BR,
Mikko
in my BB ver 7.0: array spec
in my BB ver 7.0: array spec_day_entry is the Attribute description to write all;
Method description: Inserts a new entry in the table -> entry spec_day_entry
Hi,
Hi,
I'm sorry. My mistake. This is fixed tomorrow.
BR,
Mikko
glad was to seen you Mikko
glad was to seen you Mikko
Hi,
Hi,
This is fixed. Get the latest version.
BR,
Mikko