1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=utf-8">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>WM_SetMPDataToPortEx</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WM_SetMPDataToPortEx <img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></H1>
15<h2>Syntax</h2>
16<dl>
17  <dd><PRE><CODE>#include &lt;nitro/wm.h&gt;
18
19<A href="WMErrCode.html">WMErrCode</A> WM_SetMPDataToPortEx(
20        <A href="WMCallbackFunc.html">WMCallbackFunc</A>  callback ,
21        void*      arg ,
22        const u16*      sendData,
23        u16             sendDataSize ,
24        u16             destBitmap ,
25        u16             port ,
26        u16             prio
27);
28</CODE></PRE></dd>
29</dl>
30
31<h2>Arguments</h2>
32<table border="1" width="100%">
33  <tbody>
34    <TR>
35<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>callback</CODE></FONT></STRONG></EM></TD>
36<TD width="800">Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.</TD>
37    </TR>
38    <TR>
39<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>arg</CODE></FONT></STRONG></EM></TD>
40<TD width="800">User definition data to be passed to the callback function.</TD>
41    </TR>
42    <TR>
43<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>sendData</CODE></FONT></STRONG></EM></TD>
44<TD width="800">Pointer to the data to be send-reserved. Notice that this data entity will be forcibly cached.</TD>
45    </TR>
46    <TR>
47<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>sendDataSize</CODE></FONT></STRONG></EM></TD>
48<TD width="800">The size of the send-reserved data.</TD>
49    </TR>
50    <TR>
51<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>destBitmap</CODE></FONT></STRONG></EM></TD>
52<TD width="800">Bitmap that indicates the AID of the send destination child. (enabled only for the parent).</TD>
53    </TR>
54    <TR>
55<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>port</CODE></FONT></STRONG></EM></TD>
56<TD width="800">The <A href="WMPort.html">port number</A> that sends data. Use a value from 0-15.</TD>
57    </TR>
58    <TR>
59<TD width="200"><EM><STRONG><FONT face="Courier New"><CODE>prio</CODE></FONT></STRONG></EM></TD>
60<TD width="800">Data send priority. Use a value from 0 (highest) through 3 (lowest).</TD>
61    </TR>
62  </tbody>
63</table>
64
65<h2>Return Values</h2>
66<p>Returns the results of the <CODE><A href="WMErrCode.html">WMErrCode</A></CODE> enumerated type process.</p>
67
68<H2>Description</H2>
69<P>Sets the data to be sent to the port that is specified by the MP. This function is only executable when the WM is in either the <code>MP PARENT</code> or <code>MP CHILD</code> state. If the return value is <code>WM_ERRCODE_OPERATING</code>, a callback is generated after the MP completes the data transmission process. Do not rewrite the buffer identified by <code><em><strong>sendData</strong></em></code> until the callback is called. Unlike the asynchronous functions of other wireless APIs, processing continues normally even if different function pointers are specified for callbacks when this API is called repeatedly without waiting for callbacks. However, the limit on consecutive calls without waiting for the callback is 32 times for all priority levels. If called more than 32 times, <CODE>WM_ERRCODE_SEND_QUEUE_FULL</CODE> is returned to the callback and execution fails.<BR>The user definition data that is specified by <em><strong><code>arg</code></strong></em> is passed to the callback identified by <em><strong><code>arg</code></strong></em> in <CODE>WMPortSendCallback</CODE> structure.</P>
70
71<H2>Notes</H2>
72<P>The <CODE>sendData</CODE> argument is forcibly stored in the internal cache. To avoid overwriting surrounding memory regions, be sure to pass data that is 32-byte aligned.<BR>See the Wireless Communication Library Manual (AboutWirelessManager.pdf) for additional details.</P>
73
74<h2>See Also</h2>
75<p><A href="WM_StartMP.html"><code>WM_StartMP</code></A><BR> <A href="WM_EndMP.html"><code>WM_EndMP</code></A><BR> <A href="WM_SetMPDataToPort.html"><code>WM_SetMPDataToPort</code></A><BR> <A href="WM_SetPortCallback.html"><code>WM_SetPortCallback</code></A><BR> <A href="WMPort.html"><code>WMPort</code></A></p>
76
77<H2>Revision History</H2>
78<P>
792009/10/27 Explained how many times the function can be called without waiting for the callback.<BR>2008/12/17 Added a note about the fact that data passed by argument is forcibly stored in a cache internally.<BR>2005/07/08 Added the limit on consecutive asynchronous calls.<BR>2005/06/08 Added the fact that the callback can be called from the interrupt handler.<br>2005/03/02 Added the range of values that can be specified for the port argument.<BR>2004/10/22 Changed the type of the return value.<BR>2004/09/25 Made additions and revisions to Description.<BR>2004/09/09 Initial version.<BR>
80</P>
81<hr><p>CONFIDENTIAL</p></body>
82</html>
83