<?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_8m" kind="file" language="Objective-C">
    <compoundname>client.m</compoundname>
      <sectiondef kind="var">
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1ab45d8ea6639edac36ac747cbf562be9a" prot="public" static="no" mutable="no">
        <type></type>
        <definition>exit_code</definition>
        <argsstring></argsstring>
        <name>exit_code</name>
        <initializer>= 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="5" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="5" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1ab09a63eb35b270b5cdbead1983ebdccb" prot="public" static="no" mutable="no">
        <type></type>
        <definition>log</definition>
        <argsstring></argsstring>
        <name>log</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisOutput" kindref="compound">CisOutput</ref>&apos;, &apos;output_log&apos;, &apos;fib(%-2d) = %-2d\n&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="11" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="11" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1ae404ef176b5d2260ef3f0b4ae3d81532" prot="public" static="no" mutable="no">
        <type>Iterate over Fibonacci sequence for</type>
        <definition>Iterate over Fibonacci sequence for i</definition>
        <argsstring></argsstring>
        <name>i</name>
        <initializer>= 1:iterations
    
    % Call the server and receive response
    fprintf(&apos;client(Matlab): Calling fib(%d)\n&apos;, i)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="14" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="14" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1a91cf6fbebedd86150a36e5ac3d5d3bfc" prot="public" static="no" mutable="no">
        <type></type>
        <definition>break</definition>
        <argsstring></argsstring>
        <name>break</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="22" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="22" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1afb358f48b1646c750fb9da6c6585be2b" prot="public" static="no" mutable="no">
        <type></type>
        <definition>end</definition>
        <argsstring></argsstring>
        <name>end</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="23" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="23" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1ad3c680cd6fba440cd4877962e0e163b6" prot="public" static="no" mutable="no">
        <type></type>
        <definition>fib</definition>
        <argsstring></argsstring>
        <name>fib</name>
        <initializer>= result{1}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="24" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="24" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="rpc__lesson1_2src_2client_8m_1a60ed34f760773a438e2eead061895df6" prot="public" static="no" mutable="no">
        <type>Log result by sending it to the log connection</type>
        <definition>Log result by sending it to the log connection ret</definition>
        <argsstring></argsstring>
        <name>ret</name>
        <initializer>= log.send(i, fib)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="28" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" bodystart="28" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1a1c260b311dfbd821c067ce5845e7586e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>function</type>
        <definition>function client</definition>
        <argsstring>(iterations) iterations</argsstring>
        <name>client</name>
        <param>
          <type>iterations</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="2" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1ae2daed9a39522f4f77c7f6210f58843f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>fprintf</definition>
        <argsstring>(&apos;Hello from Matlab client:iterations=%d\n&apos;, iterations)</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;Hello from Matlab client:iterations</type>
          <defval>%d\n&apos;</defval>
        </param>
        <param>
          <type>iterations</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="6" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1ae3f699d1c3d7273236cd7b4a1e80dcfb" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual">
        <type>&apos;<ref refid="classCisRpcClient" kindref="compound">CisRpcClient</ref>&apos;, &apos;server_client&apos;, &apos;%d&apos;, &apos;%d&apos;</type>
        <definition>&apos;CisRpcClient&apos;, &apos;server_client&apos;, &apos;%d&apos;, &apos;%d&apos; CisInterface</definition>
        <argsstring>()</argsstring>
        <name>CisInterface</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="9" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1acb58dcce9da5e79d109c568816407b46" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>if</definition>
        <argsstring>(~ret)</argsstring>
        <name>if</name>
        <param>
          <type>~</type>
          <declname>ret</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="19" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1a6c9ed640d23c17f443c58e2d67ba800e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;client(Matlab):RPC CALL ERROR&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;client(Matlab):RPC CALL ERROR&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="20" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1a727ffa1d76cdf3e49b0b1d6b051b7690" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>fprintf</definition>
        <argsstring>(&apos;client(Matlab):Response fib(%d)=%d\n&apos;, i, fib)</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;</type>
          <declname>client</declname>
          <array>Matlab):Response fib(%d</array>
          <defval>%d\n&apos;</defval>
        </param>
        <param>
          <type>i</type>
        </param>
        <param>
          <type>fib</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="25" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1a7fd84f18a15f1a4a0738d131b28ddf5e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;client(Matlab):SEND ERROR&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;client(Matlab):SEND ERROR&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="30" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1a456e35ad30a67bd03c76aa6d10e14257" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;Goodbye from Matlab client&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;Goodbye from Matlab client&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="36" column="1"/>
      </memberdef>
      <memberdef kind="function" id="rpc__lesson1_2src_2client_8m_1acd2236c0c236d93ae9f9e257134d5947" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>exit</definition>
        <argsstring>(exit_code)</argsstring>
        <name>exit</name>
        <param>
          <type>exit_code</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m" line="37" column="1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/>client(iterations)</highlight></codeline>
<codeline lineno="3"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="4"><highlight class="normal"><sp/><sp/>iterations<sp/>=<sp/>str2num(iterations);</highlight></codeline>
<codeline lineno="5"><highlight class="normal"><sp/><sp/>exit_code<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="6"><highlight class="normal"><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;Hello<sp/>from<sp/>Matlab<sp/>client:<sp/>iterations<sp/>=<sp/>%d\n&apos;</highlight><highlight class="normal">,<sp/>iterations);</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/>%<sp/>Set<sp/>up<sp/>connections<sp/>matching<sp/>yaml</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/>%<sp/>RPC<sp/>client-side<sp/>connection<sp/>will<sp/>be<sp/>$(server_name)_$(client_name)</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/>rpc<sp/>=<sp/>CisInterface(&apos;<ref refid="classCisRpcClient" kindref="compound">CisRpcClient</ref>&apos;,<sp/>&apos;server_client&apos;,<sp/>&apos;%d&apos;,<sp/>&apos;%d&apos;);</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/>log<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisOutput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;output_log&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;fib(%-2d)<sp/>=<sp/>%-2d\n&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/>%<sp/>Iterate<sp/>over<sp/>Fibonacci<sp/>sequence</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>1:iterations</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>Call<sp/>the<sp/>server<sp/>and<sp/>receive<sp/>response</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;client(Matlab):<sp/>Calling<sp/>fib(%d)\n&apos;</highlight><highlight class="normal">,<sp/>i);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/>[ret,<sp/>result]<sp/>=<sp/>rpc.call(i);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(~ret);</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;client(Matlab):<sp/>RPC<sp/>CALL<sp/>ERROR&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</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/>end;</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/>fib<sp/>=<sp/>result{1};</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;client(Matlab):<sp/>Response<sp/>fib(%d)<sp/>=<sp/>%d\n&apos;</highlight><highlight class="normal">,<sp/>i,<sp/>fib);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>Log<sp/>result<sp/>by<sp/>sending<sp/>it<sp/>to<sp/>the<sp/>log<sp/>connection</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>log.send(i,<sp/>fib);</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(~ret);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;client(Matlab):<sp/>SEND<sp/>ERROR&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/>end;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;Goodbye<sp/>from<sp/>Matlab<sp/>client&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/>exit(exit_code);</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="39"><highlight class="normal">end</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/rpc_lesson1/src/client.m"/>
  </compounddef>
</doxygen>
