1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<title>WMPortSendCallback</title> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</head> 10<body> 11<h1 align="left">WMPortSendCallback</h1> 12<h2>Definition</h2> 13<dl> 14 <dd> 15<CODE>#include <nitro/wm.h></CODE><BR> 16 <PRE><CODE>typedef struct WMPortSendCallback 17{ 18 u16 apiid; 19 u16 errcode; 20 u16 wlCmdID; 21 u16 wlResult; 22 u16 state; 23 u16 port; 24 u16 destBitmap; 25 u16 restBitmap; 26 u16 sentBitmap; 27 u16 rsv; 28 const u16 *data; 29 u16 length; 30 u16 seqNo; 31 WMCallbackFunc callback; 32 void *arg; 33} WMPortSendCallback;</CODE></PRE> 34 </dd> 35</dl><h2>Elements</h2> 36<TABLE border="1" width="100%"> 37 <TBODY> 38 <TR> 39<TD width="200"><CODE>apiid</CODE></TD> 40<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. <BR> In this case, it is fixed in <code>WM_APIID_PORT_SEND</code>.</TD> 41 </TR> 42 <TR> 43<TD width="200"><CODE>errcode</CODE></TD> 44<TD width="800">Result of the asynchronous process. It is equivalent to the <A href="WMErrCode.html"><code>WMErrCode</code></A> enumerated type.</TD> 45 </TR> 46 <TR> 47<TD width="200"><CODE>wlCmdID</CODE></TD> 48<TD width="800">If <CODE>errcode</CODE> is <code>WM_ERRCODE_FAILED</code>, this function will store the ID of the command that was in error in the wireless firmware.</TD> 49 </TR> 50 <TR> 51<TD width="200"><CODE>wlResult</CODE></TD> 52<TD width="800">If <CODE>errcode</CODE> is <code>WM_ERRCODE_FAILED</code>, this function will store the code was the source of the error in the wireless firmware.</TD> 53 </TR> 54 <TR> 55<TD width="200"><CODE>state</CODE></TD> 56<TD width="800">If <CODE>errcode</CODE> is <CODE>WM_ERRCODE_SUCCESS</CODE>, the <A href="WMStateCode.html">WM Cause Code</A> generated by the callback is stored. Currently, only <code>WM_STATECODE_PORT_SEND</code> is generated.</TD> 57 </TR> 58 <TR> 59<TD width="200"><CODE>port</CODE></TD> 60<TD width="800">Port that sends the data.</TD> 61 </TR> 62 <TR> 63<TD width="200"><CODE>destBitmap</CODE></TD> 64<TD width="800">Bitmap of the association IDs (AIDs) assigned to the send destinations.</TD> 65 </TR> 66 <TR> 67<TD width="200"><CODE>restBitmap</CODE></TD> 68<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> 69 </TR> 70 <TR> 71<TD width="200"><CODE>sentBitmap</CODE></TD> 72<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> 73 </TR> 74 <TR> 75<TD width="200"><CODE>rsv</CODE></TD> 76<TD width="800">Reserved.</TD> 77 </TR> 78 <TR> 79<TD width="200"><CODE>data</CODE></TD> 80<TD width="800">Address of the buffer that sent the data.</TD> 81 </TR> 82 <TR> 83<TD width="200"><CODE>length</CODE></TD> 84<TD width="800">Data length that was sent.</TD> 85 </TR> 86 <TR> 87<TD width="200"><CODE>seqNo</CODE></TD> 88<TD width="800">Sequence number.</TD> 89 </TR> 90 <TR> 91<TD width="200"><CODE>callback</CODE></TD> 92<TD width="800">Field that the library uses internally. The address of the called callback function is stored here.</TD> 93 </TR> 94 <TR> 95<TD width="200"><CODE>arg</CODE></TD> 96<TD width="800">Argument that is specified by the <a href="WM_SetPortCallback.html"><code>WM_SetPortCallback</code></a> function.</TD> 97 </TR> 98 </TBODY> 99</TABLE> 100<H2>Description</H2> 101<P> 102This 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. 103</P> 104<P> 105<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. 106</P> 107<H2>Revision History</H2> 108<P> 1092005/03/04 Initial version. 110</P> 111<hr><p>CONFIDENTIAL</p></body> 112</html>