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>MPDSGetData</title> 8</head> 9 10<body> 11<h1>MPDSGetData</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>const u8* MPDSGetData ( const <a href="MPDSContext.html">MPDSContext</a>* <i><b>context</b></i>, const <a href="MPDSDataSet.html">MPDSDataSet</a> <i><b>dataSet</b></i>, u32 <i><b>aid</b></i> );</code></pre> 19 </dd> 20</dl> 21</p> 22 23<h2>Arguments</h2> 24<p> 25<table border="1"> 26 <tr> 27<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>context</em></strong></code></td> 28 <td width="520">A pointer to the <a href="MPDSContext.html"><code>MPDSContext</code></a> structure used to maintain the DataSharing status.</td> 29 </tr> 30 <tr> 31 <td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>dataSet</em></strong></code></td> 32 <td width="520">A pointer to the <a href="MPDSDataSet.html">MPDSDataSet</a> structure used to store shared data.</td> 33 </tr> 34 <tr> 35<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>aid</em></strong></code></td> 36 <td width="520">The AID from which data is to be gotten</td> 37 </tr> 38</table> 39</p> 40 41<h2>Return Values</h2> 42 43<P>Returns a pointer to the data sent by the specified AID, from among the shared data. NULL is returned if no data exists or if the process failed in some way.</P> 44 45<h2>Description</h2> 46 47<p> 48Extracts the data sent by a specified AID from the shared data gotten using either the <a href="MPDSStep.html"><code>MPDSStep()</code></a> function or the <a href="MPDSStep.html"><code>MPDSTryStep()</code></a> function and returns a pointer to it. 49</p> 50<p> 51The following would be cases in which NULL would be returned. 52</p> 53<ol> 54 <li>Blank data read immediately after starting DataSharing</li> 55 <li>The child device for the relevant AID is not connected</li> 56 <li>An internal error occurred</li> 57</ol> 58<p> 59Blank data is read immediately after starting once if double mode is disabled, twice if double mode is enabled. 60</p> 61<p> 62You can confirm whether a child device is connected by checking the return value.<br> However, when child devices can connect freely, if another child device connects immediately after one disconnects, the system won't know that one has been swapped for another. <br> One way of dealing with that is to use the <a href="../mp/MPSetEntryFlag.html"><code>MPSetEntryFlag</code>()</a> and <a href="../mp/MPUpdateBeacon.html"><code>MPUpdateBeacon</code>()</a> functions to stop accepting connection from a new child device once the game has begun. <br> 63 In addition, configuring the callback function for the <CODE>mpdsCallback</CODE> field in the <a href="MPDSConfig.html"><code>MPDSConfig</code></a> structure will allow for direct receipt of child device connection and disconnection notifications.</p> 64 65<h2>See Also</h2> 66<p> 67<code><a href="./MPDSStep.html">MPDSStep()</a></code>, <code><a href="./MPDSStep.html">MPDSTryStep()</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>