<?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="ascii__io_8m" kind="file" language="Objective-C">
    <compoundname>ascii_io.m</compoundname>
      <sectiondef kind="var">
      <memberdef kind="variable" id="ascii__io_8m_1afc18e577af99af0c4440bcf0d486f4e6" prot="public" static="no" mutable="no">
        <type>Input &amp;output to an ASCII file line by line</type>
        <definition>Input&amp; output to an ASCII file line by line in_file</definition>
        <argsstring></argsstring>
        <name>in_file</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiFileInput" kindref="compound">CisAsciiFileInput</ref>&apos;, &apos;inputM_file&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="2" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="2" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a034f2070c23a065cbb78273e7f687f59" prot="public" static="no" mutable="no">
        <type></type>
        <definition>out_file</definition>
        <argsstring></argsstring>
        <name>out_file</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiFileOutput" kindref="compound">CisAsciiFileOutput</ref>&apos;, &apos;outputM_file&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="3" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="3" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a55fb2612d2853a899a9126579a16a561" prot="public" static="no" mutable="no">
        <type>Input &amp;output from a table row by row</type>
        <definition>Input&amp; output from a table row by row in_table</definition>
        <argsstring></argsstring>
        <name>in_table</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiTableInput" kindref="compound">CisAsciiTableInput</ref>&apos;, &apos;inputM_table&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="5" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="5" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a07478ffaf76fa41e3d6eeb75d2ac1a81" prot="public" static="no" mutable="no">
        <type></type>
        <definition>out_table</definition>
        <argsstring></argsstring>
        <name>out_table</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiTableOutput" kindref="compound">CisAsciiTableOutput</ref>&apos;, &apos;outputM_table&apos;, ...
			 &apos;%5s\t%ld\t%3.1f\t%3.1lf%+3.1lfj\n&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="6" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="6" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a38d6c5780e631a5ba7d331df87d50036" prot="public" static="no" mutable="no">
        <type>Input &amp;output from a table as an array</type>
        <definition>Input&amp; output from a table as an array in_array</definition>
        <argsstring></argsstring>
        <name>in_array</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiArrayInput" kindref="compound">CisAsciiArrayInput</ref>&apos;, &apos;inputM_array&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="9" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="9" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1ab57bdf0a2748ff4ba9feccb46316d04e" prot="public" static="no" mutable="no">
        <type></type>
        <definition>out_array</definition>
        <argsstring></argsstring>
        <name>out_array</name>
        <initializer>= CisInterface(&apos;<ref refid="classCisAsciiArrayOutput" kindref="compound">CisAsciiArrayOutput</ref>&apos;, &apos;outputM_array&apos;, ...
			 &apos;%5s\t%ld\t%3.1f\t%3.1lf%+3.1lfj\n&apos;)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="10" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="10" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1ab45d8ea6639edac36ac747cbf562be9a" prot="public" static="no" mutable="no">
        <type></type>
        <definition>exit_code</definition>
        <argsstring></argsstring>
        <name>exit_code</name>
        <initializer>= 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="12" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="12" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a7903e2dda632391a10f1b2c07bc2a219" prot="public" static="no" mutable="no">
        <type>Read lines from ASCII text file until end of file is reached As each line is</type>
        <definition>Read rows from ASCII table until end of file is reached As each row is received</definition>
        <argsstring></argsstring>
        <name>received</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="15" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="15" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1aa87f4ac2d0474d83e01f0dc7dd8edf1f" prot="public" static="no" mutable="no">
        <type></type>
        <definition>Send output to output channel If there is an the flag will be False flag</definition>
        <argsstring></argsstring>
        <name>flag</name>
        <initializer>= true</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="17" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="17" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1ae02f7c17475816f575ac2756ed693063" prot="public" static="no" mutable="no">
        <type>while flag Receive a single</type>
        <definition>while flag Receive a single line[flag, line]</definition>
        <argsstring>[flag, line]</argsstring>
        <name>line</name>
        <initializer>= in_file.recv()</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="19" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="20" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1ae3a426f493bfddf5b4a3af4e4f89b888" prot="public" static="no" mutable="no">
        <type>if flag If the receive was</type>
        <definition>else If the receive was not succesful</definition>
        <argsstring></argsstring>
        <name>succesful</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="22" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="22" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1aaa0d1af72e101521e394af651474de27" prot="public" static="no" mutable="no">
        <type></type>
        <definition>Send output to a local file ret</definition>
        <argsstring></argsstring>
        <name>ret</name>
        <initializer>= out_file.send(line)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="24" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="24" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a91cf6fbebedd86150a36e5ac3d5d3bfc" prot="public" static="no" mutable="no">
        <type></type>
        <definition>break</definition>
        <argsstring></argsstring>
        <name>break</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="28" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="28" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1afb358f48b1646c750fb9da6c6585be2b" prot="public" static="no" mutable="no">
        <type></type>
        <definition>end</definition>
        <argsstring></argsstring>
        <name>end</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="29" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="29" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a43188eb4373d55ff4393814d8baf25d9" prot="public" static="no" mutable="no">
        <type>while flag Receive a single</type>
        <definition>while flag Receive a single row[flag, line]</definition>
        <argsstring>[flag, line]</argsstring>
        <name>row</name>
        <initializer>= in_table.recv()</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="42" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a641da0a85afd179cdbbb3c5d7dd7e01b" prot="public" static="no" mutable="no">
        <type>if flag</type>
        <definition>if flag nr</definition>
        <argsstring></argsstring>
        <name>nr</name>
        <initializer>= size(arr, 1)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="68" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="68" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="ascii__io_8m_1a6f6ccfcf58b31cb6412107d9d5281426" prot="public" static="no" mutable="no">
        <type>Print each line in the array for</type>
        <definition>for i</definition>
        <argsstring></argsstring>
        <name>i</name>
        <initializer>= 1:nr
      fprintf(&apos;%5s, %d, %3.1f, %3.1f%+3.1fi\n&apos;, ...
	      char(arr{i,1}), arr{i,2}, arr{i,3}, ...
	      real(arr{i,4}), imag(arr{i,4}))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="71" column="1" bodyfile="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" bodystart="71" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="ascii__io_8m_1ad34dc43906cffb588464295900756ae3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>Read lines from ASCII text file until end of file is reached As each line is it is then sent to the output ASCII file</type>
        <definition>Read lines from ASCII text file until end of file is reached As each line is it is then sent to the output ASCII file disp</definition>
        <argsstring>(&apos;ascii_io(M):Receiving/sending ASCII file.&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;ascii_io(M):Receiving/sending ASCII file.&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="16" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1a6144dfd6aa5c3a123604d8d4f9db9689" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>if flag If the receive was send the line to output</type>
        <definition>if flag If the receive was send the line to output fprintf</definition>
        <argsstring>(&apos;File:%s&apos;, char(line))</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;File:%s&apos;</type>
        </param>
        <param>
          <type>char(line)</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="23" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1acb58dcce9da5e79d109c568816407b46" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>if</definition>
        <argsstring>(~ret)</argsstring>
        <name>if</name>
        <param>
          <type>~</type>
          <declname>ret</declname>
        </param>
        <initializer>= rpc.call(i)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="25" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1aae2b108e98db9c48aa2ecadfd68ef40b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;ascii_io(M):ERROR SENDING LINE&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;ascii_io(M):ERROR SENDING LINE&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="26" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1a89d88e47a9189484203ec7100a97216c" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual">
        <type>&apos;End of file input(Matlab</type>
        <definition>&apos;End of file input (Matlab disp</definition>
        <argsstring>()</argsstring>
        <name>disp</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="31" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1a8d5cf7a17928fd5ae3bab22957492e74" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>out_file</type>
        <definition>out_table send_eof</definition>
        <argsstring>()</argsstring>
        <name>send_eof</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="34" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1afe6e83eb2ccb3eb6f4d10ff47f83a869" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>if flag If the receive was send the values to output Formatting is taken care of on the output driver side</type>
        <definition>if flag If the receive was send the values to output Formatting is taken care of on the output driver side fprintf</definition>
        <argsstring>(&apos;Table:%s, %d, %3.1f, %3.1f%+3.1fi\n&apos;, char(line{1}),... line{2}, line{3}, real(line{4}), imag(line{4}))</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;Table:%</type>
          <declname>s</declname>
        </param>
        <param>
          <type>%</type>
          <declname>d</declname>
        </param>
        <param>
          <type>%3.</type>
          <declname>1f</declname>
        </param>
        <param>
          <type>%3.1f%+3.1fi\n&apos;</type>
        </param>
        <param>
          <type>char(line{1})</type>
        </param>
        <param>
          <type>... line{2}</type>
        </param>
        <param>
          <type>line{3}</type>
        </param>
        <param>
          <type>real(line{4})</type>
        </param>
        <param>
          <type>imag(line{4})</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="47" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1ae9c84ea22b019335ff9211bd5aace096" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;ascii_io(M):ERROR SENDING ROW&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;ascii_io(M):ERROR SENDING ROW&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="51" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1a9e260be5bac70ccc596ea2cf47d8e13a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>fprintf</definition>
        <argsstring>(&apos;Array:(%d rows)\n&apos;, nr)</argsstring>
        <name>fprintf</name>
        <param>
          <type>&apos;Array:(%d rows)\n&apos;</type>
        </param>
        <param>
          <type>nr</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="69" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1a05a1f6cddd167552262423a8c2e70106" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>disp</definition>
        <argsstring>(&apos;ascii_io(M):ERROR SENDING ARRAY&apos;)</argsstring>
        <name>disp</name>
        <param>
          <type>&apos;ascii_io(M):ERROR SENDING ARRAY&apos;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="79" column="1"/>
      </memberdef>
      <memberdef kind="function" id="ascii__io_8m_1acd2236c0c236d93ae9f9e257134d5947" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>exit</definition>
        <argsstring>(exit_code)</argsstring>
        <name>exit</name>
        <param>
          <type>exit_code</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m" line="90" column="1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal">%<sp/>Input<sp/>&amp;<sp/>output<sp/>to<sp/>an<sp/>ASCII<sp/>file<sp/>line<sp/>by<sp/>line<sp/></highlight></codeline>
<codeline lineno="2"><highlight class="normal">in_file<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiFileInput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;inputM_file&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="3"><highlight class="normal">out_file<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiFileOutput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;outputM_file&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="4"><highlight class="normal">%<sp/>Input<sp/>&amp;<sp/>output<sp/>from<sp/>a<sp/>table<sp/>row<sp/>by<sp/>row</highlight></codeline>
<codeline lineno="5"><highlight class="normal">in_table<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiTableInput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;inputM_table&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="6"><highlight class="normal">out_table<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiTableOutput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;outputM_table&apos;</highlight><highlight class="normal">,<sp/>...</highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&apos;%5s\t%ld\t%3.1f\t%3.1lf%+3.1lfj\n&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="8"><highlight class="normal">%<sp/>Input<sp/>&amp;<sp/>output<sp/>from<sp/>a<sp/>table<sp/>as<sp/>an<sp/>array</highlight></codeline>
<codeline lineno="9"><highlight class="normal">in_array<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiArrayInput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;inputM_array&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="10"><highlight class="normal">out_array<sp/>=<sp/>CisInterface(</highlight><highlight class="stringliteral">&apos;CisAsciiArrayOutput&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&apos;outputM_array&apos;</highlight><highlight class="normal">,<sp/>...</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&apos;%5s\t%ld\t%3.1f\t%3.1lf%+3.1lfj\n&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="12"><highlight class="normal">exit_code<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal">%<sp/>Read<sp/>lines<sp/>from<sp/>ASCII<sp/>text<sp/>file<sp/>until<sp/>end<sp/>of<sp/>file<sp/>is<sp/>reached.</highlight></codeline>
<codeline lineno="15"><highlight class="normal">%<sp/>As<sp/>each<sp/>line<sp/>is<sp/>received,<sp/>it<sp/>is<sp/>then<sp/>sent<sp/>to<sp/>the<sp/>output<sp/>ASCII<sp/>file.</highlight></codeline>
<codeline lineno="16"><highlight class="normal">disp(</highlight><highlight class="stringliteral">&apos;ascii_io(M):<sp/>Receiving/sending<sp/>ASCII<sp/>file.&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="17"><highlight class="normal">flag<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/>%<sp/>Receive<sp/>a<sp/>single<sp/>line</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/>[flag,<sp/>line]<sp/>=<sp/>in_file.recv();</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>If<sp/>the<sp/>receive<sp/>was<sp/>succesful,<sp/>send<sp/>the<sp/>line<sp/>to<sp/>output</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;File:<sp/>%s&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(line));</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>out_file.send(line);</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(~ret);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;ascii_io(M):<sp/>ERROR<sp/>SENDING<sp/>LINE&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>If<sp/>the<sp/>receive<sp/>was<sp/>not<sp/>succesful,<sp/>send<sp/>the<sp/>end-of-file<sp/>message<sp/>to</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>close<sp/>the<sp/>output<sp/>file.<sp/></highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(&apos;End<sp/>of<sp/>file<sp/>input<sp/>(Matlab)&apos;);</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/>out_file.send_eof();</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/>end;</highlight></codeline>
<codeline lineno="36"><highlight class="normal">end;</highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal">%<sp/>Read<sp/>rows<sp/>from<sp/>ASCII<sp/>table<sp/>until<sp/>end<sp/>of<sp/>file<sp/>is<sp/>reached.</highlight></codeline>
<codeline lineno="39"><highlight class="normal">%<sp/>As<sp/>each<sp/>row<sp/>is<sp/>received,<sp/>it<sp/>is<sp/>then<sp/>sent<sp/>to<sp/>the<sp/>output<sp/>ASCII<sp/>table</highlight></codeline>
<codeline lineno="40"><highlight class="normal">flag<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/>%<sp/>Receive<sp/>a<sp/>single<sp/>row</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/>[flag,<sp/>line]<sp/>=<sp/>in_table.recv();</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>If<sp/>the<sp/>receive<sp/>was<sp/>succesful,<sp/>send<sp/>the<sp/>values<sp/>to<sp/>output.</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>Formatting<sp/>is<sp/>taken<sp/>care<sp/>of<sp/>on<sp/>the<sp/>output<sp/>driver<sp/>side.</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;Table:<sp/>%s,<sp/>%d,<sp/>%3.1f,<sp/>%3.1f%+3.1fi\n&apos;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(line{1}),<sp/>...</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>line{2},<sp/>line{3},<sp/>real(line{4}),<sp/>imag(line{4}));</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>out_table.send(line);</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(~ret);</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;ascii_io(M):<sp/>ERROR<sp/>SENDING<sp/>ROW&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>If<sp/>the<sp/>receive<sp/>was<sp/>not<sp/>succesful,<sp/>send<sp/>the<sp/>end-of-file<sp/>message<sp/>to</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>close<sp/>the<sp/>output<sp/>file.</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(&apos;End<sp/>of<sp/>table<sp/>input<sp/>(Matlab)&apos;);</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>out_table.send_eof();</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/>end;</highlight></codeline>
<codeline lineno="61"><highlight class="normal">end;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal">%<sp/>Read<sp/>entire<sp/>array<sp/>from<sp/>ASCII<sp/>table<sp/>into<sp/>an<sp/>array</highlight></codeline>
<codeline lineno="64"><highlight class="normal">flag<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>[flag,<sp/>arr]<sp/>=<sp/>in_array.recv();</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>flag</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/>nr<sp/>=<sp/>size(arr,<sp/>1);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;Array:<sp/>(%d<sp/>rows)\n&apos;</highlight><highlight class="normal">,<sp/>nr);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>Print<sp/>each<sp/>line<sp/>in<sp/>the<sp/>array</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>1:nr</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fprintf(</highlight><highlight class="stringliteral">&apos;%5s,<sp/>%d,<sp/>%3.1f,<sp/>%3.1f%+3.1fi\n&apos;</highlight><highlight class="normal">,<sp/>...</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">(arr{i,1}),<sp/>arr{i,2},<sp/>arr{i,3},<sp/>...</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>real(arr{i,4}),<sp/>imag(arr{i,4}));</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>Send<sp/>the<sp/>array<sp/>to<sp/>output.<sp/>Formatting<sp/>is<sp/>handled<sp/>on<sp/>the<sp/>output<sp/>driver<sp/>side.</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>out_array.send(arr);</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(~ret);</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>disp(</highlight><highlight class="stringliteral">&apos;ascii_io(M):<sp/>ERROR<sp/>SENDING<sp/>ARRAY&apos;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exit_code<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>end;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>If<sp/>the<sp/>receive<sp/>was<sp/>not<sp/>succesful,<sp/>send<sp/>the<sp/>end-of-file<sp/>message<sp/>to</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/>%<sp/>close<sp/>the<sp/>output<sp/>file.</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/>disp(&apos;End<sp/>of<sp/>array<sp/>input<sp/>(Matlab)&apos;);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>end;</highlight></codeline>
<codeline lineno="88"><highlight class="normal">end;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal">exit(exit_code);</highlight></codeline>
    </programlisting>
    <location file="/root/cis_interface/cis_interface/cis_interface/examples/ascii_io/src/ascii_io.m"/>
  </compounddef>
</doxygen>
