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_StartDataSharing</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WM_StartDataSharing&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_StartDataSharing(
20        WMDataSharingInfo*  dsInfo ,
21        u16             port ,
22        u16                 aidBitmap ,
23        u16                 dataLength ,
24        BOOL                doubleMode
25);
26</CODE></PRE></dd>
27</dl>
28
29<h2>Arguments</h2>
30<table border="1" width="100%">
31  <tbody>
32    <TR>
33<TD width="200"><CODE>dsInfo</CODE></TD>
34<TD width="800">Pointer to the data sharing information structure. The buffer must separately allocate each group that performs data sharing. Because the buffer is cache-controlled, it must be 32-byte aligned.</TD>
35    </TR>
36    <TR>
37<TD width="200"><CODE>port</CODE></TD>
38<TD width="800"><a href="WMPort.html">Port number</a> that performs data sharing. Use a value between 0 and 15.</TD>
39    </TR>
40    <TR>
41<TD width="200"><CODE>aidBitmap</CODE></TD>
42<TD width="800">Poll map of the AID of the terminal that performs data sharing. When data sharing with the maximum 16 units, it is <CODE>0xFFFF</CODE>.</TD>
43    </TR>
44    <TR>
45<TD width="200"><CODE>dataLength</CODE></TD>
46<TD width="800">Data length for one child to share. This must be a byte length that is a multiple of 2.</TD>
47    </TR>
48    <TR>
49<TD width="200"><CODE>doubleMode</CODE></TD>
50<TD width="800"><CODE>TRUE</CODE> for using data sharing in every frame in the mode that executes one MP communication per frame.</TD>
51    </TR>
52   </tbody>
53</table>
54
55<h2>Return Values</h2>
56<p>Returns the results of the <A href="WMErrCode.html"><CODE>WMErrCode</CODE></A> enumerated type process.</p>
57
58<H2>Description</H2>
59<P>
60Initializes data sharing. This function can be run when the WM is in either the <a href="wm_state_diagram.html"><code>MP_PARENT</code></a> state or the <a href="wm_state_diagram.html"><code>MP_CHILD</code></a> state. This is a synchronous function that promptly returns the <code>WM_ERRCODE_SUCCESS</code> return value when the process succeeds.<br />Be sure to call <CODE>WM_StartDataSharing</CODE> immediately after <a href="WM_StartMP.html"><code>WM_StartMP</code></a>. Processing and communication does not occur regularly simply by calling this function. Processing is started by calling the <A href="WM_StepDataSharing.html"><CODE>WM_StepDataSharing</CODE></A> function. For parents, it is possible to perform parallel data sharing for multiple groups. Prepare the <code>WMDataSharingInfo</code> structure for each group and call this function multiple times for different port numbers. You cannot specify a value (number of group terminals performing data sharing &times; shared data size) that exceeds the permitted range from the length limit (508 bytes) of data that the parent can send at once. When a value of <CODE>TRUE</CODE> is specified in the <CODE>doubleMode</CODE> argument, the value that can be obtained with the <a href="WM_StepDataSharing.html"><code>WM_StepDataSharing</code></a> function will be the value that was set by the <a href="WM_StepDataSharing.html"><code>WM_StepDataSharing</code></a> function two calls earlier. <A href="WM_StepDataSharing.html">WM_StepDataSharing</A> can be called for each round of MP communication. When a value of <CODE>FALSE</CODE> is specified, it is possible to get the value that was specified immediately beforehand, but it requires at least two intervals of MP communications for <a href="WM_StepDataSharing.html"><code>WM_StepDataSharing</code></a> to succeed.
61</P>
62
63<P>For the <CODE>mpFreq</CODE> argument of <A href="WM_StartMP.html"><code>WM_StartMP</code></A> and the parameters of <A href="WM_StepDataSharing.html"><CODE>WM_StepDataSharing</CODE></A>, the data sharing success interval and communication delay of shared data correspond as shown below.
64</P>
65<table border="1">
66  <tbody>
67    <tr>
68<td><B>mpFreq</B></td>
69<td><B>doubleMode</B></td>
70<td><B>Data Sharing Intervals</B></td>
71<td><B>Delay</B></td>
72<td><B>Comments</B></td>
73    </tr>
74    <tr>
75      <td>1</td>
76<td><CODE>TRUE</CODE></td>
77<td>Every frame</td>
78<td>2 frames</td>
79<td>If <CODE>doubleMode</CODE> is set to <CODE>TRUE</CODE>, it adds one set of buffering, and the delay increases.</td>
80    </tr>
81    <tr>
82<td>2 or more, or 0 (continuous communication mode)</td>
83<td><CODE>FALSE</CODE></td>
84<td>Every frame</td>
85<td>1 frame</td>
86<td>During execution more than 2 rounds of MP communication per frame, data can be shared in every frame even when <CODE>doubleMode</CODE> is set to <CODE>FALSE</CODE>. However, it is more likely to cause errors and increase power consumption, so use it with caution. </td>
87    </tr>
88    <tr>
89      <td>1</td>
90<td><CODE>FALSE</CODE></td>
91<td>2 or more frames </td>
92<td>2 or more frames</td>
93<td>When data sharing is executed at intervals of 2 or more frames, <CODE>doubleMode</CODE> can be <CODE>FALSE</CODE> even if <CODE>mpFreq</CODE> is 1. Therefore, the delay time equals the data sharing interval.</td>
94    </tr>
95  </tbody>
96</table>
97
98
99<h2>See Also</h2>
100<P><a href="WM_EndDataSharing.html"><code>WM_EndDataSharing</code></a><BR> <a href="WM_StepDataSharing.html"><code>WM_StepDataSharing</code></a><BR> <a href="WMPort.html"><code>WMPort</code></a></P>
101
102<H2>Revision History</H2>
103<P>
1042005/03/02 Added description of allowable range for port argument.<BR> 2004/10/25 Changed maximum value of shared data to 508 bytes.<BR> 2004/10/22 Changed return value type.<BR> 2004/09/25 Added and revised <B>Description</B>.<BR> 2004/08/31 Added <CODE>doubleMode</CODE> to <B>Arguments</B>.<BR> 2004/08/11 Initial version.
105</P>
106<hr><p>CONFIDENTIAL</p></body>
107</html>
108