⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vxcolor.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/tornado/tools/vxColor.html - generated by refgen from vxColor.sh --> <title> vxColor </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado Reference :  Tornado Tools</i></a></p></blockquote><h1>vxColor</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>vxColor</strong> - graph coloring demo for Tornado</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>vxColor <i>targetServer</i> [-V.erbose]</pre><p><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command launches the <b><a href="./vxColor.html#top">vxColor</a></b> demo Graphical User Interface.  The<b><a href="./vxColor.html#top">vxColor</a></b> demo is based on a self-stabilizing algorithm for coloring aplanar graph.Given a planar graph (a 2D graph with no intersecting arc) and given 6colors, the aim of the algorithm is to assign each region of the grapha color so that nopair of connected regions (regions sharing a least one arc) can have thesame color.  The main tasks in the demo are the "controller" task andsome number of "region" tasks.<p>The GUI can be invoked from the command line on the host shell.The following parameter is required and a verbose option is available:<dl><dt><i>targetServer</i><dd>A living target server connected to the target to be used.<p><dt><b>-V</b><dd> Turn on verbose mode, which displays important steps of theinteraction between host and target. </dl><p></blockquote><h4>NOTE</h4><blockquote><p>The <b><a href="./vxColor.html#top">vxColor</a></b> demo is based on WTX and a TK-capable interpreter.<p></blockquote><h4>LAUNCHING THE DEMO</h4><blockquote><p><dl><dt>(1)<dd>Switch on your target system (booting with VxWorks).<p><dt>(2)<dd>Launch a target server for this target. <p><dt>(3)<dd> Type the command line.  For example, with a Motorola MVME162 board, assuming you named your target server <b>demo162</b>, enter:<pre>    vxColor demo162 </pre></dl><p>After executing the above steps, your screen should display a window named "Tornado Graph Coloring Demo".  The window displays three buttons:<dl><dt>(1)<dd>a toggle that switches debug mode on or off <p><dt>(2)<dd>a menu button that allows you to select a predefined graph to run the demo with <p><dt>(3)<dd> a quit button </dl><p>Debug mode should be turned on to debug the target sideof the VxColor demonstration with CrossWind.  Turning on debug mode makes the stack size for the graph coloring tasks bigger in order toaccomodate the extra space needed by local variable when the codeis compiled with the debug option (-g) turned on.The header file of the demo ($<b>WIND_BASE/target/src/demo/color/vxColor.h</b>) contains defines for different target types of the stack sizes of the controller and region tasks,in debug or normal mode.  Normal mode demands the least memory and should be used when running the demo on boards with little memory capacity. You can adjust the stack size by editing the header file. Whichever mode you select, remember that you can watch the stack usage with the Tornado browser and that a stack overflow can lead to a severe system crash.<p>When a graph has been selected, the main window displays this graphas a set of colored regions separated with border lines.  The windowdisplays a new set of buttons which are contextual controls.<p>The following gives a description of the contextual controls:<p><table><tr valign=top><td align=left>START           </td><td align=left></td><td align=left> Starts a coloring session</tr><tr valign=top><td align=left>COLOR EDIT      </td><td align=left></td><td align=left> Menu for changing region colors:</tr><tr valign=top><td align=left></td><td align=left> - RANDOM      </td><td align=left> randomly initializes each region's color</tr><tr valign=top><td align=left></td><td align=left> - UNIFORM     </td><td align=left> uniformly initializes all regions' colors</tr><tr valign=top><td align=left></td><td align=left> - LOCAL       </td><td align=left> allows editing an individual region's color</tr><tr valign=top><td align=left>NEIGHBORHOOD    </td><td align=left></td><td align=left> Displays each region neighbors (following cursor)</tr><tr valign=top><td align=left>QUIT            </td><td align=left></td><td align=left> Exits the demo</tr><tr valign=top><td align=left></tr></tr></table>During a coloring session, the contextual controls are:<p><table><tr valign=top><td align=left>STOP            </td><td align=left> Breaks a coloring session</tr><tr valign=top><td align=left>PAUSE           </td><td align=left> Temporarily halts a coloring session</tr><tr valign=top><td align=left></tr></tr></table>During a PAUSE, the only contextual control is:<p><table><tr valign=top><td align=left>CONTINUE        </td><td align=left> Resumes a coloring session after a pause</tr><tr valign=top><td align=left></tr></tr></table>If you press the START button, you can see region colors changing until a steady state is reached.What does all this activity mean and what does the steady state represent?<p>Actually, each region in the graph has a color attribute and is controlled by a task running on the target.  The existing neighborhood relationships within the graph are represented on the target as communication channels between tasks.  Thus, the target is populated with a set of tasks that have exchanges between each other.  The purpose of these exchangesis to honor a simple rule which says that no neighboring regions can have the same color and that only six (6) different colors are available.This scheme has been proven to be always possible.  See "A Self_stabilizing algorithm for Coloring a Planar Graph,"by S. Gosh and <b>M.H</b>. Karaata in<i>Distributed Computing </i>(1993) 7:55-59. <p>When a solution is found, region colors freeze.  You can then break this stabilized status by changing some colors using the COLOR EDIT menu.  If youselect LOCAL mode, choose a new color for any region by clicking on the desired region as many time as necessary (one out of the 6 possible colors will be selected in a ring fashion).  When you are satisfied with your changes, press the START button to compute a new coloring scheme.<p>While coloring is in progress, you can use the STOP and PAUSE buttons. The STOP button lets you break the target's coloring activity; thePAUSE button temporarily suspends this activity so that you can observe thetasks of the demo with various Tornado tools.  When PAUSE is on, the only available action is CONTINUE, which resumes the coloring activity.<p></blockquote><h4>RECOMPILING THE TARGET MODULE</h4><blockquote><p>The demo's target-side building technology uses a simple makefile thatrequires two parameters settings: one for CPU and the second for TOOL.The CPU and TOOL parameters must be set to a supported architecture value and to a supported toolchain value (the default value of TOOL is"gnu" when omitted).<p></blockQuote><h4>Examples</h4><blockQuote>To recompile the demo's target module for the listed architectures,enter the following, in the directory <b>target/src/demo/color</b>: <p>Motorola 68040 board:<pre>    make CPU=MC68040</pre>Solaris simulator:<pre>    make CPU=SIMSPARCSOLARIS</pre>Intel i960CA board:<pre>    make CPU=I960CA </pre>To produce debugging information:<dl><dt>(1)<dd>Recompile the demo's target module (as described here above).<p><dt>(2)<dd>Edit the command line produced in (1) to change the optimization flag to <b>-g</b>.<p><dt>(3)<dd> Execute this modified command line. </dl><p></blockquote><h4>ENVIRONMENT VARIABLES</h4><blockquote><p><dl><dt><b>WIND_BASE</b><dd>root location of the Tornado tree.<p><dt><b>WIND_REGISTRY</b><dd> host on which the Tornado Registry daemon runs (see <b><a href="./wtxregd.html#top">wtxregd</a></b>). </dl><p></blockquote><h4>FILES</h4><blockquote><p>The following files are required by the vxColor demo:<dl><dt><b>$<b>WIND_BASE</b>/host/<i>WIND_HOST_TYPE</i>/bin/wtxwish</b><dd>WTX protocol capable TK interpreter.<p><dt><b>$<b>WIND_BASE</b>/host/<i>WIND_HOST_TYPE</i>/bin/vxColor</b><dd>shell script invoking <b>wtxwish</b> to interpret <b>demoHost.tk</b>.<p><dt><b>$<b>WIND_BASE</b>/host/src/demo/color/demoHost.tk</b><dd>demo host GUI. <p><dt><b>$<b>WIND_BASE</b>/host/src/demo/color/United-States</b><dd>a planar graph representing the border states of the USA.<p><dt><b>$<b>WIND_BASE</b>/host/src/demo/color/FranceRegions</b><dd>a planar graph representing the border regions of France.<p><dt><b>$<b>WIND_BASE</b>/host/src/demo/color/Wheel</b><dd>a simple planar graph.<p><dt><b>$<b>WIND_BASE</b>/target/lib/obj<i>CPU</i><i>TOOL</i><b>test/vxColor.o</b> </b><dd> a  CPU specific demo object module. </dl><p></blockquote><h4>BUGS</h4><blockquote><p>If the NumLock key is on, the demo will hang.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./vxColor.html#top">vxColor</a></b>, <b><a href="./tgtsvr.html#top">tgtsvr</a></b>,  <i>Tornado User's Guide: Whirlwind Tour</i><p><p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -