add TimerInit, TimerCleanup and Exit functions
authorgreg
Wed, 07 May 2008 17:06:20 +0200
changeset 462 3c5b2eb51922
parent 461 51cf26e3f352
child 463 f7455fef585f
add TimerInit, TimerCleanup and Exit functions
doc/manual/en/canfestival_OS.svg
--- a/doc/manual/en/canfestival_OS.svg	Wed May 07 16:59:50 2008 +0200
+++ b/doc/manual/en/canfestival_OS.svg	Wed May 07 17:06:20 2008 +0200
@@ -12,15 +12,14 @@
    height="595.27557pt"
    id="svg2"
    sodipodi:version="0.32"
-   inkscape:version="0.45"
-   sodipodi:docbase="/home/edouard/workspace/CanFestival-3/doc"
+   inkscape:version="0.45.1"
+   sodipodi:docbase="/home/kgad/CVS/CanFestival-3/doc/manual/en"
    sodipodi:docname="canfestival_OS.svg"
    version="1.0"
    inkscape:export-filename="/home/edouard/workspace/CanFestival-3/doc/canfestival_OS.png"
    inkscape:export-xdpi="87.57"
    inkscape:export-ydpi="87.57"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape"
-   sodipodi:modified="true">
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
   <defs
      id="defs4">
     <marker
@@ -105,15 +104,15 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="1.2605926"
-     inkscape:cx="740.98173"
-     inkscape:cy="552.24525"
+     inkscape:zoom="1.1306944"
+     inkscape:cx="755.44267"
+     inkscape:cy="232.74008"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showguides="true"
      inkscape:guide-bbox="true"
-     inkscape:window-width="1592"
-     inkscape:window-height="965"
+     inkscape:window-width="1272"
+     inkscape:window-height="775"
      inkscape:window-x="0"
      inkscape:window-y="0"
      showgrid="false"
@@ -765,95 +764,103 @@
          sodipodi:role="line"
          x="466.21942"
          y="398.92847"
+         id="tspan2420">void Exit(CO_Data*d, UNS32 id){}</tspan><tspan
+         sodipodi:role="line"
+         x="466.21942"
+         y="414.18841"
+         id="tspan2422" /><tspan
+         sodipodi:role="line"
+         x="466.21942"
+         y="429.44836"
          id="tspan6600">void Operational()</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="414.18841"
+         y="444.7083"
          id="tspan6602">{</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="429.44836"
+         y="459.96825"
          id="tspan6606"> /* Your code for Operational State */</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="444.7083"
+         y="475.2282"
          id="tspan6604">}</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="459.96825"
+         y="490.48814"
          id="tspan6598" /><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="475.2282"
+         y="505.74809"
          id="tspan6596">int main(int argc, char *argv[])</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="490.48814"
+         y="521.00803"
          id="tspan5393">{</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="505.74809"
+         y="536.26798"
          id="tspan5260"> LoadCanDriver(&quot;can_peak_win32.dll&quot;);</tspan><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="521.00803"
+         y="551.52792"
          id="tspan6610" /><tspan
          sodipodi:role="line"
          x="466.21942"
-         y="536.26798"
+         y="566.78787"
          id="tspan6612"> MyNode_Data.operational = Operational;</tspan><tspan
          sodipodi:role="line"
          id="tspan5226"
          x="466.21942"
-         y="551.52792" /><tspan
+         y="582.04782" /><tspan
          sodipodi:role="line"
          id="tspan5230"
          x="466.21942"
-         y="566.78787"> s_BOARD MyBoard = {&quot;0&quot;, &quot;500K&quot;};</tspan><tspan
-         sodipodi:role="line"
-         x="466.21942"
-         y="582.04782"
+         y="597.30776"> s_BOARD MyBoard = {&quot;0&quot;, &quot;500K&quot;};</tspan><tspan
+         sodipodi:role="line"
+         x="466.21942"
+         y="612.56771"
          id="tspan5279"> MyCanHandle = canOpen(&amp;MyBoard,&amp;MyNode_Data);</tspan><tspan
          sodipodi:role="line"
          id="tspan5232"
          x="466.21942"
-         y="597.30776" /><tspan
+         y="627.82765"> TimerInit();</tspan><tspan
          sodipodi:role="line"
          id="tspan5236"
          x="466.21942"
-         y="612.56771"> StartTimerLoop(&amp;InitNode);</tspan><tspan
+         y="643.0876"> StartTimerLoop(&amp;InitNode);</tspan><tspan
          sodipodi:role="line"
          id="tspan5238"
          x="466.21942"
-         y="627.82765" /><tspan
-         sodipodi:role="line"
-         x="466.21942"
-         y="643.0876"
+         y="658.34755" /><tspan
+         sodipodi:role="line"
+         x="466.21942"
+         y="673.60749"
          id="tspan5401"> /*    Your Code Here    */</tspan><tspan
          sodipodi:role="line"
          id="tspan5246"
          x="466.21942"
-         y="658.34755"> </tspan><tspan
+         y="688.86744"> </tspan><tspan
          sodipodi:role="line"
          id="tspan5250"
          x="466.21942"
-         y="673.60749"> StopTimerLoop();</tspan><tspan
+         y="704.12738"> StopTimerLoop(&amp;Exit);</tspan><tspan
          sodipodi:role="line"
          id="tspan5252"
          x="466.21942"
-         y="688.86744"> </tspan><tspan
+         y="719.38733"> TimerCleanup();</tspan><tspan
          sodipodi:role="line"
          id="tspan5256"
          x="466.21942"
-         y="704.12738"> canClose(&amp;MyNode_Data);</tspan><tspan
-         sodipodi:role="line"
-         x="466.21942"
-         y="719.38733"
+         y="734.64727"> canClose(&amp;MyNode_Data);</tspan><tspan
+         sodipodi:role="line"
+         x="466.21942"
+         y="749.90722"
          id="tspan5395">}</tspan><tspan
          sodipodi:role="line"
          id="tspan5258"
          x="466.21942"
-         y="734.64727" /></text>
+         y="765.16717" /></text>
     <path
        style="opacity:1;color:#ff0000;fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ff0000;stroke-width:3.4000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
        d="M 901.72023,227.88056 C 946.99304,257.23786 885.53123,272.66927 802.41689,308.87468"
@@ -1299,5 +1306,14 @@
          x="179.44179"
          y="713.27274"
          id="tspan10820">OS</tspan></text>
-  </g>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2412"><flowRegion
+         id="flowRegion2414"><rect
+           id="rect2416"
+           width="353.96164"
+           height="208.87489"
+           x="462.7767"
+           y="442.66425" /></flowRegion><flowPara
+         id="flowPara2418">+</flowPara></flowRoot>  </g>
 </svg>