<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://www.wattmon.com/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www.wattmon.com/dokuwiki/feed.php">
        <title>Wattmon Documentation Wiki uphp:library_functions</title>
        <description></description>
        <link>http://www.wattmon.com/dokuwiki/</link>
        <image rdf:resource="http://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-04T10:52:01+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/add_cron?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/add_role?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/fgets_long?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/library_functions?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus.inc?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/quick_sort?rev=1640595049&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/remove_cron?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.wattmon.com/dokuwiki/uphp/library_functions/smtp_mail?rev=1631512652&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Wattmon Documentation Wiki</title>
        <link>http://www.wattmon.com/dokuwiki/</link>
        <url>http://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/add_cron?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:add_cron</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/add_cron?rev=1631512652&amp;do=diff</link>
        <description>add_cron

WattmonOS 3.12+

Add a script to be executed by the CRON scheduler

Library



Description



Add a script to be executed by the CRON scheduler after a reboot.

Parameters

: Full path to filename to be executed

: CRON-compatible interval using the following format:</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/add_role?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:add_role</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/add_role?rev=1631512652&amp;do=diff</link>
        <description>add_role

WattmonOS 3.12+

Add a role to the system roles, or modify an existing role based on its role ID.

Library



Description



Add a role to the system roles, or modify an existing role based on its role ID.

Parameters

: Role ID to update or -1 to add a new role</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/fgets_long?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:fgets_long</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/fgets_long?rev=1631512652&amp;do=diff</link>
        <description>fgets_long

WattmonOS 3.11+

Get a string of arbitrary length from a file handle

Library



Description



Since uPHP has a maximum length of 255 bytes for strings read from disk, 
this function checks for the condition and keeps reading till the end of 
the string.</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/library_functions?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:library_functions</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/library_functions?rev=1631512652&amp;do=diff</link>
        <description>uPHP Library Reference

uPHP Library functions are functions that are written in uPHP and distributed with the WattmonOS installation.  You will need to include the relevant file using include() before calling the function.

Click on the function name for further details:</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus.inc?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:modbus.inc</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus.inc?rev=1631512652&amp;do=diff</link>
        <description>&lt;?
/**
 * @file modbus.inc
 * @author Akash Heimlich
 * @version 1.0
 * @date 09/04/2021
 * @description Modbus functions
 */

define('MB_ILLEGAL_FUNCTION',-1);
define('MB_ILLEGAL_ADDRESS',-2);
define('MB_ILLEGAL_VALUE',-3);
define('MB_SLAVE_FAILURE',-4);

/**
  * mb_get_error_string - get modbus exception error 
  *
  * Return a human readable error string based on the exception code
  *
  * @param int $error_number - Modbus except (negative value)
  *         For exceptions not generated by th…</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:modbus</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/modbus?rev=1631512652&amp;do=diff</link>
        <description>Modbus Library Reference

Available in Wattmon OS 3.12+

The Modbus include library contains functions and defines as shown below.

Usage:



Source:

View Source

Defines
DEFINEVALUEMB_ILLEGAL_FUNCTION-1MB_ILLEGAL_ADDRESS-2MB_ILLEGAL_VALUE-3MB_SLAVE_FAILURE-4
Functions</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/quick_sort?rev=1640595049&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-12-27T08:50:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:quick_sort</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/quick_sort?rev=1640595049&amp;do=diff</link>
        <description>quick_sort

WattmonOS 3.14+

Sort an array using the quick sort algorithm

Library



Description



Sort an array by key, value or using a callback function

Parameters

: Array to be sorted

: One of the following methods:
TYPEVALUEDESCRIPTION SORT_KEY</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/remove_cron?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:remove_cron</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/remove_cron?rev=1631512652&amp;do=diff</link>
        <description>remove_cron

WattmonOS 3.12+

Remove a script from the CRON scheduler

Library



Description



This will attempt to remove the script from the scheduler.  This will effectively recreate the crontab file and changes will only be applied after a reboot.</description>
    </item>
    <item rdf:about="http://www.wattmon.com/dokuwiki/uphp/library_functions/smtp_mail?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:library_functions:smtp_mail</title>
        <link>http://www.wattmon.com/dokuwiki/uphp/library_functions/smtp_mail?rev=1631512652&amp;do=diff</link>
        <description>smtp_mail

WattmonOS 3.12+

Send an email using a raw socket over SMTP

Library



Description



This function will send an email using the SMTP Server settings that you pass to the function.  You can use port 465 / 587 for SSL/TLS.

Parameters

: Recipient email id</description>
    </item>
</rdf:RDF>
