1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: rdt_Misc.h 4 5 Copyright (C) Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 54504 $ 14 *---------------------------------------------------------------------------*/ 15 16 ////#include <stdafx.h> 17 18 #ifndef NN_RDT_MISC_H_ 19 #define NN_RDT_MISC_H_ 20 21 22 #include <nn/rdt/rdt_define.h> 23 24 #include <nn/types.h> 25 #include <nn/Result.h> 26 27 28 namespace nn { namespace rdt { 29 30 /*! 31 @ingroup nn_rdt 32 @defgroup nn_rdt_api Reliable Local Communication (RDT) API 33 @brief This is a list of Reliable Local Communication (RDT) library API members. (Includes only C++ API members.) 34 @{ 35 */ 36 37 const bit32 LOG_LEVEL_NONE = 0x00000000; //!< Constant that indicates that a log is not output in any way. 38 const bit32 LOG_LEVEL_ALL = 0xffffffff; //!< Constant that indicates that all logs are output. 39 40 /*! 41 @brief Configures the log output level for the Reliable Local Communication (RDT) library. 42 43 By default, the RDT library is configured to not output a log. 44 When investigating bugs in the RDT library or in similar scenarios, call <tt>nn::rdt::SetLogLevel(nn::rdt::LOG_LEVEL_ALL);</tt> in advance to enable log output. This function helps when debugging the RDT library. 45 46 At present, there are only two output level settings: no output log at all, and a complete log. In the future, we may provide more detailed options for log output. 47 48 @param[in] level Specifies an argument to control the log output. 49 50 @return Returns the value of the <tt>@ref nn::Result::IsSuccess</tt> function when a valid argument is specified. 51 Currently, the valid arguments are <tt>@ref LOG_LEVEL_NONE</tt> and <tt>@ref LOG_LEVEL_ALL</tt>. 52 Returns <tt>@ref ResultInvalidValue</tt> when an invalid argument is specified. 53 54 55 56 57 */ 58 nn::Result SetLogLevel(bit32 level); 59 60 61 /*! 62 @brief Gets the log output level configured for the RDT library. 63 64 By default, the RDT library is configured to not output a log. 65 66 @return Returns the current log output level. 67 */ 68 bit32 GetLogLevel(void); 69 70 71 //! @} 72 73 }} // namespace nn::rdt 74 75 #endif // end of NN_RDT_MISC_H_ 76