1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
4<head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta http-equiv="Content-Style-Type" content="text/css" />
7    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
8</head>
9<body>
10
11<h1>boss - sample_nadl_simple Demo</h1>
12
13<h2>Description</h2>
14
15<div class="section">
16<p>This sample demonstrates the task of downloading data from the download server provided by Nintendo.</p>
17</div>
18
19<h2>Required Environment</h2>
20
21<div class="section">
22<p>A connection target wireless access point is required. Ready a wireless access point that can connect to the Internet.<BR>You must also insert an SD Card into the PARTNER-CTR Debugger in advance. </p>
23</div>
24
25<h2>How to Use</h2>
26
27<div class="section">
28<p>None.</p>
29</div>
30
31<h2>Notes</h2>
32
33<div class="section">
34    <ul>
35<li>Beginning with CTR-SDK 2.1, BOSS tasks will no longer run on CTR systems whose country setting is not configured. Be sure to configure country settings before working on BOSS-related development. You can configure the country setting in the initial startup sequence of the HOME Menu.<br /></li>
36    </ul>
37    <ul>
38<li>The BOSS daemon will not run unless the EULA agreement version is 1.0 or higher. <BR>Start the daemon after you have set <B>Agree Version</B> to a value of at least 1.0 under the Config tool's <B>Eula Setting</B>.</li>
39    </ul>
40    <ul>
41<li>Before running this demo, you must complete settings for connecting to the wireless access point using one of the following methods.</li>
42    </ul>
43    <ol>
44<li>Make connection settings by running the <CODE>debug_connect</CODE> demo.</li>
45<li>Make connection settings using <CODE>NetworkSetting.csu</CODE>, included in the CTR-SDK.</li>
46    </ol>
47    <ul>
48<li>The BOSS daemon creates BOSS storage in the expanded save data region of the application.<BR>You must therefore insert an SD Card into the PARTNER-CTR Debugger before running the demo.</li>
49    </ul>
50    <ul>
51<li>The unit used for the BOSS task execution interval is hours. <br />This demo registers tasks that have a minimum execution interval of one hour. The first task therefore executes one hour later. <BR>If you want to confirm behavior by executing the task more quickly than that, replace the <CODE>dPolicy.Initialize</CODE> part of source code with the commented out part that uses the <CODE>dPolicy.InitializeWithSecInterval</CODE> API for testing. <BR>This sets the unit for the interval to seconds. Now, the first task will execute after one second.</li>
52    </ul>
53    <ul>
54<li>If a task of the same name is already registered, first delete that task, and then re-register it with various settings changed. <br/>The code for deleting tasks is commented out in the demo code. Refer there. (It is in the code block that uses the <CODE>boss::UnregisterTask</CODE> function.)</li>
55    </ul>
56    <ul>
57<li>If downloaded data already exists in BOSS storage on the SD Card, new data cannot be downloaded. <BR>Downloads can be made again if data already downloaded is deleted. <BR>The code for deleting downloaded data is commented out in the demo code. Refer there. (It is in the code block that uses the <CODE>boss::NsData::Delete</CODE> function.)</li>
58    </ul>
59
60</div>
61
62<h2>Execution Procedure</h2>
63
64<div class="section">
65<p>When the demo is executed, the following log is displayed in debug output. <BR>The log represents content after executing two or more times.</p>
66    <pre class="code">nn::boss::Initialize : RC=0x00000000
67Initializing network.
68BOSS Sample(NadlTaskSimple) Start
69[BOSS Sample]Regist NADL Task.
70[BOSS Sample]Start NADL Task.
71[BOSS Sample]Wait NSA data arrive....
72[BOSS Sample]Recognize NSA data arrive
73[BOSS Sample](Before Read Data, NewArrivalFlag is 1.)
74[BOSS Sample]Dump NSD datas(1).(data number = 1)
75
76===NSD No.0(SerialID = 1)===
77TitleID = 400000ff3ff00
78Content SerialID = 1
79Payload Length = 36
80Content version = 1
81Content Flags = 0
82Content DataType = 65537
83---Dump Data---
84(Read 1)
85---NSD Body Dump(Payload-Length=36)---
8623 20 62 6f 73 73 5f 73 61 6d 70 6c 65 5f 64 65
876d 6f 0d 0a 64 65 6d 6f 66 69 6c 65 82 c5 82 b7
8881 44 0d 0a (Read 2)
89---NSD Body Dump(Payload-Length=0)---
90[BOSS Sample]AdditionalInfo = 256(Set Info = 256)
91[BOSS Sample]NSD Read Flag = 0
92[BOSS Sample](After Read Data, NewArrivalFlag is 0.)
93[BOSS Sample](After NSD read flag on, New NSD number is = 0)
94BOSS Sample(NadlTaskSimple) END
95Finalizing network.
96nn::boss::Finalize : RC=0x00000000
97END</pre>
98</div>
99
100<h2>Revision History</h2>
101
102<div class="section">
103    <dl class="history">
104        <dt>2011/09/26</dt>
105<dd>Updated the debug output to match the latest sample demos.</dd>
106        <dt>2011/07/14</dt>
107<dd>Deleted the note added on 2011/03/28 about Nintendo server maintenance because that time period has passed.</dd>
108        <dt>2011/03/28</dt>
109<dd>Added a cautionary note about Nintendo server maintenance (applying only to the period from late March to mid-April 2011).</dd>
110        <dt>2011/02/11</dt>
111<dd>Initial version.</dd>
112    </dl>
113</div>
114
115
116<hr><p>CONFIDENTIAL</p></body>
117</html>