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>WMStartParentCallback</title> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</head> 10<body> 11<h1 align="left">WMStartParentCallback</h1> 12<h2>Definition</h2> 13<dl> 14 <dd> 15<CODE>#include <nitro/wm.h></CODE><BR> 16 <PRE><CODE>typedef struct WMStartParentCallback 17{ 18 u16 apiid; 19 u16 errcode; 20 u16 wlCmdID; 21 u16 wlResult; 22 u16 state; 23 u8 macAddress[6]; 24 u16 aid; 25 u16 reason; 26 u8 ssid[WM_SIZE_CHILD_SSID]; 27} WMStartParentCallback;</CODE></PRE> 28 </dd> 29</dl><h2>Elements</h2> 30<TABLE border="1" width="100%"> 31 <TBODY> 32 <TR> 33 <TD width="200"><CODE>apiid</CODE></TD> 34 <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. 35 Here, it is fixed as <code>WM_APIID_START_PARENT</code>. 36 </TD> 37 </TR> 38 <TR> 39 <TD width="200"><CODE>errcode</CODE></TD> 40 <TD width="800">Result of the asynchronous process. It is equivalent to the <A href="WMErrCode.html"><code>WMErrCode</code></A> enumerated type.</TD> 41 </TR> 42 <TR> 43 <TD width="200"><CODE>wlCmdID</CODE></TD> 44 <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> 45 </TR> 46 <TR> 47 <TD width="200"><CODE>wlResult</CODE></TD> 48 <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> 49 </TR> 50 <TR> 51 <TD width="200"><CODE>state</CODE></TD> 52 <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. There are five possible causes:.<BR><br> 53 <CODE>WM_STATECODE_PARENT_START、WM_STATECODE_CONNECTED、WM_STATECODE_BEACON_SENT、WM_STATECODE_DISCONNECTED、WM_STATECODE_DISCONNECTED_FROM_MYSELF。</CODE> 54 </TD> 55 </TR> 56 <TR> 57 <TD width="200"><CODE>macAddress</CODE></TD> 58 <TD width="800">If <code>state</code> is <code>WM_STATECODE_CONNECTED</code>, the connected child's MAC address will be stored. 59 If <CODE>state</CODE> is <CODE>WM_STATECODE_DISCONNECTED</CODE> or <CODE>WM_STATECODE_DISCONNECTED_FROM_MYSELF</CODE>, the disconnected child's MAC address will be stored. 60 </TD> 61 </TR> 62 <TR> 63 <TD width="200"><CODE>aid</CODE></TD> 64 <TD width="800">If <code>state</code> is <code>WM_STATECODE_CONNECTED</code>, the AID that was allocated to the child will be stored. 65 If <CODE>state</CODE> is <CODE>WM_STATECODE_DISCONNECTED</CODE> or <CODE>WM_STATECODE_DISCONNECTED_FROM_MYSELF</CODE>, the AID that was allocated to the disconnected child will be stored. 66 </TD> 67 </TR> 68 <TR> 69 <TD width="200"><font color="#808080"><CODE>reason</CODE></font></TD> 70 <TD width="800"><font color="#808080">Stores the code showing the reason for disconnection when the state is <CODE>WM_STATECODE_DISCONNECTED</CODE> or <CODE>WM_STATECODE_DISCONNECTED_FROM_MYSELF</CODE>.<BR> 71 This member is used internally in the library for debugging.</font></TD> 72 </TR> 73 <TR> 74 <TD width="200"><CODE>ssid</CODE></TD> 75 <TD width="800">Stores the <code>ssid</code> that the child device has specified with <a href="WM_StartConnect.html"><code>WM_StartConnect</code></a>.</TD> 76 </TR> 77 </TBODY> 78</TABLE> 79<H2>Description</H2> 80<P> 81This structure is passed to the callback function for the <A href="WM_StartParent.html"><code>WM_StartParent</code></a> function. 82</P> 83<H2>Revision History</H2> 84<P> 852006/02/17 Revised the description of codes returned in <code>state</code>.<BR> 2004/11/10 Added text about the <CODE>reason</CODE> member.<br /> 2004/10/05 Standardized MAC address as <code>u8</code> type.<br /> 2004/09/13 Changed <code>WM_STATECODE_CHILD_CONNECTED</code> to <code>WM_STATECODE_CONNECTED</code>.<br /> 2004/08/23 Added the <code>ssid</code> argument.<br /> 2004/08/02 Standardized structure names.<br /> 2004/07/29 Initial version. 86</P> 87<hr><p>CONFIDENTIAL</p></body> 88</html> 89