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>WMStartConnectCallback</title>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</head>
10<body>
11<h1 align="left">WMStartConnectCallback</h1>
12<h2>Definition</h2>
13<dl>
14  <dd>
15<CODE>#include &lt;nitro/wm.h&gt;</CODE><BR>
16  <PRE><CODE>typedef struct WMStartConnectCallback
17{
18    u16     apiid;
19    u16     errcode;
20    u16     wlCmdID;
21    u16     wlResult;
22    u16     state;
23    u16     aid;
24    u16     reason;
25    u16     wlStatus;
26    u8      macAddress[6];
27} WMStartConnectCallback;</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. This argument is the same as the <a href="WMApiid.html"><code>WMApiid</code></a> enumerated type.
35      Here, it is fixed as <code>WM_APIID_START_CONNECT</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 errcode 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 errcode 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_CONNECT_START&#x3001;WM_STATECODE_CONNECTED&#x3001;WM_STATECODE_BEACON_LOST&#x3001;WM_STATECODE_DISCONNECTED&#x3001;WM_STATECODE_DISCONNECTED_FROM_MYSELF&#x3002;</CODE>
54      </TD>
55    </TR>
56    <TR>
57      <TD width="200"><code>aid</code></TD>
58      <TD width="800">If <code>state</code> is <code>WM_STATECODE_CONNECTED</code>, the AID that is allocated by the parent will be stored.</TD>
59    </TR>
60    <TR>
61      <TD width="200"><font color="#808080"><code>reason</code></font></TD>
62      <TD width="800"><font color="#808080">Code showing the reason for disconnection when the state is <CODE>WM_STATECODE_DISCONNECTED</CODE> or <CODE>WM_STATECODE_DISCONNECTED_FROM_MYSELF</CODE>.<BR>
63      This member is used internally in the library for debugging.</font></TD>
64    </TR>
65    <TR>
66      <TD width="200"><font color="#808080"><code>wlStatus</code></font></TD>
67      <TD width="800"><font color="#808080">If the errcode is <CODE>WM_ERRCODE_FAILED</CODE>, the code that represents the status of the connection partner that caused the connection failure.<BR>
68      This member is used internally in the library for debugging.</font></TD>
69    </TR>
70    <TR>
71      <TD width="200"><code>macAddress</code></TD>
72      <TD width="800">If <code>state</code> is <code>WM_STATECODE_CONNECTED</code> or <code>WM_STATECODE_DISCONNECTED_FROM_MYSELF</code>, the MAC address of the parent will be stored.
73      </TD>
74    </TR>
75  </TBODY>
76</TABLE>
77<H2>Description</H2>
78<P>
79This structure is passed to the callback function related to <a href="WM_StartConnect.html"><code>WM_StartConnect</code></a>.
80</P>
81<H2>Revision History</H2>
82<P>
832006/02/17 Revised the description of the <code>code</code> returned in state.<BR> 2005/10/31 Added <code>macAddress</code> member.<BR> 2005/09/05 Added description of <code>wlStatus</code> member.<BR>2004/11/10 Changed the description of the <code>reason</code> member.<BR> 2004/08/02 Unified structure names.<BR> 2004/07/29 Initial version.<BR>
84</P>
85<hr><p>CONFIDENTIAL</p></body>
86</html>