1<html> 2 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 6 7<title>MPDSStep, MPDSTryStep</title> 8</head> 9 10<body> 11<h1>MPDSStep, MPDSTryStep</h1> 12 13<h2>C Specification</h2> 14<p> 15<dl> 16 <dd><pre><code>#include <revolution/mp.h></code></pre> 17 </dd> 18 <dd><pre><code>s32 MPDSStep ( <a href="./MPDSContext.html">MPDSContext</a>* <i><b>context</b></i>, const void* <i><b>sendData</b></i>, <a href="MPDSDataSet.html">MPDSDataSet</a> <i><b>dataSet</b></i> );</code></pre> 19 </dd> 20 <dd><pre><code>s32 MPDSTryStep ( <a href="./MPDSContext.html">MPDSContext</a>* <i><b>context</b></i>, const void* <i><b>sendData</b></i>, <a href="MPDSDataSet.html">MPDSDataSet</a> <i><b>dataSet</b></i> );</code></pre> 21 </dd> 22</dl> 23</p> 24 25<h2>Arguments</h2> 26<p> 27<table border="1"> 28 <tr> 29<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>context</em></strong></code></td> 30<td width="520">A pointer to the <a href="MPDSContext.html"><code>MPDSContext</code></a> structure used to maintain the DataSharing status.</td> 31 </tr> 32 <tr> 33<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>sendData</em></strong></code></td> 34<td width="520">Pointer to the data to be sent</td> 35 </tr> 36 <tr> 37<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>dataSet</em></strong></code></td> 38<td width="520">A pointer to the <a href="MPDSDataSet.html">MPDSDataSet</a> structure used to store shared data.</td> 39 </tr> 40</table> 41</p> 42 43<h2>Return Values</h2> 44 45<P>Returns the processing result. Returns a negative number if processing fails.</P> 46 47<h2>Description</h2> 48 49<p> 50Advances DataSharing by one step. The data in <code><i><b>sendData</b></i></code> is sent for sharing at the same time as shared data is stored in <code><i><b>dataSet</b></i></code>. The size of the sent data is the number of bytes set in the <code>dataLength</code> field within the <a href="MPDSConfig.html"><code>MPDSConfig</code></a> structure. 51</p> 52 53<p> 54For details on DataSharing, see the Wireless Communications Library Overview included with the NITRO-SDK. 55</p> 56 57<p> 58The <code>MPDSStep</code> function blocks until new shared data is received.<br>The <code>MPDSTryStep</code> function, however, fails immediately with <code>MP_RESULT_NO_DATA</code> when no new shared data is received, and the data in <code><i><b>sendData</b></i></code> is not sent. 59</p> 60 61<p> 62To know the timing at which newly shared data can be received, the <CODE>MPDS_PORT_CB_TYPE_DATASET_RECEIVED</CODE> notification to the callback set in the <a href="MPDSConfig.html"><code>MPDSConfig</code></a> structure's <CODE>mpdsCallback</CODE> field can be used. This notification is generated asynchronously in the background in conjunction with any running MP communications. 63</p> 64 65<h2>See Also</h2> 66<p> 67<code><a href="../mp/MPError.html">MPError</a></code> 68</p> 69 70<h2>Revision History</h2> 71 72<p> 732007/11/28 Initial version. 74</p> 75 76<hr><p>CONFIDENTIAL</p></body> 77</html>