<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Configuration Scripts</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>Recent changes to Configuration Scripts</description><atom:link href="https://sourceforge.net/p/libreacs/wiki/Configuration%20Scripts/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 10 Jul 2014 10:13:46 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/libreacs/wiki/Configuration%20Scripts/feed" rel="self" type="application/rss+xml"/><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -203,58 +203,3 @@
         logger ("DS exception: "+e.message)
     }

-Example Script
-=
-
-First for the "Default" script you should determine what sort of request was sent:
-
-    var sEvent;
-    var sCommandKey;
-    for( i=0; i&amp;lt;=cpe.Inform.Event.length-1; i++ )
-    {
-        sEvent = cpe.Inform.Event[i].EventCode;
-        sCommandKey = cpe.Inform.Event[i].CommandKey;
- 
-        switch ( sEvent )
-        {
-            case '0 BOOTSTRAP':
-                call("1-DoBootStrap");
-
-            case '1 BOOT':
-                call("2-DoBoot");
- 
-            case '2 PERIODIC':
-                call("3-DoPeriodic");
- 
-            case '3 SCHEDULED':
-                break;
- 
-            case '4 VALUE CHANGE':
-                break;
- 
-            case '5 KICKED':
-                break;
- 
-            case '6 CONNECTION REQUEST':
-                call("4-DoConnectionRequest");
- 
-            case '7 TRANSFER COMPLETE':
-                break;
- 
-            case '8 DIAGNOSTICS COMPLETE':
-                break;
-        }
-    }
-
-Subroutine scripts
-=
-
-Now that you have created a script above, you can create a sub-script that is called and name them "1-DoBootStrap" or similar, I personally numbered them so the order as displayed inside ACS on the left hand side is shown in the order that the scripts are executed, otherwise they are ordered alphabetically.
-
-Script Library
-=
-
-Below are some example scripts:
-
-[Check Object and Add Object](Example-VoiceProfile) - Check for a Voice Profile and add Voice Profile Object if if it doesn't then call external script to set TR104 Parameters.
-[SetParameterValues using Array](Example-SetTR104) - Set the TR-104 Voice Profile creating an array then using SetParameterValues
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Thu, 10 Jul 2014 10:13:46 -0000</pubDate><guid>https://sourceforge.neta3b02b218f3f7e00c7cd6fd92c634a7f6bd9284c</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -250,3 +250,11 @@
 =

 Now that you have created a script above, you can create a sub-script that is called and name them "1-DoBootStrap" or similar, I personally numbered them so the order as displayed inside ACS on the left hand side is shown in the order that the scripts are executed, otherwise they are ordered alphabetically.
+
+Script Library
+=
+
+Below are some example scripts:
+
+[Check Object and Add Object](Example-VoiceProfile) - Check for a Voice Profile and add Voice Profile Object if if it doesn't then call external script to set TR104 Parameters.
+[SetParameterValues using Array](Example-SetTR104) - Set the TR-104 Voice Profile creating an array then using SetParameterValues
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Fri, 04 Jul 2014 14:49:50 -0000</pubDate><guid>https://sourceforge.net3423882b580531e2ba56a5ccbb52edeefe8620d2</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -7,7 +7,6 @@
 =
 call
 -
-
 Call is used to call another another script.

     call ('script_name');
@@ -75,6 +74,19 @@
     // set encoding type
     parameters[2] = {name: 'InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions', value: '2', type: 'xsd:unsignedInt'};
     cpe.SetParameterValues (parameters, "commandKey");
+
+&lt;b&gt;GetParameterAttributes(parameter_names_array)&lt;/b&gt;
+
+    var p=new Array(); 
+    p[0]='InternetGatewayDevice.ManagementServer.PeriodicInformEnable'; 
+    var r = cpe.GetParameterAttributes(p);
+
+    var parameters = new Array();
+    parameters[0]='InternetGatewayDevice';
+    var response=cpe.GetParameterAttributes(parameters);
+    for (i = 0; i &lt; response.length; i++) {
+        logger ('parameterattribute: '+response[i].Name+' Notification :'+response[i].Notification);
+    }

 &lt;b&gt;SetParameterAttributes(params_array)&lt;/b&gt; - set attributes for parameters. Returns nothing.

@@ -88,12 +100,6 @@
     parameters[0].AccessList[0]='subscriber';
     cpe.SetParameterAttributes(parameters);

-&lt;b&gt;GetParameterAttributes(parameter_names_array)&lt;/b&gt;
-
-    var p=new Array(); 
-    p[0]='InternetGatewayDevice.ManagementServer.PeriodicInformEnable'; 
-    var r = cpe.GetParameterAttributes(p);
-
 &lt;b&gt;AddObject(top_object_name, commandKey)&lt;/b&gt; - Creates new object instance. Returns object with properties Status and InstanceNumber.

     var AddVoiceProfile = new Object();
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Tue, 13 May 2014 19:49:19 -0000</pubDate><guid>https://sourceforge.netf441eaacbb9f4c24ae4b02ea9ff5103b81884968</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -75,6 +75,24 @@
     // set encoding type
     parameters[2] = {name: 'InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions', value: '2', type: 'xsd:unsignedInt'};
     cpe.SetParameterValues (parameters, "commandKey");
+
+&lt;b&gt;SetParameterAttributes(params_array)&lt;/b&gt; - set attributes for parameters. Returns nothing.
+
+    var parameters = new Array();
+    parameters[0]=new Object;
+    parameters[0].Name='InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions';
+    parameters[0].Notification=0;
+    parameters[0].NotificationChange=true;
+    parameters[0].AccessListChange=true;
+    parameters[0].AccessList= new Array ();
+    parameters[0].AccessList[0]='subscriber';
+    cpe.SetParameterAttributes(parameters);
+
+&lt;b&gt;GetParameterAttributes(parameter_names_array)&lt;/b&gt;
+
+    var p=new Array(); 
+    p[0]='InternetGatewayDevice.ManagementServer.PeriodicInformEnable'; 
+    var r = cpe.GetParameterAttributes(p);

 &lt;b&gt;AddObject(top_object_name, commandKey)&lt;/b&gt; - Creates new object instance. Returns object with properties Status and InstanceNumber.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Tue, 13 May 2014 19:42:52 -0000</pubDate><guid>https://sourceforge.netb6867636cb361d5554e0341db6d4ffa383449682</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -114,9 +114,12 @@
     parameters[1] = {Name: 'InternetGatewayDevice.ManagementServer.PeriodicInformInterval', Value: '300'};
     cpe.SyncParameterValues (parameters);

-&lt;b&gt;BackupCWMPTree();&lt;/b&gt; Backup the CPE's full CWMP Tree to the cpedb local database.
-
-X_00000C_ShowStatus (array_of_show_commands) - Cisco proprietary method to run several show commands and get their output.
+&lt;b&gt;BackupCWMPTree()&lt;/b&gt; Backup the CPE's full CWMP Tree to the cpedb local database.
+
+    logger('Update complete. Performing CWMP tree backup');
+    cpe.BackupCWMPTree();
+
+&lt;b&gt;X_00000C_ShowStatus(array_of_show_commands)&lt;/b&gt; - Cisco proprietary method to run several show commands and get their output.

     var commands = new Array ();
     commands [0] = "show version";
@@ -125,7 +128,7 @@
     var thecommand = response [0].Command;
     var itsoutput = response [0].Response;

-X_JUNGO_COM_RGCommand (telnet_command) - jungo.com OpenRG based firmware proprietary method to run command.
+&lt;b&gt;X_JUNGO_COM_RGCommand(telnet_command)&lt;/b&gt; - jungo.com OpenRG based firmware proprietary method to run command.

     var response = cpe.X_JUNGO_COM_RGCommand ("net ifconfig");
     var result = response.Result; // output of command
@@ -151,26 +154,30 @@
 returns array of objects with fields name as in query e.g.

     try {
-    var rs = db.Query ("SELECT id,serialno FROM hostsbean")
-    logger ("Rows found = "+rs.length)
-    for (i=0; i &lt; rs.length; i++) {
-        logger ("id = "+rs[i].id+" serialno= "+rs[i].serialno);
-    }
-} catch (e) {
-    logger ("DS exception: "+e.message)
-}
+        var rs = db.Query ("SELECT id,serialno FROM hostsbean")
+        logger("Rows found = "+rs.length)
+        for(i=0; i &lt; rs.length; i++) {
+            logger("id = "+rs[i].id+" serialno= "+rs[i].serialno);
+        }
+    } catch (e) {
+        logger("DS exception: "+e.message)
+    }
+
 To run INSERT or UPDATE queries use Update function.
-db.Update (data_source_name, update_statement)
+
+    db.Update(data_source_name, update_statement)
+
 This would run query on openacs datasource "java:ACS".
-db.Update (select_statement)
+
+    db.Update(select_statement)
+
 returns count of rows affected e.g.
-try {
-    var rs = db.Update ("INSERT id,serialno INTO hostsbean VALUES (NULL,'12345')")
-} catch (e) {
-    logger ("DS exception: "+e.message)
-}
-
-
+
+    try {
+        var rs = db.Update ("INSERT id,serialno INTO hostsbean VALUES (NULL,'12345')")
+    } catch (e) {
+        logger ("DS exception: "+e.message)
+    }

 Example Script
 =
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Sun, 11 May 2014 09:05:35 -0000</pubDate><guid>https://sourceforge.netece2630efafcc3defca362a18b1625e08e3823f4</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,13 +1,185 @@
 Configuration Scripts
 =

-This is the core of the ACS engine where you can perform logic based on the type of request the device has sent.
+This is the core of the ACS engine where you can perform logic based on the type of request the device has sent. All scripts are written in Javascript.
+
+Available functions
+=
+call
+-
+
+Call is used to call another another script.
+
+    call ('script_name');
+
+logger
+-
+
+Logger is used to log a message to the app server logger. Either with a default severity with a single value or with the [JBoss Severity](http://docs.jboss.org/jbossweb/7.0.x/logging.html) prefixed in lower case: 
+
+    logger ('Normal message');
+    logger ('severe', 'Error message');
+
+Built in variables
+=
+
+cpe
+-
+
+The cpe global variable provides all the CPE variables and RPC calls specific to the CPE.
+
+cpedb
+=
+
+The cpedb global variable provides access to the CPE configuration specific properties record in the database. To save any property modified you muse use the Save method.
+
+Retrieve property value:
+
+    var newproperty = cpedb.newproperty;
+
+Set property value:
+
+    cpedb.newproperty = 'newpropertyvalue';
+    cpedb.Save();
+
+Properties
+=
+
+&lt;b&gt;Inform&lt;/b&gt; - exposes Inform request which triggered configuration script to run.
+
+Methods
+=
+
+&lt;b&gt;GetRPCMethods()&lt;/b&gt; - Return arrays of methods supported by CPE.
+
+Print the methods supported by the CPE to the logger
+   
+    var methods=cpe.GetRPCMethods();
+    for (i=0; i&lt;methods.length&gt;&lt;b&gt;GetParameterValues(array_of_parameter_names)&lt;/b&gt; - Return array of object with properties "name" and "value" as the name and the value of each property.
+
+    var cpeparameters=new Array();
+    cpeparameters[0]='InternetGatewayDevice.DeviceSummary';
+    var cperesponse=cpe.GetParameterValues(cpeparameters);
+    logger(cpeparameters[0].name+'='+cperesponse[0].value);
+
+&lt;b&gt;SetParameterValues(paramsarray, commandKey)&lt;/b&gt; - Sets parameter values. paramsarray is array of objects having properties name and value and type (if required) starting at 0. The commandKey always needs to be set either to a blank value or the CPE's commandKey. The commandKey parameter is optional.
+
+    var parameters = new Array();
+    parameters[0] = {name: 'InternetGatewayDevice.IPPingDiagnostics.Host', value: '192.168.0.1'};
+    // Encode parameter using default type xsd:string
+    parameters[1] = {name: 'InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions', value: '2'};
+    // set encoding type
+    parameters[2] = {name: 'InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions', value: '2', type: 'xsd:unsignedInt'};
+    cpe.SetParameterValues (parameters, "commandKey");
+
+&lt;b&gt;AddObject(top_object_name, commandKey)&lt;/b&gt; - Creates new object instance. Returns object with properties Status and InstanceNumber.
+
+    var AddVoiceProfile = new Object();
+    AddVoiceProfile = 'InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.';
+    var xResponse = cpe.AddObject(AddVoiceProfile , "commandKey");
+
+&lt;b&gt;DeleteObject (object_name, commandKey)&lt;/b&gt; - Delete object from CPE. Returns integer status.
+
+    for (i = 1; i &lt;= xVoiceProfileCount ; i++) {
+        var RmvItem = new Object();
+        RmvItem = 'InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.' + i + '.';
+        var status = cpe.DeleteObject(RmvItem, "commandKey");
+    }
+
+&lt;b&gt;Download (commandKey, what_to_download, url, username, password, file_size, file_name)&lt;/b&gt; - Informs the CPE to download the file in the "what_to_download" field.
+
+    var response = cpe.Download ("daCommand", "3 Vendor Configuration File","http://192.168.1.1:8080/kkonf", "", "",000,"user.ini");
+    logger ("st="+response.StartTime+" ct="+response.CompleteTime+" status="+response.Status);
+
+&lt;b&gt;Reboot(commandKey)&lt;/b&gt; - Reboots the CPE if supported by the CPE.
+
+    cpe.Reboot("commandKey");
+
+&lt;b&gt;FactoryReset()&lt;/b&gt; - Resets CPE to factory default settings if supported by the CPE.
+
+    cpe.FactoryReset();
+
+&lt;b&gt;ScheduleInform(seconds_to_delay, commandKey)&lt;/b&gt; - Request the CPE to schedule a one-time Inform call which is separate from its periodic Inform frequency x seconds in the future if supported by the CPE.
+
+    cpe.ScheduleInform (3600, "commandKey"); // schedule inform in one hour
+
+&lt;b&gt;SyncParameterValues(parameters_array)&lt;/b&gt; - Check and synchronize parameter values on CPE.
+
+    var parameters = new Array ();
+    parameters[0] = {Name: 'InternetGatewayDevice.ManagementServer.PeriodicInformEnable', Value: '1'};
+    parameters[1] = {Name: 'InternetGatewayDevice.ManagementServer.PeriodicInformInterval', Value: '300'};
+    cpe.SyncParameterValues (parameters);
+
+&lt;b&gt;BackupCWMPTree();&lt;/b&gt; Backup the CPE's full CWMP Tree to the cpedb local database.
+
+X_00000C_ShowStatus (array_of_show_commands) - Cisco proprietary method to run several show commands and get their output.
+
+    var commands = new Array ();
+    commands [0] = "show version";
+    commands [1] = "show running";
+    var response = cpe.X_00000C_ShowStatus (commands);
+    var thecommand = response [0].Command;
+    var itsoutput = response [0].Response;
+
+X_JUNGO_COM_RGCommand (telnet_command) - jungo.com OpenRG based firmware proprietary method to run command.
+
+    var response = cpe.X_JUNGO_COM_RGCommand ("net ifconfig");
+    var result = response.Result; // output of command
+    var status = response.Status; // status - 0 if succes
+
+db
+=
+
+This object allows to work with database. The database can be the same the openacs uses to store data as well as external datasource configured similar to datasource in [1] step 3
+
+This would run SELECT query on datasource named the data_source_name.
+
+    db.Query (data_source_name, select_statement)
+
+This would run query on openacs datasource "java:ACS".
+
+    db.Query (select_statement)
+
+it is equivalent to
+
+    db.Query ("java:ACS", select_statement)
+
+returns array of objects with fields name as in query e.g.
+
+    try {
+    var rs = db.Query ("SELECT id,serialno FROM hostsbean")
+    logger ("Rows found = "+rs.length)
+    for (i=0; i &lt; rs.length; i++) {
+        logger ("id = "+rs[i].id+" serialno= "+rs[i].serialno);
+    }
+} catch (e) {
+    logger ("DS exception: "+e.message)
+}
+To run INSERT or UPDATE queries use Update function.
+db.Update (data_source_name, update_statement)
+This would run query on openacs datasource "java:ACS".
+db.Update (select_statement)
+returns count of rows affected e.g.
+try {
+    var rs = db.Update ("INSERT id,serialno INTO hostsbean VALUES (NULL,'12345')")
+} catch (e) {
+    logger ("DS exception: "+e.message)
+}
+
+
+
+Example Script
+=

 First for the "Default" script you should determine what sort of request was sent:

     var sEvent;
     var sCommandKey;
-    for( i=0; i&amp;lt;=cpe.Inform.Event.length-1; i++ )
+    for( i=0; i&lt;=cpe.Inform.Event.length-1; i++ )
     {
         sEvent = cpe.Inform.Event[i].EventCode;
         sCommandKey = cpe.Inform.Event[i].CommandKey;
&lt;/methods.length&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Sat, 10 May 2014 02:23:02 -0000</pubDate><guid>https://sourceforge.net586f5be5b454070cf7968f08eb31c46187275601</guid></item><item><title>Configuration Scripts modified by Peter Lambrechtsen</title><link>https://sourceforge.net/p/libreacs/wiki/Configuration%2520Scripts/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="configuration-scripts"&gt;Configuration Scripts&lt;/h1&gt;
&lt;p&gt;This is the core of the ACS engine where you can perform logic based on the type of request the device has sent.&lt;/p&gt;
&lt;p&gt;First for the "Default" script you should determine what sort of request was sent:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;sEvent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;sCommandKey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;cpe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Inform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;sEvent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cpe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Inform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;EventCode&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;sCommandKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cpe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Inform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;CommandKey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;sEvent&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;BOOTSTRAP&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1-DoBootStrap&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;BOOT&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;2-DoBoot&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="n"&gt;PERIODIC&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;3-DoPeriodic&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="n"&gt;SCHEDULED&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="n"&gt;VALUE&lt;/span&gt; &lt;span class="n"&gt;CHANGE&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="n"&gt;KICKED&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="n"&gt;CONNECTION&lt;/span&gt; &lt;span class="n"&gt;REQUEST&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;4-DoConnectionRequest&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="n"&gt;TRANSFER&lt;/span&gt; &lt;span class="n"&gt;COMPLETE&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="n"&gt;DIAGNOSTICS&lt;/span&gt; &lt;span class="n"&gt;COMPLETE&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;:
            &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h1 id="subroutine-scripts"&gt;Subroutine scripts&lt;/h1&gt;
&lt;p&gt;Now that you have created a script above, you can create a sub-script that is called and name them "1-DoBootStrap" or similar, I personally numbered them so the order as displayed inside ACS on the left hand side is shown in the order that the scripts are executed, otherwise they are ordered alphabetically.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Lambrechtsen</dc:creator><pubDate>Fri, 09 May 2014 21:43:54 -0000</pubDate><guid>https://sourceforge.net14b50bee715935a89e9fac34d693987b39f87ff0</guid></item></channel></rss>