nl::Weave::Profiles::DeviceDescription::DeviceDescriptionClient

#include <src/lib/profiles/device-description/DeviceDescription.h>

デバイス説明リクエストを発行するためのクライアント オブジェクト。

概要

コンストラクタとデストラクタ

DeviceDescriptionClient(void)

パブリック タイプ

HandleIdentifyResponseFunct)(void *appState, uint64_t nodeId, const IPAddress &nodeAddr, const IdentifyResponseMessage &msg) typedef
void(*
この関数は IdentityResponse メッセージを処理します。

パブリック属性

AppState
void *
アプリケーション定義の状態オブジェクト。
ExchangeMgr
[読み取り専用] Exchange マネージャー オブジェクト
FabricState
[読み取り専用] ファブリック状態オブジェクト
OnIdentifyResponseReceived

パブリック関数

CancelExchange(void)
応答を待っている進行中の IdentityRequest 交換をキャンセルします。
Init(WeaveExchangeManager *exchangeMgr)
Device Description クライアントの状態を初期化する。
SendIdentifyRequest(const IPAddress & nodeAddr, const IdentifyRequestMessage & msg)
IdentityRequest メッセージを特定の IP アドレスに送信します。
SendIdentifyRequest(const IdentifyRequestMessage & msg)
Weave ノードを検出するため、IdentifyRequest ブロードキャスト メッセージを送信します。
Shutdown(void)
Device Description Client をシャットダウンします。

パブリック タイプ

HandleIdentifyResponseFunct

void(* HandleIdentifyResponseFunct)(void *appState, uint64_t nodeId, const IPAddress &nodeAddr, const IdentifyResponseMessage &msg)

この関数は IdentityResponse メッセージを処理します。

詳細
パラメータ
[in] appState
IdentityRequest Exchange Context の作成時に設定されたアプリケーション定義の状態へのポインタ。
[in] nodeId
メッセージ ソースの Weave ノード ID。
[in] nodeAddr
応答ノードの IP アドレス。
[in] msg
受信した IdentityResponse メッセージへの参照。

パブリック属性

AppState

void * AppState

アプリケーション定義の状態オブジェクト。

ExchangeMgr

WeaveExchangeManager * ExchangeMgr

[読み取り専用] Exchange マネージャー オブジェクト

FabricState

const WeaveFabricState * FabricState

[読み取り専用] ファブリック状態オブジェクト

OnIdentifyResponseReceived

HandleIdentifyResponseFunct OnIdentifyResponseReceived

パブリック関数

CancelExchange

WEAVE_ERROR CancelExchange(
  void
)

応答を待っている進行中の IdentityRequest 交換をキャンセルします。

詳細
戻り値
WEAVE_NO_ERROR
作成できます。

DeviceDescriptionClient

 DeviceDescriptionClient(
  void
)

init

WEAVE_ERROR Init(
  WeaveExchangeManager *exchangeMgr
)

Device Description クライアントの状態を初期化する。

param[in] exchangeMgr - Weave Exchange マネージャーへのポインタ。

詳細
戻り値
WEAVE_ERROR_INCORRECT_STATE
リモート パッシブ ランデブ サーバーがすでに登録されている場合。
WEAVE_NO_ERROR
成功時。

SendIdentifyRequest

WEAVE_ERROR SendIdentifyRequest(
  const IPAddress & nodeAddr,
  const IdentifyRequestMessage & msg
)

IdentityRequest メッセージを特定の IP アドレスに送信します。

詳細
パラメータ
[in] nodeAddr
クエリ対象の Weave ノードの IP アドレスへの参照。
[in] msg
送信する identityRequest メッセージへの参照。
戻り値
WEAVE_ERROR_NO_MEMORY
パケット バッファの交換コンテキストの割り当てに失敗した場合。
WEAVE_NO_ERROR
成功時。
other
エラーが発生したため、IdentifyRequest を送信できなかったことを示すその他の Weave またはプラットフォーム固有のエラーコード。

SendIdentifyRequest

WEAVE_ERROR SendIdentifyRequest(
  const IdentifyRequestMessage & msg
)

Weave ノードを検出するため、IdentifyRequest ブロードキャスト メッセージを送信します。

詳細
パラメータ
[in] msg
送信する identityRequest メッセージへの参照。

シャットダウン

WEAVE_ERROR Shutdown(
  void
)

Device Description Client をシャットダウンします。

この関数は、アクティブな交換コンテキストをすべて閉じ、ポインタをリセットします。オブジェクトを再利用するには、Init メソッドをもう一度呼び出します。

詳細
戻り値
WEAVE_NO_ERROR
作成できます。