Home  Contents

mtd16.fromData

Mtd16 Core4 Lua Commands

SYNOPSIS

msg = mtd16.fromData([data])

DESCRIPTION

Creates a new message instance suitable for decoding a MTD16 message. The object is initialized with the passed binary data.

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.fromData("\x0B\x00\x0F\xF0\x07\x00\x01\x30XYZZY") print(msg:trace())
0xF00F=(0x3001="XYZZY")

SEE ALSO