<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
  <compounddef id="SaM_8c" kind="file" language="C++">
    <compoundname>SaM.c</compoundname>
    <includes local="no">stdio.h</includes>
    <includes local="no">stdlib.h</includes>
    <includes refid="CisInterface_8h" local="yes">CisInterface.h</includes>
    <incdepgraph>
      <node id="2417">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="2418" relation="include">
        </childnode>
        <childnode refid="2419" relation="include">
        </childnode>
      </node>
      <node id="2439">
        <label>AsciiTableComm.h</label>
        <link refid="AsciiTableComm_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2412">
        <label>stdarg.h</label>
      </node>
      <node id="2425">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2426" relation="include">
        </childnode>
      </node>
      <node id="2408">
        <label>stdlib.h</label>
      </node>
      <node id="2413">
        <label>errno.h</label>
      </node>
      <node id="2438">
        <label>AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2426" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2427">
        <label>AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2423" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2429">
        <label>ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
      </node>
      <node id="2419">
        <label>stddef.h</label>
      </node>
      <node id="2410">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="2411" relation="include">
        </childnode>
        <childnode refid="2407" relation="include">
        </childnode>
        <childnode refid="2408" relation="include">
        </childnode>
        <childnode refid="2412" relation="include">
        </childnode>
        <childnode refid="2413" relation="include">
        </childnode>
        <childnode refid="2414" relation="include">
        </childnode>
        <childnode refid="2415" relation="include">
        </childnode>
        <childnode refid="2417" relation="include">
        </childnode>
        <childnode refid="2420" relation="include">
        </childnode>
      </node>
      <node id="2432">
        <label>IPCComm.h</label>
        <link refid="IPCComm_8h_source"/>
        <childnode refid="2431" relation="include">
        </childnode>
      </node>
      <node id="2424">
        <label>FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2423" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2436">
        <label>ServerComm.h</label>
        <link refid="ServerComm_8h_source"/>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2435" relation="include">
        </childnode>
        <childnode refid="2430" relation="include">
        </childnode>
      </node>
      <node id="2409">
        <label>CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2421" relation="include">
        </childnode>
        <childnode refid="2426" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2422">
        <label>../serialize/serialize.h</label>
        <link refid="serialize_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2423" relation="include">
        </childnode>
        <childnode refid="2424" relation="include">
        </childnode>
        <childnode refid="2427" relation="include">
        </childnode>
        <childnode refid="2428" relation="include">
        </childnode>
        <childnode refid="2429" relation="include">
        </childnode>
      </node>
      <node id="2426">
        <label>AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
      </node>
      <node id="2428">
        <label>PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
      </node>
      <node id="2430">
        <label>comm_header.h</label>
        <link refid="comm__header_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2425" relation="include">
        </childnode>
      </node>
      <node id="2418">
        <label>wchar.h</label>
      </node>
      <node id="2411">
        <label>string.h</label>
      </node>
      <node id="2406">
        <label>/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c</label>
        <link refid="SaM_8c"/>
        <childnode refid="2407" relation="include">
        </childnode>
        <childnode refid="2408" relation="include">
        </childnode>
        <childnode refid="2409" relation="include">
        </childnode>
      </node>
      <node id="2431">
        <label>CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
      </node>
      <node id="2434">
        <label>RPCComm.h</label>
        <link refid="RPCComm_8h_source"/>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2435" relation="include">
        </childnode>
        <childnode refid="2430" relation="include">
        </childnode>
      </node>
      <node id="2420">
        <label>unistd.h</label>
      </node>
      <node id="2433">
        <label>ZMQComm.h</label>
        <link refid="ZMQComm_8h_source"/>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2430" relation="include">
        </childnode>
      </node>
      <node id="2435">
        <label>DefaultComm.h</label>
        <link refid="DefaultComm_8h_source"/>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2433" relation="include">
        </childnode>
      </node>
      <node id="2415">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="2416" relation="include">
        </childnode>
        <childnode refid="2417" relation="include">
        </childnode>
      </node>
      <node id="2414">
        <label>time.h</label>
      </node>
      <node id="2423">
        <label>SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
      </node>
      <node id="2437">
        <label>ClientComm.h</label>
        <link refid="ClientComm_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2435" relation="include">
        </childnode>
        <childnode refid="2430" relation="include">
        </childnode>
      </node>
      <node id="2421">
        <label>../communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="2410" relation="include">
        </childnode>
        <childnode refid="2422" relation="include">
        </childnode>
        <childnode refid="2430" relation="include">
        </childnode>
        <childnode refid="2431" relation="include">
        </childnode>
        <childnode refid="2432" relation="include">
        </childnode>
        <childnode refid="2433" relation="include">
        </childnode>
        <childnode refid="2434" relation="include">
        </childnode>
        <childnode refid="2436" relation="include">
        </childnode>
        <childnode refid="2437" relation="include">
        </childnode>
        <childnode refid="2438" relation="include">
        </childnode>
        <childnode refid="2439" relation="include">
        </childnode>
        <childnode refid="2435" relation="include">
        </childnode>
      </node>
      <node id="2416">
        <label>regex.h</label>
      </node>
      <node id="2407">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="SaM_8c_1a403cf3149c084cea115b85c90721039a" prot="public" static="no">
        <name>BSIZE</name>
        <initializer>1000</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c" line="5" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c" bodystart="5" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="SaM_8c_1ae66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>()</argsstring>
        <name>main</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c" line="8" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c" bodystart="8" bodyend="49"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;stdio.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdlib.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;CisInterface.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>BSIZE<sp/>1000</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main()<sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>adata[BSIZE];</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>bdata[BSIZE];</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>outbuf[BSIZE];</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Get<sp/>input<sp/>and<sp/>output<sp/>channels<sp/>matching<sp/>yaml</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/>cisInput_t<sp/>in1<sp/>=<sp/>cisInput(</highlight><highlight class="stringliteral">&quot;input1_c&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/>cisInput_t<sp/>in2<sp/>=<sp/>cisInput(</highlight><highlight class="stringliteral">&quot;static_c&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/>cisOutput_t<sp/>out1<sp/>=<sp/>cisOutput(</highlight><highlight class="stringliteral">&quot;output_c&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>Set<sp/>up<sp/>I/O<sp/>channels\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Get<sp/>input<sp/>from<sp/>input1<sp/>channel</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>cis_recv(in1,<sp/>adata,<sp/>BSIZE);</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>ERROR<sp/>RECV<sp/>from<sp/>input1\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a<sp/>=<sp/>atoi(adata);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>Received<sp/>%d<sp/>from<sp/>input1\n&quot;</highlight><highlight class="normal">,<sp/>a);</highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Get<sp/>input<sp/>from<sp/>static<sp/>channel</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>cis_recv(in2,<sp/>bdata,<sp/>BSIZE);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>ERROR<sp/>RECV<sp/>from<sp/>static\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>b<sp/>=<sp/>atoi(bdata);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>Received<sp/>%d<sp/>from<sp/>static\n&quot;</highlight><highlight class="normal">,<sp/>b);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Compute<sp/>sum<sp/>and<sp/>send<sp/>message<sp/>to<sp/>output<sp/>channel</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>sum<sp/>=<sp/>a<sp/>+<sp/>b;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/>sprintf(outbuf,<sp/></highlight><highlight class="stringliteral">&quot;%d&quot;</highlight><highlight class="normal">,<sp/>sum);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>cis_send(out1,<sp/>outbuf,<sp/>strlen(outbuf));</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>ERROR<sp/>SEND<sp/>to<sp/>output\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;SaM(C):<sp/>Sent<sp/>to<sp/>output\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="49"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/SaM/src/SaM.c"/>
  </compounddef>
</doxygen>
