1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<HTML><HEAD><TITLE>OSReportDestination</TITLE> 3<META http-equiv=Content-Type content="text/html; charset=windows-1252"> 4<META content="MSHTML 6.00.2900.3314" name=GENERATOR> 5<META http-equiv=Content-Style-Type content=text/css><LINK 6href="../../CSS/revolution.css" type=text/css rel=stylesheet></HEAD> 7<BODY> 8<H1>OSReportDestination</H1> 9<H2>Syntax</H2> 10<DL> 11 <DD><PRE class=construction>#include <revolution/os/OSLog.h> 12 13#define OS_REPORT_SERIAL 0x00000001 14#define OS_REPORT_NAND 0x00000002 15 16s32 OSReportDestination( u32 dest ); 17</PRE></DD></DL> 18<H2>Arguments</H2> 19<TABLE class=arguments border=1> 20 <TBODY> 21 <TR> 22 <TH>dest</TH> 23 <TD>Port used for as the output destination for OSReport.<BR>Output destination ports are given in the table below.</TD></TR></TBODY></TABLE><BR> 24<TABLE class=arguments border=1> 25 <TBODY> 26 <TR> 27 <TD bgColor=#c0c0c0>Output Destination Port</TD> 28 <TD bgColor=#c0c0c0>Macro Name</TD> 29 <TD bgColor=#c0c0c0>Description</TD> 30 <TD bgColor=#c0c0c0>Comments</TD></TR> 31 <TR> 32 <TH>1</TH> 33 <TH>OS_REPORT_SERIAL</TH> 34 <TD>Sets the output destination to serial output (standard OSReport output destination)</TD> 35 <TD> </TD></TR> 36 <TR> 37 <TH>2</TH> 38 <TH>OS_REPORT_NAND</TH> 39 <TD>Sets the output destination to Wii console NAND memory</TD> 40 <TD> </TD></TR></TBODY></TABLE> 41<H2>Return Values</H2> 42<p> 43Returns 0 if successful or one of the following codes if unsuccessful. 44<p> 45<code> 46NAND_RESULT_ACCESS<br> 47NAND_RESULT_ALLOC_FAILED<br> 48NAND_RESULT_BUSY<br> 49NAND_RESULT_CORRUPT<br> 50NAND_RESULT_EXISTS<br> 51NAND_RESULT_INVALID<br> 52NAND_RESULT_MAXFILES<br> 53NAND_RESULT_NOEXISTS<br> 54NAND_RESULT_UNKNOWN<br> 55NAND_RESULT_FATAL_ERROR<br> 56</code> 57</p> 58</p> 59 60<H2>Description</H2> 61<P>Changes the output destination of the character string output when the <CODE>OSReport</CODE> function is called.<BR> Developers can choose either serial output or Wii console NAND memory as the output destination.<BR> The <code>OSReportDestination</code> function is effective in cases such as when debugging on hardware that cannot use serial output.<BR> 62 63<p><strong><B>Note:</B></strong> The oslog library is linked when using OSReportDestination. Memory for writing to NAND must be allocated using <a href="osreporviewer.html"><CODE>OSReportViewer</CODE></a>. Before using OSReportDestination, we recommend that you take a look at <A href="intro.html"><CODE>OSLog Overview</CODE></A> first.</p> 64 65 66<H3><CODE>OS_REPORT_SERIAL</CODE></H3> 67<P>Outputs the results of <CODE>OSReport</CODE> to the serial port of development hardware in the conventional way. 68<P> 69<H3><CODE>OS_REPORT_NAND</CODE></H3> 70<P>Uses Wii console NAND memory as the output destination for <CODE>OSReport</CODE>.<BR> <CODE>OSReport</CODE> logs that have been written are temporarily stored in Wii console main memory. <B>When <A href="OSReportFlush.html"><CODE>OSReportFlush</CODE></A> is called, these logs are written to Wii console NAND memory all at once.</B> <BR> When flushing a large amount of text, we recommend that you call <A href="OSReportFlush.html"><CODE>OSReportFlush</CODE></A> periodically.<BR><BR> Example:<BR> <CODE>OSReportDestination( OS_REPORT_NAND );<BR> <BR> OSReport("Clear blue sky today\n");<BR> OSReport("Will skies be clear blue tomorrow, too?\n");<BR> ......................<BR> OSReport("Come to think of it, we might have written a large number of characters already");<BR> <BR> OSReportDestination( OS_REPORT_SERIAL ); // All strings are written temporarily to Wii console NAND memory<BR> OSReportDestination( OS_REPORT_NAND ); // Resume writing to Wii console NAND memory</CODE><BR> <BR> The save data region of the Wii is used when writing to NAND. Pay attention to the remaining available capacity.<BR> <br> 71<H3><CODE>OS_REPORT_NAND | OS_REPORT_NAND</CODE></H3> 72<P>Performs simultaneous output to both the serial port and Wii console NAND memory.<br> <BR> 73<H2>See Also</H2> 74<P class=reference> 75<A href="intro.html">OSLog Overview</A><BR> <A href="../toc.html#OSLog" target="contents">Function for Saving Debug Output</A><BR> <A href="OSReportFlush.html"><CODE>OSReportFlush</CODE></A><BR> <A href="../Error/OSReport.html"><CODE>OSReport</CODE></A> 76</P> 77<H2>Revision History</H2> 78<P>2008/11/19 Initial version.</P><hr><p>CONFIDENTIAL</p></body></HTML> 79