<?xml version="1.0" encoding="utf-8"?>
<!--AvailableCommands.xml-->
<!--This should be in the same folder as the plugin dll-->
<AvailableCommands>
    <command>
        <name>TCP</name>
        <commandString />
        <info>
            <params />
            <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP</helplink>
            <description>
                <default>A multipurpose networking plugin that allows the following and more:

* Send and receive messages on TCP sockets.
* Host simple web pages and accept [[API]] commands
* Allow [[Google Speech]] in Chrome to be used for speech recognition</default>
            </description>
        </info>
        <command>
            <name>Client</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Client</helplink>
                <description>
                    <default>Create a named client, and connect to a server. 
Write to the server.
Receive messages back from the server as events.</default>
                </description>
            </info>
            <command>
                <name>Connect</name>
                <commandString>TCP.Client.Connect</commandString>
                <info>
                    <params>3-6</params>
                    <parameter name="Name" type="string" optional="False">Name of client to create</parameter>
                    <parameter name="Ip" type="string" optional="False">Address of server to connect to</parameter>
                    <parameter name="Port" type="integer" optional="False">Port of server to connect to</parameter>
                    <parameter name="Terminator" type="string" optional="True">Server terminates messages with this byte</parameter>
                    <parameter name="EventName" type="string" optional="True">Generate events with this name when message received from server</parameter>
                    <parameter name="EventFilter" type="string" optional="True">Only generate events if they match this Regular Expression</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Connect</helplink>
                    <description>
                        <default>Connects to a server and keeps the connection open, after which messages from the server will generate events. 

Events will use the client name unless the &lt;EventName&gt; parameter is specified. The message from the server will be attached to the event as a payload. If the server uses a standard terminator at the end of every message (e.g., \x0d) this can be specified in the &lt;Terminator&gt; parameter to ensure that each message generates exactly one event.

</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Disconnect</name>
                <commandString>TCP.Client.Disconnect</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Name" type="string" optional="False">Name of client to disconnect from</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Disconnect</helplink>
                    <description>
                        <default>Client will disconnect and be destroyed.
You can reconnect using the name afterwards.
If you only want to send a single command and then disconnect. consider using TCP.Single.Write instead.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Query</name>
                <commandString>TCP.Client.Query</commandString>
                <info>
                    <params>3-4</params>
                    <parameter name="ClientName" type="string" optional="False">Name of client to use</parameter>
                    <parameter name="Message" type="string" optional="False">Message to send</parameter>
                    <parameter name="Delay" type="integer" optional="False">Milliseconds to wait for a response of the server</parameter>
                    <parameter name="Notes" type="string" optional="True" />
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Query</helplink>
                    <description>
                        <default>Query server, similar to TCP.Client.Write. Response will be stored in {LastResult}.

ClientName must be the name of a client that was previously created using TCP.Client.Connect
To include bytes in the &lt;message&gt;, you can encode bytes as follows
0:       \x00
1:       \x01
255:   \xFF

Note: You must first use the Client.Connect action.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Write</name>
                <commandString>TCP.Client.Write</commandString>
                <info>
                    <params>2-4</params>
                    <parameter name="ClientName" type="string" optional="False">Name of client to use</parameter>
                    <parameter name="Message" type="string" optional="False">Message to send</parameter>
                    <parameter name="Delay" type="integer" optional="True">Milliseconds to wait after sending the message (default is 10)</parameter>
                    <parameter name="Notes" type="string" optional="True" />
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Write</helplink>
                    <description>
                        <default>ClientName must be the name of a client that was previously created using TCP.Client.Connect.
To include bytes in the &lt;message&gt;, you can encode bytes as follows
0:       \x00
1:       \x01
255:   \xFF

Note: You must first use the Client.Connect action.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>WriteLn</name>
                <commandString>TCP.Client.WriteLn</commandString>
                <info>
                    <params>2-4</params>
                    <parameter name="ClientName" type="string" optional="False" />
                    <parameter name="Message" type="string" optional="False" />
                    <parameter name="Delay" type="integer" optional="True">Milliseconds to wait after sending the message (default is 10)</parameter>
                    <parameter name="Notes" type="string" optional="True">You can write anything here. VC will not use it.</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#WriteLn</helplink>
                    <description>
                        <default>ClientName must be the name of a client that was previously created using TCP.Client.Connect.
To include bytes in the &lt;message&gt;, you can encode bytes as follows
0:       \x00
1:       \x01
255:   \xFF
Message will automatically have a carriage return added to it ( \x0D ).
</default>
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>GS</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#GS</helplink>
                <description>
                    <default>Actions for using Google Speech recognition in a Chrome browser with VoxCommando.

Both the "Web Server" AND "Google Speech" must be enabled in the TCP plugin settings to use Google speech recognition in Chrome with VoxCommando.</default>
                </description>
            </info>
            <command>
                <name>Close</name>
                <commandString>TCP.GS.Close</commandString>
                <info>
                    <params>0</params>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Close</helplink>
                    <description>
                        <default>( BETA )

Attempts to find and close the first Chrome tab that appears to be hosting the speech web page.  May not work if there are multiple Chrome windows open.

It is probably better to leave the Google speech web page open and turn the microphone on and off using TCP.GS.On and TCP.GS.Off</default>
                    </description>
                </info>
            </command>
            <command>
                <name>GetLastIP</name>
                <commandString>TCP.GS.GetLastIP</commandString>
                <info>
                    <params>0</params>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#GetLastIP</helplink>
                    <description>
                        <default>Returns the IP address of the last client that sent recognnized text to the TCP GS websocket.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Launch</name>
                <commandString>TCP.GS.Launch</commandString>
                <info>
                    <params>0</params>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Launch</helplink>
                    <description>
                        <default>Attempts to launch the Google Speech web page in Chrome.

Both the "Web Server" AND "Google Speech" must be enalbed in the TCP plugin settings to use Google speech recognition in Chrome with VoxCommando.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>On</name>
                <commandString>TCP.GS.On</commandString>
                <info>
                    <params>0</params>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#On</helplink>
                    <description>
                        <default>Sends a message to the web page to attempt to turn the microphone on and start listening for speech.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Off</name>
                <commandString>TCP.GS.Off</commandString>
                <info>
                    <params>0</params>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Off</helplink>
                    <description>
                        <default>Sends a message to the web page to attempt to turn the microphone off and stop listening for speech.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Send</name>
                <commandString>TCP.GS.Send</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Message" type="string" optional="False">Text to send to web page</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Send</helplink>
                    <description>
                        <default>Send any message to the web page via websocket.
(May be useful in later versions of the plugin.)</default>
                    </description>
                </info>
            </command>
            <command>
                <name>SetLanguage</name>
                <commandString>TCP.GS.SetLanguage</commandString>
                <info>
                    <params>1</params>
                    <parameter name="LanguageCode" type="string" optional="False">Example: en-US, fr-FR, de-DE, af-ZA</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#SetLanguage</helplink>
                    <description>
                        <default>Sets the speech recognition language.

Language codes can be found in the TCP settings under the Google Speech tab or possibly there are more codes listed here: https://cloud.google.com/speech-to-text/docs/languages</default>
                    </description>
                </info>
            </command>
            <command>
                <name>SetPrefix</name>
                <commandString>TCP.GS.SetPrefix</commandString>
                <info>
                    <params>0-1</params>
                    <parameter name="Prefix" type="string" optional="True">Prefix used to indicate that speech should be sent to VoxCommando</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#SetPrefix</helplink>
                    <description>
                        <default>If a prefix is used, the webpage will only send recognized text to VoxCommando when the prefix is detected.  

Any text recognized AFTER the prefix will be sent to VoxCommando for processing.

If &lt;Prefix&gt; is blank or omitted the prefix will be removed and ALL text will be accepted.</default>
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>Server</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Server</helplink>
                <description>
                    <default>Create TCP servers that can listen for connections, and receive messages.
Messages can trigger VC actions or be used to create events.</default>
                </description>
            </info>
            <command>
                <name>Start</name>
                <commandString>TCP.Server.Start</commandString>
                <info>
                    <params>1-2</params>
                    <parameter name="Port" type="integer" optional="False">TCP port to listen on</parameter>
                    <parameter name="GenEvent" type="string" optional="True">Generate an event instead of sending command to VC</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Start</helplink>
                    <description>
                        <default>If &lt;GenEvent&gt; parameter is omitted or blank, all incoming client messages will be treated as commands intended for VC.  Example: incoming message "VC.On" will turn VC green.
If &lt;GenEvent&gt; is specified, then all incoming requests will generate an event and the message from the client will be passed as a payload(s).
If &lt;GenEvent&gt; is used, and the message contains '&amp;&amp;' multiple payloads will be created.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>Stop</name>
                <commandString>TCP.Server.Stop</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Port" type="integer" optional="False">Port of server to close</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Stop</helplink>
                    <description>
                        <default>Stops the server running on &lt;Port&gt;.
Server must first have been created using TCP.StartServer.</default>
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>Single</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Single</helplink>
                <description>
                    <default>These actions will:
-open a new connection
-send a string
-close the connection immediately</default>
                </description>
            </info>
            <command>
                <name>Write</name>
                <commandString>TCP.Single.Write</commandString>
                <info>
                    <params>3-4</params>
                    <parameter name="Message" type="string" optional="False">TCP message to send. Encode bytes as \x00\x01...\xFF</parameter>
                    <parameter name="IP" type="string" optional="False" />
                    <parameter name="Port" type="integer" optional="False" />
                    <parameter name="Query" type="boolean" optional="True">Default = false.  If true will wait for a response from the server</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Write</helplink>
                    <description>
                        <default>Will send the string &lt;Message&gt; without adding a carriage-return to the IP and port specified in plugin settings.
To include bytes in the &lt;message&gt;, you can encode bytes as follows
0:       \x00
1:       \x01
255:   \xFF

If Query is set to true then will wait for a response for the server and store it in {LastResult}.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>WriteLn</name>
                <commandString>TCP.Single.WriteLn</commandString>
                <info>
                    <params>3-4</params>
                    <parameter name="Message" type="string" optional="False">TCP message to send</parameter>
                    <parameter name="IP" type="string" optional="False" />
                    <parameter name="Port" type="integer" optional="False" />
                    <parameter name="Query" type="boolean" optional="True">Default = false.  If true will wait for a response from the server</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#WriteLn</helplink>
                    <description>
                        <default>Will send the string &lt;Message&gt; followed by a carriage-return (\x0D) to the IP and port specified in plugin settings.
To include bytes in the &lt;Message&gt;, you can encode bytes as follows:
0:       \x00
1:       \x01
255:   \xFF

If Query is set to true then will wait for a response for the server and store it in {LastResult}.</default>
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>UDP</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#UDP</helplink>
                <description>
                    <default />
                </description>
            </info>
            <command>
                <name>SendMixed</name>
                <commandString>TCP.UDP.SendMixed</commandString>
                <info>
                    <params>2-3</params>
                    <parameter name="Message" type="string" optional="False">string with hex encoded elements</parameter>
                    <parameter name="Port" type="integer" optional="False">UDP port to send on</parameter>
                    <parameter name="Target IP" type="string" optional="True">Defaults to broadcast IP: 255.255.255.255</parameter>
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#SendMixed</helplink>
                    <description>
                        <default>Allows you to send UDP messages to any IP and Port and to embed any ascii or non-ascii characters using the hex format \x00-\xFF.</default>
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>WebServer</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#WebServer</helplink>
                <description>
                    <default />
                </description>
            </info>
            <command>
                <name>SetResponse</name>
                <commandString>TCP.WebServer.SetResponse</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Response" type="string" optional="False" />
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#SetResponse</helplink>
                    <description>
                        <default />
                    </description>
                </info>
            </command>
        </command>
        <command>
            <name>Persistent Server</name>
            <commandString />
            <info>
                <params />
                <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Persistent Server</helplink>
                <description>
                    <default />
                </description>
            </info>
            <command>
                <name>Write</name>
                <commandString>TCP.pSrv.Write</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Message" type="string" optional="False" />
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#Write</helplink>
                    <description>
                        <default>Send a &lt;message&gt; string to the most recently connected client.</default>
                    </description>
                </info>
            </command>
            <command>
                <name>WriteLn</name>
                <commandString>TCP.pSrv.WriteLn</commandString>
                <info>
                    <params>1</params>
                    <parameter name="Message" type="string" optional="False" />
                    <helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_TCP#WriteLn</helplink>
                    <description>
                        <default>Send a &lt;message&gt; string to the most recently connected client.
Append linefeed character at the end.</default>
                    </description>
                </info>
            </command>
        </command>
    </command>
</AvailableCommands>