<?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="AsciiFileComm_8h" kind="file" language="C++">
    <compoundname>AsciiFileComm.h</compoundname>
    <includes refid="tools_8h" local="no">../tools.h</includes>
    <includes refid="CommBase_8h" local="no">CommBase.h</includes>
    <includes refid="AsciiFile_8h" local="no">../dataio/AsciiFile.h</includes>
    <includes refid="AsciiTable_8h" local="no">../dataio/AsciiTable.h</includes>
    <includedby refid="communication_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/communication.h</includedby>
    <incdepgraph>
      <node id="10">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>stdarg.h</label>
      </node>
      <node id="16">
        <label>../dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="1" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>stdlib.h</label>
      </node>
      <node id="6">
        <label>errno.h</label>
      </node>
      <node id="0">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h"/>
        <childnode refid="1" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>stddef.h</label>
      </node>
      <node id="1">
        <label>../tools.h</label>
        <link refid="tools_8h_source"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>../dataio/AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="1" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>wchar.h</label>
      </node>
      <node id="2">
        <label>string.h</label>
      </node>
      <node id="14">
        <label>CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="1" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>unistd.h</label>
      </node>
      <node id="8">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>time.h</label>
      </node>
      <node id="9">
        <label>regex.h</label>
      </node>
      <node id="3">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="17">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h"/>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.hpp</label>
        <link refid="PsiInterface_8hpp_source"/>
      </node>
      <node id="19">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.h</label>
        <link refid="PsiInterface_8h_source"/>
      </node>
      <node id="20">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.hpp</label>
        <link refid="CisInterface_8hpp_source"/>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="AsciiFileComm_8h_1a069ddee38cb782c06d5d18d08dd95c74" prot="public" static="no">
        <name>ascii_file_comm_send_nolimit</name>
        <initializer>ascii_file_comm_send</initializer>
        <briefdescription>
<para>Send a large message to an output comm. Alias for sending short message. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="137" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="137" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="AsciiFileComm_8h_1a8d1fcb8beb9b958cb208bf7c69844d4d" prot="public" static="no">
        <name>ascii_file_comm_recv_nolimit</name>
        <initializer>ascii_file_comm_recv</initializer>
        <briefdescription>
<para>Receive a large message from an input comm. Alias for receiving short message. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="143" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="143" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="AsciiFileComm_8h_1a045a7efec80315e890e5c0b328039cef" prot="public" static="yes" mutable="no">
        <type>unsigned</type>
        <definition>unsigned _cisAsciiFilesCreated</definition>
        <argsstring></argsstring>
        <name>_cisAsciiFilesCreated</name>
        <briefdescription>
<para>Flag for checking if this header has already been included. </para>        </briefdescription>
        <detaileddescription>
<para>Number of files creates. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="15" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="15" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="AsciiFileComm_8h_1a0edbf157e593ee8547ad892fdfa80cbb" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int init_ascii_file_comm</definition>
        <argsstring>(comm_t *comm)</argsstring>
        <name>init_ascii_file_comm</name>
        <param>
          <type><ref refid="structcomm__t" kindref="compound">comm_t</ref> *</type>
          <declname>comm</declname>
        </param>
        <briefdescription>
<para>Initialize a ASCII file comm. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">comm</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structcomm__t" kindref="compound">comm_t</ref> Comm structure initialized with init_comm_base. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int -1 if the comm could not be initialized. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="23" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="23" bodyend="44"/>
      </memberdef>
      <memberdef kind="function" id="AsciiFileComm_8h_1aa56c68df43ed823497ddbb57ea016183" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int new_ascii_file_address</definition>
        <argsstring>(comm_t *comm)</argsstring>
        <name>new_ascii_file_address</name>
        <param>
          <type><ref refid="structcomm__t" kindref="compound">comm_t</ref> *</type>
          <declname>comm</declname>
        </param>
        <briefdescription>
<para>Create a new file comm. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">comm</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structcomm__t" kindref="compound">comm_t</ref> * Comm structure initialized with new_comm_base. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int -1 if the address could not be created. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="52" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="52" bodyend="56"/>
      </memberdef>
      <memberdef kind="function" id="AsciiFileComm_8h_1a3a3c6ad732e3dc4a2b68a4b83ab73839" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int free_ascii_file_comm</definition>
        <argsstring>(comm_t *x)</argsstring>
        <name>free_ascii_file_comm</name>
        <param>
          <type><ref refid="structcomm__t" kindref="compound">comm_t</ref> *</type>
          <declname>x</declname>
        </param>
        <briefdescription>
<para>Perform deallocation for ASCII file communicator. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">x</parametername>
</parameternamelist>
<parameterdescription>
<para>comm_t* Pointer to ommunicator to deallocate. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 1 if there is and error, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="64" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="64" bodyend="72"/>
      </memberdef>
      <memberdef kind="function" id="AsciiFileComm_8h_1a2a1e1d1f718000595a1e7fae1762dafd" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int ascii_file_comm_nmsg</definition>
        <argsstring>(const comm_t x)</argsstring>
        <name>ascii_file_comm_nmsg</name>
        <param>
          <type>const <ref refid="structcomm__t" kindref="compound">comm_t</ref></type>
          <declname>x</declname>
        </param>
        <briefdescription>
<para>Get number of messages in the comm. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">x</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structcomm__t" kindref="compound">comm_t</ref> Communicator to check. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int Number of messages. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="80" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="80" bodyend="87"/>
      </memberdef>
      <memberdef kind="function" id="AsciiFileComm_8h_1aac7d41ec63361f077739457d24c3198f" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int ascii_file_comm_send</definition>
        <argsstring>(const comm_t x, const char *data, const size_t len)</argsstring>
        <name>ascii_file_comm_send</name>
        <param>
          <type>const <ref refid="structcomm__t" kindref="compound">comm_t</ref></type>
          <declname>x</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>const size_t</type>
          <declname>len</declname>
        </param>
        <briefdescription>
<para>Send a message to the comm. Send a message smaller than PSI_MSG_MAX bytes to an output comm. If the message is larger, it will not be sent. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">x</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structcomm__t" kindref="compound">comm_t</ref> structure that comm should be sent to. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">data</parametername>
</parameternamelist>
<parameterdescription>
<para>character pointer to message that should be sent. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">len</parametername>
</parameternamelist>
<parameterdescription>
<para>size_t length of message to be sent. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 0 if send succesfull, 1 if send unsuccessful. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="99" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="99" bodyend="108"/>
      </memberdef>
      <memberdef kind="function" id="AsciiFileComm_8h_1a3db28f5aba7ab39b4fe0cb3b6c1553f3" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int ascii_file_comm_recv</definition>
        <argsstring>(const comm_t x, char **data, size_t len, const int allow_realloc)</argsstring>
        <name>ascii_file_comm_recv</name>
        <param>
          <type>const <ref refid="structcomm__t" kindref="compound">comm_t</ref></type>
          <declname>x</declname>
        </param>
        <param>
          <type>char **</type>
          <declname>data</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>len</declname>
        </param>
        <param>
          <type>const int</type>
          <declname>allow_realloc</declname>
        </param>
        <briefdescription>
<para>Receive a message from an input comm. Receive a message smaller than PSI_MSG_MAX bytes from an input comm. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">x</parametername>
</parameternamelist>
<parameterdescription>
<para><ref refid="structcomm__t" kindref="compound">comm_t</ref> structure that message should be sent to. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">data</parametername>
</parameternamelist>
<parameterdescription>
<para>char ** pointer to allocated buffer where the message should be saved. This should be a malloc&apos;d buffer if allow_realloc is 1. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">len</parametername>
</parameternamelist>
<parameterdescription>
<para>const size_t length of the allocated message buffer in bytes. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">allow_realloc</parametername>
</parameternamelist>
<parameterdescription>
<para>const int If 1, the buffer will be realloced if it is not large enought. Otherwise an error will be returned. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int -1 if message could not be received. Length of the received message if message was received. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" line="123" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h" bodystart="123" bodyend="131"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="2"><highlight class="preprocessor">#ifndef<sp/>CISASCIIFILECOMM_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CISASCIIFILECOMM_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;../tools.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CommBase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;../dataio/AsciiFile.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;../dataio/AsciiTable.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus<sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>a<sp/>C++<sp/>compiler,<sp/>use<sp/>C<sp/>linkage<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;C&quot;</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/>_cisAsciiFilesCreated;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>init_ascii_file_comm(<ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>*comm)<sp/>{</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Don&apos;t<sp/>check<sp/>base<sp/>validity<sp/>since<sp/>address<sp/>is<sp/>name</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/>comm-&gt;<ref refid="structcomm__t_1a2d004dd7203d970ac2f398a25276ad2f" kindref="member">is_file</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/>comm-&gt;<ref refid="structcomm__t_1a9bd691f3ae56e098b9edff7ad1628b3b" kindref="member">type</ref><sp/>=<sp/>ASCII_FILE_COMM;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/>strcpy(comm-&gt;<ref refid="structcomm__t_1aca2bf1fc2b62c779c50848501f31fbf0" kindref="member">address</ref>,<sp/>comm-&gt;<ref refid="structcomm__t_1a0c8b237f48a50a181eab8447a87ec172" kindref="member">name</ref>);</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref><sp/>*handle<sp/>=<sp/>(<ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref>*)malloc(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref>));</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(handle<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;init_ascii_file_comm:<sp/>Failed<sp/>to<sp/>malloc<sp/>asciiFile<sp/>handle.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcmp(comm-&gt;<ref refid="structcomm__t_1a1940bbad161f8cf5f868ff4cf4e95cda" kindref="member">direction</ref>,<sp/></highlight><highlight class="stringliteral">&quot;send&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/>handle[0]<sp/>=<sp/>asciiFile(comm-&gt;<ref refid="structcomm__t_1aca2bf1fc2b62c779c50848501f31fbf0" kindref="member">address</ref>,<sp/></highlight><highlight class="stringliteral">&quot;w&quot;</highlight><highlight class="normal">,<sp/>NULL,<sp/>NULL);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/>handle[0]<sp/>=<sp/>asciiFile(comm-&gt;<ref refid="structcomm__t_1aca2bf1fc2b62c779c50848501f31fbf0" kindref="member">address</ref>,<sp/></highlight><highlight class="stringliteral">&quot;r&quot;</highlight><highlight class="normal">,<sp/>NULL,<sp/>NULL);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/>comm-&gt;<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)handle;</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>af_open(handle);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/>cislog_error(</highlight><highlight class="stringliteral">&quot;init_ascii_file_comm:<sp/>Could<sp/>not<sp/>open<sp/>%s&quot;</highlight><highlight class="normal">,<sp/>comm-&gt;<ref refid="structcomm__t_1a0c8b237f48a50a181eab8447a87ec172" kindref="member">name</ref>);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>comm-&gt;<ref refid="structcomm__t_1afe8a58007e764fb3f2e906025f89fe72" kindref="member">valid</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="44"><highlight class="normal">};</highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>new_ascii_file_address(<ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>*comm)<sp/>{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/>sprintf(comm-&gt;<ref refid="structcomm__t_1a0c8b237f48a50a181eab8447a87ec172" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">&quot;temp%d&quot;</highlight><highlight class="normal">,<sp/>_cisAsciiFilesCreated);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret<sp/>=<sp/>init_ascii_file_comm(comm);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="56"><highlight class="normal">};</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>free_ascii_file_comm(<ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>*x)<sp/>{</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x-&gt;<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref><sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref><sp/>*file<sp/>=<sp/>(<ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref>*)x-&gt;<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref>;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/>af_close(file);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/>free(x-&gt;<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref>);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>x-&gt;<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref><sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="72"><highlight class="normal">};</highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ascii_file_comm_nmsg(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>x)<sp/>{</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Prevent<sp/>C4100<sp/>warning<sp/>on<sp/>windows<sp/>by<sp/>referencing<sp/>param</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>x;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:<sp/>Count<sp/>lines<sp/>in<sp/>file.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="87"><highlight class="normal">};</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ascii_file_comm_send(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>x,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>len)<sp/>{</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(is_eof(data))</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Prevent<sp/>C4100<sp/>warning<sp/>on<sp/>windows<sp/>by<sp/>referencing<sp/>param</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/>len;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref><sp/>*file<sp/>=<sp/>(<ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref>*)x.<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref>;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>af_writeline_full(file[0],<sp/>data);</highlight></codeline>
<codeline lineno="108"><highlight class="normal">};</highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ascii_file_comm_recv(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structcomm__t" kindref="compound">comm_t</ref><sp/>x,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**data,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>len,</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>allow_realloc)<sp/>{</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref><sp/>*file<sp/>=<sp/>(<ref refid="structasciiFile__t" kindref="compound">asciiFile_t</ref>*)x.<ref refid="structcomm__t_1ab7b58a54178acddc3f641e3a285aab7f" kindref="member">handle</ref>;</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/>if<sp/>(allow_realloc)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>af_readline_full(file[0],<sp/>data,<sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">*)(&amp;len));</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>af_readline_full_norealloc(file[0],<sp/>data[0],<sp/>len);</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="131"><highlight class="normal">};</highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="preprocessor">#define<sp/>ascii_file_comm_send_nolimit<sp/>ascii_file_comm_send</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="preprocessor">#define<sp/>ascii_file_comm_recv_nolimit<sp/>ascii_file_comm_recv</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus<sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>a<sp/>C++<sp/>compiler,<sp/>end<sp/>C<sp/>linkage<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal">}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*CISASCIIFILECOMM_H_*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h"/>
  </compounddef>
</doxygen>
