Lua Player Plus Vita
Documentation of lpp-vita
System Class Reference

Public Member Functions

int openFile (string filename, IOFlags flags)
 Open a file. More...
 
void writeFile (int handle, string text, int len)
 Write into an opened file. More...
 
string readFile (int handle, int len)
 Read from an opened file. More...
 
void seekFile (int handle, int pos, IOSeek seek)
 Move cursor of an opened file. More...
 
int sizeFile (int handle)
 Calculate size of an opened file in bytes. More...
 
table statFile (string filename)
 Extract info of a file/directory. More...
 
table statOpenedFile (int handle)
 Extract info of an opened file. More...
 
void closeFile (int handle)
 Close an opened file. More...
 
bool doesFileExist (string filename)
 Check if a file exists. More...
 
bool doesDirExist (string dirname)
 Check if a folder exists. More...
 
void rename (string filename, string filename2)
 Rename or move a file. More...
 
void copyFile (string filename, string filename2)
 Copy a file. More...
 
void deleteFile (string filename)
 Delete a file. More...
 
void deleteDirectory (string dirname)
 Delete a directory. More...
 
void createDirectory (string dirname)
 Create a new directory. More...
 
table listDirectory (string dirname)
 List a directory contents. More...
 
void exit (void)
 Close the interpreter. More...
 
string getFirmware (void)
 Get unspoofed system firmware version. More...
 
string getSpoofedFirmware (void)
 Get spoofed system firmware version. More...
 
string getFactoryFirmware (void)
 Get factory system firmware version. More...
 
void wait (int msecs)
 Sleep the application for a certain time. More...
 
bool isBatteryCharging (void)
 Check if the battery is under charge. More...
 
int getBatteryPercentage (void)
 Get current battery life percentage. More...
 
int getBatteryLife (void)
 Get current battery life. More...
 
int getBatteryCapacity (void)
 Get current battery capacity. More...
 
int getBatteryFullCapacity (void)
 Get full battery capacity. More...
 
int getBatteryTemp (void)
 Get battery temperature. More...
 
int getBatteryVolt (void)
 Get battery voltage. More...
 
int getBatteryHealth (void)
 Get battery state of health percentage. More...
 
int getBatteryCycles (void)
 Get battery cycles count. More...
 
void disableTimer (PowerTimer timer)
 Disable a power management timer feature. More...
 
void enableTimer (PowerTimer timer)
 Enable a power management timer feature. More...
 
void resetTimer (PowerTimer timer)
 Reset a power management timer feature. More...
 
void setCpuSpeed (int clock)
 Set CPU clock speed. More...
 
void setGpuSpeed (int clock)
 Set GPU clock speed. More...
 
void setBusSpeed (int clock)
 Set BUS clock speed. More...
 
void setBusSpeed (int clock)
 Set GPU Crossbar clock speed. More...
 
int getCpuSpeed (void)
 Get CPU clock speed. More...
 
int getGpuSpeed (void)
 Get GPU clock speed. More...
 
int getBusSpeed (void)
 Get BUS clock speed. More...
 
int getGpuXbarSpeed (void)
 Get GPU Crossbar clock speed. More...
 
void launchEboot (string filename)
 Launches a binary file. More...
 
void launchApp (string titleid)
 Launches an installed application. More...
 
void getFreeSpace (string dev)
 Get free space for a given device. More...
 
void getTotalSpace (string dev)
 Get total space for a given device. More...
 
int[] getTime (void)
 Get console time. More...
 
int[] getDate (void)
 Get console date. More...
 
string getUsername (void)
 Get account username. More...
 
int getLanguage (void)
 Get console language. More...
 
int getModel (void)
 Get console model. More...
 
string getPsId (void)
 Get console unique PsId. More...
 
string getTitle (void)
 Get running application title. More...
 
string getTitleID (void)
 Get running application title ID. More...
 
table extractSfo (string filename)
 Extract info from an SFO file. More...
 
void extractPbp (string filename, string dirname)
 Extract a PBP file (synchronous). More...
 
void extractZip (string filename, string dirname)
 Extract a ZIP file (synchronous). More...
 
void extractFromZip (string filename, string file, string destname)
 Extract a specific file from a ZIP file (synchronous). More...
 
void extractZipAsync (string filename, string dirname)
 Extract a ZIP file (asynchronous). More...
 
void extractFromZipAsync (string filename, string file, string destname)
 Extract a specific file from a ZIP file (asynchronous). More...
 
void compressZip (string path, string filename, int ratio)
 Compress a file or a folder in a ZIP file (synchronous). More...
 
void addToZip (string path, string filename, string parent, int ratio)
 Add a file or a folder in a ZIP file (synchronous). More...
 
int getAsyncState (void)
 Get current state of an asynchronous task. More...
 
string getAsyncResult (void)
 Get result from a finished asynchronous task. More...
 
void takeScreenshot (string filename, ImgFmt format, int ratio)
 Take a screenshot. More...
 
void executeUri (string uri)
 Execute an URI call. More...
 
int reboot (void)
 Reboot the console. More...
 
int shutdown (void)
 Shutdown the console. More...
 
int standby (void)
 Put the console in standby. More...
 
bool isSafeMode (void)
 Get if application is running in safe mode. More...
 
void setMessage (string text, bool progressbar, BtnMode buttons)
 Start a system message instance. More...
 
DlgState getMessageState (void)
 Get current system message instance state. More...
 
void setMessageProgress (int progress)
 Set current progress for the system message instance. More...
 
void setMessageProgMsg (string text)
 Set a submessage for the system message instance. More...
 
void closeMessage (void)
 Close the current system message instance. More...
 
void unmountPartition (int idx)
 Unmount an already mounted partition. More...
 
void mountPartition (int idx, MntPerm perms)
 Mount an unmounted partition. More...
 
void installApp (string dir)
 Install an extracted app. More...
 
void uninstallApp (string titleid)
 Uninstall an installed app. More...
 
bool doesAppExist (string titleid)
 Check if an app is installed. More...
 
string getBootParams (void)
 Retrieve params used at app boot. More...
 
int loadUserPlugin (string path)
 Load and start an user plugin. More...
 
int loadKernelPlugin (string path)
 Load and start a kernel plugin. More...
 
void unloadUserPlugin (int plug_id)
 Stop and unload an user plugin. More...
 
void unloadUserPlugin (int plug_id)
 Stop and unload a kernel plugin. More...
 
void unmountMountpoint (string mnt)
 Unmount a virtual mountpoint. More...
 

Member Function Documentation

◆ setBusSpeed()

void System::setBusSpeed ( int  clock)

Set GPU Crossbar clock speed.

Usage example:
System.setGpuXbarSpeed(166)
Definition: luaSystem.cpp:78
Parameters
clock- The clock to set in Mhz.
Note
Clock must be between 0 and 166.

◆ unloadUserPlugin()

void System::unloadUserPlugin ( int  plug_id)

Stop and unload a kernel plugin.

Usage example:
System.unloadKernelPlugin(plug_id)
Parameters
plug_id- The module identifier for the plugin to unload.
Note
This function is available only in unsafe mode.