Difference between revisions of "NETIO Lua Reference"

From wiki.netio-products.com
Jump to navigation Jump to search
(Socket System Management)
Line 30: Line 30:
 
* function [[Function xml.check()|.check()]] - tests if string is well-formed XML
 
* function [[Function xml.check()|.check()]] - tests if string is well-formed XML
 
* function [[Function xml.parse()|.parse()]] - parses XML string into [[Function xml.parse()#XmlElement|XmlElement]] object
 
* function [[Function xml.parse()|.parse()]] - parses XML string into [[Function xml.parse()#XmlElement|XmlElement]] object
 +
 +
== JSON Processing <sup><code>3.3.0</code></sup> ==
 +
<big><b>json</b></big>
 +
* function [[Function json.decode()|.decode()]] - parse json string into obj table (using dkjson.lua)
 +
* function [[Function json.encode()|.encode()]] - generate JSON string from table (using dkjson.lua)
  
 
== Standard Lua Functions ==
 
== Standard Lua Functions ==

Revision as of 17:25, 28 May 2019

Outlet Management

devices.system

Socket System Management

devices.system

Socket Communication

XML Processing 2.3.6

xml

  • function .escape() - escapes XML string to fit xml node contents
  • function .check() - tests if string is well-formed XML
  • function .parse() - parses XML string into XmlElement object

JSON Processing 3.3.0

json

  • function .decode() - parse json string into obj table (using dkjson.lua)
  • function .encode() - generate JSON string from table (using dkjson.lua)

Standard Lua Functions

Miscellaneous

  • function log() - insert a record to the socket's event log
  • function logf() - insert a formated record (incl. numbers) to the socket's event log
  • function delay() - execute function with delay (seconds)
  • function milliDelay() - execute function with delay (milliseconds)
  • function toboolean() - converts any variable to boolean type