<?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="maxMsgCli_8c" kind="file" language="C++">
    <compoundname>maxMsgCli.c</compoundname>
    <includes refid="CisInterface_8h" local="yes">CisInterface.h</includes>
    <includes local="no">stdio.h</includes>
    <incdepgraph>
      <node id="1866">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="1867" relation="include">
        </childnode>
        <childnode refid="1868" relation="include">
        </childnode>
      </node>
      <node id="1888">
        <label>AsciiTableComm.h</label>
        <link refid="AsciiTableComm_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1861">
        <label>stdarg.h</label>
      </node>
      <node id="1874">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1875" relation="include">
        </childnode>
      </node>
      <node id="1860">
        <label>stdlib.h</label>
      </node>
      <node id="1862">
        <label>errno.h</label>
      </node>
      <node id="1887">
        <label>AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1875" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1876">
        <label>AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1872" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1878">
        <label>ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
      </node>
      <node id="1855">
        <label>/root/cis_interface/cis_interface/cis_interface/examples/maxMsg/src/maxMsgCli.c</label>
        <link refid="maxMsgCli_8c"/>
        <childnode refid="1856" relation="include">
        </childnode>
        <childnode refid="1859" relation="include">
        </childnode>
      </node>
      <node id="1868">
        <label>stddef.h</label>
      </node>
      <node id="1857">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="1858" relation="include">
        </childnode>
        <childnode refid="1859" relation="include">
        </childnode>
        <childnode refid="1860" relation="include">
        </childnode>
        <childnode refid="1861" relation="include">
        </childnode>
        <childnode refid="1862" relation="include">
        </childnode>
        <childnode refid="1863" relation="include">
        </childnode>
        <childnode refid="1864" relation="include">
        </childnode>
        <childnode refid="1866" relation="include">
        </childnode>
        <childnode refid="1869" relation="include">
        </childnode>
      </node>
      <node id="1881">
        <label>IPCComm.h</label>
        <link refid="IPCComm_8h_source"/>
        <childnode refid="1880" relation="include">
        </childnode>
      </node>
      <node id="1873">
        <label>FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1872" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1885">
        <label>ServerComm.h</label>
        <link refid="ServerComm_8h_source"/>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1884" relation="include">
        </childnode>
        <childnode refid="1879" relation="include">
        </childnode>
      </node>
      <node id="1856">
        <label>CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1870" relation="include">
        </childnode>
        <childnode refid="1875" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1871">
        <label>../serialize/serialize.h</label>
        <link refid="serialize_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1872" relation="include">
        </childnode>
        <childnode refid="1873" relation="include">
        </childnode>
        <childnode refid="1876" relation="include">
        </childnode>
        <childnode refid="1877" relation="include">
        </childnode>
        <childnode refid="1878" relation="include">
        </childnode>
      </node>
      <node id="1875">
        <label>AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
      </node>
      <node id="1877">
        <label>PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
      </node>
      <node id="1879">
        <label>comm_header.h</label>
        <link refid="comm__header_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1874" relation="include">
        </childnode>
      </node>
      <node id="1867">
        <label>wchar.h</label>
      </node>
      <node id="1858">
        <label>string.h</label>
      </node>
      <node id="1880">
        <label>CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
      </node>
      <node id="1883">
        <label>RPCComm.h</label>
        <link refid="RPCComm_8h_source"/>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1884" relation="include">
        </childnode>
        <childnode refid="1879" relation="include">
        </childnode>
      </node>
      <node id="1869">
        <label>unistd.h</label>
      </node>
      <node id="1882">
        <label>ZMQComm.h</label>
        <link refid="ZMQComm_8h_source"/>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1879" relation="include">
        </childnode>
      </node>
      <node id="1884">
        <label>DefaultComm.h</label>
        <link refid="DefaultComm_8h_source"/>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1882" relation="include">
        </childnode>
      </node>
      <node id="1864">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="1865" relation="include">
        </childnode>
        <childnode refid="1866" relation="include">
        </childnode>
      </node>
      <node id="1863">
        <label>time.h</label>
      </node>
      <node id="1872">
        <label>SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
      </node>
      <node id="1886">
        <label>ClientComm.h</label>
        <link refid="ClientComm_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1884" relation="include">
        </childnode>
        <childnode refid="1879" relation="include">
        </childnode>
      </node>
      <node id="1870">
        <label>../communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="1857" relation="include">
        </childnode>
        <childnode refid="1871" relation="include">
        </childnode>
        <childnode refid="1879" relation="include">
        </childnode>
        <childnode refid="1880" relation="include">
        </childnode>
        <childnode refid="1881" relation="include">
        </childnode>
        <childnode refid="1882" relation="include">
        </childnode>
        <childnode refid="1883" relation="include">
        </childnode>
        <childnode refid="1885" relation="include">
        </childnode>
        <childnode refid="1886" relation="include">
        </childnode>
        <childnode refid="1887" relation="include">
        </childnode>
        <childnode refid="1888" relation="include">
        </childnode>
        <childnode refid="1884" relation="include">
        </childnode>
      </node>
      <node id="1865">
        <label>regex.h</label>
      </node>
      <node id="1859">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="maxMsgCli_8c_1a88dd7d1933a98397b5b9977a27908b55" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void rand_str</definition>
        <argsstring>(char *dest, size_t length)</argsstring>
        <name>rand_str</name>
        <param>
          <type>char *</type>
          <declname>dest</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>length</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/maxMsg/src/maxMsgCli.c" line="5" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/maxMsg/src/maxMsgCli.c" bodystart="5" bodyend="14"/>
      </memberdef>
      <memberdef kind="function" id="maxMsgCli_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/maxMsg/src/maxMsgCli.c" line="17" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/maxMsg/src/maxMsgCli.c" bodystart="17" bodyend="58"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;CisInterface.h&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">void</highlight><highlight class="normal"><sp/>rand_str(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*dest,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>length)<sp/>{</highlight></codeline>
<codeline lineno="6"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>charset[]<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;0123456789&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;abcdefghijklmnopqrstuvwxyz&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(length--<sp/>&gt;<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>index<sp/>=<sp/>(size_t)((</highlight><highlight class="keywordtype">double</highlight><highlight class="normal">)<sp/>rand()<sp/>/<sp/>RAND_MAX<sp/>*<sp/>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal"><sp/>charset<sp/>-<sp/>1));</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/>*dest++<sp/>=<sp/>charset[index];</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/>*dest<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="14"><highlight class="normal">}</highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><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="18"><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//char<sp/>output[CIS_MSG_BUF];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//char<sp/>input[CIS_MSG_BUF];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>msg_size<sp/>=<sp/>CIS_MSG_BUF;</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*output<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)malloc(msg_size);</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*input<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)malloc(msg_size);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>Hello<sp/>message<sp/>size<sp/>is<sp/>%d.\n&quot;</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)msg_size);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>a<sp/>max<sp/>message,<sp/>send/recv<sp/>and<sp/>verify</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/>cisRpc_t<sp/>rpc<sp/>=<sp/>cisRpcClient(</highlight><highlight class="stringliteral">&quot;maxMsgSrv_maxMsgCli&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%s&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;%s&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>a<sp/>max<sp/>message</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/>rand_str(output,<sp/>msg_size);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>sending<sp/>%.10s...\n&quot;</highlight><highlight class="normal">,<sp/>output);</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Call<sp/>RPC<sp/>server</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rpcCall(rpc,<sp/>output,<sp/>input)<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>RPC<sp/>ERROR\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/>free(output);</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/>free(input);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>received<sp/>%.10s...\n&quot;</highlight><highlight class="normal">,<sp/>input);</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>to<sp/>see<sp/>if<sp/>response<sp/>matches</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strncmp(output,<sp/>input,<sp/>msg_size))<sp/>{</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>ERROR:<sp/>input/output<sp/>do<sp/>not<sp/>match\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>free(output);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>free(input);</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>CONFIRM\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>All<sp/>done,<sp/>free<sp/>and<sp/>say<sp/>goodbye</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/>printf(</highlight><highlight class="stringliteral">&quot;maxMsgCli(C):<sp/>Goodbye!\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/>free(output);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/>free(input);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="58"><highlight class="normal">}</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/maxMsg/src/maxMsgCli.c"/>
  </compounddef>
</doxygen>
