Additions and Limitations
This chapter describes some of the ways that the Lua interpreter running on the OEM7 receiver is different than a standard Lua interpreter.
Additions
-
The mobdebug module is preloaded to facilitate debugging.
-
Help messages are available for some functions. Use the H() function within the receiver Lua prompt to view help.
-
The crc32 module was created by NovAtel to generate CRCs for NovAtel messages. Use H(crc32) on the receiver Lua prompt for more details.
-
The scom module was created by NovAtel as convenience functions to access the SCOM ports. Use H(scom) on the receiver Lua prompt for more details.
-
If a Lua script has been started with the LUA PROMPT command, it can be stopped using the os.exit() Lua command.
-
A 64 kB RAM disk has been provided to the Lua interpreter at the location /tmp.
-
The os.tmpname() function will return a unique file name within /tmp.
-
Some environment variables have been added to the Lua interpreter running on the OEM7 receiver. They can be accessed using the os.getenv() function and are defined as follows:
- "ONTARGET" is set to "true".
- "GPSCARD_PSN" is set to the receiver PSN.
- "ENCLOSURE_PSN" is set to the receiver's enclosure PSN, if one is set.
Limitations
-
The C User Application is not available to customers. That is, customers cannot write C code or take external, compiled libraries and link them to the Lua interpreter running on the OEM7 receiver.
-
The Operating System Library is not fully-functioning.
- os.time() and os.date() report in Greenwich Mean Time (GMT)
- os.date() will report time starting from Jan 1 1970, until GPS coarse time is set, at which point it will report the current time.
-
There is no way to stop a Lua script that was started with LUA START, unless the script itself completes.
-
It is not recommended to use LUA for high rate logging. Expect latency of 50 ms or more.
-
Latency will increase when idle time is low.