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 simba, 21 October, 2011
Can somebody explain me how to read array data type? For example I have array which I get reading all cosem objects and one small part in hex values, is showed bellow:
So first byte "01" is for data type ( in this case array data type, according to blue book), but I don't know what means next 3 bytes. Can somebody help me? Thanks
Accordin DLMS/COSEM spesification, if there are more than 127 items
amount is divided to multible bytes.
Example: Items count = {byte array according DLMS/COSEM}
2 = {0x2} //Higgest bit is not set. Data item count is two.
127 = {0x7F} //Higgest bit is not set. 127 items.
240 (0xF0) = {0x81, 0xF0} //Higgest bit is set. Data count takes one byte.
287 (0x11F) = {0x82, 0x01, 0x1f} //Higgest bit is set. Data count takes two bytes.
So higgest bit of the first byte is set if number of items is more than 127.
Lowest byte tells how many bytes takes to show the number.
Encoding array
Hi,
Following tree bytes tell amount of the items.
Accordin DLMS/COSEM spesification, if there are more than 127 items
amount is divided to multible bytes.
Example: Items count = {byte array according DLMS/COSEM}
2 = {0x2} //Higgest bit is not set. Data item count is two.
127 = {0x7F} //Higgest bit is not set. 127 items.
240 (0xF0) = {0x81, 0xF0} //Higgest bit is set. Data count takes one byte.
287 (0x11F) = {0x82, 0x01, 0x1f} //Higgest bit is set. Data count takes two bytes.
So higgest bit of the first byte is set if number of items is more than 127.
Lowest byte tells how many bytes takes to show the number.
Hope this helps. :-)
Happy coding,
Mikko
Encoding structure
Dear kurumi,
Same encoding procedure applies to structure also (If structure contains more than 127 elements)?
Encoding structure
Hi,
This same applies to structure.
BR,
Mikko