User Tools

Site Tools


uphp:functions:uphp_function_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:uphp_function_reference [2017/07/11 01:26]
jeff
uphp:functions:uphp_function_reference [2018/08/07 10:43]
jeff DELETED: uphp:functions:uphp_function_reference was moved to uphp:functions
Line 16: Line 16:
 |[[chdir]]|<html><span style="color:green">string<span style="color:blue"> directory</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Change the current directory| |[[chdir]]|<html><span style="color:green">string<span style="color:blue"> directory</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Change the current directory|
 |[[chr]]|<html><span style="color:green">int<span style="color:blue"> code</html>|<html><span style="color:green">string<span style="color:black"> 1 character</html>|<html>Return the character for an ASCII <span style="color:blue">code</html>| |[[chr]]|<html><span style="color:green">int<span style="color:blue"> code</html>|<html><span style="color:green">string<span style="color:black"> 1 character</html>|<html>Return the character for an ASCII <span style="color:blue">code</html>|
 +|[[clear_watchdog]]|||Clear the software watchdog timer|
 |[[cos]]|<html><span style="color:green">number<span style="color:blue"> radian_angle</html>|<html><span style="color:green">float<span style="color:black"> cosine</html>|<html>Return cosine of a <span style="color:blue">radian_angle</html>| |[[cos]]|<html><span style="color:green">number<span style="color:blue"> radian_angle</html>|<html><span style="color:green">float<span style="color:black"> cosine</html>|<html>Return cosine of a <span style="color:blue">radian_angle</html>|
 |[[debug]]|<html><span style="color:green">string<span style="color:blue"> output</html>||Print to debug output| |[[debug]]|<html><span style="color:green">string<span style="color:blue"> output</html>||Print to debug output|
Line 36: Line 37:
 |[[firmwareupdate]]|||Initiate a firmware update sequence and reboot the device| |[[firmwareupdate]]|||Initiate a firmware update sequence and reboot the device|
 |[[floatval]]|<html><span style="color:green">mixed<span style="color:blue"> value</html>|<html><span style="color:green">float<span style="color:black"> value or <span style="color:green">int<span style="color:black"> 0/1</html>|<html>Return the <span style="color:green">float<span style="color:black"> value of a <span style="color:green">number<span style="color:black"> or <span style="color:green">string</html>| |[[floatval]]|<html><span style="color:green">mixed<span style="color:blue"> value</html>|<html><span style="color:green">float<span style="color:black"> value or <span style="color:green">int<span style="color:black"> 0/1</html>|<html>Return the <span style="color:green">float<span style="color:black"> value of a <span style="color:green">number<span style="color:black"> or <span style="color:green">string</html>|
-|[[flush]]|||Flush current output to the browser|+|[[flush]]|<html><span style="color:green">socket<span style="color:black"> socket to flush</html>||Flush current output or socket to the browser|
 |[[fopen]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> string<span style="color:blue"> mode</html>|<html><span style="color:green">int<span style="color:black"> handle or 0</html>|Open a file for reading or writing| |[[fopen]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> string<span style="color:blue"> mode</html>|<html><span style="color:green">int<span style="color:black"> handle or 0</html>|Open a file for reading or writing|
 |[[fread]]|<html><span style="color:green">int<span style="color:blue"> handle<span style="color:black">,<span style="color:green"> int<span style="color:blue"> bytes</html>|<html><span style="color:green">string<span style="color:black"> or <span style="color:green">int<span style="color:black"> 0</html>|<html>Read <span style="color:blue">bytes<span style="color:black"> from a file, stream or socket</html>| |[[fread]]|<html><span style="color:green">int<span style="color:blue"> handle<span style="color:black">,<span style="color:green"> int<span style="color:blue"> bytes</html>|<html><span style="color:green">string<span style="color:black"> or <span style="color:green">int<span style="color:black"> 0</html>|<html>Read <span style="color:blue">bytes<span style="color:black"> from a file, stream or socket</html>|
Line 62: Line 63:
 |[[ini_put_array]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> array<span style="color:blue"> data<span style="color:black">,<span style="color:green"> string<span style="color:blue"> section</html>||Write a group of parameters to an INI file from an <html><span style="color:green">array<span style="color:black"></html>| |[[ini_put_array]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> array<span style="color:blue"> data<span style="color:black">,<span style="color:green"> string<span style="color:blue"> section</html>||Write a group of parameters to an INI file from an <html><span style="color:green">array<span style="color:black"></html>|
 |[[ini_set]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> string<span style="color:blue"> section<span style="color:black">,<span style="color:green"> string<span style="color:blue"> key<span style="color:black">,<span style="color:green"> mixed<span style="color:blue"> value</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Set a <html><span style="color:blue">value<span style="color:black"></html> in an INI file| |[[ini_set]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> string<span style="color:blue"> section<span style="color:black">,<span style="color:green"> string<span style="color:blue"> key<span style="color:black">,<span style="color:green"> mixed<span style="color:blue"> value</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Set a <html><span style="color:blue">value<span style="color:black"></html> in an INI file|
 +|[[init_watchdog]]|<html><span style="color:green">int <span style="color:blue">interval</html>||<html>Initialize the software watchdog timer</html>|
 |[[inttoieee754]]|<html><span style="color:green">int <span style="color:blue">representation</html>|<html><span style="color:green">float<span style="color:black"> value</html>|<html>Convert an IEEE-754 encoded <span style="color:green">integer <span style="color:blue">representation<span style="color:black"> (32 bit) to a <span style="color:green">float</html>| |[[inttoieee754]]|<html><span style="color:green">int <span style="color:blue">representation</html>|<html><span style="color:green">float<span style="color:black"> value</html>|<html>Convert an IEEE-754 encoded <span style="color:green">integer <span style="color:blue">representation<span style="color:black"> (32 bit) to a <span style="color:green">float</html>|
 |[[intval]]|<html><span style="color:green">mixed<span style="color:blue"> value</html>|<html><span style="color:green">int<span style="color:black"> value</html>|<html>Return the <span style="color:green">integer<span style="color:black"> value of a <span style="color:green">number<span style="color:black"> or <span style="color:green">string</html>| |[[intval]]|<html><span style="color:green">mixed<span style="color:blue"> value</html>|<html><span style="color:green">int<span style="color:black"> value</html>|<html>Return the <span style="color:green">integer<span style="color:black"> value of a <span style="color:green">number<span style="color:black"> or <span style="color:green">string</html>|
Line 74: Line 76:
 |[[log]]|<html><span style="color:green">string<span style="color:blue"> output<span style="color:black">,<span style="color:green"> string<span style="color:blue"> file</html>||<html>Print to the System Log (or optional <span style="color:blue">file<span style="color:black">)</html>| |[[log]]|<html><span style="color:green">string<span style="color:blue"> output<span style="color:black">,<span style="color:green"> string<span style="color:blue"> file</html>||<html>Print to the System Log (or optional <span style="color:blue">file<span style="color:black">)</html>|
 |[[log10]]|<html><span style="color:green">number<span style="color:blue"> number</html>|<html><span style="color:green">float<span style="color:black"> log<sub>10</sub></html>|Return the base 10 logarithm of a <html><span style="color:blue">number</html>| |[[log10]]|<html><span style="color:green">number<span style="color:blue"> number</html>|<html><span style="color:green">float<span style="color:black"> log<sub>10</sub></html>|Return the base 10 logarithm of a <html><span style="color:blue">number</html>|
-|[[mail]]|<html><span style="color:green">string<span style="color:blue"> recipient<span style="color:black">,<span style="color:green"> string<span style="color:blue"> subject<span style="color:black">,<span style="color:green"> string<span style="color:blue"> body</html>|<html><span style="color:green">int<span style="color:black"> 0 or SMTP error code</html>|Send an email|+|[[mail]]|<html><span style="color:green">string<span style="color:blue"> recipient<span style="color:black">,<span style="color:green"> string<span style="color:blue"> subject<span style="color:black">,<span style="color:green"> string<span style="color:blue"> body</html>|<html><span style="color:green">int<span style="color:black"> 0 or SMTP error code</html>|Send an email [deprecated]|
 |[[max_execution_time]]|<html><span style="color:green">int<span style="color:blue"> seconds</html>||Set the maximum execution time for the current script| |[[max_execution_time]]|<html><span style="color:green">int<span style="color:blue"> seconds</html>||Set the maximum execution time for the current script|
 |[[mb_add_dev]]|<html><span style="color:green">int<span style="color:blue"> id<span style="color:black">,<span style="color:green"> int<span style="color:blue"> type<span style="color:black">,<span style="color:green"> string<span style="color:blue"> name<span style="color:black">,<span style="color:green"> int<span style="color:blue"> poll_interval<span style="color:black">,<span style="color:green"> int<span style="color:blue"> status</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Add a device to the list of polled devices| |[[mb_add_dev]]|<html><span style="color:green">int<span style="color:blue"> id<span style="color:black">,<span style="color:green"> int<span style="color:blue"> type<span style="color:black">,<span style="color:green"> string<span style="color:blue"> name<span style="color:black">,<span style="color:green"> int<span style="color:blue"> poll_interval<span style="color:black">,<span style="color:green"> int<span style="color:blue"> status</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Add a device to the list of polled devices|
Line 100: Line 102:
 |[[mkdir]]|<html><span style="color:green">string<span style="color:blue"> pathname</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|Make a directory| |[[mkdir]]|<html><span style="color:green">string<span style="color:blue"> pathname</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|Make a directory|
 |[[mktime]]|<html><span style="color:green">int<span style="color:blue"> hour<span style="color:black">,<span style="color:green"> int<span style="color:blue"> minute<span style="color:black">,<span style="color:green"> int<span style="color:blue"> second<span style="color:black">,<span style="color:green"> int<span style="color:blue"> month<span style="color:black">,<span style="color:green"> int<span style="color:blue"> day<span style="color:black">,<span style="color:green"> int<span style="color:blue"> year</html>|<html><span style="color:green">int<span style="color:black"> seconds</html>|Return the Linux Timestamp for a given date and time| |[[mktime]]|<html><span style="color:green">int<span style="color:blue"> hour<span style="color:black">,<span style="color:green"> int<span style="color:blue"> minute<span style="color:black">,<span style="color:green"> int<span style="color:blue"> second<span style="color:black">,<span style="color:green"> int<span style="color:blue"> month<span style="color:black">,<span style="color:green"> int<span style="color:blue"> day<span style="color:black">,<span style="color:green"> int<span style="color:blue"> year</html>|<html><span style="color:green">int<span style="color:black"> seconds</html>|Return the Linux Timestamp for a given date and time|
 +|[[mqtt_publish]]|<html><span style="color:green">string<span style="color:blue"> channel</html>, <html><span style="color:green">string<span style="color:blue"> content</html>|<html><span style="color:green">int<span style="color:black"> 1 for success or 0 for error</html>|Publish a message to an MQTT server|
 +|[[mqtt_subscribe]]|<html><span style="color:green">string<span style="color:blue"> channel</html>, <html><span style="color:green">string<span style="color:blue"> callback</html>|<html><span style="color:green">int<span style="color:black"> 1 for success or 0 for error</html>|Subscribe to a channel on an MQTT server|
 |[[net_disable3g]]|||Disable 3G support for the dongle| |[[net_disable3g]]|||Disable 3G support for the dongle|
 |[[net_enable3g]]|||Enable 3G support for the dongle| |[[net_enable3g]]|||Enable 3G support for the dongle|
Line 135: Line 139:
 |[[reset]]|||Reset the processor| |[[reset]]|||Reset the processor|
 |[[rmdir]]|<html><span style="color:green">string<span style="color:blue"> pathname<span style="color:black">,<span style="color:green"> int<span style="color:blue"> delete_contents</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Remove a directory, with optional deletion of contents| |[[rmdir]]|<html><span style="color:green">string<span style="color:blue"> pathname<span style="color:black">,<span style="color:green"> int<span style="color:blue"> delete_contents</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Remove a directory, with optional deletion of contents|
 +|[[send_sms]]|<html><span style="color:green">string<span style="color:blue"> phone_number, <span style="color:green"> string<span style="color:blue"> message</html>|<html><span style="color:green">int<span style="color:black"> result</html>|<html>sends an sms through a cellular dongle<span style="color:black"></html>|
 |[[session_destroy]]|||Clear the current session's data| |[[session_destroy]]|||Clear the current session's data|
 |[[session_is_new]]||<html><span style="color:green">int</html>|Check if a session was just initiated| |[[session_is_new]]||<html><span style="color:green">int</html>|Check if a session was just initiated|