- val = msg:get(tag [, default])
- val = msg:getBool(tag [, default])
- val = msg:getNumber(tag [, default])
- val = msg:getString(tag [, default])
- val = msg:getDate(tag [, default])
- val = msg:getTime(tag [, default])
- val = msg:getDateTime(tag [, default])
- val = msg:getNetworkAddress(tag [, default])
- val = msg:getMessage(tag)
- valL, valH = msg:getInt64(tag [, defaultL, defaultH])
SYNOPSIS
DESCRIPTION
Retrieve the value of the data field tagged tag from msg. If tag is not a number, it is looked up in the table mtd16.lutTag to get its numerical value.
If the message does not contain a value for the tag, the default value is returned instead. The default for default is nil.
RETURN VALUE
The function msg:get() returns the value as a type that is most suitable for the type indicated by tag.
The functions msg:getBool(), msg:getNumber() and msg:getString() etc... forcefully return their specifc datatype or nil if this is not possible.
The function msg:getNetworkAddress() supports only IPv4 addresses. It returns an IP address in dotted quad notation on success.
The function msg:getMessage() returns nested contents as a message instance.
All functions return nil (or default, if given) if the tag does not exist in msg. Note that there is no support for default in msg:getMessage().
Using getInt64(), it is possible to read a 64-bit number, by using two 32-bit variables. With that function, everything is doubled: There are two optional default variables, it returns two 32-bit integer values on success or two nil values on failure.