nl::Weave::Profiles::DeviceControl::DeviceControlServer

#include <src/lib/profiles/device-control/DeviceControl.h>

Server class for implementing the Device Control profile.

Summary

Inheritance

Inherits from: nl::Weave::WeaveServerBase

Constructors and Destructors

DeviceControlServer(void)

Protected attributes

mCurClientOp
mDelegate
mFailSafeArmed
bool
mFailSafeToken
uint32_t
mRemotePassiveRendezvousClientCon
mRemotePassiveRendezvousEncryptionType
uint8_t
mRemotePassiveRendezvousJoinerAddr
mRemotePassiveRendezvousJoinerCon
mRemotePassiveRendezvousKeyId
uint16_t
mRemotePassiveRendezvousOp
mRemotePassiveRendezvousTimeout
uint16_t
mRemotePassiveRendezvousTunnel
mResetFlags
uint16_t
mTunnelInactivityTimeout
uint16_t

Public functions

Init(WeaveExchangeManager *exchangeMgr)
Initialize the Device Control Server state and register to receive Device Control messages.
IsRemotePassiveRendezvousInProgress(void) const
bool
Return Remote Passive Rendezvous state.
SendStatusReport(uint32_t statusProfileId, uint16_t statusCode, WEAVE_ERROR sysError)
virtual WEAVE_ERROR
Send a status report response to a request.
SendSuccessResponse(void)
virtual WEAVE_ERROR
Send a success response to a Device Control request.
SetDelegate(DeviceControlDelegate *delegate)
void
Set the delegate to process Device Control Server events.
Shutdown(void)
Shutdown the Device Control Server.
SystemTestTimeout(void)
void

Protected attributes

mCurClientOp

ExchangeContext * mCurClientOp

mDelegate

DeviceControlDelegate * mDelegate

mFailSafeArmed

bool mFailSafeArmed

mFailSafeToken

uint32_t mFailSafeToken

mRemotePassiveRendezvousClientCon

WeaveConnection * mRemotePassiveRendezvousClientCon

mRemotePassiveRendezvousEncryptionType

uint8_t mRemotePassiveRendezvousEncryptionType

mRemotePassiveRendezvousJoinerAddr

IPAddress mRemotePassiveRendezvousJoinerAddr

mRemotePassiveRendezvousJoinerCon

WeaveConnection * mRemotePassiveRendezvousJoinerCon

mRemotePassiveRendezvousKeyId

uint16_t mRemotePassiveRendezvousKeyId

mRemotePassiveRendezvousOp

ExchangeContext * mRemotePassiveRendezvousOp

mRemotePassiveRendezvousTimeout

uint16_t mRemotePassiveRendezvousTimeout

mRemotePassiveRendezvousTunnel

WeaveConnectionTunnel * mRemotePassiveRendezvousTunnel

mResetFlags

uint16_t mResetFlags

mTunnelInactivityTimeout

uint16_t mTunnelInactivityTimeout

Public functions

DeviceControlServer

 DeviceControlServer(
  void
)

Init

WEAVE_ERROR Init(
  WeaveExchangeManager *exchangeMgr
)

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

Details
Parameters
[in] exchangeMgr
A pointer to the Weave Exchange Manager.
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.

IsRemotePassiveRendezvousInProgress

bool IsRemotePassiveRendezvousInProgress(
  void
) const 

Return Remote Passive Rendezvous state.

Details
Return Values
TRUE
if Remote Passive Rendezvous in progress.
FALSE
if Remote Passive Rendezvous is not in progress.

SendStatusReport

virtual WEAVE_ERROR SendStatusReport(
  uint32_t statusProfileId,
  uint16_t statusCode,
  WEAVE_ERROR sysError
)

Send a status report response to a request.

Details
Parameters
[in] statusProfileId
The Weave profile ID this status report pertains to.
[in] statusCode
The status code to be included in this response.
[in] sysError
The system error code to be included in this response.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If there is no request being processed.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the status report from sending.

SendSuccessResponse

virtual WEAVE_ERROR SendSuccessResponse(
  void
)

Send a success response to a Device Control request.

Details
Return Values
WEAVE_ERROR_INCORRECT_STATE
If there is no request being processed.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the success response from sending.

SetDelegate

void SetDelegate(
  DeviceControlDelegate *delegate
)

Set the delegate to process Device Control Server events.

Details
Parameters
[in] delegate
A pointer to the Device Control Delegate.

Shutdown

WEAVE_ERROR Shutdown(
  void
)

Shutdown the Device Control Server.

Details
Return Values
WEAVE_NO_ERROR
unconditionally.

SystemTestTimeout

void SystemTestTimeout(
  void
)