<?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="rpcFibSrv_8c" kind="file" language="C++">
    <compoundname>rpcFibSrv.c</compoundname>
    <includes refid="CisInterface_8h" local="yes">CisInterface.h</includes>
    <includes local="no">stdio.h</includes>
    <incdepgraph>
      <node id="2344">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="2345" relation="include">
        </childnode>
        <childnode refid="2346" relation="include">
        </childnode>
      </node>
      <node id="2366">
        <label>AsciiTableComm.h</label>
        <link refid="AsciiTableComm_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2339">
        <label>stdarg.h</label>
      </node>
      <node id="2352">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2353" relation="include">
        </childnode>
      </node>
      <node id="2338">
        <label>stdlib.h</label>
      </node>
      <node id="2340">
        <label>errno.h</label>
      </node>
      <node id="2365">
        <label>AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2353" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2354">
        <label>AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2350" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2356">
        <label>ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
      </node>
      <node id="2346">
        <label>stddef.h</label>
      </node>
      <node id="2335">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="2336" relation="include">
        </childnode>
        <childnode refid="2337" relation="include">
        </childnode>
        <childnode refid="2338" relation="include">
        </childnode>
        <childnode refid="2339" relation="include">
        </childnode>
        <childnode refid="2340" relation="include">
        </childnode>
        <childnode refid="2341" relation="include">
        </childnode>
        <childnode refid="2342" relation="include">
        </childnode>
        <childnode refid="2344" relation="include">
        </childnode>
        <childnode refid="2347" relation="include">
        </childnode>
      </node>
      <node id="2359">
        <label>IPCComm.h</label>
        <link refid="IPCComm_8h_source"/>
        <childnode refid="2358" relation="include">
        </childnode>
      </node>
      <node id="2351">
        <label>FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2350" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2363">
        <label>ServerComm.h</label>
        <link refid="ServerComm_8h_source"/>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2362" relation="include">
        </childnode>
        <childnode refid="2357" relation="include">
        </childnode>
      </node>
      <node id="2334">
        <label>CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2348" relation="include">
        </childnode>
        <childnode refid="2353" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2349">
        <label>../serialize/serialize.h</label>
        <link refid="serialize_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2350" relation="include">
        </childnode>
        <childnode refid="2351" relation="include">
        </childnode>
        <childnode refid="2354" relation="include">
        </childnode>
        <childnode refid="2355" relation="include">
        </childnode>
        <childnode refid="2356" relation="include">
        </childnode>
      </node>
      <node id="2353">
        <label>AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
      </node>
      <node id="2355">
        <label>PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
      </node>
      <node id="2357">
        <label>comm_header.h</label>
        <link refid="comm__header_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2352" relation="include">
        </childnode>
      </node>
      <node id="2345">
        <label>wchar.h</label>
      </node>
      <node id="2336">
        <label>string.h</label>
      </node>
      <node id="2358">
        <label>CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
      </node>
      <node id="2361">
        <label>RPCComm.h</label>
        <link refid="RPCComm_8h_source"/>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2362" relation="include">
        </childnode>
        <childnode refid="2357" relation="include">
        </childnode>
      </node>
      <node id="2347">
        <label>unistd.h</label>
      </node>
      <node id="2360">
        <label>ZMQComm.h</label>
        <link refid="ZMQComm_8h_source"/>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2357" relation="include">
        </childnode>
      </node>
      <node id="2362">
        <label>DefaultComm.h</label>
        <link refid="DefaultComm_8h_source"/>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2360" relation="include">
        </childnode>
      </node>
      <node id="2342">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="2343" relation="include">
        </childnode>
        <childnode refid="2344" relation="include">
        </childnode>
      </node>
      <node id="2333">
        <label>/root/cis_interface/cis_interface/cis_interface/examples/rpcFib/src/rpcFibSrv.c</label>
        <link refid="rpcFibSrv_8c"/>
        <childnode refid="2334" relation="include">
        </childnode>
        <childnode refid="2337" relation="include">
        </childnode>
      </node>
      <node id="2341">
        <label>time.h</label>
      </node>
      <node id="2350">
        <label>SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
      </node>
      <node id="2364">
        <label>ClientComm.h</label>
        <link refid="ClientComm_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2362" relation="include">
        </childnode>
        <childnode refid="2357" relation="include">
        </childnode>
      </node>
      <node id="2348">
        <label>../communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="2335" relation="include">
        </childnode>
        <childnode refid="2349" relation="include">
        </childnode>
        <childnode refid="2357" relation="include">
        </childnode>
        <childnode refid="2358" relation="include">
        </childnode>
        <childnode refid="2359" relation="include">
        </childnode>
        <childnode refid="2360" relation="include">
        </childnode>
        <childnode refid="2361" relation="include">
        </childnode>
        <childnode refid="2363" relation="include">
        </childnode>
        <childnode refid="2364" relation="include">
        </childnode>
        <childnode refid="2365" relation="include">
        </childnode>
        <childnode refid="2366" relation="include">
        </childnode>
        <childnode refid="2362" relation="include">
        </childnode>
      </node>
      <node id="2343">
        <label>regex.h</label>
      </node>
      <node id="2337">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="rpcFibSrv_8c_1a0ddf1224851353fc92bfbff6f499fa97" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>(int argc, char *argv[])</argsstring>
        <name>main</name>
        <param>
          <type>int</type>
          <declname>argc</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>argv</declname>
          <array>[]</array>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpcFib/src/rpcFibSrv.c" line="6" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpcFib/src/rpcFibSrv.c" bodystart="6" bodyend="50"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;CisInterface.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdio.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>argc,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*argv[])<sp/>{</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>timeSleep<sp/>=<sp/>atof(argv[1]);</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;Hello<sp/>from<sp/>C<sp/>rpcFibSrv:<sp/>sleeptime<sp/>=<sp/>%f\n&quot;</highlight><highlight class="normal">,<sp/>timeSleep);</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>server-side<sp/>rpc<sp/>conneciton<sp/>using<sp/>model<sp/>name</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/>cisRpc_t<sp/>rpc<sp/>=<sp/>cisRpcServer(</highlight><highlight class="stringliteral">&quot;rpcFibSrv&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%d&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%d<sp/>%d&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Continue<sp/>receiving<sp/>requests<sp/>until<sp/>error<sp/>occurs<sp/>(the<sp/>connection<sp/>is<sp/>closed</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>by<sp/>all<sp/>clients<sp/>that<sp/>have<sp/>connected).</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>input;</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)<sp/>{</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;rpcFibSrv(C):<sp/>receiving...\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>rpcRecv(rpc,<sp/>&amp;input);</highlight></codeline>
<codeline lineno="20"><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="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;rpcFibSrv(C):<sp/>end<sp/>of<sp/>input\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Compute<sp/>fibonacci<sp/>number</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;rpcFibSrv(C):<sp/>&lt;-<sp/>input<sp/>%d&quot;</highlight><highlight class="normal">,<sp/>input);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>result<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>prevResult<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>prevPrev<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>idx<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(idx++<sp/>&lt;<sp/>input){</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>prevResult<sp/>+<sp/>prevPrev;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>prevPrev<sp/>=<sp/>prevResult;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>prevResult<sp/>=<sp/>result;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;<sp/>:::<sp/>-&gt;(%2d<sp/>%2d)\n&quot;</highlight><highlight class="normal">,<sp/>input,<sp/>result);</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/>Sleep<sp/>and<sp/>then<sp/>send<sp/>response<sp/>back</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(timeSleep)<sp/></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sleep(timeSleep);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>flag<sp/>=<sp/>rpcSend(rpc,<sp/>input,<sp/>result);</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(flag<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;rpcFibSrv(C):<sp/>ERROR<sp/>sending\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;Goodbye<sp/>from<sp/>C<sp/>rpcFibSrv\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="50"><highlight class="normal">}</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpcFib/src/rpcFibSrv.c"/>
  </compounddef>
</doxygen>
