<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to API data source</title><link>https://sourceforge.net/p/mathlabtool/wiki/API%2520data%2520source/</link><description>Recent changes to API data source</description><atom:link href="https://sourceforge.net/p/mathlabtool/wiki/API%20data%20source/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 14 Dec 2023 17:28:20 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mathlabtool/wiki/API%20data%20source/feed" rel="self" type="application/rss+xml"/><item><title>API data source modified by tanzheng</title><link>https://sourceforge.net/p/mathlabtool/wiki/API%2520data%2520source/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,3 +1,4 @@
+[Contents](https://github.com/xxyjskx1987/MathLabTool/wiki/API-Reference)
 * **csv2array:** Convert csv files to arrays.  
 ***param:***  
 ****path:**** Path and file name.  
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tanzheng</dc:creator><pubDate>Thu, 14 Dec 2023 17:28:20 -0000</pubDate><guid>https://sourceforge.net6314a4688bec547711a4a9ec693a22b0eac7ade6</guid></item><item><title>API data source modified by tanzheng</title><link>https://sourceforge.net/p/mathlabtool/wiki/API%2520data%2520source/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -13,16 +13,23 @@
     });
     mlt_page_console_log(csv_ret, '\n');
 * **mlt_serial_list:** Serial port list.  
+***param:***  
+****callback:**** Callback function.  
 ***ex:***

-    mlt_serial_list();
+    mlt_serial_list(function(data) {
+       mlt_page_console_log(data.path, '\n');
+    });
 * **mlt_serial_open:** Open the serial port.  
 ***param:***  
 ****path:**** Serial port name.  
 ****baudRate:**** Baud rate.  
+****callback:**** Callback function.  
 ***ex:***

-    mlt_serial_open('COM15', 115200);
+    mlt_serial_open('COM15', 115200, function(data) {
+       mlt_page_console_log(data, '\n');
+    });
 * **mlt_serial_write:** Write data to the serial port.  
 ***param:***  
 ****data:**** Written data.  
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tanzheng</dc:creator><pubDate>Thu, 14 Dec 2023 17:28:20 -0000</pubDate><guid>https://sourceforge.net15fc9352a2cc3d22a7a326b1d31062466241c74b</guid></item><item><title>API data source modified by tanzheng</title><link>https://sourceforge.net/p/mathlabtool/wiki/API%2520data%2520source/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -12,3 +12,23 @@
        data_struct: 'col'
     });
     mlt_page_console_log(csv_ret, '\n');
+* **mlt_serial_list:** Serial port list.  
+***ex:***
+
+    mlt_serial_list();
+* **mlt_serial_open:** Open the serial port.  
+***param:***  
+****path:**** Serial port name.  
+****baudRate:**** Baud rate.  
+***ex:***
+
+    mlt_serial_open('COM15', 115200);
+* **mlt_serial_write:** Write data to the serial port.  
+***param:***  
+****data:**** Written data.  
+***ex:***
+
+    setTimeout(function() {
+       mlt_serial_write('ddddd;');
+       mlt_serial_write('ffff;');
+    }, 500);
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tanzheng</dc:creator><pubDate>Thu, 14 Dec 2023 17:28:20 -0000</pubDate><guid>https://sourceforge.net8f850af8c2c71a069bf2d035af74f5b2532c3703</guid></item><item><title>API data source modified by tanzheng</title><link>https://sourceforge.net/p/mathlabtool/wiki/API%2520data%2520source/</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;csv2array:&lt;/strong&gt; Convert csv files to arrays.&lt;br/&gt;
&lt;strong&gt;&lt;em&gt;param:&lt;/em&gt;&lt;/strong&gt;&lt;br/&gt;
&lt;strong&gt;&lt;em&gt;*path:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; Path and file name.&lt;br/&gt;
&lt;/em&gt;&lt;strong&gt;&lt;em&gt;data_begin_row:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; The data is collected from the first row.&lt;br/&gt;
&lt;/em&gt;&lt;strong&gt;&lt;em&gt;data_index_col:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; What column data to collect, array type.&lt;br/&gt;
&lt;/em&gt;&lt;strong&gt;&lt;em&gt;data_struct:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; 'col': the first dimension of the array is column data, 'raw': the first dimension of the array is row data.&lt;br/&gt;
&lt;/em&gt;&lt;strong&gt;ex:&lt;/strong&gt;*&lt;/p&gt;
&lt;p&gt;var csv_ret = csv2array("D:/test.csv", {&lt;br/&gt;
    data_begin_row: 1,&lt;br/&gt;
    data_index_col: &lt;span&gt;[6, 13, 20, 27, 34]&lt;/span&gt;,&lt;br/&gt;
    data_struct: 'col'&lt;br/&gt;
});&lt;br/&gt;
mlt_page_console_log(csv_ret, '\n');&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tanzheng</dc:creator><pubDate>Thu, 14 Dec 2023 17:28:20 -0000</pubDate><guid>https://sourceforge.net4c0d00379a6850be06af90e65fe4957b5e4d91cf</guid></item></channel></rss>