Module: lowsys

Methods to control low.js itself
Source:

Members

(inner) codeMAC

The 12-digit code/base MAC address of the device
Properties:
Type Description
String
Source:

(inner) partitions

An object holding information about all available parititons
Properties:
Name Type Attributes Description
partitions.flash.used Number Bytes used of flash partition
partitions.flash.size Number Total size of flash partition in bytes
partitions.sdcard.used Number <optional>
Bytes used of SD card partition
partitions.sdcard.size Number <optional>
Total size of SD card partition in bytes
partitions.himem.size Number <optional>
Bytes of RAM not used by low.js and available via himemRead/himemWrite
Source:

(inner) settings

The settings tree of low.js. For all properties which can be read, see https://www.lowjs.org/documentation/lowjs-settings.html. To write new settings, call setSettings.
Source:

(inner) status

An object holding status information Every change of this object can be detected by the user program by adding an event handler for lowsysStatusChanged to process ( process.on('lowsysStatusChange', () => { ... }); )
Properties:
Name Type Description
status.eth String Status of Ethernet interface
status.wifi String Status of Wifi interface
status.time String Status of requesting time from time server
status.sdcard String Status of SD card
Source:

(inner) updateVersion

If set, is the version of low newer than the running version (defined in process.versions.lowjs_esp32) the system can update to.
Properties:
Type Description
String
Source:

Methods

(inner) gc()

Calls the garbage collector. Useful if you want to see the actual usage of memory in the graph of the neonious IDE. Not needed for correct functioning of low.js however: The garbage collector is automatically called when there is no free memory available.
Source:

(inner) himemRead(buffer, himemOffset, bufOffsetopt, lengthopt, callback)

Allows user program to read from the higher 4 MB of PSRAM if ESP-WROVER-B is used. This memory is not used by low.js itself because it cannot be accessed directly bei the ESP32 chip.
Parameters:
Name Type Attributes Default Description
buffer Buffer the buffer to fill
himemOffset Number the offset in high memory where to start reading
bufOffset Number <optional>
0 the offset in the buffer where to start writing to
length Number <optional>
buffer.length-bufOffset the number of bytes to read
callback HimemTransferCallback the callback to call when the data is read
Source:

(inner) himemWrite(buffer, himemOffset, bufOffsetopt, lengthopt, callback)

Allows user program to write to the higher 4 MB of PSRAM if ESP-WROVER-B is used. This memory is not used by low.js itself because it cannot be accessed directly bei the ESP32 chip.
Parameters:
Name Type Attributes Default Description
buffer Buffer the buffer with data
himemOffset Number the offset in high memory to start writing
bufOffset Number <optional>
0 the offset in the buffer where to get the data
length Number <optional>
buffer.length-bufOffset the number of bytes to write
callback HimemTransferCallback the callback to call when the data is written
Source:

(inner) kickWatchdog()

Kicks the watchdog. Required to do by the user program if the code.watchdog_mode setting is not set to "off", and it takes too long to get back to the event loop or code.kick_watchdog_event_loop is not true.
Source:

(inner) restart()

Ends the process just like process.exit (with call to process event exit), but restarts the process afterwards
Source:

(inner) setSettings(settings, onlyValidateopt) → {Object}

Allows to set one or more of the low.js settings. For all properties which can be set, see https://www.lowjs.org/documentation/lowjs-settings.html. The returned object holds strings indicating the error for the settings which could not be set, for example: {code: {auto_start: 'INVALID'}} if a Number is tried to be set instead of a Boolean.
Parameters:
Name Type Attributes Default Description
settings Object The settings to set, for example: {code: {auto_start: false}}
onlyValidate Boolean <optional>
false If true, settings are not set. Can be used to check if all settings would be set or if any one of the settings to be set would return an error.
Source:
Returns:
Type
Object

(inner) setSystemTime(time)

The user program can use a RTC or GPS module to get the current time and pass it to this method to set the system time to it
Parameters:
Name Type Description
time Date the new system time
Source:

(inner) updateNow()

Restarts the device into the Over-The-Air updater. Throws if no update is available (in which case updateVersion is undefined) or if the Over-The-Air updater is not supported (currently only supported on neonious one).
Source:

Type Definitions

HimemTransferCallback(errnullable)

Callback which is called when a transfer completed.
Parameters:
Name Type Attributes Description
err Error <nullable>
optional error
Source: