/*---------------------------------------------------------------------------* Project: Horizon File: uds_ScanResultReader.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 22589 $ *---------------------------------------------------------------------------*/ /*! @file @brief スキャン結果の解析用クラスを定義します。 */ #ifndef LIBRARIES_UDS_CTR_UDS_SCAN_RESULT_READER_H_ #define LIBRARIES_UDS_CTR_UDS_SCAN_RESULT_READER_H_ #include #include #include #include #include namespace nn { namespace uds { namespace CTR { /*! @name @ref nn::uds::Scan 関連 @{ */ /*! @class nn::uds::CTR::NetworkDescriptionReader @brief @ref nn::uds::CTR::ScanResultReader から取得出来る、各ネットワークの情報を解析するクラスです。 */ class NetworkDescriptionReader { public: NetworkDescriptionReader(const u8* pBuffer):m_pBuffer(pBuffer){} virtual ~NetworkDescriptionReader() {} /*! @brief スキャン結果からネットワーク情報を取得します。 @param[out] pNetworkDescription ネットワーク情報の格納先です。データは正しくネットワーク情報を取得できた場合のみ格納されます。 @return 関数の実行結果を返します。 */ nn::Result GetNetworkDescription ( NetworkDescription* pNetworkDescription ); /*! @brief スキャン結果からネットワークに接続しているノードのユーザー情報を取得します。 @param[out] pNodeInfo ユーザー情報の格納です。そのネットワークの最大接続数分の配列を指定してください。データは正しくユーザー情報を取得できた場合のみ格納されます。 @return 関数の実行結果を返します。 */ nn::Result GetNodeInformationList( NodeInformation pNodeInfo[NODE_MAX] ); /*! @brief ネットワークから送信された電波の強度を リンクレベル換算で取得します。 @param[out] pLinkLevel 電波強度の格納先です。 @return 関数の実行結果を返します。 */ nn::Result GetRadioStrength( LinkLevel* pLinkLevel ); private: const u8* m_pBuffer; }; /*! @class nn::uds::CTR::ScanResultReader @brief @ref nn::uds::CTR::Scan の探索結果を解析するクラスです。 */ class ScanResultReader { public: /*! @brief 引数で与えたれた探索結果を解析する インスタンスを生成します。 @param[in] pBuffer 探索結果のポインタです。@ref nn::uds::CTR::Scan に与えたバッファを指定してください。 @return なし */ ScanResultReader(const void* pBuffer) : m_pBuffer(pBuffer), m_pNext(NULL){} virtual ~ScanResultReader() {} u32 GetCount() const; //!< 見つかったネットワークの数をカウントします。 const NetworkDescriptionReader GetFirstDescription(); //!< 最初に見つかったネットワークを @ref nn::uds::CTR::NetworkDescriptionReader で取得します。 const NetworkDescriptionReader GetNextDescription(); //!< 次に見つかったネットワークを @ref nn::uds::CTR::NetworkDescriptionReader で取得します。 private: const void* m_pBuffer; bit8* m_pNext; }; /*! @} */ } // end of namespace CTR } // end of namespace uds } // end of namespace nn #endif /* LIBRARIES_UDS_CTR_UDS_SCAN_RESULT_READER_H_ */