<?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="tools_8h" kind="file" language="C++">
    <compoundname>tools.h</compoundname>
    <includes local="no">string.h</includes>
    <includes local="no">stdio.h</includes>
    <includes local="no">stdlib.h</includes>
    <includes local="no">stdarg.h</includes>
    <includes local="no">errno.h</includes>
    <includes local="no">time.h</includes>
    <includes refid="regex__posix_8h" local="yes">regex_posix.h</includes>
    <includes refid="stdint_8h" local="no">stdint.h</includes>
    <includes local="no">unistd.h</includes>
    <includedby refid="AsciiFileComm_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h</includedby>
    <includedby refid="AsciiTableComm_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/AsciiTableComm.h</includedby>
    <includedby refid="ClientComm_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/ClientComm.h</includedby>
    <includedby refid="comm__header_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/comm_header.h</includedby>
    <includedby refid="CommBase_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/CommBase.h</includedby>
    <includedby refid="communication_8h" local="no">/root/cis_interface/cis_interface/cis_interface/communication/communication.h</includedby>
    <includedby refid="AsciiFile_8h" local="no">/root/cis_interface/cis_interface/cis_interface/dataio/AsciiFile.h</includedby>
    <includedby refid="AsciiTable_8h" local="no">/root/cis_interface/cis_interface/cis_interface/dataio/AsciiTable.h</includedby>
    <includedby refid="CisInterface_8h" local="no">/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.h</includedby>
    <includedby refid="PsiInterface_8h" local="no">/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.h</includedby>
    <includedby refid="AsciiTableSerialize_8h" local="no">/root/cis_interface/cis_interface/cis_interface/serialize/AsciiTableSerialize.h</includedby>
    <includedby refid="FormatSerialize_8h" local="no">/root/cis_interface/cis_interface/cis_interface/serialize/FormatSerialize.h</includedby>
    <includedby refid="ObjSerialize_8h" local="no">/root/cis_interface/cis_interface/cis_interface/serialize/ObjSerialize.h</includedby>
    <includedby refid="PlySerialize_8h" local="no">/root/cis_interface/cis_interface/cis_interface/serialize/PlySerialize.h</includedby>
    <includedby refid="serialize_8h" local="yes">/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h</includedby>
    <includedby refid="SerializeBase_8h" local="no">/root/cis_interface/cis_interface/cis_interface/serialize/SerializeBase.h</includedby>
    <incdepgraph>
      <node id="3010">
        <label>stdint.h</label>
        <link refid="stdint_8h_source"/>
        <childnode refid="3011" relation="include">
        </childnode>
        <childnode refid="3012" relation="include">
        </childnode>
      </node>
      <node id="3005">
        <label>stdarg.h</label>
      </node>
      <node id="3004">
        <label>stdlib.h</label>
      </node>
      <node id="3006">
        <label>errno.h</label>
      </node>
      <node id="3012">
        <label>stddef.h</label>
      </node>
      <node id="3001">
        <label>/root/cis_interface/cis_interface/cis_interface/tools.h</label>
        <link refid="tools_8h"/>
        <childnode refid="3002" relation="include">
        </childnode>
        <childnode refid="3003" relation="include">
        </childnode>
        <childnode refid="3004" relation="include">
        </childnode>
        <childnode refid="3005" relation="include">
        </childnode>
        <childnode refid="3006" relation="include">
        </childnode>
        <childnode refid="3007" relation="include">
        </childnode>
        <childnode refid="3008" relation="include">
        </childnode>
        <childnode refid="3010" relation="include">
        </childnode>
        <childnode refid="3013" relation="include">
        </childnode>
      </node>
      <node id="3011">
        <label>wchar.h</label>
      </node>
      <node id="3002">
        <label>string.h</label>
      </node>
      <node id="3013">
        <label>unistd.h</label>
      </node>
      <node id="3008">
        <label>regex_posix.h</label>
        <link refid="regex__posix_8h_source"/>
        <childnode refid="3009" relation="include">
        </childnode>
        <childnode refid="3010" relation="include">
        </childnode>
      </node>
      <node id="3007">
        <label>time.h</label>
      </node>
      <node id="3009">
        <label>regex.h</label>
      </node>
      <node id="3003">
        <label>stdio.h</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="3021">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/AsciiTableComm.h</label>
        <link refid="AsciiTableComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3031">
        <label>/root/cis_interface/cis_interface/cis_interface/dataio/AsciiTable.h</label>
        <link refid="AsciiTable_8h_source"/>
        <childnode refid="3015" relation="include">
        </childnode>
        <childnode refid="3021" relation="include">
        </childnode>
        <childnode refid="3023" relation="include">
        </childnode>
        <childnode refid="3017" relation="include">
        </childnode>
        <childnode refid="3020" relation="include">
        </childnode>
        <childnode refid="3032" relation="include">
        </childnode>
        <childnode refid="3034" relation="include">
        </childnode>
      </node>
      <node id="3015">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/AsciiFileComm.h</label>
        <link refid="AsciiFileComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3032">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/AsciiTableSerialize.h</label>
        <link refid="AsciiTableSerialize_8h_source"/>
        <childnode refid="3033" relation="include">
        </childnode>
      </node>
      <node id="3035">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/ObjSerialize.h</label>
        <link refid="ObjSerialize_8h_source"/>
        <childnode refid="3033" relation="include">
        </childnode>
      </node>
      <node id="3019">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.hpp</label>
        <link refid="PsiInterface_8hpp_source"/>
      </node>
      <node id="3014">
        <label>/root/cis_interface/cis_interface/cis_interface/tools.h</label>
        <link refid="tools_8h"/>
        <childnode refid="3015" relation="include">
        </childnode>
        <childnode refid="3021" relation="include">
        </childnode>
        <childnode refid="3022" relation="include">
        </childnode>
        <childnode refid="3023" relation="include">
        </childnode>
        <childnode refid="3028" relation="include">
        </childnode>
        <childnode refid="3016" relation="include">
        </childnode>
        <childnode refid="3030" relation="include">
        </childnode>
        <childnode refid="3031" relation="include">
        </childnode>
        <childnode refid="3017" relation="include">
        </childnode>
        <childnode refid="3020" relation="include">
        </childnode>
        <childnode refid="3032" relation="include">
        </childnode>
        <childnode refid="3034" relation="include">
        </childnode>
        <childnode refid="3035" relation="include">
        </childnode>
        <childnode refid="3036" relation="include">
        </childnode>
        <childnode refid="3033" relation="include">
        </childnode>
        <childnode refid="3037" relation="include">
        </childnode>
      </node>
      <node id="3034">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/FormatSerialize.h</label>
        <link refid="FormatSerialize_8h_source"/>
        <childnode refid="3033" relation="include">
        </childnode>
      </node>
      <node id="3029">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/IPCComm.h</label>
        <link refid="IPCComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3025">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/ServerComm.h</label>
        <link refid="ServerComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3017">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.h</label>
        <link refid="CisInterface_8h_source"/>
        <childnode refid="3018" relation="include">
        </childnode>
        <childnode refid="3020" relation="include">
        </childnode>
      </node>
      <node id="3033">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/serialize.h</label>
        <link refid="serialize_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3030">
        <label>/root/cis_interface/cis_interface/cis_interface/dataio/AsciiFile.h</label>
        <link refid="AsciiFile_8h_source"/>
        <childnode refid="3015" relation="include">
        </childnode>
        <childnode refid="3031" relation="include">
        </childnode>
        <childnode refid="3017" relation="include">
        </childnode>
        <childnode refid="3020" relation="include">
        </childnode>
      </node>
      <node id="3036">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/PlySerialize.h</label>
        <link refid="PlySerialize_8h_source"/>
        <childnode refid="3033" relation="include">
        </childnode>
      </node>
      <node id="3023">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/comm_header.h</label>
        <link refid="comm__header_8h_source"/>
        <childnode refid="3022" relation="include">
        </childnode>
        <childnode refid="3016" relation="include">
        </childnode>
        <childnode refid="3024" relation="include">
        </childnode>
        <childnode refid="3025" relation="include">
        </childnode>
        <childnode refid="3026" relation="include">
        </childnode>
      </node>
      <node id="3028">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/CommBase.h</label>
        <link refid="CommBase_8h_source"/>
        <childnode refid="3015" relation="include">
        </childnode>
        <childnode refid="3021" relation="include">
        </childnode>
        <childnode refid="3022" relation="include">
        </childnode>
        <childnode refid="3016" relation="include">
        </childnode>
        <childnode refid="3027" relation="include">
        </childnode>
        <childnode refid="3029" relation="include">
        </childnode>
        <childnode refid="3024" relation="include">
        </childnode>
        <childnode refid="3025" relation="include">
        </childnode>
        <childnode refid="3026" relation="include">
        </childnode>
      </node>
      <node id="3024">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/RPCComm.h</label>
        <link refid="RPCComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3020">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/PsiInterface.h</label>
        <link refid="PsiInterface_8h_source"/>
      </node>
      <node id="3026">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/ZMQComm.h</label>
        <link refid="ZMQComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
        <childnode refid="3027" relation="include">
        </childnode>
      </node>
      <node id="3018">
        <label>/root/cis_interface/cis_interface/cis_interface/interface/CisInterface.hpp</label>
        <link refid="CisInterface_8hpp_source"/>
        <childnode refid="3019" relation="include">
        </childnode>
      </node>
      <node id="3027">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/DefaultComm.h</label>
        <link refid="DefaultComm_8h_source"/>
        <childnode refid="3022" relation="include">
        </childnode>
        <childnode refid="3016" relation="include">
        </childnode>
        <childnode refid="3024" relation="include">
        </childnode>
        <childnode refid="3025" relation="include">
        </childnode>
      </node>
      <node id="3037">
        <label>/root/cis_interface/cis_interface/cis_interface/serialize/SerializeBase.h</label>
        <link refid="SerializeBase_8h_source"/>
        <childnode refid="3032" relation="include">
        </childnode>
        <childnode refid="3034" relation="include">
        </childnode>
        <childnode refid="3033" relation="include">
        </childnode>
      </node>
      <node id="3022">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/ClientComm.h</label>
        <link refid="ClientComm_8h_source"/>
        <childnode refid="3016" relation="include">
        </childnode>
      </node>
      <node id="3016">
        <label>/root/cis_interface/cis_interface/cis_interface/communication/communication.h</label>
        <link refid="communication_8h_source"/>
        <childnode refid="3017" relation="include">
        </childnode>
        <childnode refid="3020" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="tools_8h_1aefdf72b7d0ea9aafd7f883a5c57a8475" prot="public" static="no">
        <name>cis_getpid</name>
        <initializer>getpid</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="33" column="13" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="33" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a344192568b1467d5eaa4899a04d5f6da" prot="public" static="no">
        <name>CIS_MSG_MAX</name>
        <initializer>1048576</initializer>
        <briefdescription>
<para>Maximum message size. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="40" column="10" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="40" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1ab249664f484fc1b133c4c8154f586e86" prot="public" static="no">
        <name>CIS_MSG_EOF</name>
        <initializer>&quot;EOF!!!&quot;</initializer>
        <briefdescription>
<para>End of file message. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="43" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1af0c478695855cb36089c4a0408e65cb7" prot="public" static="no">
        <name>CIS_MSG_BUF</name>
        <initializer>2048</initializer>
        <briefdescription>
<para>Resonable size for buffer. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="45" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a13d63aa80caf0628b6dc000fb9a5d88c" prot="public" static="no">
        <name>CIS_SLEEP_TIME</name>
        <initializer>250000</initializer>
        <briefdescription>
<para>Sleep time in micro-seconds. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="47" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="47" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1ab4898bbe6eb1c1d8b2ef19ada4dee530" prot="public" static="no">
        <name>PSI_MSG_MAX</name>
        <initializer>CIS_MSG_MAX</initializer>
        <briefdescription>
<para>Define old style names for compatibility. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="50" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="50" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1ab45c4bd3e4aa831a17b6ba54aa696b1c" prot="public" static="no">
        <name>PSI_MSG_BUF</name>
        <initializer>CIS_MSG_BUF</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="51" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="51" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a51f9d450ac9270c1f2ac6abd50085825" prot="public" static="no">
        <name>PSI_MSG_EOF</name>
        <initializer>CIS_MSG_EOF</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="52" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="52" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a24d3e1f410993a0fca45e595d968ad97" prot="public" static="no">
        <name>cislog_error</name>
        <initializer>cisError</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="168" column="10" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="168" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a960010c7655b7a1d94f1f6e25d66b1b4" prot="public" static="no">
        <name>cislog_info</name>
        <initializer>while (0) cisInfo</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="169" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="169" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="tools_8h_1a16c492447b170a746cf318dde74a224b" prot="public" static="no">
        <name>cislog_debug</name>
        <initializer>while (0) cisDebug</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="170" column="9" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="170" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="tools_8h_1a8a0caec7d9d9e18f3aba54e801ae323e" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int _cis_error_flag</definition>
        <argsstring></argsstring>
        <name>_cis_error_flag</name>
        <initializer>= 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="56" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="56" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="tools_8h_1a66d16e41d3f95c4ff44e82a7932286d7" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>unsigned long</type>
        <definition>static unsigned long ptr2seed</definition>
        <argsstring>(void *ptr)</argsstring>
        <name>ptr2seed</name>
        <param>
          <type>void *</type>
          <declname>ptr</declname>
        </param>
        <briefdescription>
<para>Get an unsigned long seed from the least significant 32bits of a pointer. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer that should be turned into a seed. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Unsigned long seed. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="65" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="65" bodyend="69"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a8001e7a0b278e9db59c17791aa91ce8f" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void cisLog</definition>
        <argsstring>(const char *prefix, const char *fmt, va_list ap)</argsstring>
        <name>cisLog</name>
        <param>
          <type>const char *</type>
          <declname>prefix</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>va_list</type>
          <declname>ap</declname>
        </param>
        <briefdescription>
<para>Print a log message. Prints a formatted message, prepending it with the process id and appending it with a newline. </para>        </briefdescription>
        <detaileddescription>
<para>Logging</para><para>Alliases are set at compile-time based on the value of CIS_CLIENT_DEBUG. If set to INFO, only messages logged with info or error alias are printed. If set to DEBUG, messages logged with error, info or debug aliases are printed. Otherwise, only error messages are printed. If the CIS_CLIENT_DEBUG is changed, any code including this header must be recompiled for the change to take effect.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">prefix</parametername>
</parameternamelist>
<parameterdescription>
<para>a constant character pointer to the prefix that should preceed the message and process id. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">fmt</parametername>
</parameternamelist>
<parameterdescription>
<para>a constant character pointer to a format string. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ap</parametername>
</parameternamelist>
<parameterdescription>
<para>va_list of arguments to be formatted in the format string. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="96" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="96" bodyend="101"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a782c8a9e1a054e3a99a98bc0d0c9e97a" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void cisInfo</definition>
        <argsstring>(const char *fmt,...)</argsstring>
        <name>cisInfo</name>
        <param>
          <type>const char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>...</type>
        </param>
        <briefdescription>
<para>Print an info log message. Prints a formatted message, prepending it with INFO and the process id. A newline character is added to the end of the message. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">fmt</parametername>
</parameternamelist>
<parameterdescription>
<para>a constant character pointer to a format string. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">...</parametername>
</parameternamelist>
<parameterdescription>
<para>arguments to be formatted in the format string. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="111" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="111" bodyend="116"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a65d4776f785477e4c4931f322734525a" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void cisDebug</definition>
        <argsstring>(const char *fmt,...)</argsstring>
        <name>cisDebug</name>
        <param>
          <type>const char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>...</type>
        </param>
        <briefdescription>
<para>Print an debug log message. Prints a formatted message, prepending it with DEBUG and the process id. A newline character is added to the end of the message. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">fmt</parametername>
</parameternamelist>
<parameterdescription>
<para>a constant character pointer to a format string. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">...</parametername>
</parameternamelist>
<parameterdescription>
<para>arguments to be formatted in the format string. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="126" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="126" bodyend="131"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a19ca2e1184d3a411dbf5e235aa229fda" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>static void cisError</definition>
        <argsstring>(const char *fmt,...)</argsstring>
        <name>cisError</name>
        <param>
          <type>const char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>...</type>
        </param>
        <briefdescription>
<para>Print an error log message. Prints a formatted message, prepending it with ERROR and the process id. A newline character is added to the end of the message. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">fmt</parametername>
</parameternamelist>
<parameterdescription>
<para>a constant character pointer to a format string. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">...</parametername>
</parameternamelist>
<parameterdescription>
<para>arguments to be formatted in the format string. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="141" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="141" bodyend="147"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1ae044164e1786583b0ac543f12d29b8ba" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int not_empty_match</definition>
        <argsstring>(const char *pattern, const char *buf)</argsstring>
        <name>not_empty_match</name>
        <param>
          <type>const char *</type>
          <declname>pattern</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
<para>Check if a character array matches a message and is non-zero length. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">pattern</parametername>
</parameternamelist>
<parameterdescription>
<para>constant character pointer to string that should be checked. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>constant character pointer to string that should be checked. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 1 if buf matches pattern, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="180" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="180" bodyend="190"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a781fa4a456e4aaaeb0b11027cb24cea4" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int is_eof</definition>
        <argsstring>(const char *buf)</argsstring>
        <name>is_eof</name>
        <param>
          <type>const char *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
<para>Check if a character array matches the internal EOF message. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>constant character pointer to string that should be checked. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 1 if buf is the EOF message, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="198" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="198" bodyend="200"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1aade62baece23cce7450bf3ff7785a503" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int is_recv</definition>
        <argsstring>(const char *buf)</argsstring>
        <name>is_recv</name>
        <param>
          <type>const char *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
<para>Check if a character array matches &quot;recv&quot;. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>constant character pointer to string that should be checked. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 1 if buf is the &quot;recv&quot; message, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="208" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="208" bodyend="210"/>
      </memberdef>
      <memberdef kind="function" id="tools_8h_1a05772e82c9aace3d2df291de6eb38c0a" prot="public" static="yes" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>int</type>
        <definition>static int is_send</definition>
        <argsstring>(const char *buf)</argsstring>
        <name>is_send</name>
        <param>
          <type>const char *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
<para>Check if a character array matches &quot;send&quot;. </para>        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">buf</parametername>
</parameternamelist>
<parameterdescription>
<para>constant character pointer to string that should be checked. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>int 1 if buf is the &quot;send&quot; message, 0 otherwise. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/tools.h" line="218" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/tools.h" bodystart="218" bodyend="220"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#ifndef<sp/>CISTOOLS_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CISTOOLS_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;string.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdio.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdlib.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdarg.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;errno.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;time.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><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="12"><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="13"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Platform<sp/>specific</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;regex_win32.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;stdint.h&quot;</highlight><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Use<sp/>local<sp/>copy<sp/>for<sp/>MSVC<sp/>support</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Prevent<sp/>windows.h<sp/>from<sp/>including<sp/>winsock.h</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>WIN32_LEAN_AND_MEAN</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>WIN32_LEAN_AND_MEAN</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;windows.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;getline_win32.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;process.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cis_getpid<sp/>_getpid</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>sleep(tsec)<sp/>Sleep(1000*tsec)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>usleep(usec)<sp/>Sleep(usec/1000)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;regex_posix.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdint.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;unistd.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cis_getpid<sp/>getpid</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="preprocessor">#ifdef<sp/>IPCDEF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CIS_MSG_MAX<sp/>2048</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CIS_MSG_MAX<sp/>1048576</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="preprocessor">#define<sp/>CIS_MSG_EOF<sp/>&quot;EOF!!!&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="preprocessor">#define<sp/>CIS_MSG_BUF<sp/>2048</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="preprocessor">#define<sp/>CIS_SLEEP_TIME<sp/>250000</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="preprocessor">#define<sp/>PSI_MSG_MAX<sp/>CIS_MSG_MAX</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>PSI_MSG_BUF<sp/>CIS_MSG_BUF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>PSI_MSG_EOF<sp/>CIS_MSG_EOF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>PSI_DEBUG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CIS_DEBUG<sp/>PSI_DEBUG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_cis_error_flag<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>ptr2seed(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr)<sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>uint64_t<sp/>v<sp/>=<sp/>(uint64_t)ptr;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>seed<sp/>=<sp/>(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/>long)(v<sp/>&amp;<sp/>0xFFFFFFFFLL);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>seed;</highlight></codeline>
<codeline lineno="69"><highlight class="normal">};</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="comment">//==============================================================================</highlight></codeline>
<codeline lineno="84"><highlight class="comment"></highlight><highlight class="comment">//==============================================================================</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cisLog(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>prefix,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fmt,<sp/>va_list<sp/>ap)<sp/>{</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/>fprintf(stdout,<sp/></highlight><highlight class="stringliteral">&quot;%s:<sp/>%d:<sp/>&quot;</highlight><highlight class="normal">,<sp/>prefix,<sp/>cis_getpid());</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>vfprintf(stdout,<sp/>fmt,<sp/>ap);</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>fprintf(stdout,<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/>fflush(stdout);</highlight></codeline>
<codeline lineno="101"><highlight class="normal">};</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cisInfo(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fmt,<sp/>...)<sp/>{</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/>va_list<sp/>ap;</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/>va_start(ap,<sp/>fmt);</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/>cisLog(</highlight><highlight class="stringliteral">&quot;INFO&quot;</highlight><highlight class="normal">,<sp/>fmt,<sp/>ap);</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>va_end(ap);</highlight></codeline>
<codeline lineno="116"><highlight class="normal">};</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="125"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cisDebug(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fmt,<sp/>...)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/>va_list<sp/>ap;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/>va_start(ap,<sp/>fmt);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/>cisLog(</highlight><highlight class="stringliteral">&quot;DEBUG&quot;</highlight><highlight class="normal">,<sp/>fmt,<sp/>ap);</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/>va_end(ap);</highlight></codeline>
<codeline lineno="131"><highlight class="normal">};</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="140"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cisError(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fmt,<sp/>...)<sp/>{</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/>va_list<sp/>ap;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/>va_start(ap,<sp/>fmt);</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/>cisLog(</highlight><highlight class="stringliteral">&quot;ERROR&quot;</highlight><highlight class="normal">,<sp/>fmt,<sp/>ap);</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/>va_end(ap);</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/>_cis_error_flag<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="147"><highlight class="normal">};</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>CIS_DEBUG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>CIS_DEBUG<sp/>&lt;=<sp/>10</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_error<sp/>cisError</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_info<sp/>cisInfo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_debug<sp/>cisDebug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>CIS_DEBUG<sp/>&lt;=<sp/>20</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_error<sp/>cisError</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_info<sp/>cisInfo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_debug<sp/>while<sp/>(0)<sp/>cisDebug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>CIS_DEBUG<sp/>&lt;=<sp/>40</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_error<sp/>cisError</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_info<sp/>while<sp/>(0)<sp/>cisInfo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_debug<sp/>while<sp/>(0)<sp/>cisDebug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_error<sp/>while<sp/>(0)<sp/>cisError</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_info<sp/>while<sp/>(0)<sp/>cisInfo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_debug<sp/>while<sp/>(0)<sp/>cisDebug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_error<sp/>cisError</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_info<sp/>while<sp/>(0)<sp/>cisInfo</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>cislog_debug<sp/>while<sp/>(0)<sp/>cisDebug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>not_empty_match(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*pattern,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf)<sp/>{</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(buf<sp/>==<sp/>NULL)</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(buf[0]<sp/>==<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcmp(buf,<sp/>pattern)<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="190"><highlight class="normal">};</highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>is_eof(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf)<sp/>{</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>not_empty_match(CIS_MSG_EOF,<sp/>buf);</highlight></codeline>
<codeline lineno="200"><highlight class="normal">};</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>is_recv(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf)<sp/>{</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>not_empty_match(</highlight><highlight class="stringliteral">&quot;recv&quot;</highlight><highlight class="normal">,<sp/>buf);</highlight></codeline>
<codeline lineno="210"><highlight class="normal">};</highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>is_send(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf)<sp/>{</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>not_empty_match(</highlight><highlight class="stringliteral">&quot;send&quot;</highlight><highlight class="normal">,<sp/>buf);</highlight></codeline>
<codeline lineno="220"><highlight class="normal">};</highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><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="223"><highlight class="normal">}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*CISTOOLS_H_*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/tools.h"/>
  </compounddef>
</doxygen>
