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 http-equiv="Content-Style-Type" content="text/css"> 6<TITLE>NWC24 Scheduler API Introduction</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<LINK rel="stylesheet" type="text/css" href="../nwc24.css"> 9</HEAD> 10<BODY> 11<H1>NWC24 Schedule Operation API</H1> 12 13<H2>Introduction</H2> 14<P> 15Wii consoles that are connected to the network and have the WiiConnect24 feature turned on can automatically send and receive messages or download data in the background as needed even if an application is running. The frequency at which this process is generated is low, at about once every several minutes. However, the execution of the application may be affected as shown below. 16</P> 17<P> 18 <UL> 19<LI>Applications with demanding performance may slow down 20<LI>The network response may worsen 21<LI>Accessing Wii console NAND memory may take more time than necessary 22 </UL> 23</P> 24<P> 25When impacts such as these are anticipated, automatic processes can be temporarily halted by using the scheduler operation API. Because it is no problem to call the automatic process scheduler's stop and restart operations anytime while an application is executing, it is possible, for example, to temporarily halt an automatic process before reading a large amount from NAND flash and then restarting it again once the data has been read. (However, when trying to halt an automatic process that is already being processed, it takes a moment until it actually stops) 26</P> 27 28<H2>Scheduler Operation API</H2> 29<P> 30The following have been provided as the API to operate the WiiConnect24 automatic send and receive scheduler. 31</P> 32<P> 33 <UL> 34<LI><A HREF="NWC24SuspendScheduler.html"><CODE>NWC24SuspendScheduler</CODE></A> : Temporarily halt (block until stopped)</LI> 35<LI><A HREF="NWC24TrySuspendScheduler.html"><CODE>NWC24TrySuspendScheduler</CODE></A> : Temporarily halt (do not block until stopped)</LI> 36<LI><A HREF="NWC24ResumeScheduler.html"><CODE>NWC24ResumeScheduler</CODE></A> : Restart processing</LI> 37 </UL> 38</P> 39<P> 40For details, see the reference manual for each function. 41</P> 42 43<H2>Opening or Closing the Library and the Scheduler Operation</H2> 44<P> 45These scheduler operation functions can be called at any time regardless of the open or close status of the library resulted from either <A HREF="../Misc/NWC24OpenLib.html"><CODE>NWC24OpenLib()</CODE></A> or <A HREF="../Misc/NWC24CloseLib.html"><CODE>NWC24CloseLib()</CODE></A>. 46</P> 47<P> 48However, while the NWC24 library is opened, the system is in the same status as the scheduler being halted. For example, even if <A HREF="NWC24ResumeScheduler.html"><CODE>NWC24ResumeScheduler()</CODE></A> is executed while the library is open, the scheduler does not restart. The process restarts only when the library is closed after that. 49</P> 50 51<H2>Initial State of the Scheduler</H2> 52<P> 53With the NWC24 library incorporated (that is, with <CODE>nwc24[D].a</CODE> linked), when the application is run, the scheduler is in a state in which it can operate by default (that is, <A HREF="NWC24ResumeScheduler.html">NWC24ResumeScheduler</A> has been called). 54</P> 55 56<P> 57On the other hand, in applications for which the NWC24 library has not been incorporated, the scheduler will be in the stopped state by default. 58</P> 59 60<H2>Conditions Specific to the Scheduler's Automated Processes</H2> 61<P> 62There are two types of automated processes launched by the WiiConnect24 scheduler. 63</P> 64<P> 65<UL> 66<LI>Sending and Receiving Messages</LI> 67<LI>Downloading</LI> 68</UL> 69</P> 70<P> 71These are launched at determined intervals for Wii consoles for which the user has agreed to the Wii Network Services User Agreement and for which WiiConnect24 is enabled. However, the sending and receiving of messages will not occur when parental controls have been sent to block messages. 72</P> 73<P> 74It is possible to use the return value from <A HREF="../Misc/NWC24Check.html"><CODE>NWC24Check</CODE></A> to determine whether the conditions for automated process have been met or not. 75</P> 76 77<H4>Launch Timing for Sending and Receiving Messages</H4> 78 79<P> 80The default interval for message sending and receiving is one minute. As a result, the first sending and receiving will occur one minute after launching an application. The server may also overwrite the specified interval value when communications with the server are occurring normally. (It is normally ten minutes, but may change as conditions warrant.) Subsequently, sending and receiving will occur at the newly specified interval. 81</P> 82<P> 83When there is a problem communicating with the servers, a delay of at least one minute will occur. However, should communication continue to fail after launching the application, the interval will continue to increase, from one to two to three minutes and so on. (The maximum interval is ten minutes.) 84</P> 85<P> 86If automated processes have been paused when the interval has elapsed, the sending and receiving of messages will be delayed. The next interval timing will occur when the set time has once again elapsed. 87</P> 88<P> 89You can get the currently set interval value for the sending and receiving of messages using <A HREF="NWC24GetScheduleSpan.html"><CODE>NWC24GetScheduleSpan</CODE></A>. 90</P> 91 92<H4>Launch Timing for Downloads</H4> 93 94<P> 95The default interval for downloading is two minutes. As a result, the first download will occur two minutes after launching an application. To begin, the task list is checked to see if there are any tasks existing for the time at which a download is scheduled to occur. If there are, they are downloaded. If there are none, the interval is set to eleven minutes and processing ends thereafter. 96</P> 97<P> 98If multiple tasks are running when downloading is set to begin, the one with the highest priority is immediately run, and the process is tentatively ended after setting the interval to two minutes. As a result, the remaining tasks will be processed at two minute intervals. 99</P> 100<P> 101If automated processes have been paused when the interval has elapsed, downloading will be delayed. The next interval timing will occur when the set time has once again elapsed. 102</P> 103<P> 104You can get the currently set interval value for downloading using <A HREF="NWC24GetScheduleSpan.html"><CODE>NWC24GetScheduleSpan</CODE></A>. 105</P> 106 107<H2>Revision History</H2> 108<P> 1092007/03/07 Added the "Initial state of the scheduler" section.<BR>Added the section, Conditions Specific to the Scheduler's Automated Processes<BR>2006/09/10 Changed the references to <CODE>NWC24OpenLib</CODE> and <CODE>NWC24CloseLib</CODE><BR>2006/09/01 Initial version. 110</P> 111 112<hr><p>CONFIDENTIAL</p></body> 113</HTML>