Home Documentation Tutorials API GitHub

All Types

class studs::Sys


Sys provides system level information and utilites for a target device.


const static Bool isDataMounted()

Return true it the writable data parition is mounted. See mountData.


const static Void mountData(Bool reformat := true)

Mount the writable data partition for this device under the /data directory. If the partition fails to mount and reformat=true, then the partition is automatically reformatted, and mount attempted again. Throws IOErr if data partition could not be mounted. If partition is already mounted, this method does nothing.


const static Str:Str props()

Get etc/sys.props system properites, which includes:

  • proj.name
  • proj.version
  • studs.version
  • system.name
  • system.version

const static Void reboot()

Reboot this device.


const static Void shutdown()

Shutdown this device.


const static Void updateFirmware(InStream in, |Int|? onProgress := null)

Update the firmware running on this device with the image streamed from the InStream in. This method does not reboot device. A reboot must be issued for update to take effect.

Use the optional onProgress callback to recieve update progress, where prog will be a number between 0..100 indicating the percentage complete.

See Updating Firmware chapter for details on how firwmare is updated.