Difference between revisions of "NETIO Lua Reference"

From wiki.netio-products.com
Jump to navigation Jump to search
(Socket Communication)
Line 29: Line 29:
 
* 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
 +
 +
== Standard Lua Functions ==
 +
* function [https://www.lua.org/pil/8.3.html assert(), error()] issues an error
 +
* function [https://www.lua.org/pil/7.3.html ipairs(), pairs(), next()] traverse tables
 +
* function [https://www.lua.org/pil/2.4.html tonumber(), tostring()] data type conversion
 +
* function [https://www.lua.org/pil/8.4.html pcall()] protected call function (handles error inside the function)
 +
* function [https://www.lua.org/pil/5.2.html select()] selects from multiple return value
 +
* function [https://www.lua.org/pil/2.html unpack] converts table into multiple values
 +
* function [https://www.lua.org/pil/2.html type()] returns variable type
 +
* function [https://www.lua.org/pil/22.1.html os.date(), os.time()] system date and time
  
 
== Miscellaneous ==
 
== Miscellaneous ==

Revision as of 15:03, 22 April 2017

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

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