You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(11) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(23) |
Feb
(15) |
Mar
|
Apr
(7) |
May
(21) |
Jun
(3) |
Jul
(28) |
Aug
(7) |
Sep
(10) |
Oct
(35) |
Nov
(1) |
Dec
(28) |
2009 |
Jan
(13) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ll...@us...> - 2010-02-18 16:04:59
|
Revision: 2345 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2345&view=rev Author: lluc-fr Date: 2010-02-18 16:04:51 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Add SVG icons for module "string". - LowerChar.svg - UpperChar.svg - StringSplit.svg Modified Paths: -------------- trunk/FlowDesigner/toolbox/string/CMakeLists.txt Added Paths: ----------- trunk/FlowDesigner/toolbox/string/icons/ trunk/FlowDesigner/toolbox/string/icons/CMakeLists.txt trunk/FlowDesigner/toolbox/string/icons/LowerChar.svg trunk/FlowDesigner/toolbox/string/icons/StringSplit.svg trunk/FlowDesigner/toolbox/string/icons/UpperChar.svg Modified: trunk/FlowDesigner/toolbox/string/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/CMakeLists.txt 2010-02-18 15:27:49 UTC (rev 2344) +++ trunk/FlowDesigner/toolbox/string/CMakeLists.txt 2010-02-18 16:04:51 UTC (rev 2345) @@ -1,2 +1,3 @@ ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(icons) Added: trunk/FlowDesigner/toolbox/string/icons/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/icons/CMakeLists.txt (rev 0) +++ trunk/FlowDesigner/toolbox/string/icons/CMakeLists.txt 2010-02-18 16:04:51 UTC (rev 2345) @@ -0,0 +1,8 @@ +SET(ICON_FILES + LowerChar.svg + UpperChar.svg + StringSplit.svg + ) + +INSTALL( FILES ${ICON_FILES} DESTINATION share/flowdesigner/icons) + Added: trunk/FlowDesigner/toolbox/string/icons/LowerChar.svg =================================================================== --- trunk/FlowDesigner/toolbox/string/icons/LowerChar.svg (rev 0) +++ trunk/FlowDesigner/toolbox/string/icons/LowerChar.svg 2010-02-18 16:04:51 UTC (rev 2345) @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64px" + height="64px" + id="svg2383" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="LowerChar.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2385"> + <linearGradient + id="linearGradient269"> + <stop + id="stop270" + offset="0.0000000" + style="stop-color:#a3a3a3;stop-opacity:1.0000000;" /> + <stop + id="stop271" + offset="1.0000000" + style="stop-color:#4c4c4c;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient259"> + <stop + id="stop260" + offset="0.0000000" + style="stop-color:#fafafa;stop-opacity:1.0000000;" /> + <stop + id="stop261" + offset="1.0000000" + style="stop-color:#bbbbbb;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient15662"> + <stop + id="stop15664" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop15666" + offset="1.0000000" + style="stop-color:#f8f8f8;stop-opacity:1.0000000;" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective2391" /> + <inkscape:perspective + id="perspective2745" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <inkscape:perspective + id="perspective2758" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <marker + viewBox="0 0 10 10" + refY="5" + refX="10" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowStart"> + <path + id="path3586" + d="M 10 0 L 0 5 L 10 10 z" /> + </marker> + <marker + viewBox="0 0 10 10" + refY="5" + refX="0" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowEnd"> + <path + id="path3583" + d="M 0 0 L 10 5 L 0 10 z" /> + </marker> + <inkscape:perspective + id="perspective3098" + inkscape:persp3d-origin="215.661 : 120.203 : 1" + inkscape:vp_z="431.32199 : 180.3045 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 180.3045 : 1" + sodipodi:type="inkscape:persp3d" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient259" + id="radialGradient2700" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1736737,0,0,1.2722105,-44.015722,-26.333029)" + cx="33.966679" + cy="35.736916" + fx="33.966679" + fy="35.736916" + r="86.708450" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient269" + id="radialGradient2702" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1831805,0,0,1.2619889,-39.91785,-25.543104)" + cx="8.8244190" + cy="3.7561285" + fx="8.8244190" + fy="3.7561285" + r="37.751713" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient15662" + id="radialGradient2704" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1831805,0,0,1.2619889,-39.91785,-25.543104)" + cx="8.1435566" + cy="7.2678967" + fx="8.1435566" + fy="7.2678967" + r="38.158695" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.203125" + inkscape:cx="49.9813" + inkscape:cy="37.064988" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showguides="false" + inkscape:window-width="1280" + inkscape:window-height="949" + inkscape:window-x="0" + inkscape:window-y="25"> + <inkscape:grid + type="xygrid" + id="grid2393" /> + </sodipodi:namedview> + <metadata + id="metadata2388"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <g + id="g3588" + transform="matrix(-3.6597748e-2,-3.6597997e-2,-3.6597997e-2,3.6597748e-2,29.241613,44.222874)"> + <path + style="fill:#000000;stroke:none" + id="path3590" + d="M 180.199,360.396 L 0,180.197 L 180.199,0 L 299.048,0 L 161.988,137.066 L 431.322,137.066 L 431.322,224.288 L 162.946,224.288 L 299.263,360.609 L 180.199,360.396 z" /> + </g> + <text + xml:space="preserve" + style="font-size:19.80689812px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="2.835582" + y="22.859514" + id="text2770"><tspan + sodipodi:role="line" + id="tspan2772" + x="2.835582" + y="22.859514">ABC</tspan></text> + <text + xml:space="preserve" + style="font-size:19.80689812px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="26.931917" + y="50.412212" + id="text2436"><tspan + sodipodi:role="line" + id="tspan2438" + x="26.931917" + y="50.412212">abc</tspan></text> + </g> +</svg> Added: trunk/FlowDesigner/toolbox/string/icons/StringSplit.svg =================================================================== --- trunk/FlowDesigner/toolbox/string/icons/StringSplit.svg (rev 0) +++ trunk/FlowDesigner/toolbox/string/icons/StringSplit.svg 2010-02-18 16:04:51 UTC (rev 2345) @@ -0,0 +1,235 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64px" + height="64px" + id="svg2383" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="StringSplit.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2385"> + <linearGradient + id="linearGradient269"> + <stop + id="stop270" + offset="0.0000000" + style="stop-color:#a3a3a3;stop-opacity:1.0000000;" /> + <stop + id="stop271" + offset="1.0000000" + style="stop-color:#4c4c4c;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient259"> + <stop + id="stop260" + offset="0.0000000" + style="stop-color:#fafafa;stop-opacity:1.0000000;" /> + <stop + id="stop261" + offset="1.0000000" + style="stop-color:#bbbbbb;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient15662"> + <stop + id="stop15664" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop15666" + offset="1.0000000" + style="stop-color:#f8f8f8;stop-opacity:1.0000000;" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective2391" /> + <inkscape:perspective + id="perspective2745" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <inkscape:perspective + id="perspective2758" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <marker + viewBox="0 0 10 10" + refY="5" + refX="10" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowStart"> + <path + id="path3586" + d="M 10 0 L 0 5 L 10 10 z" /> + </marker> + <marker + viewBox="0 0 10 10" + refY="5" + refX="0" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowEnd"> + <path + id="path3583" + d="M 0 0 L 10 5 L 0 10 z" /> + </marker> + <inkscape:perspective + id="perspective3098" + inkscape:persp3d-origin="215.661 : 120.203 : 1" + inkscape:vp_z="431.32199 : 180.3045 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 180.3045 : 1" + sodipodi:type="inkscape:persp3d" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.203125" + inkscape:cx="38.532796" + inkscape:cy="29.809164" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showguides="false" + inkscape:window-width="1280" + inkscape:window-height="947" + inkscape:window-x="0" + inkscape:window-y="25"> + <inkscape:grid + type="xygrid" + id="grid2393" /> + </sodipodi:namedview> + <metadata + id="metadata2388"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <g + id="g3588" + transform="matrix(-5.1757208e-2,-1.7606959e-7,-1.7606959e-7,5.1757208e-2,40.741358,24.148296)"> + <path + style="fill:#000000;stroke:none" + id="path3590" + d="M 180.199,360.396 L 1.2767565e-14,180.197 L 180.199,-2.7033931e-14 L 299.048,3.3029135e-14 L 161.988,137.066 L 585.88984,137.06653 L 585.88984,224.28853 L 162.946,224.288 L 299.263,360.609 L 180.199,360.396 z" + sodipodi:nodetypes="cccccccccc" /> + </g> + <text + xml:space="preserve" + style="font-size:10.04327297px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="3.2648194" + y="14.592876" + id="text2436"><tspan + sodipodi:role="line" + id="tspan2438" + x="3.2648194" + y="14.592876">A,B,C</tspan></text> + <text + xml:space="preserve" + style="font-size:10.04327297px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="10.308036" + y="55.539524" + id="text2402"><tspan + sodipodi:role="line" + id="tspan2404" + x="10.308036" + y="55.539524">,</tspan></text> + <text + xml:space="preserve" + style="font-size:10.04327297px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="50.475403" + y="22.959326" + id="text2406"><tspan + sodipodi:role="line" + x="50.475403" + y="22.959326" + id="tspan2412">A</tspan></text> + <text + xml:space="preserve" + style="font-size:36.85653687px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="57.919876" + y="32.952919" + id="text2414" + transform="scale(0.6675357,1.4980472)"><tspan + sodipodi:role="line" + x="57.919876" + y="32.952919" + id="tspan2420">{</tspan></text> + <g + id="g2428" + transform="matrix(2.7270125e-4,-5.1756489e-2,-5.1756489e-2,-2.7270125e-4,14.46943,26.621914)"> + <path + style="fill:#000000;stroke:none" + id="path2430" + d="M -155.14157,37.814586 L -114.6739,-1.8607127 L 154.6601,-1.8607127 L 154.6601,85.361287 L -113.7159,85.361287 L -155.14157,37.814586 z" + sodipodi:nodetypes="cccccc" /> + </g> + <g + id="g2432" + transform="matrix(2.7270125e-4,6.8976924e-2,-5.1756489e-2,3.6343449e-4,14.449011,39.81275)"> + <path + style="fill:#000000;stroke:none" + id="path2434" + d="M -155.14157,37.814586 L -114.6739,-1.8607127 L 154.6601,-1.8607127 L 154.6601,85.361287 L -113.7159,85.361287 L -155.14157,37.814586 z" + sodipodi:nodetypes="cccccc" /> + </g> + <text + id="text2425" + y="36.476761" + x="50.475403" + style="font-size:10.04327297px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + id="tspan2427" + y="36.476761" + x="50.475403" + sodipodi:role="line">B</tspan></text> + <text + xml:space="preserve" + style="font-size:10.04327297px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="50.475403" + y="50.476761" + id="text2429"><tspan + sodipodi:role="line" + x="50.475403" + y="50.476761" + id="tspan2431">C</tspan></text> + </g> +</svg> Added: trunk/FlowDesigner/toolbox/string/icons/UpperChar.svg =================================================================== --- trunk/FlowDesigner/toolbox/string/icons/UpperChar.svg (rev 0) +++ trunk/FlowDesigner/toolbox/string/icons/UpperChar.svg 2010-02-18 16:04:51 UTC (rev 2345) @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64px" + height="64px" + id="svg2383" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="UpperChar.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2385"> + <linearGradient + id="linearGradient269"> + <stop + id="stop270" + offset="0.0000000" + style="stop-color:#a3a3a3;stop-opacity:1.0000000;" /> + <stop + id="stop271" + offset="1.0000000" + style="stop-color:#4c4c4c;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient259"> + <stop + id="stop260" + offset="0.0000000" + style="stop-color:#fafafa;stop-opacity:1.0000000;" /> + <stop + id="stop261" + offset="1.0000000" + style="stop-color:#bbbbbb;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient15662"> + <stop + id="stop15664" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop15666" + offset="1.0000000" + style="stop-color:#f8f8f8;stop-opacity:1.0000000;" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective2391" /> + <inkscape:perspective + id="perspective2745" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <inkscape:perspective + id="perspective2758" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <marker + viewBox="0 0 10 10" + refY="5" + refX="10" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowStart"> + <path + id="path3586" + d="M 10 0 L 0 5 L 10 10 z" /> + </marker> + <marker + viewBox="0 0 10 10" + refY="5" + refX="0" + orient="auto" + markerWidth="4" + markerUnits="strokeWidth" + markerHeight="3" + id="ArrowEnd"> + <path + id="path3583" + d="M 0 0 L 10 5 L 0 10 z" /> + </marker> + <inkscape:perspective + id="perspective3098" + inkscape:persp3d-origin="215.661 : 120.203 : 1" + inkscape:vp_z="431.32199 : 180.3045 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 180.3045 : 1" + sodipodi:type="inkscape:persp3d" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.203125" + inkscape:cx="49.9813" + inkscape:cy="37.064988" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + showguides="false" + inkscape:window-width="1280" + inkscape:window-height="949" + inkscape:window-x="0" + inkscape:window-y="25"> + <inkscape:grid + type="xygrid" + id="grid2393" /> + </sodipodi:namedview> + <metadata + id="metadata2388"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <g + id="g3588" + transform="matrix(-3.6597997e-2,3.6597748e-2,3.6597748e-2,3.6597997e-2,16.044106,26.675613)"> + <path + style="fill:#000000;stroke:none" + id="path3590" + d="M 180.199,360.396 L 0,180.197 L 180.199,0 L 299.048,0 L 161.988,137.066 L 431.322,137.066 L 431.322,224.288 L 162.946,224.288 L 299.263,360.609 L 180.199,360.396 z" /> + </g> + <text + xml:space="preserve" + style="font-size:19.80689812px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="2.835582" + y="22.859514" + id="text2770"><tspan + sodipodi:role="line" + id="tspan2772" + x="2.835582" + y="22.859514">abc</tspan></text> + <text + xml:space="preserve" + style="font-size:19.80689812px;font-style:normal;font-weight:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="22.736658" + y="50.233688" + id="text2436"><tspan + sodipodi:role="line" + id="tspan2438" + x="22.736658" + y="50.233688">ABC</tspan></text> + </g> +</svg> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-02-18 15:27:55
|
Revision: 2344 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2344&view=rev Author: maestro Date: 2010-02-18 15:27:49 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Fixed CMakeFiles Modified Paths: -------------- trunk/FlowDesigner/CMakeLists.txt trunk/FlowDesigner/toolbox/CMakeLists.txt trunk/FlowDesigner/toolbox/string/CMakeLists.txt trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt Modified: trunk/FlowDesigner/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) +++ trunk/FlowDesigner/CMakeLists.txt 2010-02-18 15:27:49 UTC (rev 2344) @@ -98,8 +98,7 @@ ADD_SUBDIRECTORY(qtflow) ADD_SUBDIRECTORY(toolbox) ADD_SUBDIRECTORY(tools) -ADD_SUBDIRECTORY(examples) - + SET(INSTALLED_EXAMPLES examples/listenJitterMatrix.n examples/listenString.n Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2010-02-18 15:27:49 UTC (rev 2344) @@ -1,6 +1,3 @@ -ADD_SUBDIRECTORY(string) - - ### FuzzyEngine toolbox ### ADD_SUBDIRECTORY(FuzzyEngine) Modified: trunk/FlowDesigner/toolbox/string/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) +++ trunk/FlowDesigner/toolbox/string/CMakeLists.txt 2010-02-18 15:27:49 UTC (rev 2344) @@ -1,2 +1,2 @@ -SUBDIRS(src) +ADD_SUBDIRECTORY(src) Modified: trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) +++ trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt 2010-02-18 15:27:49 UTC (rev 2344) @@ -17,19 +17,22 @@ StringSplit.cc ) -#INSTALLING .def file -INSTALL( CODE "EXECUTE_PROCESS(WORKING_DIRECTORY ${FLOWDESIGNER_SOURCE_DIR}/toolbox/string/src OUTPUT_FILE libstring.def COMMAND ${PERL} ${FLOWDESIGNER_SOURCE_DIR}/tools/src/info2def.pl ${STRING_SRCS})" ) -INSTALL( FILES libstring.def DESTINATION ${FD_TOOLBOX_DIR}/STRING/) + # make a library add_library(libstring-dynamic SHARED ${STRING_SRCS}) +# link the library +target_link_libraries(libstring-dynamic libflow-dynamic ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) + # rename libstring-dynamic in string.tlb set_target_properties(libstring-dynamic PROPERTIES OUTPUT_NAME string.tlb) # install the library in the STRING directory install(TARGETS libstring-dynamic DESTINATION ${FD_TOOLBOX_DIR}/STRING) -# link the library -target_link_libraries(libstring-dynamic libflow-dynamic ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) +#INSTALLING .def file +INSTALL( CODE "EXECUTE_PROCESS(WORKING_DIRECTORY ${FLOWDESIGNER_SOURCE_DIR}/toolbox/string/src OUTPUT_FILE libstring.def COMMAND ${PERL} ${FLOWDESIGNER_SOURCE_DIR}/tools/src/info2def.pl ${STRING_SRCS})" ) +INSTALL( FILES libstring.def DESTINATION ${FD_TOOLBOX_DIR}/STRING/) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-02-18 14:00:58
|
Revision: 2343 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2343&view=rev Author: maestro Date: 2010-02-18 14:00:52 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Fixed unwanted commit of CMakeFile directory Modified Paths: -------------- trunk/FlowDesigner/data-flow/CMakeLists.txt trunk/FlowDesigner/toolbox/CMakeLists.txt Removed Paths: ------------- trunk/FlowDesigner/toolbox/CMakeFiles/ trunk/FlowDesigner/toolbox/cmake_install.cmake trunk/FlowDesigner/toolbox/string/CMakeFiles/ Modified: trunk/FlowDesigner/data-flow/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/data-flow/CMakeLists.txt 2010-02-17 15:57:39 UTC (rev 2342) +++ trunk/FlowDesigner/data-flow/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) @@ -4,5 +4,5 @@ #Add gtest directory if gtest is found IF (GTEST_FOUND) - ADD_SUBDIRECTORY(gtest) -ENDIF(GTEST_FOUND) \ No newline at end of file +# ADD_SUBDIRECTORY(gtest) +ENDIF(GTEST_FOUND) Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2010-02-17 15:57:39 UTC (rev 2342) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2010-02-18 14:00:52 UTC (rev 2343) @@ -1,3 +1,6 @@ +ADD_SUBDIRECTORY(string) + + ### FuzzyEngine toolbox ### ADD_SUBDIRECTORY(FuzzyEngine) Deleted: trunk/FlowDesigner/toolbox/cmake_install.cmake =================================================================== --- trunk/FlowDesigner/toolbox/cmake_install.cmake 2010-02-17 15:57:39 UTC (rev 2342) +++ trunk/FlowDesigner/toolbox/cmake_install.cmake 2010-02-18 14:00:52 UTC (rev 2343) @@ -1,47 +0,0 @@ -# Install script for directory: /home/luc/source_FlowDesigner/toolbox - -# Set the install prefix -IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr/local") -ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) -STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - IF(BUILD_TYPE) - STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Release") - ENDIF(BUILD_TYPE) - MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - -# Set the component getting installed. -IF(NOT CMAKE_INSTALL_COMPONENT) - IF(COMPONENT) - MESSAGE(STATUS "Install component: \"${COMPONENT}\"") - SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - ELSE(COMPONENT) - SET(CMAKE_INSTALL_COMPONENT) - ENDIF(COMPONENT) -ENDIF(NOT CMAKE_INSTALL_COMPONENT) - -# Install shared libraries without execute permission? -IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - SET(CMAKE_INSTALL_SO_NO_EXE "1") -ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - -IF(NOT CMAKE_INSTALL_LOCAL_ONLY) - # Include the install script for each subdirectory. - INCLUDE("/home/luc/source_FlowDesigner/toolbox/FuzzyEngine/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/NNet/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/VQ/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/HMM/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/audio_blocks/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/effects/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/lapackflow/cmake_install.cmake") - INCLUDE("/home/luc/source_FlowDesigner/toolbox/string/cmake_install.cmake") - -ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ll...@us...> - 2010-02-17 15:57:46
|
Revision: 2342 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2342&view=rev Author: lluc-fr Date: 2010-02-17 15:57:39 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Add group "String" in toolbox. 3 functions : - LowerChar : lower chars in a string. - UpperChar : upper chars in a string. - StringSplit : split a string into vector using another string. Added Paths: ----------- trunk/FlowDesigner/toolbox/CMakeFiles/ trunk/FlowDesigner/toolbox/string/CMakeFiles/ trunk/FlowDesigner/toolbox/string/CMakeLists.txt trunk/FlowDesigner/toolbox/string/include/ trunk/FlowDesigner/toolbox/string/src/ trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt trunk/FlowDesigner/toolbox/string/src/LowerChar.cc trunk/FlowDesigner/toolbox/string/src/StringSplit.cc trunk/FlowDesigner/toolbox/string/src/UpperChar.cc trunk/FlowDesigner/toolbox/string/src/libstring.def Added: trunk/FlowDesigner/toolbox/string/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/CMakeLists.txt (rev 0) +++ trunk/FlowDesigner/toolbox/string/CMakeLists.txt 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,2 @@ +SUBDIRS(src) + Added: trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt (rev 0) +++ trunk/FlowDesigner/toolbox/string/src/CMakeLists.txt 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,35 @@ + +SET(QT_USE_QTNETWORK TRUE) +SET(QT_USE_QTSVG TRUE) +SET(QT_USE_QTXML TRUE) +SET(QT_USE_QTWEBKIT TRUE) + +find_package(Qt4 REQUIRED) + +include(${QT_USE_FILE}) +include_directories(${QT_INCLUDE_DIR}) +include_directories(${FLOWDESIGNER_SOURCE_DIR}/data-flow/include) + + +SET(STRING_SRCS + LowerChar.cc + UpperChar.cc + StringSplit.cc +) + +#INSTALLING .def file +INSTALL( CODE "EXECUTE_PROCESS(WORKING_DIRECTORY ${FLOWDESIGNER_SOURCE_DIR}/toolbox/string/src OUTPUT_FILE libstring.def COMMAND ${PERL} ${FLOWDESIGNER_SOURCE_DIR}/tools/src/info2def.pl ${STRING_SRCS})" ) +INSTALL( FILES libstring.def DESTINATION ${FD_TOOLBOX_DIR}/STRING/) + + +# make a library +add_library(libstring-dynamic SHARED ${STRING_SRCS}) + +# rename libstring-dynamic in string.tlb +set_target_properties(libstring-dynamic PROPERTIES OUTPUT_NAME string.tlb) + +# install the library in the STRING directory +install(TARGETS libstring-dynamic DESTINATION ${FD_TOOLBOX_DIR}/STRING) + +# link the library +target_link_libraries(libstring-dynamic libflow-dynamic ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) Added: trunk/FlowDesigner/toolbox/string/src/LowerChar.cc =================================================================== --- trunk/FlowDesigner/toolbox/string/src/LowerChar.cc (rev 0) +++ trunk/FlowDesigner/toolbox/string/src/LowerChar.cc 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,100 @@ +/* Copyright (C) 2010 Luc LEGER + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _LOWER_CHAR_CC_ +#define _LOWER_CHAR_CC_ + +#include "BufferedNode.h" +#include <QString> + + + +/*Node + * + * @name LowerChar + * @category string + * @description none + * + * @input_name INPUT + * @input_type string + * @input_description String to lower case + * + * @output_name OUTPUT + * @output_type string + * @output_description lower case + * + END*/ +namespace FD { + + + + class LowerChar; + DECLARE_NODE(LowerChar); + + class LowerChar : public BufferedNode { + + + int inputID; + int outputID; + + public: + LowerChar(std::string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + //inputs + inputID = addInput("INPUT"); + + + //outputs + outputID = addOutput("OUTPUT"); + + //parameters + } + + + ~LowerChar() + { + } + + + void calculate(int output_id, int count, Buffer &out) + { + try + { + ObjectRef inputValue = getInput(inputID, count); + + //Converting input to string will throw an exception if not the right type + String &words = object_cast<String > (inputValue); + + //Making sure we get the full byte array by specifying the size + QString str = QString(QByteArray(words.c_str(),words.size())).toLower(); + + + //Construct FD::String from QString needs explicit toStdString() function + out[count] = ObjectRef(new String(str.toStdString())); + } + catch (BaseException *e) + { + //Let's add the exception to the exception stack + throw e->add(new GeneralException("Unable to convert to string",__FILE__,__LINE__)); + out[count] = nilObject; + } + } + + }; +}//namespace FD +#endif //_LOWER_CHAR_CC_ + Added: trunk/FlowDesigner/toolbox/string/src/StringSplit.cc =================================================================== --- trunk/FlowDesigner/toolbox/string/src/StringSplit.cc (rev 0) +++ trunk/FlowDesigner/toolbox/string/src/StringSplit.cc 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,121 @@ +/* Copyright (C) 2010 Luc LEGER + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _STRING_SPLIT_CC_ +#define _STRING_SPLIT_CC_ + +#include "BufferedNode.h" +#include <QString> +#include <QStringList> +#include <Vector.h> + + + +/*Node + * + * @name StringSplit + * @category string + * @description Split a string into a vector using a character. + * + * @input_name INPUT + * @input_type string + * @input_description String to split + * + * @input_name INPUT_SEP + * @input_type string + * @input_description Separator + * + * @output_name OUTPUT + * @output_type vector + * @output_description vector of strings + * + END*/ +namespace FD { + + + + class StringSplit; + DECLARE_NODE(StringSplit); + + class StringSplit : public BufferedNode { + + + int inputID; + int inputIDsep; + int outputID; + + public: + StringSplit(std::string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + //inputs + inputID = addInput("INPUT"); + inputIDsep = addInput("INPUT_SEP"); + + + //outputs + outputID = addOutput("OUTPUT"); + + //parameters + } + + + ~StringSplit() + { + } + + + void calculate(int output_id, int count, Buffer &out) + { + try + { + ObjectRef inputValue = getInput(inputID, count); + ObjectRef inputValueSep = getInput(inputIDsep, count); + + //Converting input to string will throw an exception if not the right type + String &words = object_cast<String > (inputValue); + String &wordsSep = object_cast<String > (inputValueSep); + + //Making sure we get the full byte array by specifying the size + QString str = QString(QByteArray(words.c_str(),words.size())); + QString sep = QString(QByteArray(wordsSep.c_str(),wordsSep.size())); + + //Split the string + QStringList listString = str.split( sep ); + + + // Create a vector to split the string + Vector<ObjectRef> *vect = new Vector<ObjectRef>; + + //Iterating over the list + for (int i = 0; i < listString.size(); ++i) + { + vect->push_back( ObjectRef( new String( listString.at(i).toLocal8Bit().constData() ) ) ); + } + out[count] = ObjectRef(vect); + } + catch (BaseException *e) + { + //Let's add the exception to the exception stack + throw e->add(new GeneralException("Unable to split the string",__FILE__,__LINE__)); + out[count] = nilObject; + } + } + + }; +}//namespace FD +#endif //_STRING_SPLIT_CC_ + Added: trunk/FlowDesigner/toolbox/string/src/UpperChar.cc =================================================================== --- trunk/FlowDesigner/toolbox/string/src/UpperChar.cc (rev 0) +++ trunk/FlowDesigner/toolbox/string/src/UpperChar.cc 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,100 @@ +/* Copyright (C) 2010 Luc LEGER + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _UPPER_CHAR_CC_ +#define _UPPER_CHAR_CC_ + +#include "BufferedNode.h" +#include <QString> + + + +/*Node + * + * @name UpperChar + * @category string + * @description none + * + * @input_name INPUT + * @input_type string + * @input_description String to upper case + * + * @output_name OUTPUT + * @output_type string + * @output_description upper case + * + END*/ +namespace FD { + + + + class UpperChar; + DECLARE_NODE(UpperChar); + + class UpperChar : public BufferedNode { + + + int inputID; + int outputID; + + public: + UpperChar(std::string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + //inputs + inputID = addInput("INPUT"); + + + //outputs + outputID = addOutput("OUTPUT"); + + //parameters + } + + + ~UpperChar() + { + } + + + void calculate(int output_id, int count, Buffer &out) + { + try + { + ObjectRef inputValue = getInput(inputID, count); + + //Converting input to string will throw an exception if not the right type + String &words = object_cast<String > (inputValue); + + //Making sure we get the full byte array by specifying the size + QString str = QString(QByteArray(words.c_str(),words.size())).toUpper(); + + + //Construct FD::String from QString needs explicit toStdString() function + out[count] = ObjectRef(new String(str.toStdString())); + } + catch (BaseException *e) + { + //Let's add the exception to the exception stack + throw e->add(new GeneralException("Unable to convert to string",__FILE__,__LINE__)); + out[count] = nilObject; + } + } + + }; +}//namespace FD +#endif //_UPPER_CHAR_CC_ + Added: trunk/FlowDesigner/toolbox/string/src/libstring.def =================================================================== --- trunk/FlowDesigner/toolbox/string/src/libstring.def (rev 0) +++ trunk/FlowDesigner/toolbox/string/src/libstring.def 2010-02-17 15:57:39 UTC (rev 2342) @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<Definitions> + <NodeClass name="LowerChar" category="string" source="LowerChar.cc"> + <Input name="INPUT" type="string">String to lower case</Input> + <Output name="OUTPUT" type="string">lower case</Output> + <Description>none</Description> + </NodeClass> + <NodeClass name="UpperChar" category="string" source="UpperChar.cc"> + <Input name="INPUT" type="string">String to upper case</Input> + <Output name="OUTPUT" type="string">upper case</Output> + <Description>none</Description> + </NodeClass> + <NodeClass name="StringSplit" category="string" source="StringSplit.cc"> + <Input name="INPUT" type="string">String to split</Input> + <Input name="INPUT_SEP" type="string">Separator</Input> + <Output name="OUTPUT" type="vector">vector of strings</Output> + <Description>Split a string into a vector using a character.</Description> + </NodeClass> + <FileDepend file="StringSplit.cc"> + <RequireHeader header="BufferedNode.h"/> + </FileDepend> + <FileDepend file="LowerChar.cc"> + <RequireHeader header="BufferedNode.h"/> + </FileDepend> + <FileDepend file="UpperChar.cc"> + <RequireHeader header="BufferedNode.h"/> + </FileDepend> +</Definitions> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ll...@us...> - 2010-02-17 15:52:29
|
Revision: 2341 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2341&view=rev Author: lluc-fr Date: 2010-02-17 15:52:23 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Add group "String" in toolbox. 3 functions : - LowerChar : lower chars in a string. - UpperChar : upper chars in a string. - StringSplit : split a string into vector using another string. Added Paths: ----------- trunk/FlowDesigner/toolbox/string/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ll...@us...> - 2010-02-17 15:50:23
|
Revision: 2340 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2340&view=rev Author: lluc-fr Date: 2010-02-17 15:50:15 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Add group "String" in toolbox. 3 functions : - LowerChar : lower chars in a string. - UpperChar : upper chars in a string. - StringSplit : split a string into vector using another string. Added Paths: ----------- trunk/FlowDesigner/toolbox/cmake_install.cmake Added: trunk/FlowDesigner/toolbox/cmake_install.cmake =================================================================== --- trunk/FlowDesigner/toolbox/cmake_install.cmake (rev 0) +++ trunk/FlowDesigner/toolbox/cmake_install.cmake 2010-02-17 15:50:15 UTC (rev 2340) @@ -0,0 +1,47 @@ +# Install script for directory: /home/luc/source_FlowDesigner/toolbox + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "Release") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + +IF(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + INCLUDE("/home/luc/source_FlowDesigner/toolbox/FuzzyEngine/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/NNet/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/VQ/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/HMM/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/audio_blocks/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/effects/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/lapackflow/cmake_install.cmake") + INCLUDE("/home/luc/source_FlowDesigner/toolbox/string/cmake_install.cmake") + +ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ll...@us...> - 2010-02-17 15:46:44
|
Revision: 2339 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2339&view=rev Author: lluc-fr Date: 2010-02-17 15:46:35 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Add group "String" in toolbox. 3 functions : - LowerChar : lower chars in a string. - UpperChar : upper chars in a string. - StringSplit : split a string into vector using another string. Modified Paths: -------------- trunk/FlowDesigner/toolbox/CMakeLists.txt Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-12-01 17:17:42 UTC (rev 2338) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2010-02-17 15:46:35 UTC (rev 2339) @@ -41,4 +41,7 @@ # MESSAGE (STATUS "OCTAVE library wasn't found, it won't be compiled.") #ENDIF (HAVE_OCTAVE) +### string ### +ADD_SUBDIRECTORY(string) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-12-01 17:17:49
|
Revision: 2338 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2338&view=rev Author: maestro Date: 2009-12-01 17:17:42 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Fixed install error of dlls Modified Paths: -------------- trunk/FlowDesigner/CMakeLists.txt Modified: trunk/FlowDesigner/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/CMakeLists.txt 2009-06-05 17:18:04 UTC (rev 2337) +++ trunk/FlowDesigner/CMakeLists.txt 2009-12-01 17:17:42 UTC (rev 2338) @@ -1,7 +1,14 @@ PROJECT (FlowDesigner) + + + #Look for minimum cmake version cmake_minimum_required(VERSION 2.6.0) + +SET(CMAKE_OSX_ARCHITECTURES i386) + + # This line will tell CMake to look in the project directory for configure scripts SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/macros) @@ -16,7 +23,7 @@ SET(CMAKE_INSTALL_PREFIX "C:/Progra~1/FlowDesigner") ELSE(WIN32) IF(APPLE) - SET(CMAKE_INSTALL_PREFIX "/usr/local") + SET(CMAKE_INSTALL_PREFIX "/opt/flowdesigner/") ELSE(APPLE) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(APPLE) @@ -116,10 +123,10 @@ SET(QTBIN_DIR ${QT_LIBRARY_DIR}/../bin) SET(DEVCPP_DLL - C:/FlowDesigner/bin/libxml2.dll - C:/FlowDesigner/bin/iconv.dll + C:/MinGW/bin/libxml2.dll + C:/MinGW/bin/iconv.dll C:/MinGW/bin/mingwm10.dll - C:/FlowDesigner/bin/zlib1.dll + C:/MinGW/bin/zlib1.dll ${QTBIN_DIR}/Qt3Support4.dll ${QTBIN_DIR}/QtAssistantClient4.dll ${QTBIN_DIR}/QtCore4.dll This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-06-05 17:18:05
|
Revision: 2337 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2337&view=rev Author: maestro Date: 2009-06-05 17:18:04 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Working WIN32 build. Modified Paths: -------------- trunk/FlowDesigner/CMakeLists.txt trunk/FlowDesigner/data-flow/src/CMakeLists.txt trunk/FlowDesigner/macros/FindLibXml2.cmake trunk/FlowDesigner/qtflow/src/flowdesigner.cc trunk/FlowDesigner/toolbox/CMakeLists.txt Modified: trunk/FlowDesigner/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) +++ trunk/FlowDesigner/CMakeLists.txt 2009-06-05 17:18:04 UTC (rev 2337) @@ -9,7 +9,7 @@ # compile in debug mode IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE Debug) + SET(CMAKE_BUILD_TYPE Release) ENDIF(NOT CMAKE_BUILD_TYPE) IF(WIN32) @@ -116,10 +116,10 @@ SET(QTBIN_DIR ${QT_LIBRARY_DIR}/../bin) SET(DEVCPP_DLL - C:/Dev-Cpp/bin/libxml2.dll - C:/Dev-Cpp/bin/iconv.dll + C:/FlowDesigner/bin/libxml2.dll + C:/FlowDesigner/bin/iconv.dll C:/MinGW/bin/mingwm10.dll - C:/Dev-Cpp/bin/zlib1.dll + C:/FlowDesigner/bin/zlib1.dll ${QTBIN_DIR}/Qt3Support4.dll ${QTBIN_DIR}/QtAssistantClient4.dll ${QTBIN_DIR}/QtCore4.dll Modified: trunk/FlowDesigner/data-flow/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) +++ trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-06-05 17:18:04 UTC (rev 2337) @@ -176,10 +176,7 @@ BinaryAND.cc BinaryOR.cc Power.cc - GetMessageNode.cc - PushToMailBoxNode.cc - PopFromMailBoxNode.cc - SetMessageNode.cc + ) @@ -218,7 +215,7 @@ flow_version.cc object_param.cc iextensions.cc - MailBox.cc + ) @@ -241,6 +238,11 @@ SET (UTILS_SRCS ${UTILS_SRCS} DLManager.cc + GetMessageNode.cc + PushToMailBoxNode.cc + PopFromMailBoxNode.cc + SetMessageNode.cc + MailBox.cc ) SET (UNIX_ADDITIONAL_LIBRARIES Modified: trunk/FlowDesigner/macros/FindLibXml2.cmake =================================================================== --- trunk/FlowDesigner/macros/FindLibXml2.cmake 2009-06-03 19:30:59 UTC (rev 2336) +++ trunk/FlowDesigner/macros/FindLibXml2.cmake 2009-06-05 17:18:04 UTC (rev 2337) @@ -29,7 +29,7 @@ ENDIF (NOT WIN32) FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h - PATHS "C:/Dev-Cpp/include" + PATHS "C:/FlowDesigner/include" "C:/MinGW/include" ${_LibXml2IncDir} PATH_SUFFIXES libxml2 @@ -37,6 +37,7 @@ FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2 PATHS + "C:/FlowDesigner/lib" ${_LibXml2LinkDir} ) Modified: trunk/FlowDesigner/qtflow/src/flowdesigner.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/flowdesigner.cc 2009-06-03 19:30:59 UTC (rev 2336) +++ trunk/FlowDesigner/qtflow/src/flowdesigner.cc 2009-06-05 17:18:04 UTC (rev 2337) @@ -123,6 +123,15 @@ //QObject::connect(&redirector_cerr,SIGNAL(newOutput(const char*, std::streamsize)),&fd,SLOT(newStderrOutput(const char *, std::streamsize))); + + + fd.show(); + splash.finish(&fd); + + //This will popup messages if required + qInstallMsgHandler(FDMsgHandler); + + if (argc > 1) { for (int i = 1; i < argc; i++) @@ -134,13 +143,7 @@ { fd.newDocumentClicked(); } - - fd.show(); - splash.finish(&fd); - - //This will popup messages if required - qInstallMsgHandler(FDMsgHandler); - + // Enter the main loop of the QApplication int result = app.exec(); Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-06-05 17:18:04 UTC (rev 2337) @@ -19,7 +19,7 @@ ### FDOpenCV toolbox ### find_package(OpenCV) IF (OpenCV_FOUND) - ADD_SUBDIRECTORY(FDOpenCV) + # ADD_SUBDIRECTORY(FDOpenCV) ELSE (OpenCV_FOUND) MESSAGE (STATUS "OpenCV library wasn't found, it won't be compiled.") ENDIF (OpenCV_FOUND) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-06-03 19:31:06
|
Revision: 2336 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2336&view=rev Author: maestro Date: 2009-06-03 19:30:59 +0000 (Wed, 03 Jun 2009) Log Message: ----------- Now able to make bundles Modified Paths: -------------- trunk/FlowDesigner/CMakeLists.txt trunk/FlowDesigner/data-flow/src/CMakeLists.txt trunk/FlowDesigner/qtflow/src/CMakeLists.txt trunk/FlowDesigner/qtflow/src/QtDLManager.cc trunk/FlowDesigner/qtflow/src/QtFlowApp.cc trunk/FlowDesigner/qtflow/src/QtProcessWindow.cc trunk/FlowDesigner/qtflow/src/flowdesigner.cc trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner-contents.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow-contents.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info-contents.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner-contents.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner.xml trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/index.xml Added Paths: ----------- trunk/FlowDesigner/FlowDesigner.icns trunk/FlowDesigner/FlowDesigner.plist trunk/FlowDesigner/startup.sh Modified: trunk/FlowDesigner/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/CMakeLists.txt 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) @@ -142,7 +142,33 @@ IF(APPLE) - SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt") + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt") + +SET(CPACK_GENERATOR Bundle) + +# CPACK_PACKAGE_FILE_NAME - provides the name of the final compressed disk image (the name of the file that is distributed). +# CPACK_PACKAGE_ICON - provides the icon for the mounted disk image (appears after the user mounts the disk image). +# CPACK_BUNDLE_NAME - provides the bundle name (displayed in the finder underneath the bundle icon). +# CPACK_BUNDLE_ICON - provides the bundle icon (displayed in the /Applications folder, on the dock, etc). +# CPACK_BUNDLE_PLIST - path to a file that will become the bundle plist. +# CPACK_BUNDLE_STARTUP_COMMAND - path to a file that will be executed when the user opens the bundle. Could be a shell-script or a binary. + +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/Applications") +SET(MACOSX_BUNDLE_INFO_STRING "FlowDesigner") +SET(CPACK_PACKAGE_FILE_NAME "FlowDesigner-${VERSION}") +SET(CPACK_BUNDLE_NAME "FlowDesigner") +SET(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications") +SET(CPACK_BUNDLE_PLIST "FlowDesigner.plist") +SET(CPACK_BUNDLE_ICON "FlowDesigner.icns") +SET(CPACK_PACKAGE_ICON "FlowDesigner.icns") +SET(CPACK_BUNDLE_STARTUP_COMMAND "startup.sh") + + + + + + + ELSE(APPLE) SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.LGPL") ENDIF(APPLE) @@ -154,7 +180,7 @@ SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_PACKAGE_CONTACT "flo...@li...") -IF(WIN32 AND NOT UNIX) +IF(WIN32) SET(CPACK_PACKAGE_INSTALL_DIRECTORY "FlowDesigner") # There is a bug in NSI that does not handle full unix paths properly. Make # sure there is at least one set of four (4) backlasshes. @@ -164,11 +190,12 @@ # SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\flowdesigner.sourceforge.net") SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\flowdesigner.sourceforge.net") SET(CPACK_NSIS_CONTACT "flo...@li...") - SET(CPACK_NSIS_MODIFY_PATH ON) -ENDIF(WIN32 AND NOT UNIX) + SET(CPACK_NSIS_MODIFY_PATH ON) + SET(CPACK_PACKAGE_EXECUTABLES "flowdesigner" "FlowDesigner" "batchflow" "batchflow" "qtflow" "qtflow") +ENDIF(WIN32) -SET(CPACK_PACKAGE_EXECUTABLES "flowdesigner" "FlowDesigner" "batchflow" "batchflow" "qtflow" "qtflow") + INSTALL( FILES ${INSTALLED_EXAMPLES} DESTINATION share/flowdesigner/examples) INSTALL( FILES ${INSTALLED_TUTORIALS} DESTINATION share/flowdesigner/examples/tutorials) Added: trunk/FlowDesigner/FlowDesigner.icns =================================================================== (Binary files differ) Property changes on: trunk/FlowDesigner/FlowDesigner.icns ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/FlowDesigner/FlowDesigner.plist =================================================================== --- trunk/FlowDesigner/FlowDesigner.plist (rev 0) +++ trunk/FlowDesigner/FlowDesigner.plist 2009-06-03 19:30:59 UTC (rev 2336) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>FlowDesigner</string> + <key>CFBundleGetInfoString</key> + <string>FlowDesigner App</string> + <key>CFBundleIconFile</key> + <string>FlowDesigner.icns</string> + <key>CFBundleIdentifier</key> + <string>FlowDesigner</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleLongVersionString</key> + <string>FlowDesigner 0.10.0</string> + <key>CFBundleName</key> + <string>FlowDesigner</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.10.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>0.10.0</string> + <key>CSResourcesFileMapped</key> + <true/> + <key>LSRequiresCarbon</key> + <true/> + <key>NSHumanReadableCopyright</key> + <string>Dominic Létourneau, Jean-Marc Valin</string> +</dict> +</plist> Modified: trunk/FlowDesigner/data-flow/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) @@ -177,7 +177,6 @@ BinaryOR.cc Power.cc GetMessageNode.cc - SetMessageNode.cc PushToMailBoxNode.cc PopFromMailBoxNode.cc SetMessageNode.cc Modified: trunk/FlowDesigner/qtflow/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/qtflow/src/CMakeLists.txt 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/qtflow/src/CMakeLists.txt 2009-06-03 19:30:59 UTC (rev 2336) @@ -115,23 +115,8 @@ ) #Install headers INSTALL(FILES ${QTFLOWLIB_HEADERS} DESTINATION include/flowdesigner/qtflow) +add_executable(flowdesigner ${QTFLOW_SRCS} flowdesigner.cc ${QTFLOW_MOC_SRCS} ${QTFLOW_RCC_SRCS} ${QTFLOW_HEADERS}) -# create an executable file named "flowdesigner" from the source files -IF(APPLE) - SET(MACOSX_BUNDLE_INFO_STRING "FlowDesigner App") - SET(MACOSX_BUNDLE_ICON_FILE "FlowDesignerIcon.icns") - SET(MACOSX_BUNDLE_GUI_IDENTIFIER "flowdesigner") - SET(MACOSX_BUNDLE_LONG_VERSION_STRING "flowdesigner ${VERSION}") - SET(MACOSX_BUNDLE_BUNDLE_NAME "flowdesigner") - SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}") - SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}") - SET(MACOSX_BUNDLE_COPYRIGHT "Dominic Letourneau, Jean-Marc Valin") - add_executable(flowdesigner MACOSX_BUNDLE ${QTFLOW_SRCS} flowdesigner.cc ${QTFLOW_MOC_SRCS} ${QTFLOW_RCC_SRCS} ${QTFLOW_HEADERS}) - #install( FILES ../icons/FlowDesignerIcon.icns DESTINATION /Applications/flowdesigner.app/Contents/Resources) -ELSE(APPLE) - add_executable(flowdesigner ${QTFLOW_SRCS} flowdesigner.cc ${QTFLOW_MOC_SRCS} ${QTFLOW_RCC_SRCS} ${QTFLOW_HEADERS}) -ENDIF(APPLE) - # create an executable file named "qtflow" from the source files add_executable(qtflow ${QTFLOW_SRCS} qtflow.cc ${QTFLOW_MOC_SRCS} ${QTFLOW_HEADERS}) @@ -153,11 +138,5 @@ INSTALL( FILES "FlowDesignerSplashScreen.jpg" DESTINATION "share/flowdesigner") - -IF(APPLE) - install(TARGETS flowdesigner DESTINATION "/Applications") -ELSE(APPLE) - install(TARGETS flowdesigner DESTINATION bin) -ENDIF(APPLE) - +install(TARGETS flowdesigner DESTINATION bin) install(TARGETS qtflow DESTINATION bin) Modified: trunk/FlowDesigner/qtflow/src/QtDLManager.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/QtDLManager.cc 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/qtflow/src/QtDLManager.cc 2009-06-03 19:30:59 UTC (rev 2336) @@ -21,6 +21,7 @@ #include "path.h" #include <iostream> #include <QApplication> +#include <QtDebug> namespace FD { @@ -86,6 +87,8 @@ { vector<string> libs; + qDebug() << "scanDL with path: "<< QString(path.c_str()); + //looking recursively in path for toolboxes recursiveScanDL(path,libs,true); Modified: trunk/FlowDesigner/qtflow/src/QtFlowApp.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/QtFlowApp.cc 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/qtflow/src/QtFlowApp.cc 2009-06-03 19:30:59 UTC (rev 2336) @@ -20,8 +20,9 @@ #include "iextensions.h" #include <QtDebug> +#include <QProcess> +#include <QStringList> - using namespace std; namespace FD @@ -88,6 +89,21 @@ //Loading libraries try { + + QStringList environment = QProcess::systemEnvironment (); + + for (int index = 0; index < environment.size(); index++) + { + QString keyvalue = environment[index]; + if (keyvalue.indexOf("FLOWDESIGNER_PATH") == 0) + { + QString path = keyvalue.split("=")[1]; + qDebug() << "Using FLOWDESIGNER_PATH = " << path; + QtDLManager::instance()->scanDL(path.toStdString()); + } + } + + //Scan for toolboxes (dll) QtDLManager::instance()->scanDL(); //Scan for toolboxes (def) Modified: trunk/FlowDesigner/qtflow/src/QtProcessWindow.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/QtProcessWindow.cc 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/qtflow/src/QtProcessWindow.cc 2009-06-03 19:30:59 UTC (rev 2336) @@ -314,7 +314,7 @@ args.append("/dev/stdin"); //Launch qtflow - m_process->start(QString(INSTALL_PREFIX) + "/bin/qtflow",args); + m_process->start("qtflow",args); m_process->write(mem,size); //This will close stdin, enabling to exit Modified: trunk/FlowDesigner/qtflow/src/flowdesigner.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/flowdesigner.cc 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/qtflow/src/flowdesigner.cc 2009-06-03 19:30:59 UTC (rev 2336) @@ -29,6 +29,8 @@ #include "BaseException.h" #include "UINodeRepository.h" #include "QtProbeRegistry.h" +#include <QProcess> +#include <QStringList> //#include "iextensions.h" using namespace FD; @@ -92,6 +94,20 @@ //IExtensions::detect(); + QStringList environment = QProcess::systemEnvironment (); + + for (int index = 0; index < environment.size(); index++) + { + QString keyvalue = environment[index]; + if (keyvalue.indexOf("FLOWDESIGNER_PATH") == 0) + { + QString path = keyvalue.split("=")[1]; + qDebug() << "Using FLOWDESIGNER_PATH = " << path; + QtDLManager::instance()->scanDL(path.toStdString()); + } + } + + //Load dynamic libraries QtDLManager::instance()->scanDL(); Added: trunk/FlowDesigner/startup.sh =================================================================== --- trunk/FlowDesigner/startup.sh (rev 0) +++ trunk/FlowDesigner/startup.sh 2009-06-03 19:30:59 UTC (rev 2336) @@ -0,0 +1,12 @@ +#!/bin/sh + +FLOWDESIGNER_BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/FlowDesigner//'`" + +echo "FlowDesigner running from : $PWD Bundle : $FLOWDESIGNER_BUNDLE" + +export DYLD_LIBRARY_PATH=$FLOWDESIGNER_BUNDLE/Contents/Resources/lib +export FLOWDESIGNER_PATH=$FLOWDESIGNER_BUNDLE/Contents/Resources/lib/flowdesigner +export PATH=$FLOWDESIGNER_BUNDLE/Contents/Resources/bin:$PATH + +#run +$FLOWDESIGNER_BUNDLE/Contents/Resources/bin/flowdesigner Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner-contents.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner-contents.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner-contents.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkg-contents spec="1.12"><f n="flowdesigner.app" o="root" g="admin" p="16877" pt="/Applications/flowdesigner.app" m="true" t="file"><f n="Contents" o="root" g="admin" p="16877"><f n="FlowDesignerIcon.icns" o="dominic" g="admin" p="33188"/><f n="Info.plist" o="root" g="admin" p="33188"/><f n="MacOS" o="root" g="admin" p="16877"><f n="flowdesigner" o="root" g="admin" p="33261"/></f><f n="Resources" o="root" g="admin" p="16877"><f n="FlowDesignerIcon.icns" o="root" g="admin" p="33188"/></f></f></f></pkg-contents> \ No newline at end of file +<pkg-contents spec="1.12"><f n="flowdesigner.app" o="root" g="admin" p="16877" pt="/Applications/flowdesigner.app" m="true" t="file"><f n="Contents" o="root" g="admin" p="16877"><f n="FlowDesignerIcon.icns" o="dletourneau" g="admin" p="33188"/><f n="Info.plist" o="root" g="admin" p="33188"/><f n="MacOS" o="root" g="admin" p="16877"><f n="flowdesigner" o="root" g="admin" p="33261"/></f><f n="Resources" o="root" g="admin" p="16877"><f n="FlowDesignerIcon.icns" o="root" g="admin" p="33188"/></f></f></f></pkg-contents> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/01flowdesigner.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkgref spec="1.12" uuid="AFE36243-7930-4D3E-B2AE-CE4BFE91A219"><config><identifier>http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner.pkg</identifier><version>2</version><description></description><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/Applications/flowdesigner.app</installFrom><installTo mod="true" relocatable="true">/Applications/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>relocatable</mod><mod>version</mod><mod>installTo.path</mod><mod>includeRoot</mod><mod>installTo</mod></config><contents><file-list>01flowdesigner-contents.xml</file-list><component id="flowdesigner" path="/Applications/flowdesigner.app" version="0.9.1" isRelocatable="true"><locator-info><token title="pkmk-token-20"><search-rule><combo identifier="flowdesigner" default-path="/Applications/flowdesigner.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file +<pkgref spec="1.12" uuid="AFE36243-7930-4D3E-B2AE-CE4BFE91A219"><config><identifier>http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner-3.pkg</identifier><version>2</version><description></description><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/Applications/flowdesigner.app</installFrom><installTo mod="true" relocatable="true">/Applications/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>requireAuthorization</mod><mod>relocatable</mod><mod>version</mod><mod>installTo.path</mod><mod>includeRoot</mod><mod>installTo</mod></config><contents><file-list>01flowdesigner-contents.xml</file-list><component id="flowdesigner" path="/Applications/flowdesigner.app" version="0.10.0" isRelocatable="true"><locator-info><token title="pkmk-token-4"><search-rule><combo identifier="flowdesigner" default-path="/Applications/flowdesigner.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow-contents.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow-contents.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow-contents.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkg-contents spec="1.12"><f n="batchflow" o="root" g="staff" p="33261" pt="/usr/local/bin/batchflow" m="false" t="file"/></pkg-contents> \ No newline at end of file +<pkg-contents spec="1.12"><f n="batchflow" o="root" g="wheel" p="33261" pt="/usr/local/bin/batchflow" m="false" t="file"/></pkg-contents> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/02batchflow.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkgref spec="1.12" uuid="155F569C-30DA-4168-AC36-E9BAA4A09FAD"><config><identifier>http://laborius.gel.usherbrooke.ca.flowdesigner091.batchflow.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom>/usr/local/bin/batchflow</installFrom><installTo mod="true">/usr/local/bin/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>02batchflow-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file +<pkgref spec="1.12" uuid="155F569C-30DA-4168-AC36-E9BAA4A09FAD"><config><identifier>http://introlab.gel.usherbrooke.ca.flowdesigner0100.batchflow.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom>/usr/local/bin/batchflow</installFrom><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>02batchflow-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info-contents.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info-contents.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info-contents.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkg-contents spec="1.12"><f n="info2def.pl" o="root" g="staff" p="33188" pt="/usr/local/bin/info2def.pl" m="false" t="file"/></pkg-contents> \ No newline at end of file +<pkg-contents spec="1.12"><f n="info2def.pl" o="root" g="wheel" p="33061" pt="/usr/local/bin/info2def.pl" m="false" t="file"/></pkg-contents> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/03info.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkgref spec="1.12" uuid="FC460302-F6D4-4301-90BA-68470B9FF341"><config><identifier>http://laborius.gel.usherbrooke.ca.flowdesigner091.info2def.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom>/usr/local/bin/info2def.pl</installFrom><installTo mod="true">/usr/local/bin/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>03info-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file +<pkgref spec="1.12" uuid="FC460302-F6D4-4301-90BA-68470B9FF341"><config><identifier>http://introlab.gel.usherbrooke.ca.flowdesigner0100.info2def.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom>/usr/local/bin/info2def.pl</installFrom><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>03info-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner-contents.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner-contents.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner-contents.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkg-contents spec="1.12"><f n="flowdesigner" o="root" g="wheel" p="16877" pt="/usr/local/include/flowdesigner" m="true" t="file"><f n="Array.h" o="root" g="wheel" p="33188"/><f n="BaseException.h" o="root" g="wheel" p="33188"/><f n="BinaryAND.h" o="root" g="wheel" p="33188"/><f n="BinaryOR.h" o="root" g="wheel" p="33188"/><f n="binio.h" o="root" g="wheel" p="33188"/><f n="Buffer.h" o="root" g="wheel" p="33188"/><f n="BufferedNode.h" o="root" g="wheel" p="33188"/><f n="Collector.h" o="root" g="wheel" p="33188"/><f n="compile_object.h" o="root" g="wheel" p="33188"/><f n="Complex.h" o="root" g="wheel" p="33188"/><f n="CompositeType.h" o="root" g="wheel" p="33188"/><f n="Constant.h" o="root" g="wheel" p="33188"/><f n="conversion.h" o="root" g="wheel" p="33188"/><f n="cwrapper.h" o="root" g="wheel" p="33188"/><f n="DLManager.h" o="root" g="wheel" p="33188"/><f n="DoubleDispatch.h" o="root" g="wheel" p="33188"/><f n="Exception.h" o="root" g="wheel" p="33188"/><f n="ExceptionObject.h" o="root" g="wheel" p="33188"/><f n="ExternalApp.h" o="root" g="wheel" p="33188"/><f n="flow_pref.h" o="root" g="wheel" p="33188"/><f n="flow_version.h" o="root" g="wheel" p="33188"/><f n="FlowException.h" o="root" g="wheel" p="33188"/><f n="fmath.h" o="root" g="wheel" p="33188"/><f n="iextensions.h" o="root" g="wheel" p="33188"/><f n="IntfNode.h" o="root" g="wheel" p="33188"/><f n="Iterator.h" o="root" g="wheel" p="33188"/><f n="JitterMatrix.h" o="root" g="wheel" p="33188"/><f n="Matrix.h" o="root" g="wheel" p="33188"/><f n="misc.h" o="root" g="wheel" p="33188"/><f n="multithread.h" o="root" g="wheel" p="33188"/><f n="net_types.h" o="root" g="wheel" p="33188"/><f n="Network.h" o="root" g="wheel" p="33188"/><f n="Node.h" o="root" g="wheel" p="33188"/><f n="NodeFactory.h" o="root" g="wheel" p="33188"/><f n="Object.h" o="root" g="wheel" p="33188"/><f n="object_param.h" o="root" g="wheel" p="33188"/><f n="ObjectParser.h" o="root" g="wheel" p="33188"/><f n="ObjectPool.h" o="root" g="wheel" p="33188"/><f n="ObjectRef.h" o="root" g="wheel" p="33188"/><f n="operators.h" o="root" g="wheel" p="33188"/><f n="ParameterSet.h" o="root" g="wheel" p="33188"/><f n="path.h" o="root" g="wheel" p="33188"/><f n="Power.h" o="root" g="wheel" p="33188"/><f n="pseudosem.h" o="root" g="wheel" p="33188"/><f n="rc_ptrs.h" o="root" g="wheel" p="33188"/><f n="rtc.h" o="root" g="wheel" p="33188"/><f n="SocketStream.h" o="root" g="wheel" p="33188"/><f n="Stream.h" o="root" g="wheel" p="33188"/><f n="stream_wrap.h" o="root" g="wheel" p="33188"/><f n="ThreadedIterator.h" o="root" g="wheel" p="33188"/><f n="typemap.h" o="root" g="wheel" p="33188"/><f n="typetraits.h" o="root" g="wheel" p="33188"/><f n="UIDocument.h" o="root" g="wheel" p="33188"/><f n="UILink.h" o="root" g="wheel" p="33188"/><f n="UINetTerminal.h" o="root" g="wheel" p="33188"/><f n="UINetwork.h" o="root" g="wheel" p="33188"/><f n="UINode.h" o="root" g="wheel" p="33188"/><f n="UINodeParameters.h" o="root" g="wheel" p="33188"/><f n="UINodeRepository.h" o="root" g="wheel" p="33188"/><f n="UINote.h" o="root" g="wheel" p="33188"/><f n="UIProbeLink.h" o="root" g="wheel" p="33188"/><f n="UITerminal.h" o="root" g="wheel" p="33188"/><f n="URLHandler.h" o="root" g="wheel" p="33188"/><f n="UserException.h" o="root" g="wheel" p="33188"/><f n="variables.h" o="root" g="wheel" p="33188"/><f n="vec.h" o="root" g="wheel" p="33188"/><f n="vec_3dnow.h" o="root" g="wheel" p="33188"/><f n="vec_sse.h" o="root" g="wheel" p="33188"/><f n="Vector.h" o="root" g="wheel" p="33188"/><f n="VectorPool.h" o="root" g="wheel" p="33188"/><f n="vmethod.h" o="root" g="wheel" p="33188"/><f n="wrapper.h" o="root" g="wheel" p="33188"/></f></pkg-contents> \ No newline at end of file +<pkg-contents spec="1.12"><f n="flowdesigner" o="root" g="wheel" p="16893" pt="/usr/local/lib/flowdesigner" m="true" t="file"><f n="toolbox" o="root" g="wheel" p="16893"><f n="AUDIO" o="root" g="wheel" p="16893"><f n="libaudio.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libaudio.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="EFFECTS" o="root" g="wheel" p="16893"><f n="libeffect.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libeffects.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="FDQTTCP" o="root" g="wheel" p="16893"><f n="libfdqttcp.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libfdqttcp.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="FUZZY" o="root" g="wheel" p="16893"><f n="libfuzzy.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libfuzzy.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="HMM" o="root" g="wheel" p="16893"><f n="libhmm.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libhmm.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="LIBFLOW" o="root" g="wheel" p="16893"><f n="libflow.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="LoadFile.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="Modulo.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="NilObject.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="Print.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="SaveAs.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="SerializeAs.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="Step.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToBool.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToDouble.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToFloat.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToInt.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToString.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="ToVect.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="Trigger.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="ManyEars" o="root" g="wheel" p="16893"><f n="def" o="root" g="wheel" p="16893"><f n="libmanyears.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><mod>mode</mod></f><f n="examples" o="root" g="wheel" p="16893"><f n="cube_mic_pos.mat" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="LocalizeSeparAndSaveTCP.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="LocalizeSeparAndSaveWavWin32.n" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="robot_mic_pos.mat" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="start_manyears.bat" o="root" g="wheel" p="33204"><mod>mode</mod></f><mod>mode</mod></f><f n="lib" o="root" g="wheel" p="16893"><f n="libmanyears.probe.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><f n="libmanyears.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="sphinx4" o="root" g="wheel" p="16893"><f n="config.xml" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="digits.gram" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="js.jar" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="jsapi.jar" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="sphinx4.jar" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="Sphinx4TcpServer.class" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="tags.jar" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar" o="root" g="wheel" p="33204"><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod></f><f n="NNET" o="root" g="wheel" p="16893"><f n="libnnet.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libnnet.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><f n="VQ" o="root" g="wheel" p="16893"><f n="libvq.def" o="root" g="wheel" p="33204"><mod>mode</mod></f><f n="libvq.tlb.dylib" o="root" g="wheel" p="33277"><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod></f></pkg-contents> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/06flowdesigner.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkgref spec="1.12" uuid="6D3F492F-E123-47FF-B86F-8687D2239DB0"><config><identifier>http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner-1.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/usr/local/include/flowdesigner</installFrom><installTo mod="true">/usr/local/include/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>06flowdesigner-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file +<pkgref spec="1.12" uuid="3F911855-A0F8-468B-BC6F-5F044AB5ABBA"><config><identifier>http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner-1.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/usr/local/lib/flowdesigner</installFrom><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>includeRoot</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>06flowdesigner-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file Modified: trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/index.xml =================================================================== --- trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/index.xml 2009-06-03 13:24:43 UTC (rev 2335) +++ trunk/FlowDesigner/tools/OSXPackageMaker.pmdoc/index.xml 2009-06-03 19:30:59 UTC (rev 2336) @@ -1 +1 @@ -<pkmkdoc spec="1.12"><properties><title>FlowDesigner-0.9.1</title><build>/Users/dominic/Public/FlowDesigner-0.9.1.pkg</build><organization>http://laborius.gel.usherbrooke.ca</organization><userSees ui="both"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>/Applications/flowdesigner.app</description><contents><choice title="flowdesigner" id="flowdesignerlib" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner-2.pkg"/></choice><choice title="batchflow" id="batchflow" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.batchflow.pkg"/></choice><choice title="info2def" id="info2def" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.info2def.pkg"/></choice><choice title="fftw3" id="fftw3" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.fftw3.pkg"/></choice><choice title="qtflow" id="qtflow" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.qtflow.pkg"/></choice><choice title="flowdesigner" id="flowdesignerinclude" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner-1.pkg"/></choice><choice title="flowdesigner" id="flowdesignerapp" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner.pkg"/></choice><choice title="audioviewer" id="audioviewer" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.audioviewer.pkg"/></choice><choice title="liblibflow" id="liblibflow" starts_selected="true" starts_enabled="true" starts_hidden="true"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.liblibflow.pkg"/></choice><choice title="flowdesignershare" id="flowdesignershare" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://laborius.gel.usherbrooke.ca.flowdesigner091.flowdesigner-3.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="fr"/></resources><requirements><requirement id="file" operator="eq" value="true"><file>/Library/Frameworks/QtCore.framework</file><message-title>Qt </message-title><message>Please install Qt4 from http://www.trolltech.com</message></requirement></requirements><flags/><postinstall><action id="com.apple.packagemaker.actions.openurl"><value>http://flowdesigner.sourceforge.net</value></action></postinstall><item type="file">01flowdesigner.xml</item><item type="file">02batchflow.xml</item><item type="file">03info.xml</item><item type="file">04fftw.xml</item><item type="file">05qtflow.xml</item><item type="file">06flowdesigner.xml</item><item type="file">07flowdesigner.xml</item><item type="file">08audioviewer.xml</item><item type="file">09liblibflow.xml</item><item type="file">10flowdesigner.xml</item><mod>postinstallActions.actions</mod><mod>properties.title</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc> \ No newline at end of file +<pkmkdoc spec="1.12"><properties><title>FlowDesigner-0.10.0</title><build>/Users/dletourneau/Desktop/FlowDesigner-0.10.0.pkg</build><organization>http://introlab.gel.usherbrooke.ca</organization><userSees ui="both"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>/Applications/flowdesigner.app</description><contents><choice title="flowdesigner" id="flowdesignerlib" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner-2.pkg"/></choice><choice title="batchflow" id="batchflow" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.batchflow.pkg"/></choice><choice title="info2def" id="info2def" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.info2def.pkg"/></choice><choice title="qtflow" id="qtflow" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.qtflow.pkg"/></choice><choice title="flowdesigner" id="flowdesignerinclude" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner-1.pkg"/></choice><choice title="flowdesigner" id="flowdesignerapp" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner.pkg"/></choice><choice title="audioviewer" id="audioviewer" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.audioviewer.pkg"/></choice><choice title="libflow" id="libflow" starts_selected="true" starts_enabled="true" starts_hidden="true"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.libflow.pkg"/></choice><choice title="flowdesignershare" id="flowdesignershare" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.flowdesigner-3.pkg"/></choice><choice title="libfftw3f.3.1.2" id="libfftw" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.libfftw3f312.pkg"/></choice><choice title="libqtflow" id="libqtflow" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="http://introlab.gel.usherbrooke.ca.flowdesigner0100.libqtflow.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="fr"/></resources><requirements><requirement id="file" operator="eq" value="true"><file>/Library/Frameworks/QtCore.framework</file><message-title>Qt </message-title><message>Please install Qt4 from http://www.trolltech.com</message></requirement></requirements><flags/><postinstall><action id="com.apple.packagemaker.actions.openurl"><value>http://flowdesigner.sourceforge.net</value></action></postinstall><item type="file">01flowdesigner.xml</item><item type="file">02batchflow.xml</item><item type="file">03info.xml</item><item type="file">04qtflow.xml</item><item type="file">05flowdesigner.xml</item><item type="file">06flowdesigner.xml</item><item type="file">07audioviewer.xml</item><item type="file">08libflow.xml</item><item type="file">09flowdesigner.xml</item><item type="file">10libfftw.xml</item><item type="file">11libqtflow.xml</item><mod>postinstallActions.actions</mod><mod>properties.title</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-06-03 13:24:44
|
Revision: 2335 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2335&view=rev Author: maestro Date: 2009-06-03 13:24:43 +0000 (Wed, 03 Jun 2009) Log Message: ----------- removed Player & Behaviors Modified Paths: -------------- trunk/FlowDesigner/toolbox/CMakeLists.txt Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-03-11 20:18:27 UTC (rev 2334) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-06-03 13:24:43 UTC (rev 2335) @@ -41,9 +41,4 @@ # MESSAGE (STATUS "OCTAVE library wasn't found, it won't be compiled.") #ENDIF (HAVE_OCTAVE) -### temp: Player ### -ADD_SUBDIRECTORY(Player) -### temp: Behaviors ### -ADD_SUBDIRECTORY(Behaviors) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pas...@us...> - 2009-03-11 20:18:40
|
Revision: 2334 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2334&view=rev Author: pascal_beaudry Date: 2009-03-11 20:18:27 +0000 (Wed, 11 Mar 2009) Log Message: ----------- Erlang implementation of FlowDesigner Modified Paths: -------------- trunk/FlowDesigner/toolbox/CMakeLists.txt Modified: trunk/FlowDesigner/toolbox/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-03-11 20:15:08 UTC (rev 2333) +++ trunk/FlowDesigner/toolbox/CMakeLists.txt 2009-03-11 20:18:27 UTC (rev 2334) @@ -1,19 +1,19 @@ ### FuzzyEngine toolbox ### ADD_SUBDIRECTORY(FuzzyEngine) -### NNet toolbox ### +### NNet toolbox ### ADD_SUBDIRECTORY(NNet) -### VQ toolbox ### +### VQ toolbox ### ADD_SUBDIRECTORY(VQ) -### HMM toolbox ### +### HMM toolbox ### ADD_SUBDIRECTORY(HMM) -### audio_blocks toolbox ### +### audio_blocks toolbox ### ADD_SUBDIRECTORY(audio_blocks) -### effects toolbox ### +### effects toolbox ### ADD_SUBDIRECTORY(effects) ### FDOpenCV toolbox ### @@ -34,13 +34,16 @@ ENDIF (HAVE_LAPACK AND NOT APPLE) ### octave toolbox ### -find_package(Octave) -IF (HAVE_OCTAVE) - ADD_SUBDIRECTORY(octave) -ELSE (HAVE_OCTAVE) - MESSAGE (STATUS "OCTAVE library wasn't found, it won't be compiled.") -ENDIF (HAVE_OCTAVE) +#find_package(Octave) +#IF (HAVE_OCTAVE) +# ADD_SUBDIRECTORY(octave) +#ELSE (HAVE_OCTAVE) +# MESSAGE (STATUS "OCTAVE library wasn't found, it won't be compiled.") +#ENDIF (HAVE_OCTAVE) -### communications toolbox ### -ADD_SUBDIRECTORY(communications) +### temp: Player ### +ADD_SUBDIRECTORY(Player) +### temp: Behaviors ### +ADD_SUBDIRECTORY(Behaviors) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pas...@us...> - 2009-03-11 20:15:25
|
Revision: 2333 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2333&view=rev Author: pascal_beaudry Date: 2009-03-11 20:15:08 +0000 (Wed, 11 Mar 2009) Log Message: ----------- Basic Prototype of FlowDesigner in Erlang, only for evaluate Concurrency Added Paths: ----------- trunk/Erlang-proto-player/ trunk/Erlang-proto-player/Erlang-proto-player/ trunk/Erlang-proto-player/Erlang-proto-player/.project trunk/Erlang-proto-player/Erlang-proto-player/.settings/ trunk/Erlang-proto-player/Erlang-proto-player/.settings/org.erlide.core.prefs trunk/Erlang-proto-player/Erlang-proto-player/ebin/ trunk/Erlang-proto-player/Erlang-proto-player/include/ trunk/Erlang-proto-player/Erlang-proto-player/src/ trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.beam trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.erl trunk/Erlang-proto-player/Erlang-proto-player/src/extprg trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.beam trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.erl trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.beam trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.erl trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayerPort.erl trunk/Erlang-proto-player/Erlang-proto-player/src/player.beam trunk/Erlang-proto-player/Erlang-proto-player/src/player.erl trunk/Erlang-proto-player/Erlang-proto-player/src/trace.txt trunk/Erlang-proto-player/Erlang-proto-player/src/velocity.beam trunk/Erlang-proto-player/Erlang-proto-player/src/velocity.erl trunk/Erlang-proto-player/Erlang-proto-player-cc/ trunk/Erlang-proto-player/Erlang-proto-player-cc/.cproject trunk/Erlang-proto-player/Erlang-proto-player-cc/.project trunk/Erlang-proto-player/Erlang-proto-player-cc/.settings/ trunk/Erlang-proto-player/Erlang-proto-player-cc/.settings/org.eclipse.cdt.managedbuilder.core.prefs trunk/Erlang-proto-player/Erlang-proto-player-cc/.settings/org.eclipse.ltk.core.refactoring.prefs trunk/Erlang-proto-player/Erlang-proto-player-cc/.settings/org.eclipse.wst.validation.prefs trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/ trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/Erlang-proto-player-cc trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/makefile trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/objects.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/sources.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/src/ trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/src/Erlang-proto-player-cc.d trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/src/erl_comm.d trunk/Erlang-proto-player/Erlang-proto-player-cc/Debug/src/subdir.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/ trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/makefile trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/objects.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/sources.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/src/ trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/src/Erlang-proto-player-cc.d trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/src/erl_comm.d trunk/Erlang-proto-player/Erlang-proto-player-cc/Release/src/subdir.mk trunk/Erlang-proto-player/Erlang-proto-player-cc/src/ trunk/Erlang-proto-player/Erlang-proto-player-cc/src/Erlang-proto-player-cc.cpp trunk/Erlang-proto-player/Erlang-proto-player-cc/src/Erlang-proto-player-cc.h trunk/Erlang-proto-player/Erlang-proto-player-cc/src/erl_comm.c trunk/Erlang-proto-player/Erlang-proto-player-cc/src/erl_comm.h trunk/Erlang-proto-player/Erlang-proto-player-cc/src/player.h trunk/Erlang-proto-player/Erlang-proto-player-cc/src/playerConnect.h Added: trunk/Erlang-proto-player/Erlang-proto-player/.project =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/.project (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/.project 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Erlang-proto-player</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.erlide.core.erlbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.erlide.core.erlnature</nature> + </natures> +</projectDescription> Added: trunk/Erlang-proto-player/Erlang-proto-player/.settings/org.erlide.core.prefs =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/.settings/org.erlide.core.prefs (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/.settings/org.erlide.core.prefs 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,13 @@ +#Wed Jan 21 13:09:04 EST 2009 +backend_cookie= +backend_name= +backend_node=erlide +eclipse.preferences.version=1 +external_includes= +external_modules= +include_dirs=include +make_unique=true +output_dir=ebin +source_dirs=src +type=NORMAL +use_pathz=false Added: trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.beam =================================================================== (Binary files differ) Property changes on: trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.beam ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.erl =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.erl (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/avoid.erl 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,73 @@ +%% Author: pascalbeaudry +%% Created: 10 mars 2009 +%% Description: TODO: Add description to avoid +-module(avoid). + +%% +%% Include files +%% +-import(modulePlayer,[getLaserScan/1, getLaserScanSize/0]). + +%% +%% Exported Functions +%% +-export([avoidNode/0,loopAvoidNode/0]). + + +%% +%% API Functions +%% +loopAvoidNode() -> + receive + {run, PIDnext} -> + PIDnext ! avoidNode(), + avoidp ! {run,PIDnext }, + loopAvoidNode(); + {stop} ->0 + end. + +avoidNode() -> + DetectionRange = 1200.00, + RotationValue = 120, + SizeLaser = getLaserScanSize(), + + IndexFront = goodFrontIndex(SizeLaser), + IndexLeft = goodLeftIndex(SizeLaser), + IndexRight = goodRightIndex(SizeLaser), + + ScanFrontValue = getScan(IndexFront), + ScanLeftValue = getScan(IndexLeft), + ScanRightValue = getScan(IndexRight), + + MinValue=min(ScanFrontValue, min(ScanLeftValue,ScanRightValue)), + + Msg=move(MinValue,ScanFrontValue,ScanLeftValue,ScanRightValue,DetectionRange,RotationValue), + + Msg. + + +%% +%% Local Functions +%% +goodFrontIndex(Size) when Size > 1 -> ((Size - 1) div 2); +goodFrontIndex(_) -> 0. + +goodLeftIndex(Size) when Size > 1 -> (2*(Size - 1) div 3); +goodLeftIndex(_) -> 0. + +goodRightIndex(Size) when Size > 1 -> ((Size - 1) div 3); +goodRightIndex(_) -> 0. + +getScan(Index) when Index > 0 -> getLaserScan(Index); +getScan(_) -> 0. + +min(A,B) when A > B ->B; +min(A,_) -> A. + +move(Min,_,_,_,_,_) when Min == 0 -> {avoid,nil}; +move(Min,_,_,_,Detection,_) when Min > Detection -> {avoid,0}; +move(_,_,Left,Right,_,Rotation) -> + turn(Left,Right,Rotation). + +turn(Left,Right,Rotation) when Left > Right -> {avoid,Rotation}; +turn(_,_,Rotation) -> {avoid,-Rotation}. Added: trunk/Erlang-proto-player/Erlang-proto-player/src/extprg =================================================================== (Binary files differ) Property changes on: trunk/Erlang-proto-player/Erlang-proto-player/src/extprg ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.beam =================================================================== (Binary files differ) Property changes on: trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.beam ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.erl =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.erl (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/mainFlow.erl 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,63 @@ +%% Author: pascalbeaudry +%% Created: 11 mars 2009 +%% Description: TODO: Add description to mainFlow +-module(mainFlow). + +%% +%% Include files +%% +-import(modulePlayer,[getLaserScan/1, getLaserScanSize/0, start/1, stop/0]). +-import(velocity,[loopVelocityNode/0]). +-import(avoid,[loopAvoidNode/0]). +-import(player,[loopPlayerNode/0]). + +%% +%% Exported Functions +%% +-export([start/0]). + +%% +%% API Functions +%% + +mainLoop(PID1,PID2,PID_end) -> + PID1 ! {run, PID_end}, + PID2 ! {run, PID_end}. + +processLoop()-> + receive + {ok ,{ V, A}}-> +%% mainLoop(avoidp,velocityp,playerp), + io:format("Msg : ~p , ~p~n", [V,A]), + processLoop(); + {stop} -> + io:format("Msg : stop \n"), + avoidp ! {stop}, + velocityp ! {stop}, + playerp ! {stop}, + modulePlayer:stop(); + Other -> + io:format("Error Main msg : ~p\n", [Other]), + processLoop() + end +. + +%% +%% Local Functions +%% + +start() -> + PidPlayer = spawn(fun player:loopPlayerNode/0 ), + PidAvoid = spawn(fun avoid:loopAvoidNode/0 ), + PidVelocity = spawn(fun velocity:loopVelocityNode/0), + PidLoop = spawn(fun processLoop/0), + + register(playerp, PidPlayer), + register(avoidp, PidAvoid), + register(velocityp, PidVelocity), + register(mainp, PidLoop), + + modulePlayer:start("./extprg"), + mainLoop(PidVelocity,PidAvoid,PidPlayer). + +%%stop() -> mainp ! {stop}. Added: trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.beam =================================================================== (Binary files differ) Property changes on: trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.beam ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.erl =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.erl (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayer.erl 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,59 @@ +%% Author: pascalbeaudry +%% Created: 26 janv. 2009 +%% Description: module to link behavior with player/stage + +-module(modulePlayer). +-export([start/1, stop/0, init/1]). +-export([playerLaser/0, getLaserScan/1, getLaserScanSize/0, setSpeed/2, setCarLike/2]). + +start(ExtPrg) -> + spawn(?MODULE, init, [ExtPrg]). +stop() -> + complex ! stop. + +setSpeed(X,Y) -> + call_port({setSpeed, X , Y}). + +setCarLike(S,A) -> + call_port({setCarLike, S,A}). + +playerLaser() -> + call_port({playerLaser}). + +getLaserScan(Index) -> + call_port({getLaserScan, Index}). + +getLaserScanSize() -> + call_port({getLaserScanSize}). + +call_port(Msg) -> + complex ! {call, self(), Msg}, + receive + {complex, Result} -> + Result + end. + +init(ExtPrg) -> + register(complex, self()), + process_flag(trap_exit, true), + Port = open_port({spawn, ExtPrg}, [{packet, 2}, binary]), + loop(Port). + +loop(Port) -> + receive + {call, Caller, Msg} -> + Port ! {self(), {command, term_to_binary(Msg)}}, + receive + {Port, {data, Data}} -> + Caller ! {complex, binary_to_term(Data)} + end, + loop(Port); + stop -> + Port ! {self(), close}, + receive + {Port, closed} -> + exit(normal) + end; + {'EXIT', Port, Reason} -> + exit(port_terminated) + end. Added: trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayerPort.erl =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayerPort.erl (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/modulePlayerPort.erl 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,55 @@ +%% Author: pascalbeaudry +%% Created: 21 janv. 2009 +%% Description: module to link behavior with player/stage +-module(modulePlayerPort). + +-export([start/1, stop/0, init/1]). +-export([setSpeed/2, setCarLike/2]). + +start(ExtPrg) -> + spawn(?MODULE, init, [ExtPrg]). +stop() -> + modulePlayer ! stop. + +setSpeed(X,Y) -> + call_port({setSpeed, X , Y}). +setCarLike(S,A) -> + call_port({setCarLike, S,A}). + +call_port(Msg) -> + player ! {call, self(), Msg}, + receive + {player, Result} -> + Result + end. + +init(ExtPrg) -> + register(player, self()), + process_flag(trap_exit, true), + Port = open_port({spawn, ExtPrg}, [{packet, 2}]), + loop(Port). + +loop(Port) -> + receive + {call, Caller, Msg} -> + Port ! {self(), {command, encode(Msg)}}, + receive + {Port, {data, Data}} -> + Caller ! {player, decode(Data)} + end, + loop(Port); + stop -> + Port ! {self(), close}, + receive + {Port, closed} -> + exit(normal) + end; + {'EXIT', Port, Reason} -> + exit(port_terminated) + end. + +encode({setSpeed, X, Y}) -> [1, X, Y]; +encode({setCarLike, S, A}) -> [2, S, A]. + +decode([Int]) -> Int. + Added: trunk/Erlang-proto-player/Erlang-proto-player/src/player.beam =================================================================== (Binary files differ) Property changes on: trunk/Erlang-proto-player/Erlang-proto-player/src/player.beam ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Erlang-proto-player/Erlang-proto-player/src/player.erl =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/player.erl (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/player.erl 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,74 @@ +%% Author: pascalbeaudry +%% Created: 11 mars 2009 +%% Description: TODO: Add description to player +-module(player). + +%% +%% Include files +%% +-import(modulePlayer,[setSpeed/2]). + +%% +%% Exported Functions +%% +-export([loopPlayerNode/0]). + +%% +%% API Functions +%% +loopPlayerNode() -> + receive + {avoid, Avoid} -> + receive + {safeVelocity, Velocity} -> + mainp ! {ok,playerNode(Avoid,Velocity)}, + loopPlayerNode() + end; + {safeVelocity, Velocity} -> + receive + {avoid, Avoid} -> + mainp ! {ok,playerNode(Avoid,Velocity)}, + loopPlayerNode() + end; + {stop} ->0; + Other -> + io:format("Error PlayerNode msg : ~p\n", [Other]), + loopPlayerNode() + + end. + +playerNode(Avoid,Velocity)-> +%% io:format("AvoidNode : ~p\n", [Avoid]), +%% io:format("VelocityNode : ~p\n", [Velocity]), + + Vel=Velocity, + Rot=Avoid, + + move(Vel,Rot) +. + +%% +%% Local Functions +%% +move(Vel,Rot) when (not ( Vel == nil) and (not (Rot== nil))) -> + Rv=Vel/1000.0, + Rs=Rot*3.141592/180, + modulePlayer:setSpeed(Rv,Rs), + {Rv,Rs}; +move(Vel,Rot) when ((Vel == nil) and (not (Rot== nil))) -> + Rv=0, + Rs=Rot*3.141592/180, + modulePlayer:setSpeed(Rv,Rs), + {Rv,Rs}; +move(Vel,Rot) when (not( Vel == nil) and ((Rot== nil))) -> + Rv=Vel/1000.0, + Rs=0, + modulePlayer:setSpeed(Rv,Rs), + {Rv,Rs}; +move(Vel,Rot) when (( Vel == nil) and ((Rot== nil))) -> + Rv=0, + Rs=0, + modulePlayer:setSpeed(Rv,Rs), + {Rv,Rs}; +move(_,_) -> {0,0}. + Added: trunk/Erlang-proto-player/Erlang-proto-player/src/trace.txt =================================================================== --- trunk/Erlang-proto-player/Erlang-proto-player/src/trace.txt (rev 0) +++ trunk/Erlang-proto-player/Erlang-proto-player/src/trace.txt 2009-03-11 20:15:08 UTC (rev 2333) @@ -0,0 +1,18545 @@ +================================================= +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +setSpeed +mk +encode +write +free intp +free argp +free argp 2 +end setSpeed +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScanSize +mk +encode +write +free intp +end getLaserScanSize +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +end loop +refresh +decode tuple +decode fonction name +find good fonction +getLaserScan +mk +encode +write +free intp +free argp +end getLaserScan +free tuplep +free fnp +... [truncated message content] |
From: <pas...@us...> - 2009-01-15 20:43:54
|
Revision: 2332 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2332&view=rev Author: pascal_beaudry Date: 2009-01-15 20:43:44 +0000 (Thu, 15 Jan 2009) Log Message: ----------- add clone on ObjectRef Modified Paths: -------------- trunk/FlowDesigner/data-flow/include/MailBox.h trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n trunk/FlowDesigner/data-flow/src/SetMessageNode.cc Modified: trunk/FlowDesigner/data-flow/include/MailBox.h =================================================================== --- trunk/FlowDesigner/data-flow/include/MailBox.h 2009-01-15 15:23:52 UTC (rev 2331) +++ trunk/FlowDesigner/data-flow/include/MailBox.h 2009-01-15 20:43:44 UTC (rev 2332) @@ -72,7 +72,7 @@ pthread_mutex_lock(&pushmodifLock); for (Iter = mailBoxList.begin(); Iter != mailBoxList.end(); Iter++ ) { - (*Iter)->pushObject(obj); + (*Iter)->pushObject(obj->clone()); } pthread_mutex_unlock(&pushmodifLock); @@ -161,7 +161,7 @@ pthread_mutex_lock(&mutexLock); if(DEBUG) cout<<'\n'<< "msg Set : "<< name<<" "<< obj <<'\n'; - mailObject = obj; + mailObject = obj->clone(); pthread_mutex_unlock(&mutexLock); if(DEBUG) cout<<'\n'<< "Unlock : "<< name<<" "<<mailObject <<'\n'; Modified: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n 2009-01-15 15:23:52 UTC (rev 2331) +++ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n 2009-01-15 20:43:44 UTC (rev 2332) @@ -22,6 +22,22 @@ <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> </Network> <Network type="iterator" name="loop"> <Node name="Constant_2" type="Constant" x="32.000000" y="13.000000"> @@ -88,12 +104,22 @@ <Node name="Constant_32" type="Constant" x="732.000000" y="544.000000"> <Parameter name="VALUE" type="int" value="0" description="The value"/> </Node> - <Node name="GetMessageNode_32" type="GetMessageNode" x="819.000000" y="315.000000"> - <Parameter name="MessageBox_Name" type="string" value="CONNECT" description="name "/> - </Node> <Node name="PopFromMailBoxNode_33" type="PopFromMailBoxNode" x="-131.000000" y="575.000000"> <Parameter name="MailBox_Name" type="string" value="LASER" description="name "/> </Node> + <Node name="PlayerConnect_32" type="PlayerConnect" x="771.000000" y="280.000000"> + <Parameter name="HOST" type="string" value="localhost" description="The host where to connect for sonars readings"/> + <Parameter name="FREQUENCY" type="int" value="20" description="The frequency (Hz) of the updates from the Player server."/> + <Parameter name="PORT" type="int" value="6665" description="The port where to connect for sonars readings."/> + <Parameter name="POSITION_PROXY" type="bool" value="true" description="Start position proxy if it's true."/> + <Parameter name="GRIPPER_PROXY" type="bool" value="false" description="Start gripper proxy if it's true."/> + <Parameter name="LASER_PROXY" type="bool" value="true" description="Start laser proxy if it's true."/> + <Parameter name="PTZ_PROXY" type="bool" value="false" description="Start ptz proxy if it's true."/> + <Parameter name="SONAR_PROXY" type="bool" value="false" description="Start sonar proxy if it's true."/> + <Parameter name="BLOB_FINDER_PROXY" type="bool" value="false" description="Start blob finder proxy if it's true (in simulation only)."/> + <Parameter name="GPS_PROXY" type="bool" value="false" description="Start GPS proxy if it's true."/> + <Parameter name="LASER2_PROXY" type="bool" value="false" description="Start laser proxy if it's true."/> + </Node> <ProbeLink id="1" from="SafeVelocity_5" output="VELOCITY" to="PlayerVelocity_4" input="VELOCITY"/> <ProbeLink id="2" from="Constant_7" output="VALUE" to="SafeVelocity_5" input="ACTIVATED"/> <ProbeLink id="3" from="Constant_7" output="VALUE" to="Avoid_6" input="ACTIVATED"/> @@ -131,9 +157,9 @@ <ProbeLink id="35" from="Subsumption_31" output="OUTPUT" to="PlayerVelocity_4" input="HEADING"/> <ProbeLink id="36" from="Avoid_6" output="ROTATION" to="Subsumption_31" input="HIGH_PRIORITY"/> <ProbeLink id="37" from="Subsumption_31" output="OUTPUT" to="Print_3" input="INPUT"/> - <ProbeLink id="38" from="GetMessageNode_32" output="OUTPUT" to="PlayerVelocity_4" input="CLIENT"/> - <ProbeLink id="39" from="PopFromMailBoxNode_33" output="OUTPUT" to="IF_19" input="THEN"/> - <ProbeLink id="40" from="PopFromMailBoxNode_33" output="OUTPUT" to="Length_10" input="INPUT"/> + <ProbeLink id="38" from="PopFromMailBoxNode_33" output="OUTPUT" to="IF_19" input="THEN"/> + <ProbeLink id="39" from="PopFromMailBoxNode_33" output="OUTPUT" to="Length_10" input="INPUT"/> + <ProbeLink id="40" from="PlayerConnect_32" output="CLIENT" to="PlayerVelocity_4" input="CLIENT"/> <NetCondition name="CONDITION" node="Constant_2" terminal="VALUE"/> <NetOutput name="RANGE" node="PopFromMailBoxNode_33" terminal="OUTPUT" object_type="any" description="No description available"/> <NetOutput name="XPOS" node="PlayerVelocity_4" terminal="XPOS" object_type="any" description="No description available"/> @@ -154,5 +180,21 @@ <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> </Network> </Document> Modified: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n 2009-01-15 15:23:52 UTC (rev 2331) +++ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n 2009-01-15 20:43:44 UTC (rev 2332) @@ -14,6 +14,14 @@ <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> </Network> <Network type="iterator" name="loop"> <Node name="PlayerLaser_1" type="PlayerLaser" x="113.152237" y="50.585815"> @@ -22,14 +30,24 @@ <Node name="USleep_1" type="USleep" x="-4.000000" y="-62.000000"> <Parameter name="MICROSECONDS" type="int" value="1000" description="The time required to sleep"/> </Node> - <Node name="GetMessageNode_2" type="GetMessageNode" x="-87.000000" y="75.000000"> - <Parameter name="MessageBox_Name" type="string" value="CONNECT" description="name "/> - </Node> <Node name="PushToMailBoxNode_3" type="PushToMailBoxNode" x="323.000000" y="-9.000000"> <Parameter name="MailBox_Name" type="string" value="LASER" description="name"/> </Node> - <ProbeLink id="1" from="GetMessageNode_2" output="OUTPUT" to="PlayerLaser_1" input="CLIENT"/> - <ProbeLink id="2" from="PlayerLaser_1" output="RANGE" to="PushToMailBoxNode_3" input="INPUT"/> + <Node name="PlayerConnect_3" type="PlayerConnect" x="-80.000000" y="46.000000"> + <Parameter name="HOST" type="string" value="localhost" description="The host where to connect for sonars readings"/> + <Parameter name="FREQUENCY" type="int" value="20" description="The frequency (Hz) of the updates from the Player server."/> + <Parameter name="PORT" type="int" value="6665" description="The port where to connect for sonars readings."/> + <Parameter name="POSITION_PROXY" type="bool" value="true" description="Start position proxy if it's true."/> + <Parameter name="GRIPPER_PROXY" type="bool" value="false" description="Start gripper proxy if it's true."/> + <Parameter name="LASER_PROXY" type="bool" value="true" description="Start laser proxy if it's true."/> + <Parameter name="PTZ_PROXY" type="bool" value="false" description="Start ptz proxy if it's true."/> + <Parameter name="SONAR_PROXY" type="bool" value="false" description="Start sonar proxy if it's true."/> + <Parameter name="BLOB_FINDER_PROXY" type="bool" value="false" description="Start blob finder proxy if it's true (in simulation only)."/> + <Parameter name="GPS_PROXY" type="bool" value="false" description="Start GPS proxy if it's true."/> + <Parameter name="LASER2_PROXY" type="bool" value="false" description="Start laser proxy if it's true."/> + </Node> + <ProbeLink id="1" from="PlayerLaser_1" output="RANGE" to="PushToMailBoxNode_3" input="INPUT"/> + <ProbeLink id="2" from="PlayerConnect_3" output="CLIENT" to="PlayerLaser_1" input="CLIENT"/> <NetCondition name="CONDITION" node="USleep_1" terminal="OUTPUT"/> <NetOutput name="OUTPUT" node="PushToMailBoxNode_3" terminal="OUTPUT" object_type="any" description="No description available"/> <NetOutput name="RANGE" node="PlayerLaser_1" terminal="RANGE" object_type="any" description="No description available"/> @@ -41,5 +59,13 @@ <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> </Network> </Document> Modified: trunk/FlowDesigner/data-flow/src/SetMessageNode.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/SetMessageNode.cc 2009-01-15 15:23:52 UTC (rev 2331) +++ trunk/FlowDesigner/data-flow/src/SetMessageNode.cc 2009-01-15 20:43:44 UTC (rev 2332) @@ -66,7 +66,8 @@ //Get input data from previous node(s).*/ ObjectRef input1Value = getInput(input1ID, count); ObjectRef valueToSend = input1Value; - if(DEBUG){ + + if(DEBUG){ cout<<'\n'<< "input1Value = "<< input1Value<<'\n'; cout<<'\n'<< "set "<< valueToSend<<'\n'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-15 15:24:25
|
Revision: 2331 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2331&view=rev Author: albertop7 Date: 2009-01-15 15:23:52 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Removed a file that should not be there. Removed Paths: ------------- trunk/FlowDesigner/toolbox/communications/Makefile Deleted: trunk/FlowDesigner/toolbox/communications/Makefile =================================================================== --- trunk/FlowDesigner/toolbox/communications/Makefile 2009-01-15 15:16:28 UTC (rev 2330) +++ trunk/FlowDesigner/toolbox/communications/Makefile 2009-01-15 15:23:52 UTC (rev 2331) @@ -1,192 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.6 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canoncical targets will work. -.SUFFIXES: - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Produce verbose output by default. -VERBOSE = 1 - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# The program to use to edit the cache. -CMAKE_EDIT_COMMAND = /usr/bin/ccmake - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/albertop/projects/FlowDesigner - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/albertop/projects/FlowDesigner - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: install/local -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: install/strip -.PHONY : install/strip/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target package -package: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cpack --config /home/albertop/projects/FlowDesigner/CPackConfig.cmake -.PHONY : package - -# Special rule for the target package -package/fast: package -.PHONY : package/fast - -# Special rule for the target package_source -package_source: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cpack --config /home/albertop/projects/FlowDesigner/CPackSourceConfig.cmake -.PHONY : package_source - -# Special rule for the target package_source -package_source/fast: package_source -.PHONY : package_source/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -E cmake_progress_start /home/albertop/projects/FlowDesigner/CMakeFiles /home/albertop/projects/FlowDesigner/toolbox/communications/CMakeFiles/progress.make - cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/albertop/projects/FlowDesigner/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... package" - @echo "... package_source" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-15 15:17:03
|
Revision: 2330 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2330&view=rev Author: albertop7 Date: 2009-01-15 15:16:28 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Added CyclicEncoder class and GF2Polynomial class. Added cyclic-encoder.n example. Fixed minor bugs in iidSource. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/Makefile trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt trunk/FlowDesigner/toolbox/communications/src/iidSource.cc Added Paths: ----------- trunk/FlowDesigner/toolbox/communications/examples/cyclic-encoder.n trunk/FlowDesigner/toolbox/communications/include/CyclicEncoder.h trunk/FlowDesigner/toolbox/communications/include/GF2Polynomial.h trunk/FlowDesigner/toolbox/communications/src/CyclicEncoder.cc trunk/FlowDesigner/toolbox/communications/src/GF2Polynomial.cc Modified: trunk/FlowDesigner/toolbox/communications/Makefile =================================================================== --- trunk/FlowDesigner/toolbox/communications/Makefile 2009-01-15 13:36:59 UTC (rev 2329) +++ trunk/FlowDesigner/toolbox/communications/Makefile 2009-01-15 15:16:28 UTC (rev 2330) @@ -33,19 +33,19 @@ SHELL = /bin/sh # The CMake executable. -CMAKE_COMMAND = "/Applications/CMake 2.6-2.app/Contents/bin/cmake" +CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. -RM = "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E remove -f +RM = /usr/bin/cmake -E remove -f # The program to use to edit the cache. -CMAKE_EDIT_COMMAND = "/Applications/CMake 2.6-2.app/Contents/bin/ccmake" +CMAKE_EDIT_COMMAND = /usr/bin/ccmake # The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /Users/dominic/WA/FlowDesigner/FlowDesigner +CMAKE_SOURCE_DIR = /home/albertop/projects/FlowDesigner # The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /Users/dominic/WA/FlowDesigner/FlowDesigner +CMAKE_BINARY_DIR = /home/albertop/projects/FlowDesigner #============================================================================= # Targets provided globally by CMake. @@ -53,7 +53,7 @@ # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/ccmake" -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : edit_cache # Special rule for the target edit_cache @@ -63,19 +63,19 @@ # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -P cmake_install.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -P cmake_install.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local @@ -85,7 +85,7 @@ # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip @@ -104,7 +104,7 @@ # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cpack" --config /Users/dominic/WA/FlowDesigner/FlowDesigner/CPackConfig.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cpack --config /home/albertop/projects/FlowDesigner/CPackConfig.cmake .PHONY : package # Special rule for the target package @@ -114,7 +114,7 @@ # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cpack" --config /Users/dominic/WA/FlowDesigner/FlowDesigner/CPackSourceConfig.cmake + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cpack --config /home/albertop/projects/FlowDesigner/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source @@ -124,7 +124,7 @@ # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - cd /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications && "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) + cd /home/albertop/projects/FlowDesigner/toolbox/communications && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache @@ -133,14 +133,14 @@ # The main all target all: cmake_check_build_system - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(CMAKE_COMMAND) -E cmake_progress_start /Users/dominic/WA/FlowDesigner/FlowDesigner/CMakeFiles /Users/dominic/WA/FlowDesigner/FlowDesigner/toolbox/communications/CMakeFiles/progress.make - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/all - $(CMAKE_COMMAND) -E cmake_progress_start /Users/dominic/WA/FlowDesigner/FlowDesigner/CMakeFiles 0 + cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -E cmake_progress_start /home/albertop/projects/FlowDesigner/CMakeFiles /home/albertop/projects/FlowDesigner/toolbox/communications/CMakeFiles/progress.make + cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/albertop/projects/FlowDesigner/CMakeFiles 0 .PHONY : all # The main clean target clean: - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/clean + cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/clean .PHONY : clean # The main clean target @@ -149,17 +149,17 @@ # Prepare targets for installation. preinstall: all - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall + cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall + cd /home/albertop/projects/FlowDesigner && $(MAKE) -f CMakeFiles/Makefile2 toolbox/communications/preinstall .PHONY : preinstall/fast # clear depends depend: - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 + cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target @@ -187,6 +187,6 @@ # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: - cd /Users/dominic/WA/FlowDesigner/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 + cd /home/albertop/projects/FlowDesigner && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system Added: trunk/FlowDesigner/toolbox/communications/examples/cyclic-encoder.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/cyclic-encoder.n (rev 0) +++ trunk/FlowDesigner/toolbox/communications/examples/cyclic-encoder.n 2009-01-15 15:16:28 UTC (rev 2330) @@ -0,0 +1,19 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="cyclic-encoder.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="DiscreteSource_0" type="DiscreteSource" x="-486.000000" y="-221.000000"> + <Parameter name="LENGTH" type="int" value="15" description="Number of generated symbols."/> + <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> + <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> + </Node> + <Node name="CyclicEncoder_1" type="CyclicEncoder" x="-279.000000" y="-216.000000"> + <Parameter name="GENERATOR" type="string" value="6" description="Generator polynomial in octal"/> + <Parameter name="K" type="int" value="15" description="Number of information bits"/> + </Node> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="CyclicEncoder_1" input="INPUT"/> + <NetOutput name="INFO_BITS" node="DiscreteSource_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetOutput name="CODED_BITS" node="CyclicEncoder_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/toolbox/communications/examples/cyclic-encoder.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/toolbox/communications/include/CyclicEncoder.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/CyclicEncoder.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/CyclicEncoder.h 2009-01-15 15:16:28 UTC (rev 2330) @@ -0,0 +1,38 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#ifndef _CYCLICENCODER_H_ +#define _CYCLICENCODER_H_ + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" +#include <stdlib.h> +#include <math.h> +#include "macros_math.h" +#include "GF2Polynomial.h" + +using namespace std; + +namespace FD { + +class CyclicEncoder : public BufferedNode { + + int inputID; + int outputID; + + int K; + GF2Polynomial g; // The generator polynomial. + + GF2Polynomial w, x; // Information word, code word. + +public: + CyclicEncoder(string nodeName, ParameterSet params); + virtual ~CyclicEncoder(); + + void calculate(int output_id, int count, Buffer &out); +}; + +} //namespace FD + +#endif // _CYCLICENCODER_H_ Added: trunk/FlowDesigner/toolbox/communications/include/GF2Polynomial.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/GF2Polynomial.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/GF2Polynomial.h 2009-01-15 15:16:28 UTC (rev 2330) @@ -0,0 +1,58 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#ifndef _GF2POLYNOMIAL_H_ +#define _GF2POLYNOMIAL_H_ + +#include "Object.h" +#include "ParameterSet.h" +#include "Vector.h" +#include <stdlib.h> +#include <math.h> +#include "macros_math.h" + +using namespace std; + +namespace FD { + +class GF2Polynomial{ + Vector<int> c; // Vector of binary coefficients + +public: + GF2Polynomial(); + GF2Polynomial(Vector<int> const &p){ *this = p;}; + GF2Polynomial(String const &s); + virtual ~GF2Polynomial(){}; + + int degree() const {return c.size() - 1;} + + GF2Polynomial &upshift(int const l); + + GF2Polynomial &operator+=(GF2Polynomial const &right); + GF2Polynomial &operator-=(GF2Polynomial const &right); + GF2Polynomial &operator*=(GF2Polynomial const &right); + GF2Polynomial &operator/=(GF2Polynomial const &right); + GF2Polynomial &operator%=(GF2Polynomial const &right); + + GF2Polynomial &operator<<(String const &s); + int operator[](int const i) const { return c[i];}; + + GF2Polynomial const &operator=(Vector<int> const &c); + + size_t size() const { return c.size();}; +}; + +GF2Polynomial operator+(GF2Polynomial const &left, GF2Polynomial const &right); + +GF2Polynomial operator-(GF2Polynomial const &left, GF2Polynomial const &right); + +GF2Polynomial operator*(GF2Polynomial const &left, GF2Polynomial const &right); + +GF2Polynomial operator/(GF2Polynomial const &left, GF2Polynomial const &right); + +GF2Polynomial operator%(GF2Polynomial const &left, GF2Polynomial const &right); + + +} //namespace FD + +#endif // _GF2POLYNOMIAL_H_ Modified: trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-15 13:36:59 UTC (rev 2329) +++ trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-15 15:16:28 UTC (rev 2330) @@ -3,6 +3,7 @@ iidSource.cc DiscreteSource.cc ComplexGaussian.cc + CyclicEncoder.cc Constellation.cc ConstellationMapper.cc OFDModulator.cc @@ -16,6 +17,7 @@ AveragePower.cc Interleaver.cc SpreadInterleaver.cc + GF2Polynomial.cc ) find_package(FFTW3) Added: trunk/FlowDesigner/toolbox/communications/src/CyclicEncoder.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/CyclicEncoder.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/CyclicEncoder.cc 2009-01-15 15:16:28 UTC (rev 2330) @@ -0,0 +1,86 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "CyclicEncoder.h" + +using namespace std; + +namespace FD { + +DECLARE_NODE(CyclicEncoder) + +/*Node + * + * @name CyclicEncoder + * @category Communications:Transmitter + * @description Systematic binary cyclic encoder + * + * @input_name INPUT + * @input_type Vector<int> + * @input_description Binary input sequence + * + * @output_name OUTPUT + * @output_type Vector<int> + * @output_description Binary output sequence + * + * @parameter_name GENERATOR + * @parameter_type string + * @parameter_description Generator polynomial in octal + * @parameter_value 6 + * + * @parameter_name K + * @parameter_type int + * @parameter_description Number of information bits + * @parameter_value 255 + * +END*/ + + +CyclicEncoder::CyclicEncoder(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params) +{ + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if(params.exist("K")) + K = dereference_cast<int>(params.get("K")); + else K = 255; + + if(params.exist("GENERATOR")) + g << object_cast<String>(params.get("GENERATOR")); + else g << string("6"); + + w << "0"; + x << "0"; +} + + +CyclicEncoder::~CyclicEncoder() +{ + // Xiptr->destroy(); +} + + +void CyclicEncoder::calculate(int output_id, int count, Buffer &out) +{ + int i; + ObjectRef inputRef = getInput(inputID, count); + const Vector<int> &inputVec = object_cast<Vector<int> >(inputRef); + int length = inputVec.size(); + + if(length != K) throw new NodeException(this, + "CyclicEncoder: input length != K", __FILE__, __LINE__); + + Vector<int> &output = *Vector<int>::alloc(length + g.degree()); + + out[count] = &output; + + w = inputVec; // w(D) is the information word. + + w.upshift(g.degree()); // w(D) D^{n-k} + x = w - w % g; // x(D) is the code word. + + for(i = 0; i < output.size(); i++) output[i] = x[i]; +} + +}//namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/GF2Polynomial.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/GF2Polynomial.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/GF2Polynomial.cc 2009-01-15 15:16:28 UTC (rev 2330) @@ -0,0 +1,181 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "GF2Polynomial.h" + +using namespace std; + +namespace FD { + +GF2Polynomial::GF2Polynomial() +{ + c.resize(0); +} + + +GF2Polynomial::GF2Polynomial(String const &s) +{ + unsigned int i, o; + + c.resize(0); + for(i = 0; i < s.size(); i++) + { + o = int(s.data()[i] - '0'); + if(o < 0 || o >= 8) continue; // Skip non-octal chars + c.resize(c.size() + 1, (o >> 2) & 1); + c.resize(c.size() + 1, (o >> 1) & 1); + c.resize(c.size() + 1, o & 1); + } + while(c.size() && c.back() == 0) c.pop_back(); +} + +GF2Polynomial &GF2Polynomial::upshift(int const l) +{ + int i; + GF2Polynomial &p = *this; + + c.resize(c.size() + l, 0); + for(i = c.size() - 1; i >= l; i--) + c[i] = c[i - l]; + + for(; i >= 0; i--) c[i] = 0; + + return p; +} + +GF2Polynomial &GF2Polynomial::operator<<(String const &s) +{ + unsigned int i, o; + + c.resize(0); + for(i = 0; i < s.size(); i++) + { + o = int(s.data()[i] - '0'); + if(o < 0 || o >= 8) continue; // Skip non-octal chars + c.resize(c.size() + 1, (o >> 2) & 1); + c.resize(c.size() + 1, (o >> 1) & 1); + c.resize(c.size() + 1, o & 1); + } + while(c.size() && c.back() == 0) c.pop_back(); + + return *this; +} + +GF2Polynomial &GF2Polynomial::operator+=(GF2Polynomial const &p0) +{ + unsigned int i; + + if(c.size() < p0.size()) c.resize(p0.size(), 0); + + for(i = 0; i <= MIN(degree(), p0.degree()); i++) + { + c[i] ^= p0[i]; + c[i] &= 1; + } + + return *this; +} + +GF2Polynomial &GF2Polynomial::operator-=(GF2Polynomial const &p0) +{ + *this += p0; + return *this; +} + +GF2Polynomial &GF2Polynomial::operator*=(GF2Polynomial const &p0) +{ + int i, j; + GF2Polynomial &p = *this; + + c.resize(p0.degree() + degree() + 1, 0); + + for(i = degree() - p0.degree(); i >= 0; i--) + { + if(c[i]) + { + for(j = 1; j <= p0.degree(); j++) + { + c[i + j] ^= p0[j]; + c[i + j] &= 1; + } + } + } + + return p; +} + +GF2Polynomial &GF2Polynomial::operator/=(GF2Polynomial const &p0) +{ + int i, j; + GF2Polynomial &p = *this; + + if(p0.degree() >= degree()) throw 1; + + for(i = degree(); i >= p0.degree(); i--) + { + if(c[i]) + { + for(j = 0; j < p0.degree(); j++) + { + c[i - p0.degree() + j] ^= p0[j]; + c[i - p0.degree() + j] &= 1; + } + } + } + + for(i = 0; i <= degree() - p0.degree(); i++) + c[i] = c[i + p0.degree()]; + + c.resize(c.size() - p0.size() + 1); + + return p; +} + +GF2Polynomial &GF2Polynomial::operator%=(GF2Polynomial const &p0) +{ + GF2Polynomial &p = *this; + + p = p - ((p / p0) * p0); + + return p; +} + + +GF2Polynomial const &GF2Polynomial::operator=(Vector<int> const &v) +{ + int i; + + c.resize(0); + for(i = 0; i < v.size(); i++) c.push_back(v[i]); + + return *this; +} + +GF2Polynomial operator+(GF2Polynomial const &left, GF2Polynomial const &right) +{ + return GF2Polynomial(left) += right; +} + +GF2Polynomial operator-(GF2Polynomial const &left, GF2Polynomial const &right) +{ + return GF2Polynomial(left) -= right; +} + +GF2Polynomial operator*(GF2Polynomial const &left, GF2Polynomial const &right) +{ + return GF2Polynomial(left) *= right; +} + +GF2Polynomial operator/(GF2Polynomial const &left, GF2Polynomial const &right) +{ + return GF2Polynomial(left) /= right; +} + +GF2Polynomial operator%(GF2Polynomial const &left, GF2Polynomial const &right) +{ + return GF2Polynomial(left) %= right; +} + + + +} //namespace FD Modified: trunk/FlowDesigner/toolbox/communications/src/iidSource.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/iidSource.cc 2009-01-15 13:36:59 UTC (rev 2329) +++ trunk/FlowDesigner/toolbox/communications/src/iidSource.cc 2009-01-15 15:16:28 UTC (rev 2330) @@ -34,7 +34,7 @@ * @parameter_name TYPE * @parameter_type string * @parameter_description Generated pdf (UNIFORM, GAUSSIAN) - * @parameter_value GAUSSIAN + * @parameter_value GAUSSIAN;UNIFORM * * @parameter_name MEAN * @parameter_type float This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-01-15 13:37:16
|
Revision: 2329 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2329&view=rev Author: maestro Date: 2009-01-15 13:36:59 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Fixed subnet params for documents Modified Paths: -------------- trunk/FlowDesigner/qtflow/src/QtDocumentParameters.cc Modified: trunk/FlowDesigner/qtflow/src/QtDocumentParameters.cc =================================================================== --- trunk/FlowDesigner/qtflow/src/QtDocumentParameters.cc 2009-01-14 20:21:53 UTC (rev 2328) +++ trunk/FlowDesigner/qtflow/src/QtDocumentParameters.cc 2009-01-15 13:36:59 UTC (rev 2329) @@ -210,6 +210,7 @@ combo->addItem("float"); combo->addItem("bool"); combo->addItem("object"); + combo->addItem("subnet_param"); int index = combo->findText(m_params[i]->type.c_str()); if( index != -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pas...@us...> - 2009-01-14 20:22:03
|
Revision: 2328 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2328&view=rev Author: pascal_beaudry Date: 2009-01-14 20:21:53 +0000 (Wed, 14 Jan 2009) Log Message: ----------- ajout exemple simple de r?\195?\169seau fonctionnant avec les mails Added Paths: ----------- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/connect.n trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n Added: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n 2009-01-14 20:21:53 UTC (rev 2328) @@ -0,0 +1,158 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="behavior.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-42.000000" y="120.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="RANGE" node="loop_1" terminal="RANGE" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="Constant_2" type="Constant" x="32.000000" y="13.000000"> + <Parameter name="VALUE" type="bool" value="true" description="The value"/> + </Node> + <Node name="Print_3" type="Print" x="944.203064" y="551.941162"/> + <Node name="PlayerVelocity_4" type="PlayerVelocity" x="983.551270" y="328.592926"/> + <Node name="SafeVelocity_5" type="SafeVelocity" x="630.195984" y="138.455841"> + <Parameter name="MAX_FORWARD_VELOCITY" type="int" value="500" description="Maximum velocity allowed (mm/s)."/> + <Parameter name="BACKWARD_VELOCITY" type="int" value="100" description="Default value when going backward."/> + <Parameter name="FRONT_DISTANCE" type="float" value="300,00" description="Front sonar reading befoir going backward."/> + <Parameter name="BACK_DISTANCE" type="float" value="1000,00" description="Back sonar reading before going forward."/> + </Node> + <Node name="Avoid_6" type="Avoid" x="672.249756" y="337.627411"> + <Parameter name="DETECTION_RANGE" type="float" value="1200,00" description="No description available"/> + <Parameter name="ROTATION_VALUE" type="int" value="120" description="No description available"/> + </Node> + <Node name="Constant_7" type="Constant" x="400.000000" y="70.000000"> + <Parameter name="VALUE" type="bool" value="true" description="The value"/> + </Node> + <Node name="Constant_8" type="Constant" x="483.414215" y="54.941124"> + <Parameter name="VALUE" type="int" value="400" description="The value"/> + </Node> + <Node name="VectorGetIndex_9" type="VectorGetIndex" x="409.492432" y="396.414215"/> + <Node name="Length_10" type="Length" x="-141.906631" y="324.200989"/> + <Node name="Div_12" type="Div" x="125.000000" y="399.000000"/> + <Node name="Constant_13" type="Constant" x="32.142136" y="408.473083"> + <Parameter name="VALUE" type="int" value="3" description="The value"/> + </Node> + <Node name="Constant_14" type="Constant" x="129.000000" y="284.000000"> + <Parameter name="VALUE" type="int" value="2" description="The value"/> + </Node> + <Node name="Mul_15" type="Mul" x="263.000000" y="319.000000"/> + <Node name="VectorGetIndex_16" type="VectorGetIndex" x="420.597992" y="317.426422"/> + <Node name="Div_17" type="Div" x="270.000000" y="211.000000"/> + <Node name="VectorGetIndex_18" type="VectorGetIndex" x="420.485291" y="219.539108"/> + <Node name="Constant_18" type="Constant" x="483.661041" y="-28.284271"> + <Parameter name="VALUE" type="float" value="1000,00" description="The value"/> + </Node> + <Node name="IF_19" type="IF" x="329.511749" y="500.631592"> + <Parameter name="PULL_ANYWAY" type="bool" value="" description="If true, the IF statement pulls also on the branch not taken"/> + </Node> + <Node name="DCVector_20" type="DCVector" x="181.019333" y="560.028564"> + <Parameter name="LENGTH" type="int" value="3" description="The vector length"/> + <Parameter name="VALUE" type="float" value="0,00" description="Value of each element"/> + </Node> + <Node name="Greater_21" type="Greater" x="45.254833" y="489.317902"/> + <Node name="Constant_22" type="Constant" x="-91.923882" y="476.589966"> + <Parameter name="VALUE" type="int" value="0" description="The value"/> + </Node> + <Node name="ToFloat_23" type="ToFloat" x="516.187927" y="219.203110"/> + <Node name="ToFloat_24" type="ToFloat" x="255.972656" y="557.200134"/> + <Node name="ToFloat_25" type="ToFloat" x="524.673218" y="313.955414"/> + <Node name="ToFloat_26" type="ToFloat" x="531.744324" y="387.494507"/> + <Node name="Sub_27" type="Sub" x="16.970562" y="313.955414"/> + <Node name="Constant_28" type="Constant" x="-65.053825" y="144.249786"> + <Parameter name="VALUE" type="int" value="1" description="The value"/> + </Node> + <Node name="Constant_30" type="Constant" x="-147.078217" y="227.688385"> + <Parameter name="VALUE" type="int" value="1" description="The value"/> + </Node> + <Node name="Max_30" type="Max" x="-65.053825" y="288.499573"/> + <Node name="Subsumption_31" type="Subsumption" x="834.000000" y="424.000000"/> + <Node name="Constant_32" type="Constant" x="732.000000" y="544.000000"> + <Parameter name="VALUE" type="int" value="0" description="The value"/> + </Node> + <Node name="GetMessageNode_32" type="GetMessageNode" x="819.000000" y="315.000000"> + <Parameter name="MessageBox_Name" type="string" value="CONNECT" description="name "/> + </Node> + <Node name="PopFromMailBoxNode_33" type="PopFromMailBoxNode" x="-131.000000" y="575.000000"> + <Parameter name="MailBox_Name" type="string" value="LASER" description="name "/> + </Node> + <ProbeLink id="1" from="SafeVelocity_5" output="VELOCITY" to="PlayerVelocity_4" input="VELOCITY"/> + <ProbeLink id="2" from="Constant_7" output="VALUE" to="SafeVelocity_5" input="ACTIVATED"/> + <ProbeLink id="3" from="Constant_7" output="VALUE" to="Avoid_6" input="ACTIVATED"/> + <ProbeLink id="4" from="Constant_8" output="VALUE" to="SafeVelocity_5" input="FORWARD_VELOCITY"/> + <ProbeLink id="5" from="Constant_13" output="VALUE" to="Div_12" input="DEN"/> + <ProbeLink id="6" from="Div_12" output="OUTPUT" to="VectorGetIndex_9" input="INDEX"/> + <ProbeLink id="7" from="Div_12" output="OUTPUT" to="Mul_15" input="INPUT1"/> + <ProbeLink id="8" from="Constant_14" output="VALUE" to="Mul_15" input="INPUT2"/> + <ProbeLink id="9" from="Mul_15" output="OUTPUT" to="VectorGetIndex_16" input="INDEX"/> + <ProbeLink id="10" from="Constant_14" output="VALUE" to="Div_17" input="DEN"/> + <ProbeLink id="11" from="Div_17" output="OUTPUT" to="VectorGetIndex_18" input="INDEX"/> + <ProbeLink id="12" from="Constant_18" output="VALUE" to="SafeVelocity_5" input="BACK"/> + <ProbeLink id="13" from="IF_19" output="OUTPUT" to="VectorGetIndex_18" input="VECTOR"/> + <ProbeLink id="14" from="IF_19" output="OUTPUT" to="VectorGetIndex_16" input="VECTOR"/> + <ProbeLink id="15" from="IF_19" output="OUTPUT" to="VectorGetIndex_9" input="VECTOR"/> + <ProbeLink id="16" from="Greater_21" output="OUTPUT" to="IF_19" input="COND"/> + <ProbeLink id="17" from="VectorGetIndex_18" output="OUTPUT" to="ToFloat_23" input="INPUT"/> + <ProbeLink id="18" from="ToFloat_23" output="OUTPUT" to="SafeVelocity_5" input="FRONT"/> + <ProbeLink id="19" from="DCVector_20" output="OUTPUT" to="ToFloat_24" input="INPUT"/> + <ProbeLink id="20" from="ToFloat_24" output="OUTPUT" to="IF_19" input="ELSE"/> + <ProbeLink id="21" from="ToFloat_23" output="OUTPUT" to="Avoid_6" input="FRONT"/> + <ProbeLink id="22" from="VectorGetIndex_16" output="OUTPUT" to="ToFloat_25" input="INPUT"/> + <ProbeLink id="23" from="ToFloat_25" output="OUTPUT" to="Avoid_6" input="LEFT_FRONT"/> + <ProbeLink id="24" from="VectorGetIndex_9" output="OUTPUT" to="ToFloat_26" input="INPUT"/> + <ProbeLink id="25" from="ToFloat_26" output="OUTPUT" to="Avoid_6" input="RIGHT_FRONT"/> + <ProbeLink id="26" from="Constant_28" output="VALUE" to="Sub_27" input="INPUT2"/> + <ProbeLink id="27" from="Sub_27" output="OUTPUT" to="Div_17" input="NUM"/> + <ProbeLink id="28" from="Sub_27" output="OUTPUT" to="Div_12" input="NUM"/> + <ProbeLink id="29" from="Max_30" output="OUTPUT" to="Sub_27" input="INPUT1"/> + <ProbeLink id="30" from="Constant_30" output="VALUE" to="Max_30" input="INPUT1"/> + <ProbeLink id="31" from="Length_10" output="OUTPUT" to="Max_30" input="INPUT2"/> + <ProbeLink id="32" from="Length_10" output="OUTPUT" to="Greater_21" input="INPUT2"/> + <ProbeLink id="33" from="Constant_22" output="VALUE" to="Greater_21" input="INPUT1"/> + <ProbeLink id="34" from="Constant_32" output="VALUE" to="Subsumption_31" input="LOW_PRIORITY"/> + <ProbeLink id="35" from="Subsumption_31" output="OUTPUT" to="PlayerVelocity_4" input="HEADING"/> + <ProbeLink id="36" from="Avoid_6" output="ROTATION" to="Subsumption_31" input="HIGH_PRIORITY"/> + <ProbeLink id="37" from="Subsumption_31" output="OUTPUT" to="Print_3" input="INPUT"/> + <ProbeLink id="38" from="GetMessageNode_32" output="OUTPUT" to="PlayerVelocity_4" input="CLIENT"/> + <ProbeLink id="39" from="PopFromMailBoxNode_33" output="OUTPUT" to="IF_19" input="THEN"/> + <ProbeLink id="40" from="PopFromMailBoxNode_33" output="OUTPUT" to="Length_10" input="INPUT"/> + <NetCondition name="CONDITION" node="Constant_2" terminal="VALUE"/> + <NetOutput name="RANGE" node="PopFromMailBoxNode_33" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetOutput name="XPOS" node="PlayerVelocity_4" terminal="XPOS" object_type="any" description="No description available"/> + <NetOutput name="OUTPUT" node="Print_3" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/behavior.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/connect.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/connect.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/connect.n 2009-01-14 20:21:53 UTC (rev 2328) @@ -0,0 +1,38 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="connect.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-42.000000" y="120.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="PlayerConnect_0" type="PlayerConnect" x="-292.168610" y="-101.923019"> + <Parameter name="HOST" type="string" value="localhost" description="The host where to connect for sonars readings"/> + <Parameter name="FREQUENCY" type="int" value="20" description="The frequency (Hz) of the updates from the Player server."/> + <Parameter name="PORT" type="int" value="6665" description="The port where to connect for sonars readings."/> + <Parameter name="POSITION_PROXY" type="bool" value="true" description="Start position proxy if it's true."/> + <Parameter name="GRIPPER_PROXY" type="bool" value="false" description="Start gripper proxy if it's true."/> + <Parameter name="LASER_PROXY" type="bool" value="true" description="Start laser proxy if it's true."/> + <Parameter name="PTZ_PROXY" type="bool" value="false" description="Start ptz proxy if it's true."/> + <Parameter name="SONAR_PROXY" type="bool" value="false" description="Start sonar proxy if it's true."/> + <Parameter name="BLOB_FINDER_PROXY" type="bool" value="false" description="Start blob finder proxy if it's true (in simulation only)."/> + <Parameter name="GPS_PROXY" type="bool" value="false" description="Start GPS proxy if it's true."/> + <Parameter name="LASER2_PROXY" type="bool" value="false" description="Start laser proxy if it's true."/> + </Node> + <Node name="SetMessageNode_1" type="SetMessageNode" x="-92.580734" y="-104.308655"> + <Parameter name="MessageBox_Name" type="string" value="CONNECT" description="name "/> + </Node> + <Node name="USleep_2" type="USleep" x="-212.132034" y="0.000000"> + <Parameter name="MICROSECONDS" type="int" value="10000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="PlayerConnect_0" output="CLIENT" to="SetMessageNode_1" input="INPUT"/> + <NetOutput name="OUTPUT" node="SetMessageNode_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/connect.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n 2009-01-14 20:21:53 UTC (rev 2328) @@ -0,0 +1,45 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="laser.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-42.000000" y="120.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="PlayerLaser_1" type="PlayerLaser" x="113.152237" y="50.585815"> + <Parameter name="LASER2_PROXY" type="bool" value="false" description="Start laser proxy if it's true."/> + </Node> + <Node name="USleep_1" type="USleep" x="-4.000000" y="-62.000000"> + <Parameter name="MICROSECONDS" type="int" value="1000" description="The time required to sleep"/> + </Node> + <Node name="GetMessageNode_2" type="GetMessageNode" x="-87.000000" y="75.000000"> + <Parameter name="MessageBox_Name" type="string" value="CONNECT" description="name "/> + </Node> + <Node name="PushToMailBoxNode_3" type="PushToMailBoxNode" x="323.000000" y="-9.000000"> + <Parameter name="MailBox_Name" type="string" value="LASER" description="name"/> + </Node> + <ProbeLink id="1" from="GetMessageNode_2" output="OUTPUT" to="PlayerLaser_1" input="CLIENT"/> + <ProbeLink id="2" from="PlayerLaser_1" output="RANGE" to="PushToMailBoxNode_3" input="INPUT"/> + <NetCondition name="CONDITION" node="USleep_1" terminal="OUTPUT"/> + <NetOutput name="OUTPUT" node="PushToMailBoxNode_3" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetOutput name="RANGE" node="PlayerLaser_1" terminal="RANGE" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/exempleMailSimple/laser.n ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pas...@us...> - 2009-01-13 22:53:22
|
Revision: 2327 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2327&view=rev Author: pascal_beaudry Date: 2009-01-13 21:43:38 +0000 (Tue, 13 Jan 2009) Log Message: ----------- introduce mail and message box concept Modified Paths: -------------- trunk/FlowDesigner/data-flow/src/CMakeLists.txt Added Paths: ----------- trunk/FlowDesigner/data-flow/include/MailBox.h trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox2Thread.n trunk/FlowDesigner/data-flow/n-files/mailBoxPop.n trunk/FlowDesigner/data-flow/n-files/mailBoxPop2.n trunk/FlowDesigner/data-flow/n-files/mailBoxPop3.n trunk/FlowDesigner/data-flow/n-files/mailBoxPush.n trunk/FlowDesigner/data-flow/n-files/mailBoxPush2.n trunk/FlowDesigner/data-flow/n-files/mailBoxPush3.n trunk/FlowDesigner/data-flow/n-files/messageBoxGET.n trunk/FlowDesigner/data-flow/n-files/messageBoxGET2.n trunk/FlowDesigner/data-flow/n-files/messageBoxGET3.n trunk/FlowDesigner/data-flow/n-files/messageBoxSET.n trunk/FlowDesigner/data-flow/n-files/messageBoxSET2.n trunk/FlowDesigner/data-flow/n-files/messageBoxSET3.n trunk/FlowDesigner/data-flow/src/GetMessageNode.cc trunk/FlowDesigner/data-flow/src/MailBox.cc trunk/FlowDesigner/data-flow/src/PopFromMailBoxNode.cc trunk/FlowDesigner/data-flow/src/PushToMailBoxNode.cc trunk/FlowDesigner/data-flow/src/SetMessageNode.cc Added: trunk/FlowDesigner/data-flow/include/MailBox.h =================================================================== --- trunk/FlowDesigner/data-flow/include/MailBox.h (rev 0) +++ trunk/FlowDesigner/data-flow/include/MailBox.h 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,257 @@ +/* + * MailBox.h + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#define DEBUG false + +#ifndef MAILBOX_H +#define MAILBOX_H + +#include "BufferedNode.h" +#include <semaphore.h> +#include "Node.h" +#include <queue> +#include "Timer.h" +#include <unistd.h> +#include <sys/time.h> +#include <unistd.h> + +using namespace std; + +namespace FD { + +class MailBox; + +class PopFromMailBoxNode : public BufferedNode { + + protected: + int outputID; + std::string mailboxName; + MailBox* mailbox; + queue <ObjectRef> msgQueue; + pthread_mutex_t pushmodifLock; + ObjectRef popObject(); + + public: + PopFromMailBoxNode(string nodeName, ParameterSet params); + void calculate(int output_id, int count, Buffer &out); + void pushObject(ObjectRef obj); + +}; + +class MailBox{ + +private: + pthread_mutex_t pushmodifLock; + pthread_mutex_t registermodifLock; + ObjectRef mailObject; + vector<PopFromMailBoxNode*> mailBoxList; + vector<PopFromMailBoxNode*>::iterator Iter; + std::string name; + +public: + + MailBox(std::string nname){ + pthread_mutex_init(&pushmodifLock, NULL); + pthread_mutex_init(®istermodifLock, NULL); + name=nname; + } + + void push(ObjectRef obj){ + + if(DEBUG) + cout<<'\n'<< "push mail : "<< name<<" "<< obj <<'\n'; + if(mailBoxList.empty()) + return; + + pthread_mutex_lock(&pushmodifLock); + for (Iter = mailBoxList.begin(); Iter != mailBoxList.end(); Iter++ ) + { + (*Iter)->pushObject(obj); + } + + pthread_mutex_unlock(&pushmodifLock); + } + + void registerReceiver(PopFromMailBoxNode* receiver){ + pthread_mutex_lock(®istermodifLock); + mailBoxList.push_back(receiver); + pthread_mutex_unlock(®istermodifLock); + } +}; + + +class MailBoxManager{ + +private: + std::map<std::string,MailBox*> mailBoxList; + std::map<std::string,MailBox*>::iterator mailboxIt; + static MailBoxManager* instance; + static pthread_mutex_t instancelock; + + MailBoxManager(){ + + //init Mailbox system + } + +public: + + MailBox* getMailBoxFromName(std::string name) + { + + pthread_mutex_lock(&instancelock); + + //Check if Mailbox exist + mailboxIt=mailBoxList.find(name); + + if(mailboxIt==mailBoxList.end()){ + if(DEBUG) + cout<<'\n'<< "Create new MailBox instance : "<< name <<'\n'; + mailBoxList[name]=new MailBox(name); + } + + pthread_mutex_unlock(&instancelock); + + return mailBoxList[name]; + } + + static MailBoxManager* getInstance() + { + if(!instance){ + pthread_mutex_lock(&instancelock); + if(!instance){ + + if(DEBUG) + cout<<'\n'<< "Create new mailBoxManagerInstance " <<'\n'; + instance=new MailBoxManager(); + } + pthread_mutex_unlock(&instancelock); + + } + + return instance; + } + +}; + +class MessageBox{ + +private: + pthread_mutex_t mutexLock; + ObjectRef mailObject; + bool empty; + std::string name; + +public: + + MessageBox(std::string nname){ + empty=true; + pthread_mutex_init(&mutexLock,0); + name=nname; + } + + void set(ObjectRef obj){ + if(DEBUG) + cout<<'\n'<< "Lock : "<< name <<'\n'; + pthread_mutex_lock(&mutexLock); + if(DEBUG) + cout<<'\n'<< "msg Set : "<< name<<" "<< obj <<'\n'; + mailObject = obj; + pthread_mutex_unlock(&mutexLock); + if(DEBUG) + cout<<'\n'<< "Unlock : "<< name<<" "<<mailObject <<'\n'; + empty=false; + } + + bool isEmpty(){ + return empty; + } + + ObjectRef get(){ + ObjectRef tmp; + + while(isEmpty()){ + if(DEBUG) + cout<<'\n'<< "mailObject "<< name<<" isEmpty()"<<'\n'; + thread_usleep(1000); + } + + + if(DEBUG) + cout<<'\n'<< "get wait lock "<< name<<'\n'; + pthread_mutex_lock(&mutexLock); + tmp=mailObject; + + if(DEBUG) + cout<<'\n'<< "get "<< name<<" "<< tmp <<'\n'; + + pthread_mutex_unlock(&mutexLock); + + if(DEBUG) + cout<<'\n'<< "get lock"<< tmp <<'\n'; + return tmp; + } +}; + + + +class MessageBoxManager{ + +private: + std::map<std::string,MessageBox*> messageBoxList; + std::map<std::string,MessageBox*>::iterator messageboxIt; + static MessageBoxManager* instance ; + static pthread_mutex_t instancelock; + + MessageBoxManager(){ + + } + +public: + + MessageBox* getMessageBoxFromName(std::string name) + { + + pthread_mutex_lock(&instancelock); + + //Check if Mailbox exist + messageboxIt=messageBoxList.find(name); + + if(messageboxIt==messageBoxList.end()){ + if(DEBUG) + cout<<'\n'<< "Create new MessageBox instance : "<< name <<'\n'; + messageBoxList[name]=new MessageBox(name); + } + + pthread_mutex_unlock(&instancelock); + + return messageBoxList[name]; + } + + static MessageBoxManager* getInstance() + { + if(!instance){ + pthread_mutex_lock(&instancelock); + if(!instance){ + + if(DEBUG) + cout<<'\n'<< "Create new messageBoxManagerInstance " <<'\n'; + instance=new MessageBoxManager(); + } + pthread_mutex_unlock(&instancelock); + + } + + return instance; + } + +}; + +} + +#endif \ No newline at end of file Property changes on: trunk/FlowDesigner/data-flow/include/MailBox.h ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox =================================================================== --- trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,22 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="ImplementationTestMesssageBox" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="Constant_0" type="Constant" x="-366.000000" y="189.000000"> + <Parameter name="VALUE" type="string" value="test" description="The value"/> + </Node> + <Node name="SetMessageNode_1" type="SetMessageNode" x="-197.000000" y="189.000000"> + <Parameter name="MessageBox_Name" type="string" value="aaaa" description="name "/> + </Node> + <Node name="GetMessageNode_2" type="GetMessageNode" x="-323.000000" y="95.000000"> + <Parameter name="MessageBox_Name" type="string" value="aaaa" description="name "/> + </Node> + <Node name="Print_3" type="Print" x="-182.000000" y="97.000000"/> + <ProbeLink id="1" from="Constant_0" output="VALUE" to="SetMessageNode_1" input="INPUT"/> + <ProbeLink id="2" from="GetMessageNode_2" output="OUTPUT" to="Print_3" input="INPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox2Thread.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox2Thread.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox2Thread.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,50 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="ImplementationTestMesssageBox2Thread.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loopSet_0" type="loopSet" x="-63.000000" y="-107.000000"> + <Parameter name="DOWHILE" type="bool" value="true" description="No description available"/> + </Node> + <Node name="loopGet_1" type="loopGet" x="-61.000000" y="38.000000"> + <Parameter name="DOWHILE" type="bool" value="true" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loopGet_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loopSet"> + <Node name="SetMessageNode_0" type="SetMessageNode" x="218.000000" y="151.000000"> + <Parameter name="MessageBox_Name" type="string" value="qwerty" description="name "/> + </Node> + <Node name="Constant_1" type="Constant" x="50.000000" y="148.000000"> + <Parameter name="VALUE" type="string" value="Bonjour" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="37.000000" y="28.000000"> + <Parameter name="MICROSECONDS" type="int" value="1000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="SetMessageNode_0" input="INPUT"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loopGet"> + <Node name="GetMessageNode_0" type="GetMessageNode" x="-128.000000" y="157.000000"> + <Parameter name="MessageBox_Name" type="string" value="" description="name "/> + </Node> + <Node name="Print_1" type="Print" x="19.000000" y="154.000000"/> + <Node name="USleep_2" type="USleep" x="-63.000000" y="61.000000"> + <Parameter name="MICROSECONDS" type="int" value="1000000" description="The time required to sleep"/> + </Node> + <ProbeLink id="2" from="GetMessageNode_0" output="OUTPUT" to="Print_1" input="INPUT"/> + <NetOutput name="OUTPUT" node="Print_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/ImplementationTestMesssageBox2Thread.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPop.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPop.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPop.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPop.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-16.000000" y="133.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="USleep_0" type="USleep" x="-187.000000" y="-88.000000"> + <Parameter name="MICROSECONDS" type="int" value="10000" description="The time required to sleep"/> + </Node> + <Node name="PopFromMailBoxNode_1" type="PopFromMailBoxNode" x="-181.000000" y="40.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST" description="name "/> + </Node> + <Node name="Print_2" type="Print" x="2.000000" y="47.000000"/> + <ProbeLink id="1" from="PopFromMailBoxNode_1" output="OUTPUT" to="Print_2" input="INPUT"/> + <NetCondition name="CONDITION" node="USleep_0" terminal="OUTPUT"/> + <NetOutput name="OUTPUT" node="Print_2" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPop.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPop2.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPop2.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPop2.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPop2.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-16.000000" y="133.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="USleep_0" type="USleep" x="-187.000000" y="-88.000000"> + <Parameter name="MICROSECONDS" type="int" value="20000" description="The time required to sleep"/> + </Node> + <Node name="PopFromMailBoxNode_1" type="PopFromMailBoxNode" x="-181.000000" y="40.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST2" description="name "/> + </Node> + <Node name="Print_2" type="Print" x="2.000000" y="47.000000"/> + <ProbeLink id="1" from="PopFromMailBoxNode_1" output="OUTPUT" to="Print_2" input="INPUT"/> + <NetCondition name="CONDITION" node="USleep_0" terminal="OUTPUT"/> + <NetOutput name="OUTPUT" node="Print_2" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPop2.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPop3.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPop3.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPop3.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPop3.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-16.000000" y="133.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="USleep_0" type="USleep" x="-187.000000" y="-88.000000"> + <Parameter name="MICROSECONDS" type="int" value="30000" description="The time required to sleep"/> + </Node> + <Node name="PopFromMailBoxNode_1" type="PopFromMailBoxNode" x="-181.000000" y="40.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST3" description="name "/> + </Node> + <Node name="Print_2" type="Print" x="2.000000" y="47.000000"/> + <ProbeLink id="1" from="PopFromMailBoxNode_1" output="OUTPUT" to="Print_2" input="INPUT"/> + <NetCondition name="CONDITION" node="USleep_0" terminal="OUTPUT"/> + <NetOutput name="OUTPUT" node="Print_2" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPop3.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPush.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPush.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPush.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPush.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="-57.000000" y="25.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="PushToMailBoxNode_0" type="PushToMailBoxNode" x="193.000000" y="104.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST" description="name"/> + </Node> + <Node name="Constant_1" type="Constant" x="35.000000" y="97.000000"> + <Parameter name="VALUE" type="string" value="TestMail" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="35.000000" y="14.000000"> + <Parameter name="MICROSECONDS" type="int" value="10000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="PushToMailBoxNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="PushToMailBoxNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPush.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPush2.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPush2.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPush2.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPush2.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="-57.000000" y="25.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="PushToMailBoxNode_0" type="PushToMailBoxNode" x="193.000000" y="104.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST2" description="name"/> + </Node> + <Node name="Constant_1" type="Constant" x="35.000000" y="103.000000"> + <Parameter name="VALUE" type="int" value="223" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="35.000000" y="14.000000"> + <Parameter name="MICROSECONDS" type="int" value="20000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="PushToMailBoxNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="PushToMailBoxNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPush2.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/mailBoxPush3.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/mailBoxPush3.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/mailBoxPush3.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="mailBoxPush3.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="-57.000000" y="25.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="PushToMailBoxNode_0" type="PushToMailBoxNode" x="193.000000" y="104.000000"> + <Parameter name="MailBox_Name" type="string" value="TEST3" description="name"/> + </Node> + <Node name="Constant_1" type="Constant" x="35.000000" y="103.000000"> + <Parameter name="VALUE" type="bool" value="false" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="35.000000" y="14.000000"> + <Parameter name="MICROSECONDS" type="int" value="30000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="PushToMailBoxNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="PushToMailBoxNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/mailBoxPush3.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxGET.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxGET.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxGET.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,24 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxGET.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-131.000000" y="40.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="Print_0" type="Print" x="223.000000" y="103.000000"/> + <Node name="GetMessageNode_1" type="GetMessageNode" x="43.000000" y="101.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST" description="name "/> + </Node> + <Node name="USleep_2" type="USleep" x="32.000000" y="3.000000"> + <Parameter name="MICROSECONDS" type="int" value="10000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="GetMessageNode_1" output="OUTPUT" to="Print_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="Print_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxGET.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxGET2.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxGET2.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxGET2.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxGET2.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-131.000000" y="40.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="Print_0" type="Print" x="223.000000" y="103.000000"/> + <Node name="GetMessageNode_1" type="GetMessageNode" x="43.000000" y="101.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST2" description="name "/> + </Node> + <Node name="USleep_2" type="USleep" x="32.000000" y="3.000000"> + <Parameter name="MICROSECONDS" type="int" value="1500" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="GetMessageNode_1" output="OUTPUT" to="Print_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="Print_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxGET2.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxGET3.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxGET3.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxGET3.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxGET3.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_1" type="loop" x="-131.000000" y="40.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="Print_0" type="Print" x="223.000000" y="103.000000"/> + <Node name="GetMessageNode_1" type="GetMessageNode" x="43.000000" y="101.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST3" description="name "/> + </Node> + <Node name="USleep_2" type="USleep" x="32.000000" y="3.000000"> + <Parameter name="MICROSECONDS" type="int" value="4000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="GetMessageNode_1" output="OUTPUT" to="Print_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="Print_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxGET3.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxSET.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxSET.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxSET.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxGET.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="31.000000" y="15.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="SetMessageNode_0" type="SetMessageNode" x="290.000000" y="156.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST" description="name "/> + </Node> + <Node name="USleep_1" type="USleep" x="142.000000" y="8.000000"> + <Parameter name="MICROSECONDS" type="int" value="1000" description="The time required to sleep"/> + </Node> + <Node name="Constant_2" type="Constant" x="55.000000" y="151.000000"> + <Parameter name="VALUE" type="string" value="valeurDeTest" description="The value"/> + </Node> + <ProbeLink id="1" from="Constant_2" output="VALUE" to="SetMessageNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="SetMessageNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_1" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxSET.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxSET2.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxSET2.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxSET2.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxSET2.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="40.000000" y="38.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="SetMessageNode_0" type="SetMessageNode" x="181.000000" y="123.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST2" description="name "/> + </Node> + <Node name="Constant_1" type="Constant" x="39.000000" y="122.000000"> + <Parameter name="VALUE" type="int" value="24" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="35.000000" y="24.000000"> + <Parameter name="MICROSECONDS" type="int" value="2000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="SetMessageNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="SetMessageNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxSET2.n ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/n-files/messageBoxSET3.n =================================================================== --- trunk/FlowDesigner/data-flow/n-files/messageBoxSET3.n (rev 0) +++ trunk/FlowDesigner/data-flow/n-files/messageBoxSET3.n 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,26 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="messageBoxSET3.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="40.000000" y="38.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="OUTPUT" node="loop_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="SetMessageNode_0" type="SetMessageNode" x="181.000000" y="123.000000"> + <Parameter name="MessageBox_Name" type="string" value="TEST3" description="name "/> + </Node> + <Node name="Constant_1" type="Constant" x="39.000000" y="122.000000"> + <Parameter name="VALUE" type="bool" value="true" description="The value"/> + </Node> + <Node name="USleep_2" type="USleep" x="35.000000" y="24.000000"> + <Parameter name="MICROSECONDS" type="int" value="3000" description="The time required to sleep"/> + </Node> + <ProbeLink id="1" from="Constant_1" output="VALUE" to="SetMessageNode_0" input="INPUT"/> + <NetOutput name="OUTPUT" node="SetMessageNode_0" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="USleep_2" terminal="OUTPUT"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/data-flow/n-files/messageBoxSET3.n ___________________________________________________________________ Added: svn:executable + * Modified: trunk/FlowDesigner/data-flow/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-01-09 23:36:16 UTC (rev 2326) +++ trunk/FlowDesigner/data-flow/src/CMakeLists.txt 2009-01-13 21:43:38 UTC (rev 2327) @@ -19,6 +19,7 @@ ../include/Iterator.h ../include/JitterMatrix.h ../include/Matrix.h +../include/MailBox.h ../include/Network.h ../include/Node.h ../include/NodeFactory.h @@ -175,6 +176,11 @@ BinaryAND.cc BinaryOR.cc Power.cc + GetMessageNode.cc + SetMessageNode.cc + PushToMailBoxNode.cc + PopFromMailBoxNode.cc + SetMessageNode.cc ) @@ -213,6 +219,7 @@ flow_version.cc object_param.cc iextensions.cc + MailBox.cc ) Added: trunk/FlowDesigner/data-flow/src/GetMessageNode.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/GetMessageNode.cc (rev 0) +++ trunk/FlowDesigner/data-flow/src/GetMessageNode.cc 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,75 @@ +/* + * MailBoxNode.cpp + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#include "BufferedNode.h" +#include "Node.h" +#include "MailBox.h" + + +namespace FD { + +using namespace std; + +class GetMessageNode; + + +DECLARE_NODE(GetMessageNode) +/*Node + * + * @name GetMessageNode + * @category Mail + * @description Mailbox to keep the newest data between loops + * + * @output_name OUTPUT + * @output_type ObjectRef + * @output_description object to receive + * + * @parameter_name MessageBox_Name + * @parameter_type string + * @parameter_description name + * +END*/ + class GetMessageNode : public BufferedNode { + + int outputID; + std::string mailboxName; + MessageBox* mailbox; + public: + GetMessageNode(string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + outputID = addOutput("OUTPUT"); + + //Get messagebox name + mailboxName = object_cast<String> ( parameters.get("MessageBox_Name")); + + //Get mailbox + MessageBoxManager* manager= MessageBoxManager::getInstance(); + mailbox= manager->getMessageBoxFromName(mailboxName); + } + + void calculate(int output_id, int count, Buffer &out) + { + ObjectRef mailBoxData; + + while(mailbox->isEmpty()){ + if(DEBUG) + cout<<'\n'<< "isEmpty"<<'\n'; + } + mailBoxData = (mailbox->get()); + + if(DEBUG) + cout<<'\n'<< mailBoxData<<'\n'; + out[count] = mailBoxData; + + } + +}; + +} Property changes on: trunk/FlowDesigner/data-flow/src/GetMessageNode.cc ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/src/MailBox.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/MailBox.cc (rev 0) +++ trunk/FlowDesigner/data-flow/src/MailBox.cc 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,19 @@ +/* + * MailBox.cc + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#include "MailBox.h" + +namespace FD{ + +MailBoxManager* MailBoxManager::instance =0; +MessageBoxManager* MessageBoxManager::instance =0; +pthread_mutex_t MessageBoxManager::instancelock=PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t MailBoxManager::instancelock=PTHREAD_MUTEX_INITIALIZER; + +} \ No newline at end of file Property changes on: trunk/FlowDesigner/data-flow/src/MailBox.cc ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/src/PopFromMailBoxNode.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/PopFromMailBoxNode.cc (rev 0) +++ trunk/FlowDesigner/data-flow/src/PopFromMailBoxNode.cc 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,86 @@ +/* + * MailBoxNode.cpp + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#include "BufferedNode.h" +#include "Node.h" +#include "MailBox.h" + +namespace FD{ +using namespace std; + +class PopFromMailBoxNode; + +DECLARE_NODE(PopFromMailBoxNode) +/*Node + * + * @name PopFromMailBoxNode + * @category Mail + * @description Read the last mail of the Mailbox + * + * @output_name OUTPUT + * @output_type ObjectRef + * @output_description object to receive + * + * @parameter_name MailBox_Name + * @parameter_type string + * @parameter_description name +END*/ +PopFromMailBoxNode::PopFromMailBoxNode(string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + outputID = addOutput("OUTPUT"); + + //Get messagebox name + mailboxName = object_cast<String> ( parameters.get("MailBox_Name")); + + + //Get mailbox + MailBoxManager* manager= MailBoxManager::getInstance(); + mailbox= manager->getMailBoxFromName(mailboxName); + + //Register to mailbox + mailbox->registerReceiver(this); + + pthread_mutex_init(&pushmodifLock, NULL); + } + +void PopFromMailBoxNode::calculate(int output_id, int count, Buffer &out) + { + ObjectRef mailBoxData; + + while(msgQueue.empty()){ + if(DEBUG) + cout<<'\n'<< "isEmpty"<<'\n'; + thread_usleep(1500); + } + mailBoxData =popObject(); + + if(DEBUG) + cout<<'\n'<< mailBoxData<<'\n'; + out[count] = mailBoxData; + + } + +void PopFromMailBoxNode::pushObject(ObjectRef obj){ + + pthread_mutex_lock(&pushmodifLock); + msgQueue.push(obj); + pthread_mutex_unlock(&pushmodifLock); +} + +ObjectRef PopFromMailBoxNode::popObject(){ + pthread_mutex_lock(&pushmodifLock); + ObjectRef obj; + obj=msgQueue.front(); + msgQueue.pop(); + pthread_mutex_unlock(&pushmodifLock); + return obj; +} + +} Property changes on: trunk/FlowDesigner/data-flow/src/PopFromMailBoxNode.cc ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/src/PushToMailBoxNode.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/PushToMailBoxNode.cc (rev 0) +++ trunk/FlowDesigner/data-flow/src/PushToMailBoxNode.cc 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,81 @@ +/* + * MailBoxNode.cpp + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#include "BufferedNode.h" +#include "Node.h" +#include "MailBox.h" + +namespace FD { + +using namespace std; + +class PushToMailBoxNode; + +DECLARE_NODE(PushToMailBoxNode) +/*Node + * + * @name PushToMailBoxNode + * @category Mail + * @description push a mail into a Mailbox + * + * @input_name INPUT + * @input_type ObjectRef> + * @input_description object to mail + * + * @output_name OUTPUT + * @output_type ObjectRef + * @output_description object to mail + * + * @parameter_name MailBox_Name + * @parameter_type string + * @parameter_description name + * +END*/ +class PushToMailBoxNode : public BufferedNode { + int input1ID; + int outputID; + std::string mailboxName; + MailBox* mailbox; + + public: + PushToMailBoxNode(string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + input1ID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + //Get messagebox name + mailboxName = object_cast<String> ( parameters.get("MailBox_Name")); + + MailBoxManager* manager= MailBoxManager::getInstance(); + mailbox= manager->getMailBoxFromName(mailboxName); + } + + void calculate(int output_id, int count, Buffer &out) + { + + //Get input data from previous node(s).*/ + ObjectRef input1Value = getInput(input1ID, count); + ObjectRef valueToSend = input1Value; + + if(DEBUG){ + cout<<'\n'<< "input1Value = "<< input1Value<<'\n'; + cout<<'\n'<< "push "<< valueToSend<<'\n'; + } + mailbox->push(valueToSend); + + + out[count] = input1Value; + + } + +}; + + +} \ No newline at end of file Property changes on: trunk/FlowDesigner/data-flow/src/PushToMailBoxNode.cc ___________________________________________________________________ Added: svn:executable + * Added: trunk/FlowDesigner/data-flow/src/SetMessageNode.cc =================================================================== --- trunk/FlowDesigner/data-flow/src/SetMessageNode.cc (rev 0) +++ trunk/FlowDesigner/data-flow/src/SetMessageNode.cc 2009-01-13 21:43:38 UTC (rev 2327) @@ -0,0 +1,81 @@ +/* + * MailBoxNode.cpp + * FlowDesigner + * + * Created by Pascal Beaudry on 08-11-17. + * Copyright 2008 Laborius. All rights reserved. + * + */ + +#include "BufferedNode.h" +#include "Node.h" +#include "MailBox.h" + + +namespace FD { + +using namespace std; + +class SetMessageNode; + +DECLARE_NODE(SetMessageNode) +/*Node + * + * @name SetMessageNode + * @category Mail + * @description Mailbox to keep the newest data between loops + * + * @input_name INPUT + * @input_type ObjectRef + * @input_description object to mail + * + * @output_name OUTPUT + * @output_type ObjectRef + * @output_description object to mail + * + * @parameter_name MessageBox_Name + * @parameter_type string + * @parameter_description name + * +END*/ +class SetMessageNode : public BufferedNode { + + protected: + int input1ID; + int outputID; + std::string mailboxName; + MessageBox* mailbox; + + public: + SetMessageNode(string nodeName, ParameterSet params) + : BufferedNode(nodeName, params) + { + input1ID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + //Get messagebox name + mailboxName = object_cast<String> ( parameters.get("MessageBox_Name")); + + //Get mailbox + MessageBoxManager* manager= MessageBoxManager::getInstance(); + mailbox= manager->getMessageBoxFromName(mailboxName); + } + + void calculate(int output_id, int count, Buffer &out) + { + //Get input data from previous node(s).*/ + ObjectRef input1Value = getInput(input1ID, count); + ObjectRef valueToSend = input1Value; + if(DEBUG){ + cout<<'\n'<< "input1Value = "<< input1Value<<'\n'; + cout<<'\n'<< "set "<< valueToSend<<'\n'; + } + mailbox->set(valueToSend); + + + out[count] = input1Value; + } + +}; + +} \ No newline at end of file Property changes on: trunk/FlowDesigner/data-flow/src/SetMessageNode.cc ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-09 23:36:21
|
Revision: 2326 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2326&view=rev Author: albertop7 Date: 2009-01-09 23:36:16 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Fixed CMakeList.txt. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt Modified: trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-09 23:29:36 UTC (rev 2325) +++ trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-09 23:36:16 UTC (rev 2326) @@ -4,7 +4,6 @@ DiscreteSource.cc ComplexGaussian.cc Constellation.cc - Constellation-dvbt.cc ConstellationMapper.cc OFDModulator.cc LLRComputer.cc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-09 23:29:38
|
Revision: 2325 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2325&view=rev Author: albertop7 Date: 2009-01-09 23:29:36 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Added OFDM modulator and demodulator headers. Added Inerleaver.h and LLRComputer.h. Minor changes to other files. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/include/Constellation.h trunk/FlowDesigner/toolbox/communications/include/ConstellationMapper.h trunk/FlowDesigner/toolbox/communications/include/macros_math.h Added Paths: ----------- trunk/FlowDesigner/toolbox/communications/include/Interleaver.h trunk/FlowDesigner/toolbox/communications/include/LLRComputer.h trunk/FlowDesigner/toolbox/communications/include/OFDDemodulator.h trunk/FlowDesigner/toolbox/communications/include/OFDModulator.h Modified: trunk/FlowDesigner/toolbox/communications/include/Constellation.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/Constellation.h 2009-01-09 23:26:04 UTC (rev 2324) +++ trunk/FlowDesigner/toolbox/communications/include/Constellation.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -1,6 +1,9 @@ // Copyright (C) 2008 Alberto Perotti // Author: Alberto Perotti +#ifndef _CONSTELLATION_H_ +#define _CONSTELLATION_H_ + #include "Object.h" #include "ParameterSet.h" #include "Vector.h" @@ -14,7 +17,7 @@ class Constellation : public vector<complex<float> > { - int nbits; + int d_nbits; int nsignals; float Es; enum modType {PAM, PSK, QAM, FILE_T}; @@ -27,17 +30,10 @@ Constellation(); Constellation(ParameterSet params); virtual ~Constellation(){}; -/* - void printOn(ostream &out) const - { - out << "<Constellation " << endl; - out << "<nbits " << nbits << ">" << endl; - out << "<nsignals " << nsignals << ">" << endl; - out << "<Es " << Es << ">" << endl; - out << "<modType " << type << ">" << endl; - out << ">\n"; - } -*/ + + int nbits() const {return d_nbits;} }; } //namespace FD + +#endif // _CONSTELLATION_H_ Modified: trunk/FlowDesigner/toolbox/communications/include/ConstellationMapper.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/ConstellationMapper.h 2009-01-09 23:26:04 UTC (rev 2324) +++ trunk/FlowDesigner/toolbox/communications/include/ConstellationMapper.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -1,6 +1,9 @@ // Copyright (C) 2008 Alberto Perotti // Author: Alberto Perotti +#ifndef _CONSTELLATIONMAPPER_H_ +#define _CONSTELLATIONMAPPER_H_ + #include "BufferedNode.h" #include "Buffer.h" #include "Vector.h" @@ -23,7 +26,7 @@ // enum modType {PAM, PSK, QAM, FILE_T}; // modType type; // RCPtr<Vector<complex<float> > > Xiptr; - Constellation Xii; + Constellation Xi; // string filename; public: @@ -34,3 +37,5 @@ }; }//namespace FD + +#endif // _CONSTELLATIONMAPPER_H_ Added: trunk/FlowDesigner/toolbox/communications/include/Interleaver.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/Interleaver.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/Interleaver.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -0,0 +1,29 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#ifndef _INTERLEAVER_H_ +#define _INTERLEAVER_H_ + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" + +using namespace std; + +namespace FD { + +class Interleaver : public BufferedNode { +protected: + int inputID; + int outputID; + int length; + Vector<int> perm; + bool inverse; + +public: + Interleaver(string nodeName, ParameterSet params); + void calculate(int output_id, int count, Buffer &out); +}; + +}//namespace FD +#endif // _INTERLEAVER_H_ Added: trunk/FlowDesigner/toolbox/communications/include/LLRComputer.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/LLRComputer.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/LLRComputer.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -0,0 +1,47 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#ifndef _LLRCOMPUTER_H_ +#define _LLRCOMPUTER_H_ + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" +#include <stdlib.h> +#include <math.h> +#include "macros_math.h" +#include "Constellation.h" + +using namespace std; + +namespace FD { + +class LLRComputer : public BufferedNode { + + int inputID; + int outputID; + int d_nbits; + int nsignals; + float Es; + enum modType {PAM, PSK, QAM, FILE_T}; + modType type; + // RCPtr<Vector<complex<float> > > Xiptr; + Constellation Xi; + string filename; + float sigma; + bool bit_llrs; + vector<float> tllr; + +public: + LLRComputer(){ ParameterSet ps;}; + LLRComputer(string nodeName, ParameterSet params); + + void calculate(int output_id, int count, Buffer &out); + float calculate(complex<float> s, int bit); // TODO: should return a vector<float> + + int nbits(){ return d_nbits;}; +}; // class LLRComputer + +} // namespace FD + +#endif // _LLRCOMPUTER_H_ Added: trunk/FlowDesigner/toolbox/communications/include/OFDDemodulator.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/OFDDemodulator.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/OFDDemodulator.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -0,0 +1,72 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#ifndef _OFDDEMODULATOR_H_ +#define _OFDDEMODULATOR_H_ + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" +#include <stdlib.h> +#include <math.h> +#include "Constellation.h" +#include "LLRComputer.h" + +#ifdef FFTW3_FOUND +#include "fftw3.h" +#endif + +using namespace std; + +namespace FD { + + +class OFDDemodulator : public BufferedNode { + + int inputID; + int outputID; + + int ncarriers; // Total number of carriers ( = FFT size) + int lprefix; // Length of cyclic prefix + Vector<float> gain; // Gains vector + + int ndatacarriers; // TODO: remove if not used + int npilotcarriers; + int nothercarriers; + int ndatabits; + + // Vector<Constellation> Xi; // Set of available constellations + vector<LLRComputer> lc; // Set of LLR computers + + enum CarrierType {DATA, PILOT, OTHER}; + vector<enum CarrierType> typeofcarrier; + vector<int> Xiforcarrier; // Index of constellation for each carrier + +#ifdef FFTW3_FOUND + fftw_plan p; + fftw_complex *fft_in, *fft_out; +#else + Vector<complex<float> > fft_in; + Vector<complex<float> > fft_out; +#endif + + // MTRand rng; // Used to simulate pilot symbols + + virtual enum CarrierType getCarrierType(int carrierindex){return DATA;} + virtual int getConstellation(int carrierindex){return 0;} + // virtual int getPilotSymbol(int carrierindex) + // { + // return rng.randInt((1 << Xi[carrierindex].nbits()) - 1); + // } + +public: + OFDDemodulator(string nodeName, ParameterSet params); + ~OFDDemodulator(); + + void calculate(int output_id, int count, Buffer &out); + +}; + +}//namespace FD + +#endif // _OFDDEMODULATOR_H_ Added: trunk/FlowDesigner/toolbox/communications/include/OFDModulator.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/OFDModulator.h (rev 0) +++ trunk/FlowDesigner/toolbox/communications/include/OFDModulator.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -0,0 +1,66 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" +#include <stdlib.h> +#include <math.h> +#include "Constellation.h" +#include "MersenneTwister.h" + +#ifdef FFTW3_FOUND +#include "fftw3.h" +#endif + +using namespace std; + +namespace FD { + + +class OFDModulator : public BufferedNode { + + int inputID; + int outputID; + + int ncarriers; // Total number of carriers ( = FFT size) + int lprefix; // Length of cyclic prefix + Vector<float> gain; // Gains vector + + int ndatacarriers; // TODO: remove if not used + int npilotcarriers; + int nothercarriers; + int ndatabits; + + Vector<Constellation> Xi; // Set of available constellations + + enum CarrierType {DATA, PILOT, OTHER}; + vector<enum CarrierType> typeofcarrier; + vector<int> Xiforcarrier; // Index of constellation for each carrier + +#ifdef FFTW3_FOUND + fftw_plan p; + fftw_complex *fft_in, *fft_out; +#else + Vector<complex<float> > fft_in; + Vector<complex<float> > fft_out; +#endif + + MTRand rng; // Used to simulate pilot symbols + + virtual enum CarrierType getCarrierType(int carrierindex){return DATA;} + virtual int getConstellation(int carrierindex){return 0;} + virtual int getPilotSymbol(int carrierindex) + { + return rng.randInt((1 << Xi[carrierindex].nbits()) - 1); + } + +public: + OFDModulator(string nodeName, ParameterSet params); + ~OFDModulator(); + + void calculate(int output_id, int count, Buffer &out); + +}; + +}//namespace FD Modified: trunk/FlowDesigner/toolbox/communications/include/macros_math.h =================================================================== --- trunk/FlowDesigner/toolbox/communications/include/macros_math.h 2009-01-09 23:26:04 UTC (rev 2324) +++ trunk/FlowDesigner/toolbox/communications/include/macros_math.h 2009-01-09 23:29:36 UTC (rev 2325) @@ -1,6 +1,8 @@ // Copyright (C) 2008 Alberto Perotti // Author: Alberto Perotti +#ifndef _MACROS_MATH_H_ +#define _MACROS_MATH_H_ // Some useful constants @@ -17,3 +19,6 @@ #define BIN2GRAY(a) (a ^ (a >> 1)) #define MAXSTAR(a, b) (MAX(a, b) + log(1 + exp(-ABS(a - b)))) + + +#endif // _MACROS_MATH_H_ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-09 23:26:30
|
Revision: 2324 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2324&view=rev Author: albertop7 Date: 2009-01-09 23:26:04 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Added ofdm-ber.n : test OFDM mo-demodulator. Minor changes to other examples. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/examples/16qam-ber.n trunk/FlowDesigner/toolbox/communications/examples/16qam-mi.n trunk/FlowDesigner/toolbox/communications/examples/32qam-ber.n trunk/FlowDesigner/toolbox/communications/examples/32qam-mi.n trunk/FlowDesigner/toolbox/communications/examples/64qam-ber.n trunk/FlowDesigner/toolbox/communications/examples/8psk-ber.n trunk/FlowDesigner/toolbox/communications/examples/8psk-mi.n trunk/FlowDesigner/toolbox/communications/examples/bpsk-ber.n trunk/FlowDesigner/toolbox/communications/examples/bpsk-mi.n trunk/FlowDesigner/toolbox/communications/examples/bpsk.n trunk/FlowDesigner/toolbox/communications/examples/qpsk-ber.n trunk/FlowDesigner/toolbox/communications/examples/qpsk-mi.n Added Paths: ----------- trunk/FlowDesigner/toolbox/communications/examples/ofdm-ber.n Modified: trunk/FlowDesigner/toolbox/communications/examples/16qam-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/16qam-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/16qam-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="QAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="4" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="4.00" description="Average symbol energy per complex dimension."/> @@ -45,12 +45,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/16qam-mi.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/16qam-mi.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/16qam-mi.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="QAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="4" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="4.00" description="Average symbol energy per complex dimension."/> @@ -45,9 +45,9 @@ <Parameter name="NSYMBOLS" type="int" value="16" description="Number of symbols in the source alphabet."/> </Node> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="3" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="3" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="4" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="5" from="DiscreteSource_0" output="OUTPUT" to="MutualInf_6" input="INPUT_REF"/> <ProbeLink id="6" from="LLRComputer_3" output="OUTPUT" to="MutualInf_6" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/32qam-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/32qam-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/32qam-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="QAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="5" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="5.00" description="Average symbol energy per complex dimension."/> @@ -45,12 +45,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/32qam-mi.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/32qam-mi.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/32qam-mi.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="QAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="5" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="5.00" description="Average symbol energy per complex dimension."/> @@ -45,9 +45,9 @@ <Parameter name="NSYMBOLS" type="int" value="32" description="Number of symbols in the source alphabet."/> </Node> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="3" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="3" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="4" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="5" from="DiscreteSource_0" output="OUTPUT" to="MutualInf_6" input="INPUT_REF"/> <ProbeLink id="6" from="LLRComputer_3" output="OUTPUT" to="MutualInf_6" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/64qam-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/64qam-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/64qam-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="QAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="6" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="6.00" description="Average symbol energy per complex dimension."/> @@ -45,12 +45,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/8psk-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/8psk-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/8psk-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PSK" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="3" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="3.00" description="Average symbol energy per complex dimension."/> @@ -45,12 +45,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/8psk-mi.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/8psk-mi.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/8psk-mi.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PSK" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="3" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="3.00" description="Average symbol energy per complex dimension."/> @@ -45,9 +45,9 @@ <Parameter name="NSYMBOLS" type="int" value="8" description="Number of symbols in the source alphabet."/> </Node> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="3" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="3" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="4" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="5" from="DiscreteSource_0" output="OUTPUT" to="MutualInf_6" input="INPUT_REF"/> <ProbeLink id="6" from="LLRComputer_3" output="OUTPUT" to="MutualInf_6" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/bpsk-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/bpsk-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/bpsk-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -17,7 +17,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="1" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="1.00" description="Average symbol energy per complex dimension."/> @@ -46,12 +46,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/bpsk-mi.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/bpsk-mi.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/bpsk-mi.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -21,7 +21,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="1" description="Number of bits per symbol. For QAM, number of bits per dimension."/> <Parameter name="ENERGY" type="float" value="1.00" description="Average symbol energy per complex dimension."/> @@ -45,9 +45,9 @@ <Parameter name="MIN_ESTLENGTH" type="int" value="10000" description="Minimum estimation length."/> <Parameter name="NSYMBOLS" type="int" value="2" description="Number of symbols in the source alphabet."/> </Node> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="3" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="3" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="4" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="5" from="DiscreteSource_0" output="OUTPUT" to="MutualInf_6" input="INPUT_REF"/> <ProbeLink id="6" from="LLRComputer_3" output="OUTPUT" to="MutualInf_6" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/bpsk.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/bpsk.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/bpsk.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -17,7 +17,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PAM" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="1" description="Number of bits per symbol. For QAM, number of bits per dimension."/> <Parameter name="ENERGY" type="float" value="1.00" description="Average symbol energy per complex dimension."/> @@ -46,12 +46,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Added: trunk/FlowDesigner/toolbox/communications/examples/ofdm-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/ofdm-ber.n (rev 0) +++ trunk/FlowDesigner/toolbox/communications/examples/ofdm-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -0,0 +1,71 @@ +#!/usr/bin/env batchflow +<?xml version="1.0"?> +<Document docName="ofdm-ber.n" connectionPort="0"> + <Network type="subnet" name="MAIN"> + <Node name="loop_0" type="loop" x="-176.000000" y="23.000000"> + <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> + </Node> + <NetOutput name="BER" node="loop_0" terminal="BER" object_type="any" description="No description available"/> + <NetOutput name="NBITS" node="loop_0" terminal="NBITS" object_type="any" description="No description available"/> + <NetOutput name="NBERS" node="loop_0" terminal="NBERS" object_type="any" description="No description available"/> + <NetOutput name="TXPOW" node="loop_0" terminal="TXPOW" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> + <Network type="iterator" name="loop"> + <Node name="DiscreteSource_0" type="DiscreteSource" x="-555.000000" y="-143.000000"> + <Parameter name="LENGTH" type="int" value="512" description="Number of generated symbols."/> + <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> + <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> + </Node> + <Node name="BitErrors_5" type="BitErrors" x="17.000000" y="-62.000000"> + <Parameter name="MIN_NBERS" type="int" value="1000" description="Number of bit errors to count."/> + </Node> + <Node name="Add_6" type="Add" x="-255.000000" y="-184.000000"/> + <Node name="ComplexGaussian_7" type="ComplexGaussian" x="-388.000000" y="-303.000000"> + <Parameter name="LENGTH" type="int" value="272" description="Number of generated samples"/> + <Parameter name="MEAN" type="float" value="0.00" description="Mean"/> + <Parameter name="VARIANCE" type="float" value="0.125" description="Variance"/> + <Parameter name="SEED" type="int" value="-1" description="Generator seed (negative integer)"/> + </Node> + <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> + <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> + <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> + <Node name="OFDModulator_9" type="OFDModulator" x="-396.000000" y="-160.000000"> + <Parameter name="NCARRIERS" type="int" value="256" description="Number of carriers."/> + <Parameter name="LPREFIX" type="int" value="16" description="Length of cyclic prefix"/> + <Parameter name="FILENAME" type="string" value="Xi.txt" description="Name of file containing the OFDModulator."/> + </Node> + <Node name="OFDDemodulator_8" type="OFDDemodulator" x="-148.000000" y="-182.000000"> + <Parameter name="NCARRIERS" type="int" value="256" description="Number of carriers."/> + <Parameter name="LPREFIX" type="int" value="16" description="Length of cyclic prefix"/> + <Parameter name="FILENAME" type="string" value="Xi.txt" description="Name of file containing the OFDDemodulator."/> + </Node> + <Node name="HardDetector_9" type="HardDetector" x="-63.000000" y="-198.000000"/> + <Node name="AveragePower_10" type="AveragePower" x="-266.000000" y="-41.000000"> + <Parameter name="MEMORY" type="bool" value="true" description="Perform average across blocks"/> + </Node> + <Node name="Print_11" type="Print" x="-170.000000" y="-39.000000"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> + <ProbeLink id="2" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> + <ProbeLink id="3" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> + <ProbeLink id="4" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> + <ProbeLink id="5" from="BitErrors_5" output="NBITS" to="Print_10" input="INPUT"/> + <ProbeLink id="6" from="DiscreteSource_0" output="OUTPUT" to="OFDModulator_9" input="INPUT"/> + <ProbeLink id="7" from="OFDModulator_9" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="8" from="Add_6" output="OUTPUT" to="OFDDemodulator_8" input="INPUT"/> + <ProbeLink id="9" from="OFDDemodulator_8" output="OUTPUT" to="HardDetector_9" input="INPUT"/> + <ProbeLink id="10" from="HardDetector_9" output="OUTPUT" to="BitErrors_5" input="INPUT"/> + <ProbeLink id="11" from="OFDModulator_9" output="OUTPUT" to="AveragePower_10" input="INPUT"/> + <ProbeLink id="12" from="AveragePower_10" output="OUTPUT" to="Print_11" input="INPUT"/> + <NetOutput name="BER" node="Print_8" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetOutput name="NBERS" node="Print_9" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetOutput name="NBITS" node="Print_10" terminal="OUTPUT" object_type="any" description="No description available"/> + <NetCondition name="CONDITION" node="BitErrors_5" terminal="NOT_FINISHED"/> + <NetOutput name="TXPOW" node="Print_11" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.10.0" label="Automatic-note"/> + </Network> +</Document> Property changes on: trunk/FlowDesigner/toolbox/communications/examples/ofdm-ber.n ___________________________________________________________________ Added: svn:executable + * Modified: trunk/FlowDesigner/toolbox/communications/examples/qpsk-ber.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/qpsk-ber.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/qpsk-ber.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="ALPHABETSIZE" type="int" value="2" description="Number of symbols in the source alphabet."/> <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PSK" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="2" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="2.00" description="Average symbol energy per complex dimension."/> @@ -45,12 +45,12 @@ <Node name="Print_8" type="Print" x="116.000000" y="-131.000000"/> <Node name="Print_9" type="Print" x="147.000000" y="-46.000000"/> <Node name="Print_10" type="Print" x="134.000000" y="58.000000"/> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="LLRComputer_3" output="OUTPUT" to="MLDetector_4" input="INPUT"/> <ProbeLink id="3" from="MLDetector_4" output="OUTPUT" to="BitErrors_5" input="INPUT"/> <ProbeLink id="4" from="DiscreteSource_0" output="OUTPUT" to="BitErrors_5" input="INPUT_REF"/> <ProbeLink id="5" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="6" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="6" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="7" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="8" from="BitErrors_5" output="BER" to="Print_8" input="INPUT"/> <ProbeLink id="9" from="BitErrors_5" output="NBERS" to="Print_9" input="INPUT"/> Modified: trunk/FlowDesigner/toolbox/communications/examples/qpsk-mi.n =================================================================== --- trunk/FlowDesigner/toolbox/communications/examples/qpsk-mi.n 2009-01-09 23:22:29 UTC (rev 2323) +++ trunk/FlowDesigner/toolbox/communications/examples/qpsk-mi.n 2009-01-09 23:26:04 UTC (rev 2324) @@ -16,7 +16,7 @@ <Parameter name="SEED" type="int" value="-1" description="RNG seed."/> </Node> - <Node name="Constellation_1" type="Constellation" x="-391.000000" y="-178.000000"> + <Node name="ConstellationMapper_1" type="ConstellationMapper" x="-391.000000" y="-178.000000"> <Parameter name="TYPE" type="string" value="PSK" description="Modulation type (PAM, PSK, QAM, FILE)"/> <Parameter name="NBITS" type="int" value="2" description="Number of bits per symbol."/> <Parameter name="ENERGY" type="float" value="2.00" description="Average symbol energy per complex dimension."/> @@ -45,9 +45,9 @@ <Parameter name="NSYMBOLS" type="int" value="4" description="Number of symbols in the source alphabet."/> </Node> - <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="Constellation_1" input="INPUT"/> + <ProbeLink id="1" from="DiscreteSource_0" output="OUTPUT" to="ConstellationMapper_1" input="INPUT"/> <ProbeLink id="2" from="Add_6" output="OUTPUT" to="LLRComputer_3" input="INPUT"/> - <ProbeLink id="3" from="Constellation_1" output="OUTPUT" to="Add_6" input="INPUT1"/> + <ProbeLink id="3" from="ConstellationMapper_1" output="OUTPUT" to="Add_6" input="INPUT1"/> <ProbeLink id="4" from="ComplexGaussian_7" output="OUTPUT" to="Add_6" input="INPUT2"/> <ProbeLink id="5" from="DiscreteSource_0" output="OUTPUT" to="MutualInf_6" input="INPUT_REF"/> <ProbeLink id="6" from="LLRComputer_3" output="OUTPUT" to="MutualInf_6" input="INPUT"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-09 23:23:00
|
Revision: 2323 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2323&view=rev Author: albertop7 Date: 2009-01-09 23:22:29 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Added OFDM modulator and OFDM demodulator blocks. Added Interleaver and SpreadInterleaver blocks. Added AveragePower block. Added HardDetector block. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt trunk/FlowDesigner/toolbox/communications/src/Constellation.cc trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc trunk/FlowDesigner/toolbox/communications/src/LLRComputer.cc Added Paths: ----------- trunk/FlowDesigner/toolbox/communications/src/AveragePower.cc trunk/FlowDesigner/toolbox/communications/src/HardDetector.cc trunk/FlowDesigner/toolbox/communications/src/Interleaver.cc trunk/FlowDesigner/toolbox/communications/src/OFDDemodulator.cc trunk/FlowDesigner/toolbox/communications/src/OFDModulator.cc trunk/FlowDesigner/toolbox/communications/src/SpreadInterleaver.cc Added: trunk/FlowDesigner/toolbox/communications/src/AveragePower.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/AveragePower.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/AveragePower.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,96 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "Node.h" +#include "Vector.h" + +using namespace std; + +namespace FD { + +class AveragePower; + +DECLARE_NODE(AveragePower) +/*Node + * + * @name AveragePower + * @category Communications:Statistics + * @description Estimate the bit error rate (BER) + * + * @input_name INPUT + * @input_type Vector<complex<float> > + * @input_description Input signal. + * + * @output_name OUTPUT + * @output_type float + * @output_description Estimated power. + * + * @parameter_name MEMORY + * @parameter_type bool + * @parameter_description Perform average across blocks + * @parameter_value true + + * +END*/ + + +class AveragePower : public Node { + + int inputID; + int outputID; + + double APow; + unsigned long int nsamples; + bool memory; + +public: +AveragePower(string nodeName, ParameterSet params) +: Node(nodeName, params) +{ + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if (params.exist("MEMORY")) + memory = dereference_cast<bool>(params.get("MEMORY")); + else memory = true; + + APow = 0.; + nsamples = 0; +} + + +void reset() +{ + Node::reset(); + APow = 0.; + nsamples = 0; +} + + +ObjectRef getOutput(int output_id, int count) +{ + unsigned int i; + unsigned int length; + double tpow = 0.; + + ObjectRef inputRef = getInput(inputID, count); + const Vector<complex<float> > &inputVec = object_cast<Vector<complex<float> > >(inputRef); + length = inputVec.size(); + + if(!memory) reset(); + + for(i = 0; i < length; i++) + { + tpow += inputVec[i].real() * inputVec[i].real(); + tpow += inputVec[i].imag() * inputVec[i].imag(); + } + + APow = APow * (nsamples / float(nsamples + length)) + tpow / float(nsamples + length); + nsamples += length; + + return ObjectRef(Float::alloc(float(APow))); +} + +}; // class AveragePower + +} // namespace FD Modified: trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-08 15:43:06 UTC (rev 2322) +++ trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-09 23:22:29 UTC (rev 2323) @@ -4,12 +4,19 @@ DiscreteSource.cc ComplexGaussian.cc Constellation.cc + Constellation-dvbt.cc ConstellationMapper.cc + OFDModulator.cc LLRComputer.cc MLDetector.cc + OFDDemodulator.cc BitErrors.cc + HardDetector.cc MutualInf.cc Histogram.cc + AveragePower.cc + Interleaver.cc + SpreadInterleaver.cc ) find_package(FFTW3) @@ -25,7 +32,7 @@ set_target_properties(libcommunications-dynamic PROPERTIES OUTPUT_NAME communications.tlb) -target_link_libraries(libcommunications-dynamic libflow-dynamic ${LIBXML2_LIBRARIES}) +target_link_libraries(libcommunications-dynamic libflow-dynamic ${LIBXML2_LIBRARIES} ${FFTW3_LIBRARY}) install(TARGETS libcommunications-dynamic DESTINATION ${FD_TOOLBOX_DIR}/communications) Modified: trunk/FlowDesigner/toolbox/communications/src/Constellation.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/Constellation.cc 2009-01-08 15:43:06 UTC (rev 2322) +++ trunk/FlowDesigner/toolbox/communications/src/Constellation.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -38,11 +38,11 @@ else type = PAM; if (params.exist("NBITS")) - nbits = dereference_cast<int> (params.get("NBITS")); + d_nbits = dereference_cast<int> (params.get("NBITS")); else - nbits = 1; + d_nbits = 1; - nsignals = 1 << nbits; + nsignals = 1 << d_nbits; if (params.exist("ENERGY")) Es = dereference_cast<float> (params.get("ENERGY")); @@ -55,7 +55,7 @@ filename = object_cast<String> (params.get("FILENAME")); } - resize(1 << nbits); + resize(1 << d_nbits); complex<float> tmpc; double Es0 = 0.; @@ -78,8 +78,8 @@ } break; case QAM: - nbh = 1 << (nbits >> 1); - nbhp = 1 << ((nbits + 1) >> 1); + nbh = 1 << (d_nbits >> 1); + nbhp = 1 << ((d_nbits + 1) >> 1); for(i = 0; i < nbhp; i++) { for(j = 0; j < nbh; j++) @@ -112,7 +112,7 @@ Es0 += this->at(ui).imag() * this->at(ui).imag(); } nsignals = this->size(); - nbits = floor(log2(nsignals)); + d_nbits = floor(log2(nsignals)); Es0 /= float(nsignals); for(i = 0; i < nsignals; i++) { Modified: trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc 2009-01-08 15:43:06 UTC (rev 2322) +++ trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -27,7 +27,7 @@ * @parameter_name TYPE * @parameter_type string * @parameter_description Modulation type (PAM, PSK, QAM, FILE). - * @parameter_value PSK + * @parameter_value PAM;PSK;QAM;FILE * * @parameter_name NBITS * @parameter_type int @@ -47,15 +47,12 @@ ConstellationMapper::ConstellationMapper(string nodeName, ParameterSet params) -: BufferedNode(nodeName, params), Xii(params) +: BufferedNode(nodeName, params), Xi(params) { inputID = addInput("INPUT"); outputID = addOutput("OUTPUT"); - if (parameters.exist("NBITS")) - nbits = dereference_cast<int> (parameters.get("NBITS")); - else nbits = 1; - + nbits = Xi.nbits(); } @@ -86,7 +83,7 @@ { k += (inputVec[i * nbits + j] & 1) << j; } - output[i] = Xii[k]; + output[i] = Xi[k]; } } Added: trunk/FlowDesigner/toolbox/communications/src/HardDetector.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/HardDetector.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/HardDetector.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,65 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "BufferedNode.h" +#include "Vector.h" + +using namespace std; + +namespace FD { + +class HardDetector; + +DECLARE_NODE(HardDetector) +/*Node + * + * @name HardDetector + * @category Communications:Receiver + * @description Compute estimated bits from binary LLRs + * + * @input_name INPUT + * @input_type Vector<float> + * @input_description LLR input sequence. + * + * @output_name OUTPUT + * @output_type Vector<int> + * @output_description Estimated bits. + * +END*/ + + +class HardDetector : public BufferedNode { + + int inputID; + int outputID; + +public: +HardDetector(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params) +{ + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); +} + + +void calculate(int output_id, int count, Buffer &out) +{ + int i; + + ObjectRef inputRef = getInput(inputID, count); + const Vector<float> &inputVec = object_cast<Vector<float> >(inputRef); + int length = inputVec.size(); + + Vector<int> &output = *Vector<int>::alloc(length); + + out[count] = &output; + + for (i = 0; i < length; i++) + { + output[i] = (inputVec[i] >= 0.) ? 1 : 0; + } + +} +}; + +}//namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/Interleaver.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/Interleaver.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/Interleaver.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,88 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "Interleaver.h" + +using namespace FD; + + +DECLARE_NODE(Interleaver) +/*Node + * + * @name Interleaver + * @category Communications:Tools + * @description Perform a pemutation of the input block. + * + * @input_name INPUT + * @parameter_type int + * @input_description Input block. + * + * @output_name OUTPUT + * @parameter_type int + * @output_description Permuted block. + * + * @parameter_name LENGTH + * @parameter_type int + * @parameter_description Block length. + * @parameter_value 1 + * + * @parameter_name INVERSE + * @parameter_type bool + * @parameter_description If true, inverse permutation is applied. + * @parameter_value false + * +END*/ + + +Interleaver::Interleaver(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) +{ + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if(parameters.exist("LENGTH")) + length = dereference_cast<int> (parameters.get("LENGTH")); + else + length = 1; + + if(parameters.exist("INVERSE")) + inverse = dereference_cast<bool>(parameters.get("INVERSE")); + else + inverse = false; + + perm.resize(length); + for(int i = 0; i < length; i++) perm[i] = i; +} + + +void Interleaver::calculate(int output_id, int count, Buffer &out) +{ + ObjectRef inputRef = getInput(inputID, count); + + // TODO: implement this function in a type-independent way. + + const Vector<int> &inputVec = object_cast<Vector<int> >(inputRef); + if(length != inputVec.size()) + throw new NodeException(this, "Length of input vector differs from interleaver size.", __FILE__, __LINE__); + + Vector<int> &output = *Vector<int>::alloc(length); + + out[count] = &output; + + if(inverse) + { + for(int i = 0; i < length; i++) + { + output[i] = inputVec[perm[i]]; + } + } + else + { + for(int i = 0; i < length; i++) + { + output[perm[i]] = inputVec[i]; + } + } + + +} + Modified: trunk/FlowDesigner/toolbox/communications/src/LLRComputer.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/LLRComputer.cc 2009-01-08 15:43:06 UTC (rev 2322) +++ trunk/FlowDesigner/toolbox/communications/src/LLRComputer.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -7,13 +7,12 @@ #include <stdlib.h> #include <math.h> #include "macros_math.h" +#include "LLRComputer.h" using namespace std; namespace FD { -class LLRComputer; - DECLARE_NODE(LLRComputer) /*Node * @@ -54,159 +53,52 @@ * @parameter_description Variance of Gaussian noise. * @parameter_value 1. * + * @parameter_name BIT_LLRS + * @parameter_type bool + * @parameter_description If true, comupte bit LLRs; if false, compute symbol LLRs. + * @parameter_value false; true END*/ -class LLRComputer : public BufferedNode { - - int inputID; - int outputID; - int nbits; - int nsignals; - float Es; - enum modType {PAM, PSK, QAM, FILE_T}; - modType type; - RCPtr<Vector<complex<float> > > Xiptr; - string filename; - float sigma; - -public: -LLRComputer(string nodeName, ParameterSet params) -: BufferedNode(nodeName, params) +LLRComputer::LLRComputer(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params), Xi(params) { - int i, j; - int nbh, nbhp; - unsigned int k; - inputID = addInput("INPUT"); outputID = addOutput("OUTPUT"); - if (parameters.exist("TYPE")) - { - if (object_cast<String> (parameters.get("TYPE")) == "PAM") - type = PAM; - else if (object_cast<String> (parameters.get("TYPE")) == "PSK") - type = PSK; - else if (object_cast<String> (parameters.get("TYPE")) == "QAM") - type = QAM; - else if (object_cast<String> (parameters.get("TYPE")) == "FILE") - type = FILE_T; - else - new NodeException(NULL, "Unknown function type", __FILE__, __LINE__); - } else type = PAM; + d_nbits = Xi.nbits(); + nsignals = 1 << d_nbits; - if (parameters.exist("NBITS")) - nbits = dereference_cast<int> (parameters.get("NBITS")); - else - nbits = 1; - - if (parameters.exist("ENERGY")) - Es = dereference_cast<float> (parameters.get("ENERGY")); - else - Es = 1.; - if (parameters.exist("VARIANCE")) sigma = sqrt(dereference_cast<float> (parameters.get("VARIANCE"))); else sigma = 1.; + if (parameters.exist("BIT_LLRS")) + bit_llrs = sqrt(dereference_cast<bool> (parameters.get("BIT_LLRS"))); + else bit_llrs = false; - if(parameters.exist("FILENAME")) - { - filename = object_cast<String> (parameters.get("FILENAME")); - } + tllr.resize(nsignals); - Xiptr = Vector<complex<float> >::alloc(1 << nbits); - Vector<complex<float> > &Xi = *Xiptr; - - complex<float> tmpc; - double Es0 = 0.; - ifstream ifs; - switch(type) - { - case PAM: - nsignals = 1 << nbits; - for (i = 0; i < nsignals; i++) - { - Xi[BIN2GRAY(i)] = complex<float>(nsignals - 1 - 2 * i, 0.); - Xi[BIN2GRAY(i)] *= sqrt((3. * Es) / float(nsignals * nsignals - 1.)); - } - break; - case PSK: - nsignals = 1 << nbits; - for (i = 0; i < nsignals; i++) - { - Xi[BIN2GRAY(i)] = complex<float>(cos((1 + 2 * i) * PI / float(nsignals)), - sin((1 + 2 * i) * PI / float(nsignals))); - Xi[BIN2GRAY(i)] *= sqrt(Es); - } - break; - case QAM: - nsignals = 1 << nbits; - nbh = 1 << (nbits >> 1); - nbhp = 1 << ((nbits + 1) >> 1); - for(i = 0; i < nbhp; i++) - { - for(j = 0; j < nbh; j++) - { - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)] = - complex<float>(nbhp - 1 - 2 * i, nbh - 1 - 2 * j); - Es0 += Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].real() * - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].real(); - Es0 += Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].imag() * - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].imag(); - } - } - Es0 /= float(nsignals); - for(i = 0; i < nbhp; i++) - { - for(j = 0; j < nbh; j++) - { - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)] *= sqrt(Es / Es0); - } - } - break; - case FILE_T: - ifs.open(filename.c_str()); - ifs >> Xi; - ifs.close(); - - for(k = 0; k < Xi.size(); k++) - { - Es0 += Xi[k].real() * Xi[k].real(); - Es0 += Xi[k].imag() * Xi[k].imag(); - } - nsignals = Xi.size(); - nbits = floor(log2(nsignals)); - if(nsignals > (1 << nbits)) - throw new NodeException(this, "Constellation loaded from file has non power of 2 size", __FILE__, __LINE__); - Es0 /= float(nsignals); - for(i = 0; i < nsignals; i++) - { - Xi[i] *= sqrt(Es / Es0); - } - break; - default: - ; - } - } -void calculate(int output_id, int count, Buffer &out) +void LLRComputer::calculate(int output_id, int count, Buffer &out) { - int i, j; + int i, j, k; + float llr0, llr1; ObjectRef inputRef = getInput(inputID, count); const Vector<complex<float> > &inputVec = object_cast<Vector<complex<float> > >(inputRef); int length = inputVec.size(); - Vector<float> &output = *Vector<float>::alloc(length * nsignals); - + Vector<float> &output = *Vector<float>::alloc(length * (bit_llrs ? d_nbits : nsignals)); out[count] = &output; - Vector<complex<float> > &Xi = *Xiptr; + + + // Compute symbol LLRs float yr, yi, mag; float sigma22 = 2. * sigma * sigma; for (i = 0; i < length; i++) @@ -216,18 +108,79 @@ mag = yr * yr + yi * yi; for(j = 0; j < nsignals; j++) { - output[i * nsignals + j] = mag - (yr - Xi[j].real()) * (yr - Xi[j].real()) - + tllr[j] = mag - (yr - Xi[j].real()) * (yr - Xi[j].real()) - (yi - Xi[j].imag()) * (yi - Xi[j].imag()); - output[i * nsignals + j] /= sigma22; + tllr[j] /= sigma22; + } + } + + + if(bit_llrs) + { + // Compute bit LLRs + for (i = 0; i < length; i++) + { + llr0 = -1.e9; + llr1 = -1.e9; + for(j = 0; j < d_nbits; j++) + { + for(k = 0; k < nsignals; k++) + { + if((k >> j) & 1) llr1 = MAXSTAR(llr1, tllr[k]); + else llr0 = MAXSTAR(llr0, tllr[k]); + } + output[i * d_nbits + j] = llr1 - llr0; + } } } + else + { + // Copy symbol LLRs + for (i = 0; i < length; i++) + { + for(j = 0; j < nsignals; j++) + { + output[i * nsignals + j] = tllr[j]; + } + } + } } +float LLRComputer::calculate(complex<float> x, int b) +{ -}; // class LLRComputer + int j, k; + float llr0, llr1; + + // Compute symbol LLR + float yr, yi, mag; + float sigma22 = 2. * sigma * sigma; + yr = x.real(); + yi = x.imag(); + mag = yr * yr + yi * yi; + for(j = 0; j < nsignals; j++) + { + tllr[j] = mag - (yr - Xi[j].real()) * (yr - Xi[j].real()) - + (yi - Xi[j].imag()) * (yi - Xi[j].imag()); + tllr[j] /= sigma22; + } + + + + // Compute bit LLR + llr0 = -1.e9; + llr1 = -1.e9; + for(k = 0; k < nsignals; k++) + { + if((k >> b) & 1) llr1 = MAXSTAR(llr1, tllr[k]); + else llr0 = MAXSTAR(llr0, tllr[k]); + } + return llr1 - llr0; + +} } // namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/OFDDemodulator.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/OFDDemodulator.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/OFDDemodulator.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,228 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "OFDDemodulator.h" + +using namespace std; + +namespace FD { + +DECLARE_NODE(OFDDemodulator) +/*Node + * + * @name OFDDemodulator + * @category Communications:Receiver + * @description OFDM demodulator. + * + * @input_name INPUT + * @input_type Vector<complex<float> > + * @input_description Input sequence of complex samples. + * + * @output_name OUTPUT + * @output_type Vector<float> + * @output_description LLRs on OFDM information bits. + * + * @parameter_name NCARRIERS + * @parameter_type int + * @parameter_description Number of carriers. + * @parameter_value 256 + * + * @parameter_name LPREFIX + * @parameter_type int + * @parameter_description Length of cyclic prefix + * @parameter_value 16 + * + * @parameter_name FILENAME + * @parameter_type string + * @parameter_description Name of file containing the OFDDemodulator. + * @parameter_value Xi.txt +END*/ + + +OFDDemodulator::OFDDemodulator(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params) +{ + int i; + + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if(parameters.exist("NCARRIERS")) + ncarriers = dereference_cast<int>(parameters.get("NCARRIERS")); + else ncarriers = 256; + if((1 << int(log2(ncarriers))) != ncarriers) + throw new NodeException(this, + "OFDDemodulator: ncarriers is not a power of 2.", __FILE__, __LINE__); + + gain.resize(ncarriers); + for(i = 0; i < ncarriers; i++) gain[i] = 1.; + +#ifdef FFTW3_FOUND + fft_in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * ncarriers); + fft_out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * ncarriers); +#else + fft_in.resize(ncarriers); + fft_out.resize(ncarriers); +#endif + + if(parameters.exist("LPREFIX")) + lprefix = dereference_cast<int>(parameters.get("LPREFIX")); + else lprefix = 16; + + if(lprefix < 0 || lprefix > ncarriers) + throw new NodeException(this, "OFDDemodulator: \ + length of cyclic prefix is invalid.", __FILE__, __LINE__); + + +#ifdef FFTW3_FOUND + // FFTW initialization + p = fftw_plan_dft_1d(ncarriers, fft_in, fft_out, FFTW_FORWARD, FFTW_ESTIMATE); + // TODO: check if + // FFTW_ESTIMATE is the + // best solution. +#endif + + // cout << "TP0" << endl; + // Xi.resize(4); + // lc.resize(4); + // cout << "TP1" << endl; + + ParameterSet ps; + ps.add(string("TYPE"), ObjectRef(new String("QAM"))); + ps.add(string("ENERGY"), ObjectRef(new Float(1.))); + ps.add(string("BIT_LLRS"), ObjectRef(new Bool(true))); + ps.add(string("NBITS"), ObjectRef(new Int(2))); + LLRComputer lc0(string("LC0"), ps); + lc.resize(1, lc0); + ps.add(string("NBITS"), ObjectRef(new Int(4))); + LLRComputer lc1(string("LC1"), ps); + lc.resize(2, lc1); + ps.add(string("NBITS"), ObjectRef(new Int(6))); + LLRComputer lc2(string("LC2"), ps); + lc.resize(3, lc2); + ps.add(string("NBITS"), ObjectRef(new Int(8))); + LLRComputer lc3(string("LC3"), ps); + lc.resize(4, lc3); + + // Determine the number of data carriers and pilot carriers + ndatacarriers = npilotcarriers = nothercarriers = 0; + ndatabits = 0; + typeofcarrier.resize(ncarriers); + Xiforcarrier.resize(ncarriers); + for(i = 0; i < ncarriers; i++) + { + typeofcarrier[i] = getCarrierType(i); + if(typeofcarrier[i] == DATA) ndatacarriers++; + else if(typeofcarrier[i] == PILOT) npilotcarriers++; + else nothercarriers++; + + Xiforcarrier[i] = getConstellation(i); + ndatabits += lc[Xiforcarrier[i]].nbits(); + } + + // cout << "OFDDemodulator: end of constructor." << endl; + +} + + +OFDDemodulator::~OFDDemodulator() +{ +#ifdef FFTW3_FOUND + fftw_destroy_plan(p); + fftw_free(fft_in); + fftw_free(fft_out); +#else + fft_in.destroy(); + fft_out.destroy(); +#endif +} + + + + + +void OFDDemodulator::calculate(int output_id, int count, Buffer &out) +{ + int i, j, k; + + ObjectRef inputRef = getInput(inputID, count); + const Vector<complex<float> > &inputVec = object_cast<Vector<complex<float> > >(inputRef); + int length = inputVec.size(); + if(length > ncarriers + lprefix) + throw new NodeException(this, "OFDDemodulator: length of input vector > ncarriers + lprefix.", + __FILE__, __LINE__); + + Vector<float> &output = *Vector<float>::alloc(ndatabits); + out[count] = &output; + + +#ifdef FFTW3_FOUND + + // Remove the cyclic prefix + for(k = 0; k < ncarriers; k++) + { + fft_in[k][0] = inputVec[k + lprefix].real(); + fft_in[k][1] = inputVec[k + lprefix].imag(); + } + + + // Compute the FFT + fftw_execute(p); + + + + // Compute LLRs on OFDM input bits + j = 0; // Data bit index + LLRComputer &lcomp = lc[Xiforcarrier[0]]; + complex<float> x; + float sqrn = sqrt(ncarriers); + for(i = 0; i < ncarriers; i++) + { + lcomp = lc[Xiforcarrier[i]]; + if(typeofcarrier[i] == DATA) + { + x = complex<float>(fft_out[(i + ncarriers / 2) % ncarriers][0], + fft_out[(i + ncarriers / 2) % ncarriers][1]); + x /= gain[i] * sqrn; + + // cout << i << ": " << x << endl; + + for(k = 0; k < lcomp.nbits(); k++) + { + output[j++] = lcomp.calculate(x, k); + } + } + } + + + + +#else // FFTW3_FOUND + + // Multiply each subcarrier by gain + /* + for(i = 0; i < ncarriers; i++) + { + fft_in[i] = gain[i] * inputVec[i]; + } */ + + + // Compute the FFT + // fftw_one(p, fft_in, fft_out); + throw new NodeException(this, "OFDDemodulator: FFTW3 not available.", __FILE__, __LINE__); + + + + // Add the cyclic prefix + /* + for(k = 0; k < lprefix; k++) + output[k] = fft_out[ncarriers - lprefix + k]; + for(k = 0; k < ncarriers; k++) + output[k + lprefix] = fft_out[k]; + */ + +#endif // FFTW3_FOUND + +} + +} //namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/OFDModulator.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/OFDModulator.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/OFDModulator.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,229 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "OFDModulator.h" + +using namespace std; + +namespace FD { + +DECLARE_NODE(OFDModulator) +/*Node + * + * @name OFDModulator + * @category Communications:Transmitter + * @description OFDM modulator. + * + * @input_name INPUT + * @input_type Vector<int> + * @input_description Input sequence of bits. + * + * @output_name OUTPUT + * @output_type Vector<complex<float> > + * @output_description The OFDM symbol. + * + * @parameter_name NCARRIERS + * @parameter_type int + * @parameter_description Number of carriers. + * @parameter_value 256 + * + * @parameter_name LPREFIX + * @parameter_type int + * @parameter_description Length of cyclic prefix + * @parameter_value 16 + * + * @parameter_name FILENAME + * @parameter_type string + * @parameter_description Name of file containing the OFDModulator. + * @parameter_value Xi.txt +END*/ + + +OFDModulator::OFDModulator(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params) +{ + int i; + + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if(parameters.exist("NCARRIERS")) + ncarriers = dereference_cast<int>(parameters.get("NCARRIERS")); + else ncarriers = 256; + if((1 << int(log2(ncarriers))) != ncarriers) + throw new NodeException(this, + "OFDModulator: ncarriers is not power of 2.", __FILE__, __LINE__); + + gain.resize(ncarriers); + for(i = 0; i < ncarriers; i++) gain[i] = 1.; + +#ifdef FFTW3_FOUND + fft_in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * ncarriers); + fft_out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * ncarriers); +#else + fft_in.resize(ncarriers); + fft_out.resize(ncarriers); +#endif + + if(parameters.exist("LPREFIX")) + lprefix = dereference_cast<int>(parameters.get("LPREFIX")); + else lprefix = 16; + + if(lprefix < 0 || lprefix > ncarriers) + throw new NodeException(this, "OFDModulator: \ + length of cyclic prefix is invalid.", __FILE__, __LINE__); + +#ifdef FFTW3_FOUND + // FFTW initialization + p = fftw_plan_dft_1d(ncarriers, fft_in, fft_out, FFTW_BACKWARD, FFTW_ESTIMATE); + // TODO: check if + // FFTW_ESTIMATE is the + // best solution. +#endif + + Xi.resize(4); + + + ParameterSet ps; + ps.add(string("TYPE"), ObjectRef(new String("QAM"))); + ps.add(string("ENERGY"), ObjectRef(new Float(2.))); + ps.add(string("NBITS"), ObjectRef(new Int(2))); + Xi[0] = Constellation(ps); + ps.add(string("ENERGY"), ObjectRef(new Float(4.))); + ps.add(string("NBITS"), ObjectRef(new Int(4))); + Xi[1] = Constellation(ps); + ps.add(string("ENERGY"), ObjectRef(new Float(6.))); + ps.add(string("NBITS"), ObjectRef(new Int(6))); + Xi[2] = Constellation(ps); + ps.add(string("ENERGY"), ObjectRef(new Float(8.))); + ps.add(string("NBITS"), ObjectRef(new Int(8))); + Xi[3] = Constellation(ps); + + + + // Determine the number of data carriers and pilot carriers + ndatacarriers = npilotcarriers = nothercarriers = 0; + ndatabits = 0; + + typeofcarrier.resize(ncarriers); + Xiforcarrier.resize(ncarriers); + for(i = 0; i < ncarriers; i++) + { + typeofcarrier[i] = getCarrierType(i); + if(typeofcarrier[i] == DATA) ndatacarriers++; + else if(typeofcarrier[i] == PILOT) npilotcarriers++; + else nothercarriers++; + + Xiforcarrier[i] = getConstellation(i); + + ndatabits += Xi[Xiforcarrier[i]].nbits(); + } + + +} + + +OFDModulator::~OFDModulator() +{ +#ifdef FFTW3_FOUND + fftw_destroy_plan(p); + fftw_free(fft_in); + fftw_free(fft_out); +#else + fft_in.destroy(); + fft_out.destroy(); +#endif +} + + + + + +void OFDModulator::calculate(int output_id, int count, Buffer &out) +{ + int i, j, k; + + ObjectRef inputRef = getInput(inputID, count); + const Vector<int> &inputVec = object_cast<Vector<int> >(inputRef); + int length = inputVec.size(); + if(length != ndatabits) + throw new NodeException(this, "OFDModulator: length of input vector does not match the number \ + of data bits in one OFDM symbol.", __FILE__, __LINE__); + + Vector<complex<float> > &output = *Vector<complex<float> >::alloc(ncarriers + lprefix); + + out[count] = &output; + +#ifdef FFTW3_FOUND + + // Generate the IFFT input vector + j = 0; // Data carrier index + complex<float> x; + int s; + for(i = 0; i < ncarriers; i++) + { + s = 0; + if(typeofcarrier[i] == DATA) + { + for(k = 0; k < Xi[Xiforcarrier[i]].nbits(); k++) + { + s |= (inputVec[j++] & 1) << k; + } + x = Xi[Xiforcarrier[i]][s]; + } + else if(typeofcarrier[i] == PILOT) + { + s = getPilotSymbol(i); + x = Xi[Xiforcarrier[i]][s]; + } + else x = complex<float>(0., 0.); + + fft_in[(i + ncarriers / 2) % ncarriers][0] = gain[i] * x.real(); + fft_in[(i + ncarriers / 2) % ncarriers][1] = gain[i] * x.imag(); + + } + + + + // Compute the IFFT + fftw_execute(p); + + + + // Add the cyclic prefix + float sqrn = sqrt(ncarriers); + for(k = 0; k < lprefix; k++) + output[k] = complex<float>(fft_out[ncarriers - lprefix + k][0] / sqrn, + fft_out[ncarriers - lprefix + k][1] / sqrn); + for(k = 0; k < ncarriers; k++) + output[k + lprefix] = complex<float>(fft_out[k][0] / sqrn, fft_out[k][1] / sqrn); + +#else // FFTW3_FOUND + + // Multiply each subcarrier by gain + /* + for(i = 0; i < ncarriers; i++) + { + fft_in[i] = gain[i] * inputVec[i]; + } */ + + + // Compute the FFT + // fftw_one(p, fft_in, fft_out); + throw new NodeException(this, "OFDModulator: FFTW3 not available.", __FILE__, __LINE__); + + + + // Add the cyclic prefix + /* + for(k = 0; k < lprefix; k++) + output[k] = fft_out[ncarriers - lprefix + k]; + for(k = 0; k < ncarriers; k++) + output[k + lprefix] = fft_out[k]; + */ + +#endif // FFTW3_FOUND + +} + +} //namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/SpreadInterleaver.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/SpreadInterleaver.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/SpreadInterleaver.cc 2009-01-09 23:22:29 UTC (rev 2323) @@ -0,0 +1,143 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "BufferedNode.h" +#include "Buffer.h" +#include "Vector.h" +#include "Interleaver.h" +#include "MersenneTwister.h" +#include "macros_math.h" + +using namespace std; + +namespace FD { + +class SpreadInterleaver; + +DECLARE_NODE(SpreadInterleaver) +/*Node + * + * @name SpreadInterleaver + * @category Communications:Tools + * @description Perform a pemutation of the input block. The generated permutation satisfies given spread constraints. + * + * @input_name INPUT + * @input_description Input block. + * + * @output_name OUTPUT + * @output_description Permuted block. + * + * @parameter_name LENGTH + * @parameter_type int + * @parameter_description Block length. + * @parameter_value 1 + * + * @parameter_name SPREAD + * @parameter_type int + * @parameter_description Spread constraint. + * @parameter_value 1 + * + * @parameter_name MAX_NRET + * @parameter_type int + * @parameter_description Maximum number of retrials in interleaver generation before decreasing S. + * @parameter_value 100 + * + * @parameter_name MAX_VRET + * @parameter_type int + * @parameter_description Maximum number of retrials for each value before starting a new reetrial. + * @parameter_value 100 + * + * @parameter_name INVERSE + * @parameter_type bool + * @parameter_description If true, inverse permutation is applied. + * @parameter_value false + * +END*/ + + +class SpreadInterleaver : public Interleaver +{ + + int spread; + int max_nret; + int max_vret; + +public: +SpreadInterleaver(string nodeName, ParameterSet params) +: Interleaver(nodeName, params) +{ + if(parameters.exist("SPREAD")) + spread = dereference_cast<int>(parameters.get("SPREAD")); + else + spread = 1; + + if(parameters.exist("MAX_NRET")) + max_nret = dereference_cast<int>(parameters.get("MAX_NRET")); + else + max_nret = 100; + + if(parameters.exist("MAX_VRET")) + max_vret = dereference_cast<int>(parameters.get("MAX_VRET")); + else + max_vret = 100; + + + Permutation(); +} + + + +/** Generate a pseudo-random permutation satisfying given spread constraints + * |i - j| + |p[i] - p[j]| > S; + */ +void Permutation() +{ + int i, j; + int r, x; + int nret = max_nret; + int vret = max_vret; + bool v = false; + MTRand rng(101); + + + while(spread) + { + cout << "Spread is " << spread << endl; + nret = max_nret; + while(nret--) + { + for(i = 0; i < length; i++) + { + vret = max_vret; + v = true; + while(vret-- && v) + { + r = rng.randInt(length - 1 - i); + x = perm[i + r]; + perm[i + r] = perm[i]; + perm[i] = x; + v = false; + for(j = i - 1; j > MAX(i - spread, 0); j--) + { + if(ABS(i - j) + ABS(perm[i] - perm[j]) < spread) + { + v = true; + x = perm[i + r]; + perm[i + r] = perm[i]; + perm[i] = x; + break; + } + } + } + if(v) break; + } + } + if(!v) break; + spread--; + } + +} + +}; + +}//namespace FD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-08 15:43:31
|
Revision: 2322 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2322&view=rev Author: albertop7 Date: 2009-01-08 15:43:06 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Changed libfftw3 and libfftw3f search order. Modified Paths: -------------- trunk/FlowDesigner/macros/FindFFTW3.cmake Modified: trunk/FlowDesigner/macros/FindFFTW3.cmake =================================================================== --- trunk/FlowDesigner/macros/FindFFTW3.cmake 2009-01-04 22:38:00 UTC (rev 2321) +++ trunk/FlowDesigner/macros/FindFFTW3.cmake 2009-01-08 15:43:06 UTC (rev 2322) @@ -18,7 +18,7 @@ MESSAGE (STATUS "FFTW3_INCLUDE_DIR : ${FFTW3_INCLUDE_DIR}") -FIND_LIBRARY(FFTW3_LIBRARY NAMES fftw3f fftw3 NO_DEFAULT_PATH +FIND_LIBRARY(FFTW3_LIBRARY NAMES fftw3 fftw3f NO_DEFAULT_PATH PATHS "C:/Dev-Cpp/lib" "C:/Dev-Cpp/bin" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <alb...@us...> - 2009-01-04 22:38:03
|
Revision: 2321 http://flowdesigner.svn.sourceforge.net/flowdesigner/?rev=2321&view=rev Author: albertop7 Date: 2009-01-04 22:38:00 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Added new node ConstellationMapper and new type Constellation. Modified Paths: -------------- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt trunk/FlowDesigner/toolbox/communications/src/Constellation.cc Added Paths: ----------- trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc Modified: trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-04 22:36:39 UTC (rev 2320) +++ trunk/FlowDesigner/toolbox/communications/src/CMakeLists.txt 2009-01-04 22:38:00 UTC (rev 2321) @@ -4,6 +4,7 @@ DiscreteSource.cc ComplexGaussian.cc Constellation.cc + ConstellationMapper.cc LLRComputer.cc MLDetector.cc BitErrors.cc @@ -11,6 +12,11 @@ Histogram.cc ) +find_package(FFTW3) +IF (FFTW3_FOUND) + ADD_DEFINITIONS(-DFFTW3_FOUND) +ENDIF (FFTW3_FOUND) + INCLUDE_DIRECTORIES(${FLOWDESIGNER_SOURCE_DIR}/data-flow/include ../include ${LIBXML2_INCLUDE} ) Modified: trunk/FlowDesigner/toolbox/communications/src/Constellation.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/Constellation.cc 2009-01-04 22:36:39 UTC (rev 2320) +++ trunk/FlowDesigner/toolbox/communications/src/Constellation.cc 2009-01-04 22:38:00 UTC (rev 2321) @@ -1,113 +1,61 @@ // Copyright (C) 2008 Alberto Perotti // Author: Alberto Perotti -#include "BufferedNode.h" -#include "Buffer.h" -#include "Vector.h" -#include <stdlib.h> -#include <math.h> -#include "macros_math.h" +#include "Constellation.h" -using namespace std; namespace FD { -class Constellation; +Constellation::Constellation() +{ + ParameterSet ps; + c_initialize(ps); +} -DECLARE_NODE(Constellation) -/*Node - * - * @name Constellation - * @category Communications:Transmitter - * @description Generate a sequence of constellation points - * - * @input_name INPUT - * @input_type Vector<int> - * @input_description Binary input sequence. - * - * @output_name OUTPUT - * @output_type Vector<complex<float> > - * @output_description Generated sequence. - * - * @parameter_name TYPE - * @parameter_type string - * @parameter_description Modulation type (PAM, PSK, QAM, FILE). - * @parameter_value PSK - * - * @parameter_name NBITS - * @parameter_type int - * @parameter_description Number of bits per symbol. - * @parameter_value 1 - * - * @parameter_name ENERGY - * @parameter_type float - * @parameter_description Average symbol energy per complex dimension. - * @parameter_value 1. - * - * @parameter_name FILENAME - * @parameter_type string - * @parameter_description Name of file containing the constellation. - * @parameter_value Xi.txt -END*/ +Constellation::Constellation(ParameterSet params) +{ + c_initialize(params); +} -class Constellation : public BufferedNode { - - int inputID; - int outputID; - int nbits; - int nsignals; - float Es; - enum modType {PAM, PSK, QAM, FILE_T}; - modType type; - RCPtr<Vector<complex<float> > > Xiptr; - string filename; - -public: -Constellation(string nodeName, ParameterSet params) -: BufferedNode(nodeName, params) +void Constellation::c_initialize(ParameterSet ¶ms) { int i, j; int nbh, nbhp; unsigned int ui; - inputID = addInput("INPUT"); - outputID = addOutput("OUTPUT"); + if (params.exist("TYPE")) + { + if (object_cast<String> (params.get("TYPE")) == "PAM") + type = PAM; + else if (object_cast<String> (params.get("TYPE")) == "PSK") + type = PSK; + else if (object_cast<String> (params.get("TYPE")) == "QAM") + type = QAM; + else if (object_cast<String> (params.get("TYPE")) == "FILE") + type = FILE_T; + } + else type = PAM; - if (parameters.exist("TYPE")) - { - if (object_cast<String> (parameters.get("TYPE")) == "PAM") - type = PAM; - else if (object_cast<String> (parameters.get("TYPE")) == "PSK") - type = PSK; - else if (object_cast<String> (parameters.get("TYPE")) == "QAM") - type = QAM; - else if (object_cast<String> (parameters.get("TYPE")) == "FILE") - type = FILE_T; - else - new NodeException(NULL, "Unknown function type", __FILE__, __LINE__); - } else type = PAM; - - if (parameters.exist("NBITS")) - nbits = dereference_cast<int> (parameters.get("NBITS")); + if (params.exist("NBITS")) + nbits = dereference_cast<int> (params.get("NBITS")); else nbits = 1; nsignals = 1 << nbits; - if (parameters.exist("ENERGY")) - Es = dereference_cast<float> (parameters.get("ENERGY")); + if (params.exist("ENERGY")) + Es = dereference_cast<float> (params.get("ENERGY")); else Es = 1.; - if(parameters.exist("FILENAME")) + if(params.exist("FILENAME")) { - filename = object_cast<String> (parameters.get("FILENAME")); + filename = object_cast<String> (params.get("FILENAME")); } - Xiptr = Vector<complex<float> >::alloc(1 << nbits); - Vector<complex<float> > &Xi = *Xiptr; + resize(1 << nbits); complex<float> tmpc; double Es0 = 0.; @@ -117,16 +65,16 @@ case PAM: for (i = 0; i < nsignals; i++) { - Xi[BIN2GRAY(i)] = complex<float>(nsignals - 1 - 2 * i, 0.); - Xi[BIN2GRAY(i)] *= sqrt((3. * Es) / float(nsignals * nsignals - 1.)); + this->at(BIN2GRAY(i)) = complex<float>(nsignals - 1 - 2 * i, 0.); + this->at(BIN2GRAY(i)) *= sqrt((3. * Es) / float(nsignals * nsignals - 1.)); } break; case PSK: for (i = 0; i < nsignals; i++) { - Xi[BIN2GRAY(i)] = complex<float>(cos((1 + 2 * i) * PI / float(nsignals)), + this->at(BIN2GRAY(i)) = complex<float>(cos((1 + 2 * i) * PI / float(nsignals)), sin((1 + 2 * i) * PI / float(nsignals))); - Xi[BIN2GRAY(i)] *= sqrt(Es); + this->at(BIN2GRAY(i)) *= sqrt(Es); } break; case QAM: @@ -136,12 +84,12 @@ { for(j = 0; j < nbh; j++) { - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)] = + this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)) = complex<float>(nbhp - 1 - 2 * i, nbh - 1 - 2 * j); - Es0 += Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].real() * - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].real(); - Es0 += Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].imag() * - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)].imag(); + Es0 += this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)).real() * + this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)).real(); + Es0 += this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)).imag() * + this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)).imag(); } } Es0 /= float(nsignals); @@ -149,63 +97,31 @@ { for(j = 0; j < nbh; j++) { - Xi[BIN2GRAY(j) + nbh * BIN2GRAY(i)] *= sqrt(Es / Es0); + this->at(BIN2GRAY(j) + nbh * BIN2GRAY(i)) *= sqrt(Es / Es0); } } break; case FILE_T: ifs.open(filename.c_str()); - ifs >> Xi; + ifs >> *this; ifs.close(); - for(ui = 0; ui < Xi.size(); ui++) + for(ui = 0; ui < this->size(); ui++) { - Es0 += Xi[ui].real() * Xi[ui].real(); - Es0 += Xi[ui].imag() * Xi[ui].imag(); + Es0 += this->at(ui).real() * this->at(ui).real(); + Es0 += this->at(ui).imag() * this->at(ui).imag(); } - nsignals = Xi.size(); + nsignals = this->size(); nbits = floor(log2(nsignals)); - if(nsignals > (1 << nbits)) - throw new NodeException(this, "Constellation loaded from file has non power of 2 size.", __FILE__, __LINE__); Es0 /= float(nsignals); for(i = 0; i < nsignals; i++) { - Xi[i] *= sqrt(Es / Es0); + this->at(i) *= sqrt(Es / Es0); } break; default: - throw new NodeException(this, "Invalid constellation type.", __FILE__, __LINE__); + throw 1; } } - - -void calculate(int output_id, int count, Buffer &out) -{ - int i, j, k; - - ObjectRef inputRef = getInput(inputID, count); - const Vector<int> &inputVec = object_cast<Vector<int> >(inputRef); - int length = inputVec.size(); - - if(type != FILE_T && (length % nbits)) throw new NodeException(this, "Constellation: input length % nbits != 0", __FILE__, __LINE__); - - Vector<complex<float> > &output = *Vector<complex<float> >::alloc(length / nbits); - - out[count] = &output; - Vector<complex<float> > &Xi = *Xiptr; - - for (i = 0; i < length / nbits; i++) - { - k = 0; // TODO: add nonbinary input - for(j = 0; j < nbits; j++) - { - k += (inputVec[i * nbits + j] & 1) << j; - } - output[i] = Xi[k]; - } - -} -}; - -}//namespace FD +} //namespace FD Added: trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc =================================================================== --- trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc (rev 0) +++ trunk/FlowDesigner/toolbox/communications/src/ConstellationMapper.cc 2009-01-04 22:38:00 UTC (rev 2321) @@ -0,0 +1,94 @@ +// Copyright (C) 2008 Alberto Perotti +// Author: Alberto Perotti + +#include "ConstellationMapper.h" + +using namespace std; + +namespace FD { + +DECLARE_NODE(ConstellationMapper) + +/*Node + * + * @name ConstellationMapper + * @category Communications:Transmitter + * @require Constellation + * @description Generate a sequence of constellation points + * + * @input_name INPUT + * @input_type Vector<int> + * @input_description Binary input sequence. + * + * @output_name OUTPUT + * @output_type Vector<complex<float> > + * @output_description Generated sequence. + * + * @parameter_name TYPE + * @parameter_type string + * @parameter_description Modulation type (PAM, PSK, QAM, FILE). + * @parameter_value PSK + * + * @parameter_name NBITS + * @parameter_type int + * @parameter_description Number of bits per symbol. + * @parameter_value 1 + * + * @parameter_name ENERGY + * @parameter_type float + * @parameter_description Average symbol energy per complex dimension. + * @parameter_value 1. + * + * @parameter_name FILENAME + * @parameter_type string + * @parameter_description Name of file containing the constellation. + * @parameter_value Xi.txt +END*/ + + +ConstellationMapper::ConstellationMapper(string nodeName, ParameterSet params) +: BufferedNode(nodeName, params), Xii(params) +{ + inputID = addInput("INPUT"); + outputID = addOutput("OUTPUT"); + + if (parameters.exist("NBITS")) + nbits = dereference_cast<int> (parameters.get("NBITS")); + else nbits = 1; + +} + + +ConstellationMapper::~ConstellationMapper() +{ + // Xiptr->destroy(); +} + + +void ConstellationMapper::calculate(int output_id, int count, Buffer &out) +{ + int i, j, k; + + ObjectRef inputRef = getInput(inputID, count); + const Vector<int> &inputVec = object_cast<Vector<int> >(inputRef); + int length = inputVec.size(); + + if(length % nbits) throw new NodeException(this, "ConstellationMapper: input length % nbits != 0", __FILE__, __LINE__); + + Vector<complex<float> > &output = *Vector<complex<float> >::alloc(length / nbits); + + out[count] = &output; + + for (i = 0; i < length / nbits; i++) + { + k = 0; // TODO: add nonbinary input + for(j = 0; j < nbits; j++) + { + k += (inputVec[i * nbits + j] & 1) << j; + } + output[i] = Xii[k]; + } + +} + +}//namespace FD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |