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/06/28 04:08]
admin
uphp:functions [2019/08/16 06:02]
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 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 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 51: Line 53:
 |[[.functions:ftp_download]]|<html><span style="color:green">int<span style="color:blue"> result</html>|<html><span style="color:green">string<span style="color:black"> remote_file</html>,<html><span style="color:green">string<span style="color:black"> local_file</html>,[<html><span style="color:green">int<span style="color:black"> position</html>]|Initiate a download of a remote file| |[[.functions:ftp_download]]|<html><span style="color:green">int<span style="color:blue"> result</html>|<html><span style="color:green">string<span style="color:black"> remote_file</html>,<html><span style="color:green">string<span style="color:black"> local_file</html>,[<html><span style="color:green">int<span style="color:black"> position</html>]|Initiate a download of a remote file|
 |[[.functions:ftp_error]]|<html><span style="color:green">int<span style="color:blue"> result</html>||Get last FTP response code| |[[.functions:ftp_error]]|<html><span style="color:green">int<span style="color:blue"> result</html>||Get last FTP response code|
 +|[[.functions:ftp_is_busy]]|<html><span style="color:green">int<span style="color:blue"> result</html>|| Check if the FTP engine is busy|
 |[[.functions:ftp_is_connected]]|<html><span style="color:green">int<span style="color:blue"> result</html>|| Check if the FTP connection is active| |[[.functions:ftp_is_connected]]|<html><span style="color:green">int<span style="color:blue"> result</html>|| Check if the FTP connection is active|
 |[[.functions:ftp_is_connecting]]|<html><span style="color:green">int<span style="color:blue"> result</html>|| Check if the FTP connection is in the process of connecting| |[[.functions:ftp_is_connecting]]|<html><span style="color:green">int<span style="color:blue"> result</html>|| Check if the FTP connection is in the process of connecting|
Line 93: Line 96:
 |[[.functions:max_execution_time]]|<html><span style="color:green">int<span style="color:blue"> seconds</html>||Set the maximum execution time for the current script| |[[.functions:max_execution_time]]|<html><span style="color:green">int<span style="color:blue"> seconds</html>||Set the maximum execution time for the current script|
 |[[.functions: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<span style="color:black">,<span style="color:green"> int<span style="color:blue"> bus</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Add a device to the list of polled devices| |[[.functions: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<span style="color:black">,<span style="color:green"> int<span style="color:blue"> bus</html>|<html><span style="color:green">int<span style="color:black"> 0=OK</html>|Add a device to the list of polled devices|
-|[[.functions:mb_delete_device]]|<html><span style="color:green">int<span style="color:blue"> id</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Delete a device from the list of active devices|+|[[.functions:mb_delete_dev]]|<html><span style="color:green">int<span style="color:blue"> id</html>|<html><span style="color:green">int<span style="color:black"> 1=OK</html>|Delete a device from the list of active devices|
 |[[.functions:mb_get_dev_by_id]]|<html><span style="color:green">int<span style="color:blue"> id</html>|<html><span style="color:green">array</html>|Return modbus device details by <html><span style="color:blue">id</html>| |[[.functions:mb_get_dev_by_id]]|<html><span style="color:green">int<span style="color:blue"> id</html>|<html><span style="color:green">array</html>|Return modbus device details by <html><span style="color:blue">id</html>|
 |[[.functions:mb_get_dev_by_index]]|<html><span style="color:green">int<span style="color:blue"> index</html>|<html><span style="color:green">array</html>|Return modbus device details by <html><span style="color:blue">index</html>| |[[.functions:mb_get_dev_by_index]]|<html><span style="color:green">int<span style="color:blue"> index</html>|<html><span style="color:green">array</html>|Return modbus device details by <html><span style="color:blue">index</html>|
Line 186: Line 189:
 |[[.functions:time]]||<html><span style="color:green">int<span style="color:black"> seconds</html>|Return the current system timestamp| |[[.functions:time]]||<html><span style="color:green">int<span style="color:black"> seconds</html>|Return the current system timestamp|
 |[[.functions:timefromfat]]|<html><span style="color:green">int<span style="color:blue"> filetime</html>|<html><span style="color:green">int<span style="color:black"> seconds</html>|Convert a FAT <html><span style="color:blue">filetime<span style="color:black"></html> to a Linux Timestamp| |[[.functions:timefromfat]]|<html><span style="color:green">int<span style="color:blue"> filetime</html>|<html><span style="color:green">int<span style="color:black"> seconds</html>|Convert a FAT <html><span style="color:blue">filetime<span style="color:black"></html> to a Linux Timestamp|
 +|[[.functions:trim]]|<html><span style="color:green">string<span style="color:blue"> input</html>|<html><span style="color:green">string<span style="color:black"> trimmed</html>|Return the trimmed <html><span style="color:green">string</html>|
 |[[.functions:ucfirst]]|<html><span style="color:green">string<span style="color:blue"> input</html>|<html><span style="color:green">string<span style="color:black"> Lowercase</html>|Convert a <html><span style="color:green">string<span style="color:black"></html> to Lowercase except for the first character| |[[.functions:ucfirst]]|<html><span style="color:green">string<span style="color:blue"> input</html>|<html><span style="color:green">string<span style="color:black"> Lowercase</html>|Convert a <html><span style="color:green">string<span style="color:black"></html> to Lowercase except for the first character|
 |[[.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)|
uphp/functions.txt · Last modified: 2022/09/23 04:53 by admin