User Tools

Site Tools


uphp:functions

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
Next revision Both sides next revision
uphp:functions [2019/08/16 06:02]
admin
uphp:functions [2019/12/20 09:22]
admin
Line 7: Line 7:
 ^FUNCTION NAME^PARAMETER(S)^RETURN^DESCRIPTION^ ^FUNCTION NAME^PARAMETER(S)^RETURN^DESCRIPTION^
 |[[.functions:adc_read]]|<html><span style="color:green">int<span style="color:blue"> channel</html>|<html><span style="color:green">int<span style="color:black"> ADC value</html>|Read an onboard <tooltip title="Analog to Digital Converter">ADC</tooltip> <html><span style="color:blue">channel</html>| |[[.functions:adc_read]]|<html><span style="color:green">int<span style="color:blue"> channel</html>|<html><span style="color:green">int<span style="color:black"> ADC value</html>|Read an onboard <tooltip title="Analog to Digital Converter">ADC</tooltip> <html><span style="color:blue">channel</html>|
-|[[.functions:aes_decrypt]]|<html><span style="color:green">string <span style="color:black">text, <span style="color:green">int <span style="color:black">length, <span style="color:green"> string<span style="color:blue"> key</html>, <html><span style="color:green">string<span style="color:black"> iv</html>|String|<html>Return an AES-decrypted string</html>+|[[.functions:aes_decrypt]]|<html><span style="color:green">string <span style="color:black">text, <span style="color:green">int <span style="color:black">length, <span style="color:green"> string<span style="color:blue"> key</html>, <html><span style="color:green">string<span style="color:black"> iv</html>|string with data|<html>Return an AES-decrypted string</html>
-|[[.functions:aes_encrypt]]|<html><span style="color:green">string <span style="color:black">text, <span style="color:green">int<span style="color:black"> length, <span style="color:green"> string<span style="color:blue"> key<span style="color:black">,<span style="color:green">string<span style="color:black"> iv</html>|String|<html>Return an AES-encrypted string</html>|+|[[.functions:aes_encrypt]]|<html><span style="color:green">string <span style="color:black">text, <span style="color:green">int<span style="color:black"> length, <span style="color:green"> string<span style="color:blue"> key<span style="color:black">,<span style="color:green">string<span style="color:black"> iv</html>|string with data|<html>Return an AES-encrypted string</html>|
 |[[.functions:array]]|<html><span style="color:green">mixed<span style="color:blue"> values<span style="color:black"> ...</html>|<html><span style="color:green">array</html>|<html>Create an <span style="color:green">array<span style="color:black">, with optional <html><span style="color:blue">values</html>| |[[.functions:array]]|<html><span style="color:green">mixed<span style="color:blue"> values<span style="color:black"> ...</html>|<html><span style="color:green">array</html>|<html>Create an <span style="color:green">array<span style="color:black">, with optional <html><span style="color:blue">values</html>|
 |[[.functions:array_key]]|<html><span style="color:green">array<span style="color:black">, <span style="color:green"> int<span style="color:blue"> index</html>|<html><span style="color:green">string<span style="color:black"> key</html>|<html>Return the key for an <span style="color:green">array <span style="color:blue">index</html>| |[[.functions:array_key]]|<html><span style="color:green">array<span style="color:black">, <span style="color:green"> int<span style="color:blue"> index</html>|<html><span style="color:green">string<span style="color:black"> key</html>|<html>Return the key for an <span style="color:green">array <span style="color:blue">index</html>|
Line 119: Line 119:
 |[[.functions: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| |[[.functions: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|
 |[[.functions: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| |[[.functions: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|
 +|[[.functions:mqtt_disconnect]]||<html></html>|Disconnect MQTT connection|
 |[[.functions: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| |[[.functions: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|
 |[[.functions: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| |[[.functions: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|
 +|[[.functions:mqttstat]]||<html><span style="color:green">array<span style="color:black"> array with connection status</html>|Get MQTT Connection status|
 |[[.functions:net_disable3g]]|||Disable 3G support for the dongle| |[[.functions:net_disable3g]]|||Disable 3G support for the dongle|
 |[[.functions:net_enable3g]]|||Enable 3G support for the dongle| |[[.functions:net_enable3g]]|||Enable 3G support for the dongle|
Line 140: Line 142:
 |[[.functions:ow_reset]]|||Reset the OneWire bus| |[[.functions:ow_reset]]|||Reset the OneWire bus|
 |[[.functions:ow_write]]|<html><span style="color:green">int<span style="color:blue"> value</html>||Write a byte to the OneWire bus| |[[.functions:ow_write]]|<html><span style="color:green">int<span style="color:blue"> value</html>||Write a byte to the OneWire bus|
 +|[[.functions:pack]]|<html><span style="color:green">string<span style="color:blue"> format<span style="color:black">, <span style="color:green">mixed <span style="color:blue"> value<span style="color:black"></html> |<html><span style="color:green">string</html>|<html>Pack a value into a <html><span style="color:green">string<span style="color:black"></html>|
 |[[.functions:phpinfo]]||<html><span style="color:green">string</html>|Return information about the system| |[[.functions:phpinfo]]||<html><span style="color:green">string</html>|Return information about the system|
 |[[.functions:pin_configure]]|<html><span style="color:green">int<span style="color:blue"> pin_index<span style="color:black">,<span style="color:green"> int<span style="color:blue"> pin_type<span style="color:black">,<span style="color:green"> int<span style="color:blue"> counter_type</html>||Configure an <tooltip title="Input/Output">I/O</tooltip> pin as a digital input, output, or analog input| |[[.functions:pin_configure]]|<html><span style="color:green">int<span style="color:blue"> pin_index<span style="color:black">,<span style="color:green"> int<span style="color:blue"> pin_type<span style="color:black">,<span style="color:green"> int<span style="color:blue"> counter_type</html>||Configure an <tooltip title="Input/Output">I/O</tooltip> pin as a digital input, output, or analog input|
Line 153: Line 156:
 |[[.functions:rand]]|<html><span style="color:green">int<span style="color:blue"> min<span style="color:black">, <span style="color:green">int<span style="color:blue"> max</html>|<html><span style="color:green">int</html>|<html>Return a random <span style="color:green">integer<span style="color:black"> between <span style="color:blue">min<span style="color:black"> and <span style="color:blue">max</html>| |[[.functions:rand]]|<html><span style="color:green">int<span style="color:blue"> min<span style="color:black">, <span style="color:green">int<span style="color:blue"> max</html>|<html><span style="color:green">int</html>|<html>Return a random <span style="color:green">integer<span style="color:black"> between <span style="color:blue">min<span style="color:black"> and <span style="color:blue">max</html>|
 |[[.functions:reboot]]|||Reboot the processor| |[[.functions:reboot]]|||Reboot the processor|
 +|[[.functions:register_callback]]|<html><span style="color:green">string<span style="color:blue"> callback_type<span style="color:black">, <span style="color:green">string<span style="color:blue"> filename, <span style="color:green">string<span style="color:blue"> functionname</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|<html>Register a callback function for system events </html>|
 +
 |[[.functions:rename]]|<html><span style="color:green">string<span style="color:blue"> source<span style="color:black">, <span style="color:green">string<span style="color:blue"> destination</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|<html>Rename or move a file or directory from <span style="color:blue">source<span style="color:black"> to <span style="color:blue">destination</html>| |[[.functions:rename]]|<html><span style="color:green">string<span style="color:blue"> source<span style="color:black">, <span style="color:green">string<span style="color:blue"> destination</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|<html>Rename or move a file or directory from <span style="color:blue">source<span style="color:black"> to <span style="color:blue">destination</html>|
 |[[.functions:reset]]|||Reset the processor| |[[.functions:reset]]|||Reset the processor|
Line 193: Line 198:
 |[[.functions:unlink]]|<html><span style="color:green">string <span style="color:blue">filename</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|Remove a file (delete it)| |[[.functions:unlink]]|<html><span style="color:green">string <span style="color:blue">filename</html>|<html><span style="color:green">int<span style="color:black"> 0 or error code</html>|Remove a file (delete it)|
 |[[.functions:untar]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> int<span style="color:blue"> verbosity</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Expand a TAR file into the current folder, optionally verbose| |[[.functions:untar]]|<html><span style="color:green">string<span style="color:blue"> filename<span style="color:black">,<span style="color:green"> int<span style="color:blue"> verbosity</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Expand a TAR file into the current folder, optionally verbose|
 +|[[.functions:unpack]]|<html><span style="color:green">string<span style="color:blue"> format<span style="color:black">, <span style="color:green">string <span style="color:blue"> value<span style="color:black"></html> |<html><span style="color:green">number</html>|<html>Unpack a packed string value and return the original data<span style="color:black"></html>|
 |[[.functions:uptime]]||<html><span style="color:green">int<span style="color:black"> ms</html>|Return the uptime in milliseconds| |[[.functions:uptime]]||<html><span style="color:green">int<span style="color:black"> ms</html>|Return the uptime in milliseconds|
 |[[.functions:wifi_disable]]|||Disable Wifi module| |[[.functions:wifi_disable]]|||Disable Wifi module|
 |[[.functions:wifi_enable]]|||Enable Wifi module| |[[.functions:wifi_enable]]|||Enable Wifi module|
  
uphp/functions.txt · Last modified: 2022/09/23 04:53 by admin