[tuxdroid-svn] r4712 - in software_suite_v3/smart-core/smart-api/csharp/trunk: . doc
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-05-30 14:25:05
|
Author: ks156 Date: 2009-05-30 16:24:50 +0200 (Sat, 30 May 2009) New Revision: 4712 Added: software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ Removed: software_suite_v3/smart-core/smart-api/csharp/trunk/API Documentation/ software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs_source.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/annotated.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_a_p_i-members.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_a_p_i.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_button_event_args-members.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_button_event_args.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_button_event_mgr-members.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_button_event_mgr.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_date_time_event_args-members.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_date_time_event_args.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_date_time_event_mgr-members.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/class_tux_a_p_i_1_1_tux_date_time_event_mgr.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/classes.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/doxygen.css software_suite_v3/smart-core/smart-api/csharp/trunk/doc/doxygen.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/files.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2blank.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2doc.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2folderclosed.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2folderopen.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2lastnode.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2link.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2mlastnode.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2mnode.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2node.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2plastnode.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2pnode.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/ftv2vertline.png software_suite_v3/smart-core/smart-api/csharp/trunk/doc/functions.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/functions_enum.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/functions_evnt.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/functions_func.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/functions_prop.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/index.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/main.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/namespace_tux_a_p_i.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/namespaces.html software_suite_v3/smart-core/smart-api/csharp/trunk/doc/tab_b.gif software_suite_v3/smart-core/smart-api/csharp/trunk/doc/tab_l.gif software_suite_v3/smart-core/smart-api/csharp/trunk/doc/tab_r.gif software_suite_v3/smart-core/smart-api/csharp/trunk/doc/tabs.css software_suite_v3/smart-core/smart-api/csharp/trunk/doc/tree.html Log: * Renamed "API Documentation" to "doc". It's better to avoid the spaces in the path, especially for Linux Copied: software_suite_v3/smart-core/smart-api/csharp/trunk/doc (from rev 4711, software_suite_v3/smart-core/smart-api/csharp/trunk/API Documentation) Deleted: software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs.html =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/API Documentation/_tux_a_p_i_8cs.html 2009-05-30 12:35:03 UTC (rev 4711) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs.html 2009-05-30 14:24:50 UTC (rev 4712) @@ -1,50 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Tux C# API: C:/Documents and Settings/Administrateur/Bureau/apidoc/TuxAPI.cs File Reference</title> -<link href="tabs.css" rel="stylesheet" type="text/css"> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generated by Doxygen 1.5.9 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="main.html"><span>Main Page</span></a></li> - <li><a href="namespaces.html"><span>Packages</span></a></li> - <li><a href="annotated.html"><span>Classes</span></a></li> - <li class="current"><a href="files.html"><span>Files</span></a></li> - </ul> - </div> - <div class="tabs"> - <ul> - <li><a href="files.html"><span>File List</span></a></li> - </ul> - </div> -</div> -<div class="contents"> -<h1>C:/Documents and Settings/Administrateur/Bureau/apidoc/TuxAPI.cs File Reference</h1> -<p> -<a href="_tux_a_p_i_8cs_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> -<tr><td></td></tr> -<tr><td colspan="2"><br><h2>Classes</h2></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tux_a_p_i_1_1_tux_a_p_i.html">TuxAPI.TuxAPI</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tux_a_p_i_1_1_tux_button_event_mgr.html">TuxAPI.TuxButtonEventMgr</a></td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Event Manager for the 3 buttons of Tux Droid. <a href="class_tux_a_p_i_1_1_tux_button_event_mgr.html#_details">More...</a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tux_a_p_i_1_1_tux_button_event_args.html">TuxAPI.TuxButtonEventArgs</a></td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Permet de connaitre ou de donner l'état d'un bouton. <a href="class_tux_a_p_i_1_1_tux_button_event_args.html#_details">More...</a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tux_a_p_i_1_1_tux_date_time_event_mgr.html">TuxAPI.TuxDateTimeEventMgr</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tux_a_p_i_1_1_tux_date_time_event_args.html">TuxAPI.TuxDateTimeEventArgs</a></td></tr> - -<tr><td colspan="2"><br><h2>Packages</h2></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">package </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_tux_a_p_i.html">TuxAPI</a></td></tr> - -</table> -</div> -<hr size="1"><address style="text-align: right;"><small>Generated on Sat May 30 13:14:08 2009 for Tux C# API by -<a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> -</body> -</html> Deleted: software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs_source.html =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/API Documentation/_tux_a_p_i_8cs_source.html 2009-05-30 12:35:03 UTC (rev 4711) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/doc/_tux_a_p_i_8cs_source.html 2009-05-30 14:24:50 UTC (rev 4712) @@ -1,1151 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -<title>Tux C# API: C:/Documents and Settings/Administrateur/Bureau/apidoc/TuxAPI.cs Source File</title> -<link href="tabs.css" rel="stylesheet" type="text/css"> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generated by Doxygen 1.5.9 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="main.html"><span>Main Page</span></a></li> - <li><a href="namespaces.html"><span>Packages</span></a></li> - <li><a href="annotated.html"><span>Classes</span></a></li> - <li class="current"><a href="files.html"><span>Files</span></a></li> - </ul> - </div> - <div class="tabs"> - <ul> - <li><a href="files.html"><span>File List</span></a></li> - </ul> - </div> -<h1>C:/Documents and Settings/Administrateur/Bureau/apidoc/TuxAPI.cs</h1><a href="_tux_a_p_i_8cs.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> -<a name="l00002"></a>00002 <span class="comment"> * C# TuxAPI</span> -<a name="l00003"></a>00003 <span class="comment"> * </span> -<a name="l00004"></a>00004 <span class="comment"> * An API written in C# for the Tux Droid</span> -<a name="l00005"></a>00005 <span class="comment"> * </span> -<a name="l00006"></a>00006 <span class="comment"> * Joel Matteotti <joel.matteotti _AT_ free _DOT_ fr></span> -<a name="l00007"></a>00007 <span class="comment"> * </span> -<a name="l00008"></a>00008 <span class="comment"> * Version 1.0.0</span> -<a name="l00009"></a>00009 <span class="comment"> * </span> -<a name="l00010"></a>00010 <span class="comment"> * =============== GPL HEADER =====================</span> -<a name="l00011"></a>00011 <span class="comment"> * This file is part of C# TuxAPI.</span> -<a name="l00012"></a>00012 <span class="comment"> *</span> -<a name="l00013"></a>00013 <span class="comment"> * C# TuxAPI is free software: you can redistribute it and/or modify</span> -<a name="l00014"></a>00014 <span class="comment"> * it under the terms of the GNU General Public License as published by</span> -<a name="l00015"></a>00015 <span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span> -<a name="l00016"></a>00016 <span class="comment"> * (at your option) any later version.</span> -<a name="l00017"></a>00017 <span class="comment"> *</span> -<a name="l00018"></a>00018 <span class="comment"> * C# TuxAPI is distributed in the hope that it will be useful,</span> -<a name="l00019"></a>00019 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> -<a name="l00020"></a>00020 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> -<a name="l00021"></a>00021 <span class="comment"> * GNU General Public License for more details.</span> -<a name="l00022"></a>00022 <span class="comment"> *</span> -<a name="l00023"></a>00023 <span class="comment"> * You should have received a copy of the GNU General Public License</span> -<a name="l00024"></a>00024 <span class="comment"> * along with "C# TuxAPI". If not, see <http://www.gnu.org/licenses/>.</span> -<a name="l00025"></a>00025 <span class="comment"> * </span> -<a name="l00026"></a>00026 <span class="comment"> * ====================================================</span> -<a name="l00027"></a>00027 <span class="comment"> * </span> -<a name="l00028"></a>00028 <span class="comment"> * TODO Code:</span> -<a name="l00029"></a>00029 <span class="comment"> * </span> -<a name="l00030"></a>00030 <span class="comment"> * - Complete the status part</span> -<a name="l00031"></a>00031 <span class="comment"> * - Allow the use of sound_flash</span> -<a name="l00032"></a>00032 <span class="comment"> * - Modify the 3 values of the TuxAPI_LEDS_INTENSITY_LEVEL enumeration</span> -<a name="l00033"></a>00033 <span class="comment"> * - Rename all constant of TuxAPI_STATUS_REQUESTED for more short name</span> -<a name="l00034"></a>00034 <span class="comment"> * </span> -<a name="l00035"></a>00035 <span class="comment"> * </span> -<a name="l00036"></a>00036 <span class="comment">*/</span> -<a name="l00037"></a>00037 -<a name="l00038"></a>00038 -<a name="l00039"></a>00039 <span class="comment">//blinked leds:</span> -<a name="l00040"></a>00040 <span class="comment">/*</span> -<a name="l00041"></a>00041 <span class="comment"> * count :</span> -<a name="l00042"></a>00042 <span class="comment"> <uint8></span> -<a name="l00043"></a>00043 <span class="comment">fx_speed :</span> -<a name="l00044"></a>00044 <span class="comment"> <float></span> -<a name="l00045"></a>00045 <span class="comment">fx_step :</span> -<a name="l00046"></a>00046 <span class="comment"> <uint8></span> -<a name="l00047"></a>00047 <span class="comment">fx_type :</span> -<a name="l00048"></a>00048 <span class="comment"> <<UNAFFECTED|LAST|NONE|DEFAULT|FADE_DURATION|FADE_RATE|GRADIENT_NBR|GRADIENT_DELTA>></span> -<a name="l00049"></a>00049 <span class="comment">leds :</span> -<a name="l00050"></a>00050 <span class="comment"> <<LED_BOTH|LED_RIGHT|LED_LEFT>></span> -<a name="l00051"></a>00051 <span class="comment">max_intensity :</span> -<a name="l00052"></a>00052 <span class="comment"> <float></span> -<a name="l00053"></a>00053 <span class="comment">min_intensity :</span> -<a name="l00054"></a>00054 <span class="comment"> <float></span> -<a name="l00055"></a>00055 <span class="comment">period :</span> -<a name="l00056"></a>00056 <span class="comment"> <float>*/</span> -<a name="l00057"></a>00057 -<a name="l00058"></a>00058 -<a name="l00059"></a>00059 <span class="comment">//sound flash:</span> -<a name="l00060"></a>00060 <span class="comment">/*</span> -<a name="l00061"></a>00061 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=1&volume=500.0 ronflement</span> -<a name="l00062"></a>00062 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=2&volume=500.0 pet + "oops"</span> -<a name="l00063"></a>00063 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=3&volume=500.0 yumm</span> -<a name="l00064"></a>00064 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=4&volume=500.0 "hello"</span> -<a name="l00065"></a>00065 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=5&volume=500.0 "ready"</span> -<a name="l00066"></a>00066 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=6&volume=500.0 "yo" </span> -<a name="l00067"></a>00067 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=7&volume=500.0 (???)</span> -<a name="l00068"></a>00068 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=8&volume=500.0 rire moqueur</span> -<a name="l00069"></a>00069 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=9&volume=500.0 'bloop'</span> -<a name="l00070"></a>00070 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=10&volume=500.0 'plock' aigue</span> -<a name="l00071"></a>00071 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=11&volume=500.0 'plock' grave</span> -<a name="l00072"></a>00072 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=12&volume=500.0 'touc touc'</span> -<a name="l00073"></a>00073 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=13&volume=500.0 'twiing'</span> -<a name="l00074"></a>00074 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=14&volume=500.0 FIRE ALARM :D</span> -<a name="l00075"></a>00075 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=15&volume=500.0 moto ?</span> -<a name="l00076"></a>00076 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=16&volume=500.0 'wong'</span> -<a name="l00077"></a>00077 <span class="comment"> * http://127.0.0.1:270/0/sound_flash/play?track=17&volume=500.0 coucou coucou coucou</span> -<a name="l00078"></a>00078 <span class="comment"> * </span> -<a name="l00079"></a>00079 <span class="comment"> </span> -<a name="l00080"></a>00080 <span class="comment">*/</span> -<a name="l00081"></a>00081 -<a name="l00082"></a>00082 <span class="keyword">using</span> System; -<a name="l00083"></a>00083 <span class="keyword">using</span> System.Net; -<a name="l00084"></a>00084 <span class="keyword">using</span> System.Threading; -<a name="l00085"></a>00085 -<a name="l00086"></a><a class="code" href="namespace_tux_a_p_i.html">00086</a> <span class="keyword">namespace </span><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html">TuxAPI</a> -<a name="l00087"></a>00087 { -<a name="l00088"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html">00088</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html">TuxAPI</a> -<a name="l00089"></a>00089 { -<a name="l00090"></a>00090 <span class="preprocessor"> #region ENUMERATIONS</span> -<a name="l00094"></a>00094 <span class="preprocessor"> private static WebClient wc;</span> -<a name="l00095"></a>00095 <span class="preprocessor"></span> -<a name="l00099"></a>00099 <span class="keyword">private</span> <span class="keyword">enum</span> TuxAPI_LEVEL: <span class="keywordtype">int</span> -<a name="l00100"></a>00100 { -<a name="l00101"></a>00101 CLIENT_LEVEL_ANONYME = -1, -<a name="l00102"></a>00102 CLIENT_LEVEL_FREE = 0, -<a name="l00103"></a>00103 CLIENT_LEVEL_RESTRICTED = 1, -<a name="l00104"></a>00104 CLIENT_LEVEL_ROOT = 2, -<a name="l00105"></a>00105 } -<a name="l00106"></a>00106 -<a name="l00110"></a>00110 <span class="keyword">private</span> <span class="keyword">enum</span> TuxAPI_ACTION : byte -<a name="l00111"></a>00111 { -<a name="l00112"></a>00112 FLIPPERS_UP = 1, -<a name="l00113"></a>00113 FLIPPERS_DOWN = 2, -<a name="l00114"></a>00114 -<a name="l00115"></a>00115 MOUTH_OPEN = 3, -<a name="l00116"></a>00116 MOUTH_CLOSE = 4, -<a name="l00117"></a>00117 -<a name="l00118"></a>00118 EYES_OPEN = 5, -<a name="l00119"></a>00119 EYES_CLOSE = 6, -<a name="l00120"></a>00120 -<a name="l00121"></a>00121 LEDS_ON = 7, -<a name="l00122"></a>00122 LEDS_OFF = 8, -<a name="l00123"></a>00123 -<a name="l00124"></a>00124 ROTATE_LEFT = 9, -<a name="l00125"></a>00125 ROTATE_RIGHT = 10, -<a name="l00126"></a>00126 -<a name="l00127"></a>00127 ATTITUNE_PLAY = 11, -<a name="l00128"></a>00128 ATTITUNE_STOP = 12, -<a name="l00129"></a>00129 -<a name="l00130"></a>00130 WAV_PLAY = 13, -<a name="l00131"></a>00131 WAV_STOP = 14, -<a name="l00132"></a>00132 } -<a name="l00133"></a>00133 -<a name="l00137"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#99dd95de098daeabeab6af86ebb3bcf7">00137</a> <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#99dd95de098daeabeab6af86ebb3bcf7" title="The TTS voice (TODO: Add others voices).">TuxAPI_SPEAK_LOCUTOR</a> : byte -<a name="l00138"></a>00138 { -<a name="l00139"></a>00139 Bruno = 0, -<a name="l00140"></a>00140 Julie = 1, -<a name="l00141"></a>00141 } -<a name="l00142"></a>00142 -<a name="l00146"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#46d878fae760506b4dbad0c3dab80bb8">00146</a> <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#46d878fae760506b4dbad0c3dab80bb8" title="3 levels of luminosity intensity i&#39;ve defined (value to check and modify !!)">TuxAPI_LEDS_INTENSITY_LEVEL</a> -<a name="l00147"></a>00147 { -<a name="l00148"></a>00148 Minimum = 0, -<a name="l00149"></a>00149 Middle = 5, -<a name="l00150"></a>00150 Maximum = 10, -<a name="l00151"></a>00151 } -<a name="l00152"></a>00152 -<a name="l00156"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471">00156</a> <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471" title="&lt;&lt;LED_BOTH|LED_RIGHT|LED_LEFT&gt;&gt;">TuxAPI_LEDS</a> : byte -<a name="l00157"></a>00157 { -<a name="l00158"></a>00158 LED_BOTH = 0, -<a name="l00159"></a>00159 LED_LEFT = 1, -<a name="l00160"></a>00160 LED_RIGHT = 2, -<a name="l00161"></a>00161 } -<a name="l00162"></a>00162 -<a name="l00166"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#3319b7bd4bdfe84dfacd70ace79d0d71">00166</a> <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#3319b7bd4bdfe84dfacd70ace79d0d71" title="The 3 buttons.">TuxAPI_BUTTON_REQUESTED</a> : byte -<a name="l00167"></a>00167 { -<a name="l00168"></a>00168 head_button = 0, -<a name="l00169"></a>00169 left_wing_button = 1, -<a name="l00170"></a>00170 right_wing_button = 2, -<a name="l00171"></a>00171 } -<a name="l00172"></a>00172 -<a name="l00176"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#b6e8b412c5e1d09470c6a8e75a95215b">00176</a> <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#b6e8b412c5e1d09470c6a8e75a95215b" title="Enumeration for status request (rename all for more short name).">TuxAPI_STATUS_REQUESTED</a> : byte -<a name="l00177"></a>00177 { -<a name="l00178"></a>00178 flippers_motor_on = 0, -<a name="l00179"></a>00179 flippers_position = 1, -<a name="l00180"></a>00180 flippers_remaining_movements = 2, -<a name="l00181"></a>00181 -<a name="l00182"></a>00182 eyes_motor_on = 3, -<a name="l00183"></a>00183 eyes_position = 4, -<a name="l00184"></a>00184 eyes_remaining_movements = 5, -<a name="l00185"></a>00185 -<a name="l00186"></a>00186 mouth_motor_on = 6, -<a name="l00187"></a>00187 mouth_position = 7, -<a name="l00188"></a>00188 mouth_remaining_movements = 8, -<a name="l00189"></a>00189 -<a name="l00190"></a>00190 spin_left_motor_on = 9, -<a name="l00191"></a>00191 spin_right_motor_on = 10, -<a name="l00192"></a>00192 spinning_direction = 11, -<a name="l00193"></a>00193 spinning_remaining_movements = 12, -<a name="l00194"></a>00194 -<a name="l00195"></a>00195 light_level = 13, -<a name="l00196"></a>00196 right_led_state = 14, -<a name="l00197"></a>00197 left_led_state = 15, -<a name="l00198"></a>00198 -<a name="l00199"></a>00199 battery_level = 16, -<a name="l00200"></a>00200 battery_state = 17, -<a name="l00201"></a>00201 charger_state = 18, -<a name="l00202"></a>00202 -<a name="l00203"></a>00203 <span class="comment">//-----------</span> -<a name="l00204"></a>00204 -<a name="l00205"></a>00205 <span class="comment">/* TODO: modify the number of any status</span> -<a name="l00206"></a>00206 <span class="comment"> descriptor_complete = 4,</span> -<a name="l00207"></a>00207 <span class="comment"> radio_state = 5,</span> -<a name="l00208"></a>00208 <span class="comment"> dongle_plug = 6,</span> -<a name="l00209"></a>00209 <span class="comment"></span> -<a name="l00210"></a>00210 <span class="comment"></span> -<a name="l00211"></a>00211 <span class="comment"> connection_quality = 15,</span> -<a name="l00212"></a>00212 <span class="comment"> </span> -<a name="l00213"></a>00213 <span class="comment"> audio_flash_play = 16,</span> -<a name="l00214"></a>00214 <span class="comment"> audio_general_play = 17,</span> -<a name="l00215"></a>00215 <span class="comment"></span> -<a name="l00216"></a>00216 <span class="comment"> flash_programming_current_track = 18,</span> -<a name="l00217"></a>00217 <span class="comment"> flash_programming_last_track_size = 19,</span> -<a name="l00218"></a>00218 <span class="comment"></span> -<a name="l00219"></a>00219 <span class="comment"> tuxcore_symbolic_version = 20,</span> -<a name="l00220"></a>00220 <span class="comment"> tuxaudio_symbolic_version = 21,</span> -<a name="l00221"></a>00221 <span class="comment"> fuxusb_symbolic_version = 22,</span> -<a name="l00222"></a>00222 <span class="comment"> fuxrf_symbolic_version = 23,</span> -<a name="l00223"></a>00223 <span class="comment"> tuxrf_symbolic_version = 24,</span> -<a name="l00224"></a>00224 <span class="comment"> driver_symbolic_version = 25,</span> -<a name="l00225"></a>00225 <span class="comment"></span> -<a name="l00226"></a>00226 <span class="comment"> sound_reflash_begin = 26,</span> -<a name="l00227"></a>00227 <span class="comment"> sound_reflash_end = 27,</span> -<a name="l00228"></a>00228 <span class="comment"> sound_reflash_current_trac = 28,</span> -<a name="l00229"></a>00229 <span class="comment"></span> -<a name="l00230"></a>00230 <span class="comment"> </span> -<a name="l00231"></a>00231 <span class="comment"> left_wing_button = 34,</span> -<a name="l00232"></a>00232 <span class="comment"> sound_flash_count = 35,</span> -<a name="l00233"></a>00233 <span class="comment"></span> -<a name="l00234"></a>00234 <span class="comment"> osl_symbolic_version=38,</span> -<a name="l00235"></a>00235 <span class="comment"> general_sound_state = 39,</span> -<a name="l00236"></a>00236 <span class="comment"> wav_volume=40,</span> -<a name="l00237"></a>00237 <span class="comment"> tts_volume=41,</span> -<a name="l00238"></a>00238 <span class="comment"> tts_pitch=42,</span> -<a name="l00239"></a>00239 <span class="comment"> tts_locutor=43,</span> -<a name="l00240"></a>00240 <span class="comment"> wav_0_sound_state=44,</span> -<a name="l00241"></a>00241 <span class="comment"> wav_0_pause_state=45,</span> -<a name="l00242"></a>00242 <span class="comment"> wav_0_stop=46,</span> -<a name="l00243"></a>00243 <span class="comment"> right_wing_button=47,</span> -<a name="l00244"></a>00244 <span class="comment"> wav_1_sound_state=48,</span> -<a name="l00245"></a>00245 <span class="comment"> wav_1_pause_state=49,</span> -<a name="l00246"></a>00246 <span class="comment"> wav_1_stop=50,</span> -<a name="l00247"></a>00247 <span class="comment"> wav_2_sound_state=51,</span> -<a name="l00248"></a>00248 <span class="comment"> wav_2_pause_state=52,</span> -<a name="l00249"></a>00249 <span class="comment"> wav_2_stop=53,</span> -<a name="l00250"></a>00250 <span class="comment"> wav_3_sound_state=54,</span> -<a name="l00251"></a>00251 <span class="comment"> wav_3_pause_state=55,</span> -<a name="l00252"></a>00252 <span class="comment"> wav_3_stop=56,</span> -<a name="l00253"></a>00253 <span class="comment"> tts_0_sound_state=57,</span> -<a name="l00254"></a>00254 <span class="comment"> head_button=58,</span> -<a name="l00255"></a>00255 <span class="comment"> tts_0_pause_state=59,</span> -<a name="l00256"></a>00256 <span class="comment"> tts_0_stop=60,</span> -<a name="l00257"></a>00257 <span class="comment"> tts_0_voice_loaded=61,</span> -<a name="l00258"></a>00258 <span class="comment"> tts_0_speak_status=62,</span> -<a name="l00259"></a>00259 <span class="comment"> tts_0_voice_list=63,</span> -<a name="l00260"></a>00260 <span class="comment"> tts_wav_channel_start=64,</span> -<a name="l00261"></a>00261 <span class="comment"> None=65,</span> -<a name="l00262"></a>00262 <span class="comment"> remote_button=66,*/</span> -<a name="l00263"></a>00263 -<a name="l00264"></a>00264 -<a name="l00265"></a>00265 -<a name="l00266"></a>00266 } -<a name="l00267"></a>00267 -<a name="l00268"></a>00268 <span class="preprocessor"> #endregion</span> -<a name="l00269"></a>00269 <span class="preprocessor"></span> -<a name="l00270"></a>00270 <span class="preprocessor"> #region CONTROL METHODS</span> -<a name="l00271"></a>00271 <span class="preprocessor"></span> -<a name="l00272"></a>00272 <span class="preprocessor"> #region SERVER VARIABLES</span> -<a name="l00276"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1">00276</a> <span class="preprocessor"> public static string TuxAPI_Host { get; set; }</span> -<a name="l00280"></a><a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892">00280</a> <span class="preprocessor"> public static string TuxAPI_Port { get; set; }</span> -<a name="l00281"></a>00281 <span class="preprocessor"></span><span class="preprocessor"> #endregion</span> -<a name="l00282"></a>00282 <span class="preprocessor"></span> -<a name="l00283"></a>00283 <span class="preprocessor"> #region MOTORS CONTROL</span> -<a name="l00289"></a>00289 <span class="preprocessor"> private static void DoMotorAction(TuxAPI_LEVEL level, TuxAPI_ACTION action)</span> -<a name="l00290"></a>00290 <span class="preprocessor"></span> { -<a name="l00291"></a>00291 wc = <span class="keyword">new</span> WebClient(); -<a name="l00292"></a>00292 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00293"></a>00293 -<a name="l00294"></a>00294 <span class="comment">//http://localhost:270/0/flippers/up?0 //permet de faire mettre les ailles en haut !</span> -<a name="l00295"></a>00295 -<a name="l00296"></a>00296 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/"</span>; -<a name="l00297"></a>00297 -<a name="l00298"></a>00298 <span class="keywordflow">switch</span> (action) -<a name="l00299"></a>00299 { -<a name="l00300"></a>00300 <span class="keywordflow">case</span> TuxAPI_ACTION.FLIPPERS_UP: -<a name="l00301"></a>00301 { -<a name="l00302"></a>00302 final_uri = final_uri + <span class="stringliteral">"flippers/up?"</span>; -<a name="l00303"></a>00303 } -<a name="l00304"></a>00304 <span class="keywordflow">break</span>; -<a name="l00305"></a>00305 <span class="keywordflow">case</span> TuxAPI_ACTION.FLIPPERS_DOWN: -<a name="l00306"></a>00306 { -<a name="l00307"></a>00307 final_uri = final_uri + <span class="stringliteral">"flippers/down?"</span>; -<a name="l00308"></a>00308 } -<a name="l00309"></a>00309 <span class="keywordflow">break</span>; -<a name="l00310"></a>00310 <span class="keywordflow">case</span> TuxAPI_ACTION.MOUTH_OPEN: -<a name="l00311"></a>00311 { -<a name="l00312"></a>00312 final_uri = final_uri + <span class="stringliteral">"mouth/open?"</span>; -<a name="l00313"></a>00313 } -<a name="l00314"></a>00314 <span class="keywordflow">break</span>; -<a name="l00315"></a>00315 <span class="keywordflow">case</span> TuxAPI_ACTION.MOUTH_CLOSE: -<a name="l00316"></a>00316 { -<a name="l00317"></a>00317 final_uri = final_uri + <span class="stringliteral">"mouth/close?"</span>; -<a name="l00318"></a>00318 } -<a name="l00319"></a>00319 <span class="keywordflow">break</span>; -<a name="l00320"></a>00320 <span class="keywordflow">case</span> TuxAPI_ACTION.EYES_OPEN: -<a name="l00321"></a>00321 { -<a name="l00322"></a>00322 final_uri = final_uri + <span class="stringliteral">"eyes/open?"</span>; -<a name="l00323"></a>00323 } -<a name="l00324"></a>00324 <span class="keywordflow">break</span>; -<a name="l00325"></a>00325 <span class="keywordflow">case</span> TuxAPI_ACTION.EYES_CLOSE: -<a name="l00326"></a>00326 { -<a name="l00327"></a>00327 final_uri = final_uri + <span class="stringliteral">"eyes/close?"</span>; -<a name="l00328"></a>00328 } -<a name="l00329"></a>00329 <span class="keywordflow">break</span>; -<a name="l00330"></a>00330 } -<a name="l00331"></a>00331 -<a name="l00332"></a>00332 wc.DownloadString(final_uri); -<a name="l00333"></a>00333 } -<a name="l00334"></a>00334 -<a name="l00341"></a>00341 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoRotorAction(TuxAPI_LEVEL level, TuxAPI_ACTION action, <span class="keywordtype">int</span> rotation) -<a name="l00342"></a>00342 { -<a name="l00343"></a>00343 wc = <span class="keyword">new</span> WebClient(); -<a name="l00344"></a>00344 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00345"></a>00345 -<a name="l00346"></a>00346 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/"</span>; -<a name="l00347"></a>00347 -<a name="l00348"></a>00348 <span class="keywordflow">switch</span> (action) -<a name="l00349"></a>00349 { -<a name="l00350"></a>00350 <span class="keywordflow">case</span> TuxAPI_ACTION.ROTATE_LEFT: -<a name="l00351"></a>00351 { -<a name="l00352"></a>00352 final_uri = final_uri + <span class="stringliteral">"spinning/left_on?count="</span> + rotation; -<a name="l00353"></a>00353 } -<a name="l00354"></a>00354 <span class="keywordflow">break</span>; -<a name="l00355"></a>00355 <span class="keywordflow">case</span> TuxAPI_ACTION.ROTATE_RIGHT: -<a name="l00356"></a>00356 { -<a name="l00357"></a>00357 final_uri = final_uri + <span class="stringliteral">"spinning/right_on?count="</span> + rotation; -<a name="l00358"></a>00358 } -<a name="l00359"></a>00359 <span class="keywordflow">break</span>; -<a name="l00360"></a>00360 } -<a name="l00361"></a>00361 -<a name="l00362"></a>00362 wc.DownloadString(final_uri); -<a name="l00363"></a>00363 } -<a name="l00364"></a>00364 <span class="preprocessor"> #endregion</span> -<a name="l00365"></a>00365 <span class="preprocessor"></span> -<a name="l00366"></a>00366 <span class="preprocessor"> #region LEDS CONTROL</span> -<a name="l00373"></a>00373 <span class="preprocessor"> private static void DoLedsAction(TuxAPI_LEVEL level, TuxAPI_ACTION action, TuxAPI_LEDS leds)</span> -<a name="l00374"></a>00374 <span class="preprocessor"></span> { -<a name="l00375"></a>00375 wc = <span class="keyword">new</span> WebClient(); -<a name="l00376"></a>00376 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00377"></a>00377 -<a name="l00378"></a>00378 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/"</span>; -<a name="l00379"></a>00379 -<a name="l00380"></a>00380 <span class="preprocessor"> #region Quel action effecteur ? ouvrir/fermer </span> -<a name="l00381"></a>00381 <span class="preprocessor"></span> <span class="keywordflow">switch</span> (action) -<a name="l00382"></a>00382 { -<a name="l00383"></a>00383 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_OFF: -<a name="l00384"></a>00384 { -<a name="l00385"></a>00385 final_uri = final_uri + <span class="stringliteral">"leds/off?leds="</span>+leds; -<a name="l00386"></a>00386 } -<a name="l00387"></a>00387 <span class="keywordflow">break</span>; -<a name="l00388"></a>00388 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_ON: -<a name="l00389"></a>00389 { -<a name="l00390"></a>00390 final_uri = final_uri + <span class="stringliteral">"leds/on?leds="</span>+leds+<span class="stringliteral">"&intensity=10.0"</span>; <span class="comment">//dont know the real maximum of intensity TODO: change 10.0 to the maximum</span> -<a name="l00391"></a>00391 } -<a name="l00392"></a>00392 <span class="keywordflow">break</span>; -<a name="l00393"></a>00393 } -<a name="l00394"></a>00394 <span class="preprocessor"> #endregion</span> -<a name="l00395"></a>00395 <span class="preprocessor"></span> -<a name="l00396"></a>00396 wc.DownloadString(final_uri); -<a name="l00397"></a>00397 } -<a name="l00398"></a>00398 -<a name="l00406"></a>00406 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoLedsAction(TuxAPI_LEVEL level, TuxAPI_ACTION action, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471" title="&lt;&lt;LED_BOTH|LED_RIGHT|LED_LEFT&gt;&gt;">TuxAPI_LEDS</a> leds, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#46d878fae760506b4dbad0c3dab80bb8" title="3 levels of luminosity intensity i&#39;ve defined (value to check and modify !!)">TuxAPI_LEDS_INTENSITY_LEVEL</a> intensity) -<a name="l00407"></a>00407 { -<a name="l00408"></a>00408 wc = <span class="keyword">new</span> WebClient(); -<a name="l00409"></a>00409 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00410"></a>00410 -<a name="l00411"></a>00411 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/"</span>; -<a name="l00412"></a>00412 -<a name="l00413"></a>00413 -<a name="l00414"></a>00414 <span class="preprocessor"> #region Quel action effecteur ? ouvrir/fermer</span> -<a name="l00415"></a>00415 <span class="preprocessor"></span> <span class="keywordflow">switch</span> (action) -<a name="l00416"></a>00416 { -<a name="l00417"></a>00417 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_OFF: -<a name="l00418"></a>00418 { -<a name="l00419"></a>00419 final_uri = final_uri + <span class="stringliteral">"leds/off?leds="</span> + leds; -<a name="l00420"></a>00420 } -<a name="l00421"></a>00421 <span class="keywordflow">break</span>; -<a name="l00422"></a>00422 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_ON: -<a name="l00423"></a>00423 { -<a name="l00424"></a>00424 final_uri = final_uri + <span class="stringliteral">"leds/on?leds="</span> + leds + <span class="stringliteral">"&intensity="</span>+((double)intensity+0.1).ToString().Replace(<span class="stringliteral">","</span>,<span class="stringliteral">"."</span>); -<a name="l00425"></a>00425 } -<a name="l00426"></a>00426 <span class="keywordflow">break</span>; -<a name="l00427"></a>00427 } -<a name="l00428"></a>00428 <span class="preprocessor"> #endregion</span> -<a name="l00429"></a>00429 <span class="preprocessor"></span> -<a name="l00430"></a>00430 wc.DownloadString(final_uri); -<a name="l00431"></a>00431 } -<a name="l00432"></a>00432 -<a name="l00440"></a>00440 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoLedsAction(TuxAPI_LEVEL level, TuxAPI_ACTION action, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471" title="&lt;&lt;LED_BOTH|LED_RIGHT|LED_LEFT&gt;&gt;">TuxAPI_LEDS</a> leds, <span class="keywordtype">double</span> intensity) -<a name="l00441"></a>00441 { -<a name="l00442"></a>00442 wc = <span class="keyword">new</span> WebClient(); -<a name="l00443"></a>00443 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00444"></a>00444 -<a name="l00445"></a>00445 -<a name="l00446"></a>00446 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/"</span>; -<a name="l00447"></a>00447 -<a name="l00448"></a>00448 <span class="preprocessor"> #region Quel action effecteur ? ouvrir/fermer</span> -<a name="l00449"></a>00449 <span class="preprocessor"></span> <span class="keywordflow">switch</span> (action) -<a name="l00450"></a>00450 { -<a name="l00451"></a>00451 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_OFF: -<a name="l00452"></a>00452 { -<a name="l00453"></a>00453 final_uri = final_uri + <span class="stringliteral">"leds/off?leds="</span> + leds; -<a name="l00454"></a>00454 } -<a name="l00455"></a>00455 <span class="keywordflow">break</span>; -<a name="l00456"></a>00456 <span class="keywordflow">case</span> TuxAPI_ACTION.LEDS_ON: -<a name="l00457"></a>00457 { -<a name="l00458"></a>00458 final_uri = final_uri + <span class="stringliteral">"leds/on?leds="</span> + leds + <span class="stringliteral">"&intensity="</span> + (intensity + 0.1).ToString().Replace(<span class="stringliteral">","</span>, <span class="stringliteral">"."</span>); -<a name="l00459"></a>00459 } -<a name="l00460"></a>00460 <span class="keywordflow">break</span>; -<a name="l00461"></a>00461 } -<a name="l00462"></a>00462 <span class="preprocessor"> #endregion</span> -<a name="l00463"></a>00463 <span class="preprocessor"></span> -<a name="l00464"></a>00464 wc.DownloadString(final_uri); -<a name="l00465"></a>00465 } -<a name="l00466"></a>00466 -<a name="l00473"></a>00473 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoBlinkLedsAction(TuxAPI_LEVEL level, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471" title="&lt;&lt;LED_BOTH|LED_RIGHT|LED_LEFT&gt;&gt;">TuxAPI_LEDS</a> leds, <span class="keywordtype">int</span> count) -<a name="l00474"></a>00474 { -<a name="l00475"></a>00475 wc = <span class="keyword">new</span> WebClient(); -<a name="l00476"></a>00476 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00477"></a>00477 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/leds/blink?count="</span> + count + <span class="stringliteral">"&delay=0.1&leds="</span> + leds; -<a name="l00478"></a>00478 wc.DownloadString(final_uri); -<a name="l00479"></a>00479 } -<a name="l00480"></a>00480 -<a name="l00488"></a>00488 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoBlinkLedsAction(TuxAPI_LEVEL level, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#70fe51119e6f48d65fd7fbe67f89b471" title="&lt;&lt;LED_BOTH|LED_RIGHT|LED_LEFT&gt;&gt;">TuxAPI_LEDS</a> leds, <span class="keywordtype">int</span> count, <span class="keywordtype">double</span> delay) -<a name="l00489"></a>00489 { -<a name="l00490"></a>00490 wc = <span class="keyword">new</span> WebClient(); -<a name="l00491"></a>00491 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00492"></a>00492 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/leds/blink?count="</span> + count + <span class="stringliteral">"&delay="</span> + delay.ToString().Replace(<span class="stringliteral">","</span>, <span class="stringliteral">"."</span>) + <span class="stringliteral">"&leds="</span> + leds; -<a name="l00493"></a>00493 wc.DownloadString(final_uri); -<a name="l00494"></a>00494 } -<a name="l00495"></a>00495 <span class="preprocessor"> #endregion</span> -<a name="l00496"></a>00496 <span class="preprocessor"></span> -<a name="l00497"></a>00497 <span class="preprocessor"> #region TTS SPEECH CONTROL</span> -<a name="l00503"></a>00503 <span class="preprocessor"> private static void DoSpeak(TuxAPI_LEVEL level, string Text)</span> -<a name="l00504"></a>00504 <span class="preprocessor"></span> { -<a name="l00505"></a>00505 wc = <span class="keyword">new</span> WebClient(); -<a name="l00506"></a>00506 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00507"></a>00507 -<a name="l00508"></a>00508 <span class="comment">//http://localhost:270/0/flippers/up?0 //permet de faire mettre les ailles en haut !</span> -<a name="l00509"></a>00509 -<a name="l00510"></a>00510 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/tts/speak?text="</span> + Text; -<a name="l00511"></a>00511 -<a name="l00512"></a>00512 wc.DownloadString(final_uri); -<a name="l00513"></a>00513 } -<a name="l00514"></a>00514 -<a name="l00521"></a>00521 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoSpeak(TuxAPI_LEVEL level, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#99dd95de098daeabeab6af86ebb3bcf7" title="The TTS voice (TODO: Add others voices).">TuxAPI_SPEAK_LOCUTOR</a> locutor, <span class="keywordtype">string</span> Text) -<a name="l00522"></a>00522 { -<a name="l00523"></a>00523 wc = <span class="keyword">new</span> WebClient(); -<a name="l00524"></a>00524 <span class="keywordtype">string</span> start_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00525"></a>00525 <span class="keywordtype">string</span> final_url = <span class="keywordtype">string</span>.Empty; -<a name="l00526"></a>00526 -<a name="l00527"></a>00527 start_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/tts/"</span>; -<a name="l00528"></a>00528 -<a name="l00529"></a>00529 <span class="comment">//1 - locutor choice</span> -<a name="l00530"></a>00530 <span class="comment">//http://127.0.0.1:270/0/tts/locutor?name=Bruno</span> -<a name="l00531"></a>00531 final_url = start_uri + <span class="stringliteral">"locutor?name="</span> + (byte)locutor; -<a name="l00532"></a>00532 wc.DownloadString(final_url); -<a name="l00533"></a>00533 -<a name="l00534"></a>00534 <span class="comment">//2 - the text</span> -<a name="l00535"></a>00535 final_url = start_uri + <span class="stringliteral">"speak?text="</span> + Text; -<a name="l00536"></a>00536 -<a name="l00537"></a>00537 wc.DownloadString(final_url); -<a name="l00538"></a>00538 } -<a name="l00539"></a>00539 -<a name="l00546"></a>00546 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoSpeak(TuxAPI_LEVEL level, <span class="keywordtype">int</span> pitch, <span class="keywordtype">string</span> Text) -<a name="l00547"></a>00547 { -<a name="l00548"></a>00548 wc = <span class="keyword">new</span> WebClient(); -<a name="l00549"></a>00549 <span class="keywordtype">string</span> start_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00550"></a>00550 <span class="keywordtype">string</span> final_url = <span class="keywordtype">string</span>.Empty; -<a name="l00551"></a>00551 -<a name="l00552"></a>00552 start_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/tts/"</span>; -<a name="l00553"></a>00553 -<a name="l00554"></a>00554 <span class="comment">//1 - pitch</span> -<a name="l00555"></a>00555 <span class="comment">//http://127.0.0.1:270/0/tts/pitch?value=10</span> -<a name="l00556"></a>00556 final_url = start_uri + <span class="stringliteral">"pitch?value="</span> + pitch; -<a name="l00557"></a>00557 wc.DownloadString(final_url); -<a name="l00558"></a>00558 -<a name="l00559"></a>00559 <span class="comment">//2 - text</span> -<a name="l00560"></a>00560 final_url = start_uri + <span class="stringliteral">"speak?text="</span> + Text; -<a name="l00561"></a>00561 -<a name="l00562"></a>00562 wc.DownloadString(final_url); -<a name="l00563"></a>00563 } -<a name="l00564"></a>00564 -<a name="l00572"></a>00572 <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> DoSpeak(TuxAPI_LEVEL level, <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#99dd95de098daeabeab6af86ebb3bcf7" title="The TTS voice (TODO: Add others voices).">TuxAPI_SPEAK_LOCUTOR</a> locutor, <span class="keywordtype">int</span> pitch, <span class="keywordtype">string</span> Text) -<a name="l00573"></a>00573 { -<a name="l00574"></a>00574 wc = <span class="keyword">new</span> WebClient(); -<a name="l00575"></a>00575 <span class="keywordtype">string</span> start_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00576"></a>00576 <span class="keywordtype">string</span> final_url = <span class="keywordtype">string</span>.Empty; -<a name="l00577"></a>00577 -<a name="l00578"></a>00578 start_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/tts/"</span>; -<a name="l00579"></a>00579 -<a name="l00580"></a>00580 <span class="comment">//1 - l'interlocuteur</span> -<a name="l00581"></a>00581 <span class="comment">//http://127.0.0.1:270/0/tts/locutor?name=Bruno</span> -<a name="l00582"></a>00582 final_url = start_uri + <span class="stringliteral">"locutor?name="</span> + (byte)locutor; -<a name="l00583"></a>00583 wc.DownloadString(final_url); -<a name="l00584"></a>00584 -<a name="l00585"></a>00585 <span class="comment">//2 - Le pitch</span> -<a name="l00586"></a>00586 <span class="comment">//http://127.0.0.1:270/0/tts/pitch?value=10</span> -<a name="l00587"></a>00587 final_url = start_uri + <span class="stringliteral">"pitch?value="</span> + pitch; -<a name="l00588"></a>00588 wc.DownloadString(final_url); -<a name="l00589"></a>00589 -<a name="l00590"></a>00590 <span class="comment">//3 - le texte</span> -<a name="l00591"></a>00591 final_url = start_uri + <span class="stringliteral">"speak?text="</span> + Text; -<a name="l00592"></a>00592 -<a name="l00593"></a>00593 wc.DownloadString(final_url); -<a name="l00594"></a>00594 } -<a name="l00595"></a>00595 <span class="preprocessor"> #endregion</span> -<a name="l00596"></a>00596 <span class="preprocessor"></span> -<a name="l00597"></a>00597 <span class="preprocessor"> #region ATTITUNES CONTROL</span> -<a name="l00604"></a>00604 <span class="preprocessor"> private static void AttituneControl(TuxAPI_LEVEL level, TuxAPI_ACTION action, string attitune)</span> -<a name="l00605"></a>00605 <span class="preprocessor"></span> { -<a name="l00606"></a>00606 wc = <span class="keyword">new</span> WebClient(); -<a name="l00607"></a>00607 <span class="keywordtype">string</span> final_uri = <span class="keywordtype">string</span>.Empty; -<a name="l00608"></a>00608 <span class="keywordtype">string</span> final_url = <span class="keywordtype">string</span>.Empty; -<a name="l00609"></a>00609 -<a name="l00610"></a>00610 -<a name="l00611"></a>00611 final_uri = <span class="stringliteral">"http://"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#68c01b22f580fb22a364a8fbe07947c1" title="Tux Droid httpserver host.">TuxAPI_Host</a> + <span class="stringliteral">":"</span> + <a class="code" href="class_tux_a_p_i_1_1_tux_a_p_i.html#f8723a574fc2115a76f5550dbe7a4892" title="Tux Droid httpserver port.">TuxAPI_Port</a> + <span class="stringliteral">"/"</span> + (int)level + <span class="stringliteral">"/attitune/"</span>; -<a name="l00612"></a>00612 -<a name="l00613"></a>00613 <span class="keywordflow">switch</span> (action) -<a name="l00614"></a>00614 { -<a name="l00615"></a>00615 <span class="keywordflow">case</span> TuxAPI_ACTION.ATTITUNE_PLAY: <span class="comment">//Need to fix: the attitune stopping before the end !!</span> -<a name="l00616"></a>00616 { -<a name="l00617"></a>00617 <span class="comment">//attitune/load_and_play?</span> -<a name="l00618"></a>00618 final_url = final_uri + <span class="stringliteral">"load_and_play?path="</span> + attitune; -<a name="l00619"></a>00619 final_url = final_url.Replace(<span class="stringliteral">"\\"</span>, <span class="stringliteral">"\\\\"</span>); -<a name="l00620"></a>00620 wc.DownloadString(final_url); -<a name="l00621"></a>00621 } -<a name="l00622"></a>00622 <span class="keywordflow">break</span>; -<a name="l00623"></a>00623 <span class="keywordflow">case</span> TuxAPI_ACTION.ATTITUNE_STOP: -<a name="l00624"></a>00624 { -<a name="l00625"></a>00625 final_url = final_uri + <span class="stringliteral">"stop?"</span>; -<a name="l00626"></a>00626 wc.DownloadString(final_url); -<a name="l00627"></a>00627 } -<a name="l00628"></a>00628 <span class="keywordflow">break</span>; -<a name="l00629"></a>00629 } -<a name="l00630"></a>00630 } -<a name="l00631"></a>00631 <span class="preprocessor"> #endregion</span> -<a name="l00632"></a>00632 <span class="preprocessor"></span> -<a name="l00633"></a>00633 <span class="preprocessor"> #region WAV CONTROL</span> -<a name="l00640"></a>00640 <span class="preprocessor"> private static void WavControl(TuxAPI_LEVEL level, TuxAPI_ACTION action, string sound)</span> -<a name="l00641"></a>00641 <span class="preprocessor"></sp... [truncated message content] |