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

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

Client object for issuing Device Description requests.

Summary

Constructors and Destructors

DeviceDescriptionClient(void)

Public types

HandleIdentifyResponseFunct)(void *appState, uint64_t nodeId, const IPAddress &nodeAddr, const IdentifyResponseMessage &msg) typedef
void(*
This function is responsible for processing IdentityResponse messages.

Public attributes

AppState
void *
Application defined state object.
ExchangeMgr
[READ ONLY] Exchange manager object
FabricState
[READ ONLY] Fabric state object
OnIdentifyResponseReceived

Public functions

CancelExchange(void)
Cancel an in-progress IdentifyRequest exchange awaiting a response.
Init(WeaveExchangeManager *exchangeMgr)
Initialize the Device Description client state.
SendIdentifyRequest(const IPAddress & nodeAddr, const IdentifyRequestMessage & msg)
Send an IdentifyRequest message to a particular IP address.
SendIdentifyRequest(const IdentifyRequestMessage & msg)
Send a broadcast IdentifyRequest message to discover Weave nodes.
Shutdown(void)
Shutdown the Device Description Client.

Public types

HandleIdentifyResponseFunct

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

This function is responsible for processing IdentityResponse messages.

Details
Parameters
[in] appState
A pointer to the application defined state set when creating the IdentityRequest Exchange Context.
[in] nodeId
The Weave node ID of the message source.
[in] nodeAddr
The IP address of the responding node.
[in] msg
A reference to the incoming IdentifyResponse message.

Public attributes

AppState

void * AppState

Application defined state object.

ExchangeMgr

WeaveExchangeManager * ExchangeMgr

[READ ONLY] Exchange manager object

FabricState

const WeaveFabricState * FabricState

[READ ONLY] Fabric state object

OnIdentifyResponseReceived

HandleIdentifyResponseFunct OnIdentifyResponseReceived

Public functions

CancelExchange

WEAVE_ERROR CancelExchange(
  void
)

Cancel an in-progress IdentifyRequest exchange awaiting a response.

Details
Return Values
WEAVE_NO_ERROR
unconditionally.

DeviceDescriptionClient

 DeviceDescriptionClient(
  void
)

Init

WEAVE_ERROR Init(
  WeaveExchangeManager *exchangeMgr
)

Initialize the Device Description client state.

param[in] exchangeMgr A pointer to the Weave Exchange Manager.

Details
Return Values
WEAVE_ERROR_INCORRECT_STATE
When a remote passive rendezvous server has already been registered.
WEAVE_NO_ERROR
On success.

SendIdentifyRequest

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

Send an IdentifyRequest message to a particular IP address.

Details
Parameters
[in] nodeAddr
A reference to the IP address of the Weave node to query.
[in] msg
A reference to the IdentifyRequest message to send.
Return Values
WEAVE_ERROR_NO_MEMORY
If allocating the exchange context of packet buffer fails.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the sending of the IdentifyRequest.

SendIdentifyRequest

WEAVE_ERROR SendIdentifyRequest(
  const IdentifyRequestMessage & msg
)

Send a broadcast IdentifyRequest message to discover Weave nodes.

Details
Parameters
[in] msg
A reference to the IdentifyRequest message to send.

Shutdown

WEAVE_ERROR Shutdown(
  void
)

Shutdown the Device Description Client.

This function closes any active exchange context and resets pointers. The object can be reused by calling the Init method again.

Details
Return Values
WEAVE_NO_ERROR
unconditionally.