mgaman / PDUlib

Encode/Decode PDU strings for use with most GSM modems. Both 7 bit and 16 bit alphabets are supported.
GNU Lesser General Public License v2.1
22 stars 10 forks source link

Added universal User-Data-Header interpreter, code refactoring #35

Open egzumer opened 1 year ago

egzumer commented 1 year ago

Hi. I had a problem with clipping first letter in messages with user data header so I started fixing it. I used platformio version so I didn't know at the time that you already fixed it. Regardless, I did some refactoring, mainly the data header processing. You only expect two types of headers, but there is a possibility that there are others, and there might be more than one at the same time, I added that. Also I don't know where the Information Element Identifier of 8 come from (the 16bit reference number for concat messages), the documentation doesn't mention this type. I hope it will be useful.