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=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.2.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>WM_StartParent</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WM_StartParent&nbsp;<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_StartParent( <A href="WMCallbackFunc.html">WMCallbackFunc</A> callback );
20</CODE></PRE></dd>
21</dl>
22
23<h2>Arguments</h2>
24<table border="1" width="100%">
25  <tbody>
26    <TR>
27      <TD width="200"><EM><STRONG><FONT face="Courier New">callback</FONT></STRONG></EM></TD>
28      <TD width="800">Specifies the callback function to be called when the notification of the status for the asynchronous process is sent or when the asynchronous process completes. This callback is called from within the interrupt handler.</TD>
29    </TR>
30 </tbody>
31</table>
32
33<h2>Return Values</h2>
34<p>Returns the results of the <CODE><A href="WMErrCode.html">WMErrCode</A></CODE> enumerated type process.</p>
35
36<H2>Description</H2>
37<P>Starts a parent operation based on parameters set by <A href="WM_SetParentParameter.html"><CODE>WM_SetParentParameter</CODE></A>This function is only executable when the WM is in the <code>IDLE</code> state. This function changes the WM to the <code>PARENT</code> state. If the return value is <CODE>WM_ERRCODE_OPERATING</CODE>, a callback is generated after the setup process to be a parent is completed. If the current number of connected children is less than the number specified by <code>maxEntry(<A href="WM_SetParentParameter.html">WM_SetParentParameter</A>)</code>, it accepts children and generates a callback when a connection is completed. One callback can only obtain information for one child machine. If the beacon transmission indicator is enabled by <A href="WM_SetBeaconIndication.html"><CODE>WM_SetBeaconIndication</CODE></A>, the specified callback is generated every time the beacon is transmitted. Also, when disconnecting from a connected child device, a callback indicating the AID of that child device will be generated separately.</P>
38
39<h2>Note</h2>
40<P>
41If the machine starts working successfully as a parent after this function is called, a callback will be generated. In some cases, this callback will occur after the notification indicating that beacon transmission is complete or that a child was connected/disconnected. When initializing as a parent, do not initialize when a callback has occurred, but perform initialization before calling this function.
42</P>
43
44<h2>See Also</h2>
45<p><A href="WM_SetParentParameter.html"><CODE>WM_SetParentParameter</CODE></A>, <A href="WM_EndParent.html"><code>WM_EndParent</code></A></p>
46
47<H2>Revision History</H2>
48<P>
492005/06/08 Added statement about callback being called from the interrupt handler.<br>2005/02/07 Added caution about callbacks.<br>2004/10/22 Changed type of return value.<br>2004/08/02 Standardized structure names.<br>2004/07/29 Added to Description.<br>2004/07/23 Initial version.
50</P>
51<hr><p>CONFIDENTIAL</p></body>
52</html>
53