nl::Weave::Profiles::DeviceDescription::DeviceDescriptionServer

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

Server object for responding to Device Description requests.

Summary

Inheritance

Inherits from: nl::Weave::WeaveServerBase
Direct Known Subclasses: nl::Weave::DeviceLayer::Internal::DeviceDescriptionServer

Constructors and Destructors

DeviceDescriptionServer(void)

Public types

HandleIdentifyRequestFunct)(void *appState, uint64_t nodeId, const IPAddress &nodeAddr, const IdentifyRequestMessage &reqMsg, bool &sendResp, IdentifyResponseMessage &respMsg) typedef
void(*

Public attributes

AppState
void *
Application defined state pointer to provide context for callbacks.
OnIdentifyRequestReceived
HandleIdentifyRequestFunct
This function is responsible for processing IdentityRequest messages.

Public functions

Init(WeaveExchangeManager *exchangeMgr)
Initialize the Device Description Server state and register to receive Device Description messages.
Shutdown(void)
Shutdown the Device Description Server.

Public types

HandleIdentifyRequestFunct

void(* HandleIdentifyRequestFunct)(void *appState, uint64_t nodeId, const IPAddress &nodeAddr, const IdentifyRequestMessage &reqMsg, bool &sendResp, IdentifyResponseMessage &respMsg)

Public attributes

AppState

void * AppState

Application defined state pointer to provide context for callbacks.

OnIdentifyRequestReceived

HandleIdentifyRequestFunct OnIdentifyRequestReceived

This function is responsible for processing IdentityRequest messages.

Details
Parameters
[in] appState
A pointer to the application defined state set when registering to receive messages of this type.
[in] nodeId
The Weave node ID of the message source.
[in] nodeAddr
The IP address of the message source.
[in] reqMsg
A reference to the incoming IdentifyRequest message.
[out] sendResp
A reference to a boolean that should be set to true if a response message should be sent to the initiator.
[out] respMsg
A reference to the IdentifyResponse message to be sent to the initiator.

Public functions

DeviceDescriptionServer

 DeviceDescriptionServer(
  void
)

Init

WEAVE_ERROR Init(
  WeaveExchangeManager *exchangeMgr
)

Initialize the Device Description Server state and register to receive Device Description messages.

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_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
When too many unsolicited message handlers are registered.
WEAVE_NO_ERROR
On success.

Shutdown

WEAVE_ERROR Shutdown(
  void
)

Shutdown the Device Description Server.

Details
Return Values
WEAVE_NO_ERROR
unconditionally.