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>WMPortSendCallback</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">WMPortSendCallback</h1> 15 16<h2>Definition</h2> 17 18<dl> 19 <dd> 20<CODE>#include <nitro/wm.h></CODE><BR> 21 <PRE><CODE>typedef struct WMPortSendCallback 22{ 23 u16 apiid; 24 u16 errcode; 25 u16 wlCmdID; 26 u16 wlResult; 27 u16 state; 28 u16 port; 29 u16 destBitmap; 30 u16 restBitmap; 31 u16 sentBitmap; 32 u16 rsv; 33 const u16 *data; 34 u16 length; 35 u16 seqNo; 36 WMCallbackFunc callback; 37 void *arg; 38 39} WMPortSendCallback;</CODE></PRE> 40 </dd> 41 42</dl><h2>Elements</h2> 43<TABLE border="1" width="100%"> 44 <TBODY> 45 <TR> 46<TD width="200"><em><strong><font face="Courier New">apiid</font></strong></em></TD> 47<TD width="800">ID of the API that acts as the source for the callback generation. It is equivalent to the <A href="WMApiid.html"><code>WMApiid</code></A> enumerated type. Here, <SPAN class="argument">apiid</SPAN> is set to WM_APIID_SET_MP_DATA.</TD> 48 </TR> 49 <TR> 50<TD width="200"><em><strong><font face="Courier New">errcode</font></strong></em></TD> 51<TD width="800">Result of the asynchronous process. It is equivalent to the <A href="WMErrCode.html"><code>WMErrCode</code></A> enumerated type.</TD> 52 </TR> 53 <TR> 54<TD width="200"><em><strong><font face="Courier New">wlCmdID</font></strong></em></TD> 55<TD width="800">If <CODE>errcode</CODE> is <CODE>WM_ERRCODE_FAILED</CODE>, this stores the ID of the command that caused the wireless-firmware error.</TD> 56 </TR> 57 <TR> 58<TD width="200"><em><strong><font face="Courier New">wlResult</font></strong></em></TD> 59<TD width="800">If <CODE>errcode</CODE> is <CODE>WM_ERRCODE_FAILED</CODE>, this stores the code of what caused the error in the wireless firmware.</TD> 60 </TR> 61 <TR> 62<TD width="200"><em><strong><font face="Courier New">state</font></strong></em></TD> 63<TD width="800">If <CODE>errcode</CODE> is <CODE>WM_ERRCODE_SUCCESS</CODE>, this stores the <A href="WMStateCode.html">state code</A> generated by the callback. Currently, only <code>WM_STATECODE_PORT_SEND</code> is generated.</TD> 64 </TR> 65 <TR> 66<TD width="200"><em><strong><font face="Courier New">port</font></strong></em></TD> 67<TD width="800">Port that sends the data.</TD> 68 </TR> 69 <TR> 70<TD width="200"><em><strong><font face="Courier New">destBitmap</font></strong></em></TD> 71<TD width="800">Bitmap of the association IDs (AIDs) assigned to the send destinations.</TD> 72 </TR> 73 <TR> 74<TD width="200"><em><strong><font face="Courier New">restBitmap</font></strong></em></TD> 75<TD width="800">Bitmap of the association IDs (AIDs) of the send destinations for which retries are necessary. The bitmap will not include any AIDs for which it is clear that the send will not succeed for reasons such as disconnection or no connection having been established.</TD> 76 </TR> 77 <TR> 78<TD width="200"><em><strong><font face="Courier New">sentBitmap</font></strong></em></TD> 79<TD width="800">Bitmap of those AIDs for the communications partners to which data was actually sent (among the send destinations designated by <code>destBitmap</code>). Although it is guaranteed that the data will have arrived at communications partners included in <CODE>sentBitmap</CODE>, there is no guarantee that data will not have arrived at communications partners not included in <CODE>sentBitmap</CODE>.</TD> 80 </TR> 81 <TR> 82<TD width="200"><em><strong><font face="Courier New">rsv</font></strong></em></TD> 83<TD width="800">Reserved.</TD> 84 </TR> 85 <TR> 86<TD width="200"><em><strong><font face="Courier New">data</font></strong></em></TD> 87<TD width="800">Address of the buffer that sent the data.</TD> 88 </TR> 89 <TR> 90<TD width="200"><em><strong><font face="Courier New">length</font></strong></em></TD> 91<TD width="800">Data length that was sent.</TD> 92 </TR> 93 <TR> 94<TD width="200"><em><strong><font face="Courier New">seqNo</font></strong></em></TD> 95<TD width="800">Sequence number.</TD> 96 </TR> 97 <TR> 98<TD width="200"><em><strong><font face="Courier New">callback</font></strong></em></TD> 99<TD width="800">Field that the library uses internally. The address of the called callback function is stored here.</TD> 100 </TR> 101 <TR> 102<TD width="200"><em><strong><font face="Courier New">arg</font></strong></em></TD> 103<TD width="800">Argument that is specified by the <a href="WM_SetPortCallback.html"><code>WM_SetPortCallback</code></a> function.</TD> 104 </TR> 105 </TBODY> 106</TABLE> 107 108<H2>Description</H2> 109<P> 110This is a structure passed to the callback function for each of the <A href="WM_SetMPDataToPort.html"><code>WM_SetMPDataToPort</code></A>, <A href="WM_SetMPDataToPortEx.html"><code>WM_SetMPDataToPortEx</code></A>, and <A href="WM_SetMPData.html"><code>WM_SetMPData</code></A> functions. 111</P> 112<P> 113<code>WM_ERRCODE_SUCCESS</code> goes in the errcode field if the send was a success, <code>WM_ERRCODE_SEND_FAILED</code> goes in if the send failed, and <code>WM_ERRCODE_SEND_QUEUE_FULL</code> goes in if the send queue is full. Note that even if the destinations specified with <code>destBitmap</code> include AIDs where data cannot be sent to due to a disconnection during the send or a connection not yet existing, <code>WM_ERRCODE_SUCCESS</code> will be returned if everything was sent to the remaining communications partners to which data could be sent. Compare the <code>destBitmap</code> and the <code>sentBitmap</code> to confirm that everything was actually sent to the designated send destinations. 114</P> 115 116<H2>Revision History</H2> 117<P> 1182009/09/29 Corrected an error regarding the description of <SPAN class="argument">apiid</SPAN>.<br/>2005/03/04 Initial version. 119</P> 120<hr><p>CONFIDENTIAL</p></body> 121</html> 122