<?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="rpc__lesson1_2src_2client_8cpp" kind="file" language="C++">
    <compoundname>client.cpp</compoundname>
    <includes refid="CisInterface_8hpp" local="yes">CisInterface.hpp</includes>
    <includes local="no">stdio.h</includes>
    <incdepgraph>
      <node id="2123">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="2124" relation="include">
        </childnode>
        <childnode refid="2125" relation="include">
        </childnode>
      </node>
      <node id="2145">
        <label>AsciiTableComm.h</label>
        <link refid="AsciiTableComm_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2118">
        <label>stdarg.h</label>
      </node>
      <node id="2131">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2132" relation="include">
        </childnode>
      </node>
      <node id="2117">
        <label>stdlib.h</label>
      </node>
      <node id="2111">
        <label>/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.cpp</label>
        <link refid="rpc__lesson1_2src_2client_8cpp"/>
        <childnode refid="2112" relation="include">
        </childnode>
        <childnode refid="2116" relation="include">
        </childnode>
      </node>
      <node id="2119">
        <label>errno.h</label>
      </node>
      <node id="2144">
        <label>AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2132" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2133">
        <label>AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2129" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2135">
        <label>ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
      </node>
      <node id="2125">
        <label>stddef.h</label>
      </node>
      <node id="2114">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="2115" relation="include">
        </childnode>
        <childnode refid="2116" relation="include">
        </childnode>
        <childnode refid="2117" relation="include">
        </childnode>
        <childnode refid="2118" relation="include">
        </childnode>
        <childnode refid="2119" relation="include">
        </childnode>
        <childnode refid="2120" relation="include">
        </childnode>
        <childnode refid="2121" relation="include">
        </childnode>
        <childnode refid="2123" relation="include">
        </childnode>
        <childnode refid="2126" relation="include">
        </childnode>
      </node>
      <node id="2138">
        <label>IPCComm.h</label>
        <link refid="IPCComm_8h_source"/>
        <childnode refid="2137" relation="include">
        </childnode>
      </node>
      <node id="2130">
        <label>FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2129" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2142">
        <label>ServerComm.h</label>
        <link refid="ServerComm_8h_source"/>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2141" relation="include">
        </childnode>
        <childnode refid="2136" relation="include">
        </childnode>
      </node>
      <node id="2113">
        <label>CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2127" relation="include">
        </childnode>
        <childnode refid="2132" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2128">
        <label>../serialize/serialize.h</label>
        <link refid="serialize_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2129" relation="include">
        </childnode>
        <childnode refid="2130" relation="include">
        </childnode>
        <childnode refid="2133" relation="include">
        </childnode>
        <childnode refid="2134" relation="include">
        </childnode>
        <childnode refid="2135" relation="include">
        </childnode>
      </node>
      <node id="2132">
        <label>AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
      </node>
      <node id="2134">
        <label>PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
      </node>
      <node id="2136">
        <label>comm_header.h</label>
        <link refid="comm__header_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2131" relation="include">
        </childnode>
      </node>
      <node id="2124">
        <label>wchar.h</label>
      </node>
      <node id="2115">
        <label>string.h</label>
      </node>
      <node id="2137">
        <label>CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
      </node>
      <node id="2140">
        <label>RPCComm.h</label>
        <link refid="RPCComm_8h_source"/>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2141" relation="include">
        </childnode>
        <childnode refid="2136" relation="include">
        </childnode>
      </node>
      <node id="2126">
        <label>unistd.h</label>
      </node>
      <node id="2139">
        <label>ZMQComm.h</label>
        <link refid="ZMQComm_8h_source"/>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2136" relation="include">
        </childnode>
      </node>
      <node id="2112">
        <label>CisInterface.hpp</label>
        <link refid="CisInterface_8hpp_source"/>
        <childnode refid="2113" relation="include">
        </childnode>
      </node>
      <node id="2141">
        <label>DefaultComm.h</label>
        <link refid="DefaultComm_8h_source"/>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2139" relation="include">
        </childnode>
      </node>
      <node id="2121">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="2122" relation="include">
        </childnode>
        <childnode refid="2123" relation="include">
        </childnode>
      </node>
      <node id="2120">
        <label>time.h</label>
      </node>
      <node id="2129">
        <label>SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
      </node>
      <node id="2143">
        <label>ClientComm.h</label>
        <link refid="ClientComm_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2141" relation="include">
        </childnode>
        <childnode refid="2136" relation="include">
        </childnode>
      </node>
      <node id="2127">
        <label>../communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="2114" relation="include">
        </childnode>
        <childnode refid="2128" relation="include">
        </childnode>
        <childnode refid="2136" relation="include">
        </childnode>
        <childnode refid="2137" relation="include">
        </childnode>
        <childnode refid="2138" relation="include">
        </childnode>
        <childnode refid="2139" relation="include">
        </childnode>
        <childnode refid="2140" relation="include">
        </childnode>
        <childnode refid="2142" relation="include">
        </childnode>
        <childnode refid="2143" relation="include">
        </childnode>
        <childnode refid="2144" relation="include">
        </childnode>
        <childnode refid="2145" relation="include">
        </childnode>
        <childnode refid="2141" relation="include">
        </childnode>
      </node>
      <node id="2122">
        <label>regex.h</label>
      </node>
      <node id="2116">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8cpp_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/rpc_lesson1/src/client.cpp" line="5" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.cpp" bodystart="5" bodyend="47"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;CisInterface.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdio.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><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="6"><highlight class="normal"><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iterations<sp/>=<sp/>atoi(argv[1]);</highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>exit_code<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;Hello<sp/>from<sp/>C++<sp/>client:<sp/>iterations<sp/>%d\n&quot;</highlight><highlight class="normal">,<sp/>iterations);</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/>Set<sp/>up<sp/>connections<sp/>matching<sp/>yaml</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>RPC<sp/>client-side<sp/>connection<sp/>will<sp/>be<sp/>$(server_name)_$(client_name)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><ref refid="classCisRpcClient" kindref="compound">CisRpcClient</ref><sp/>rpc(</highlight><highlight class="stringliteral">&quot;server_client&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%d&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%d&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><ref refid="classCisOutput" kindref="compound">CisOutput</ref><sp/>log(</highlight><highlight class="stringliteral">&quot;output_log&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;fib(%-2d)<sp/>=<sp/>%-2d\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>variables</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>fib<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*logmsg<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)malloc(CIS_MSG_MAX*</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Iterate<sp/>over<sp/>Fibonacci<sp/>sequence</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>1;<sp/>i<sp/>&lt;=<sp/>iterations;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Call<sp/>the<sp/>server<sp/>and<sp/>receive<sp/>response</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;client(C++):<sp/>Calling<sp/>fib(%d)\n&quot;</highlight><highlight class="normal">,<sp/>i);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>rpc.call(2,<sp/>i,<sp/>&amp;fib);</highlight></codeline>
<codeline lineno="28"><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="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;client(C++):<sp/>RPC<sp/>CALL<sp/>ERROR\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;client(C++):<sp/>Response<sp/>fib(%d)<sp/>=<sp/>%d\n&quot;</highlight><highlight class="normal">,<sp/>i,<sp/>fib);</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Log<sp/>result<sp/>by<sp/>sending<sp/>it<sp/>to<sp/>the<sp/>log<sp/>connection</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>log.send(2,<sp/>i,<sp/>fib);</highlight></codeline>
<codeline lineno="37"><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="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;client(C++):<sp/>SEND<sp/>ERROR\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/>free(logmsg);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;Goodbye<sp/>from<sp/>C++<sp/>client\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>exit_code;</highlight></codeline>
<codeline lineno="47"><highlight class="normal">}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.cpp"/>
  </compounddef>
</doxygen>
