SYNOPSIS
msg = mtd16.fromText([text])
DESCRIPTION
Creates a new message instance suitable for decoding a MTD16 message. The object is initialized with the passed textual representation of a message. This function can decode a message that was encoded using mtd16:toText().
RETURN VALUE
A new message buffer instance.
NOTES
This also returns a message buffer instance even if the passed data is not a properly encoded
MTD16 message. You can use mtd16:isValid to check if the message can be decoded.
EXAMPLE
>
>
msg = mtd16.fromText("F00F=(3001=\"XYZZY\")")
print(msg:toData():hexdump())
00000000: 0B 00 0F F0 07 00 01 30 58 59 5A 5A 59 .......0XYZZY
SEE ALSO
#mtd16, mtd16.answerCode, mtd16.fromData, mtd16.isNestedTag, mtd16.lutType, mtd16.new, mtd16.tagCode, mtd16.tagName, mtd16.tagNumber, mtd16.tagType, mtd16:append, mtd16:appendMessageCode, mtd16:contains, mtd16:get, mtd16:getNumber, mtd16:getString, mtd16:isEmpty, mtd16:isValid, mtd16:messageCode, mtd16:nextMessageCode, mtd16:pairs, mtd16:rewind, mtd16:tags, mtd16:toData, mtd16:toText, mtd16:trace, tostring(mtd16)