Scripting Interfaces: General Host Objects
Sys:
Synopsis
Used to provide quick shortcuts to a variety of operations
API
-
InitCommLink (String host, String port, String protocol)
Tries to initialize the TaskScheduler Engine's communication link by connecting to the
specified broker:port using the specified protocol
E.g.
Sys.InitCommLink("localhost", "25000", "niotcp");
-
run (String pathToFile)
Runs a script in the file
E.g.
Sys.run("/home/scripts/script1.js");
-
print (String[] stuff) / println (Stirng[] stuff)
Prints the given strings to STDOUT. println explicitly print a
newline after printing all elements.
For E.g.
Sys.println("Hello" + name);
-
GenerateUUID()
Generates a new Time-based UUID. Useful for tagging objects with UUIDs.
For E.g.
uuid = Sys.GenerateUUID();
-
getHostAddress()
Returns the current hosts' IP address.
For E.g.
addr = Sys.getHostAddress();
-
date
Returns the current date and time
For E.g.
currentDate = Sys.date;
Status: Implemented
(back to Notes)