Module gma.
General GMA LUA functions
Functions
gma.sleep (sleep_seconds) | Sleeps the LUA script for number of seconds |
gma.echo (var) | Echoes a variable to the GMA system monitor. |
gma.feedback (var) | Prints feedback to the GMA Command Line |
gma.build_date () | Returns the build date of the current GMA software. |
gma.build_time () | Return the build time of the current GMA software. |
gma.git_version () | Returns GIT branch identifier of the current GMA software. |
gma.export (filename, export_data) | Export a table as a file??? |
gma.export_csv (filename, export_data) | Export a table as a CSV file? |
gma.export_json (filename, export_data) | Export a table as a JSON file? |
gma.import (filename) | Import a file as a table? |
gma.cmd (command) | Run a command on the GMA's command line |
gma.timer (name, dt, max_count, cleanup) | Run specified function after time??? |
gma.gettime () | Returns the system time |
gma.textinput (title, old_text) | Prompts user for a string and returns it |
gma.gethardwaretype () | Returns the host hardware type |
Functions
- gma.sleep (sleep_seconds)
-
Sleeps the LUA script for number of seconds
Parameters:
- sleep_seconds number Number of seconds to sleep for.
Usage:
gma.sleep(5);
gma.sleep(0.1);
- gma.echo (var)
-
Echoes a variable to the GMA system monitor.
Parameters:
- var mixed Variable to echo to the console log. Strings, numbers, and more should work.
Usage:
gma.echo("Hello World!")
gma.echo(1)
- gma.feedback (var)
-
Prints feedback to the GMA Command Line
Parameters:
- var mixed Variable to echo to the console log. Strings, numbers, and more should work.
Usage:
gma.feedback("Hello World!")
gma.feedback(1)
- gma.build_date ()
-
Returns the build date of the current GMA software.
Returns:
-
string
Build Date of GMA2 software
Usage:
gma.build_date(); "Aug 25 2015"
- gma.build_time ()
-
Return the build time of the current GMA software.
Returns:
-
string
Build Time of GMA2 software
Usage:
gma.build_time(); "18:18:44"
- gma.git_version ()
-
Returns GIT branch identifier of the current GMA software.
Returns:
-
string
GIT branch identifier.
Usage:
gma.git_version(); "ef1a5c86425aa8ab7bff1cdad68c45897f49c230"
- gma.export (filename, export_data)
-
Export a table as a file???
Parameters:
- gma.export_csv (filename, export_data)
-
Export a table as a CSV file?
Parameters:
- gma.export_json (filename, export_data)
-
Export a table as a JSON file?
Parameters:
- gma.import (filename)
-
Import a file as a table?
Parameters:
- filename string Filename to import
Returns:
-
table
Imported data
- gma.cmd (command)
-
Run a command on the GMA's command line
Parameters:
- command String Command to run
- gma.timer (name, dt, max_count, cleanup)
-
Run specified function after time???
Parameters:
- name function Function to run???
- dt number ???
- max_count number ???
- cleanup function function to run to clean up???
- gma.gettime ()
-
Returns the system time
Returns:
-
number
Current LINUX time as returned by systemd???
- gma.textinput (title, old_text)
-
Prompts user for a string and returns it
Parameters:
Returns:
-
string
User-entered string
- gma.gethardwaretype ()
-
Returns the host hardware type
Returns:
-
string
'GMA2' or 'GMA3' depending on the host hardware