WM_StartParent

C Specification

#include <nitro/wm.h>

WMErrCode WM_StartParent( WMCallbackFunc callback );

Arguments

callback 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.

Return Values

Returns the results of the WMErrCode enumerated type process.

Description

Starts a parent operation based on parameters set by WM_SetParentParameterThis function is only executable when the WM is in the IDLE state. This function changes the WM to the PARENT state. If the return value is WM_ERRCODE_OPERATING, 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 maxEntry(WM_SetParentParameter), 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 WM_SetBeaconIndication, 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.

Note

If 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.

See Also

WM_SetParentParameter, WM_EndParent

Revision History

06/08/2005 Added statement about callback being called from the interrupt handler.
02/07/2005 Added caution about callbacks.
10/22/2004 Changed type of return value.
08/02/2004 Standardized structure names.
07/29/2004 Added to Description.
07/23/2004 Initial version