#include <nitro/wm.h>
typedef struct WMParentParam
{
u16* userGameInfo;
u16 userGameInfoLength;
u16 padding;
u32 ggid;
u16 tgid;
u16 entryFlag;
u16 maxEntry;
u16 multiBootFlag;
u16 KS_Flag;
u16 CS_Flag;
u16 beaconPeriod;
u16 rsv1 [4];
u16 rsv2 [8];
u16 channel;
u16 parentMaxSize;
u16 childMaxSize;
u16 rsv[4];
} WMParentParam;
The structure of the information is set when starting activity as a parent.
User defined data can be set to userGameInfo. This can be changed with WM_SetGameInfo later. userGameInfoLength is the maximum of WM_SIZE_USER_GAMEINFO bytes (currently 112 bytes).
The entryFlag argument can be changed with WM_SetEntry. If the beaconPeriod argument is too short, it interferes with MP communication. Normally, it should be set to a few hundred ms.
For the channel argument, select one from the channels that was permitted by WM_GetAllowedChannel.
For parentMaxSize and childMaxSize, specify the maximum send size for each argument, but there are some restrictions as mentioned in the programming guideline. Use the wireless communication time calculation sheet, and make sure that the time that is required for one MP communication does not exceed 5600 μs.
By setting a value of TRUE for KS_Flag, the sendable size on both parent and child is automatically expanded for key sharing.
Setting a value of TRUE for KS_Flag, and adding 36+6 to parentMaxSize and 2+4 to childMaxSize have the same effect.
userGameInfo |
Specifies the pointer to user game information. |
userGameInfoLength |
Specifies the size of user game information in bytes. |
ggid |
Specifies the game group ID that is allocated for each title or series. Specified as 4-byte data. |
tgid |
Specifies the temporary group ID. This argument must be a value that is different from the one that begins activity as a parent. |
entryFlag |
Specifies the flag that permits a connection from a child. A connection is permitted when this flag is set to "1." |
maxEntry |
Specifies the number of children that are permitted for the connection. The connection is denied when the number children that are connected are in excess of this number. Up to 15 children can be connected. |
multiBootFlag |
This argument is set to 1 when acting as the parent that sends multi-boot data. |
KS_Flag |
This argument is set to 1 when acting as the parent that performs key sharing. |
CS_Flag |
This field allows the function to maintain compatibility with previous versions, and is no longer used. |
beaconPeriod |
Specifies the interval in units of ms for regularly sending the broadcast data (this structure's data) for the child. Specify the value returned by WM_GetDispersionBeaconPeriod. |
rsv1 |
Reserved regions. These members may be deleted in the future. |
channel |
Specifies the wireless channel to act as parent. |
parentMaxSize |
Specifies the maximum data size of the parent that communicates by the MP protocol. |
childMaxSize |
Specifies the maximum data size of the child that communicates by the MP protocol. |
11/12/2004 Noted that userGameInfoLength is measured in bytes.
10/18/2004 Added a value that needs to be specified to beaconPeriod.
10/04/2004 Changed the game group ID to u32 type.
09/24/2004 Added description.
09/21/2004 Added description.
08/27/2004 Revised because of changes to structure members.
08/02/2004 Standardized structure names.
07/29/2004 Initial version.