nl::Weave::Profiles::DeviceControl::DeviceControlDelegate

This is an abstract class.

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

Delegate class for implementing incoming Device Control operations on the server device.

Summary

Inheritance

Inherits from: nl::Weave::WeaveServerDelegateBase
Direct Known Subclasses: nl::Weave::DeviceLayer::Internal::DeviceControlServer

Public functions

EnforceAccessControl(ExchangeContext *ec, uint32_t msgProfileId, uint8_t msgType, const WeaveMessageInfo *msgInfo, AccessControlResult & result)
virtual void
Enforce message-level access control for an incoming DeviceControl request message.
IsPairedToAccount() const
virtual bool
Called to determine if the device is currently paired to an account.
IsResetAllowed(uint16_t resetFlags)=0
virtual bool
Check if resetting the specified configuration is allowed.
OnConnectionMonitorTimeout(uint64_t peerNodeId, IPAddress peerAddr)=0
virtual void
Indicate that there has been a connection monitor timeout.
OnFailSafeArmed(void)=0
virtual WEAVE_ERROR
Indicate that the device configuration fail safe has been armed.
OnFailSafeDisarmed(void)=0
virtual WEAVE_ERROR
Indicate that the device configuration fail safe has been disarmed.
OnRemotePassiveRendezvousDone(void)=0
virtual void
Indicates that the Remote Passive Rendezvous process has finished.
OnRemotePassiveRendezvousStarted(void)=0
virtual void
Indicates that the Remote Passive Rendezvous process has started.
OnResetConfig(uint16_t resetFlags)=0
virtual WEAVE_ERROR
Reset all or part of the device configuration.
OnSystemTestStarted(uint32_t profileId, uint32_t testId)=0
virtual WEAVE_ERROR
Start the specified system test.
OnSystemTestStopped(void)=0
virtual WEAVE_ERROR
Stop the system test in progress.
ShouldCloseConBeforeResetConfig(uint16_t resetFlags)=0
virtual bool
Determine whether a server connection, if present, should be closed prior to a configuration reset.
WillCloseRemotePassiveRendezvous(void)=0
virtual void
Prepare to stop Remote Passive Rendezvous.
WillStartRemotePassiveRendezvous(void)=0
virtual WEAVE_ERROR
Prepare for a Remote Passive Rendezvous.

Public functions

EnforceAccessControl

virtual void EnforceAccessControl(
  ExchangeContext *ec,
  uint32_t msgProfileId,
  uint8_t msgType,
  const WeaveMessageInfo *msgInfo,
  AccessControlResult & result
)

Enforce message-level access control for an incoming DeviceControl request message.

Details
Parameters
[in] ec
The ExchangeContext over which the message was received.
[in] msgProfileId
The profile id of the received message.
[in] msgType
The message type of the received message.
[in] msgInfo
A WeaveMessageInfo structure containing information about the received message.
[in,out] result
An enumerated value describing the result of access control policy evaluation for the received message. Upon entry to the method, the value represents the tentative result at the current point in the evaluation process. Upon return, the result is expected to represent the final assessment of access control policy for the message.

IsPairedToAccount

virtual bool IsPairedToAccount() const 

Called to determine if the device is currently paired to an account.

IsResetAllowed

virtual bool IsResetAllowed(
  uint16_t resetFlags
)=0

Check if resetting the specified configuration is allowed.

Details
Parameters
[in] resetFlags
The flags specifying which configuration to reset.
Return Values
TRUE
if resetting the configuration is allowed.
FALSE
if resetting the configuration is not allowed.

OnConnectionMonitorTimeout

virtual void OnConnectionMonitorTimeout(
  uint64_t peerNodeId,
  IPAddress peerAddr
)=0

Indicate that there has been a connection monitor timeout.

This function is called when a Connection Monitor timeout has occurred, that is, when liveness checks have not been detected from the remote host for a certain amount of time.

Details
Parameters
[in] peerNodeId
The node ID of the remote peer to which the connection liveness has timed out.
[in] peerAddr
The address of the remote peer.

OnFailSafeArmed

virtual WEAVE_ERROR OnFailSafeArmed(
  void
)=0

Indicate that the device configuration fail safe has been armed.

This function is called when the server device configuration fail safe has been armed in response to a request from the client. The fail safe automatically resets the device configuration to a known state should the configuration process fail to complete successfully.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the fail safe from arming.

OnFailSafeDisarmed

virtual WEAVE_ERROR OnFailSafeDisarmed(
  void
)=0

Indicate that the device configuration fail safe has been disarmed.

This function is called when the server device configuration fail safe has been disarmed in response to a request from the client. The client will disarm the fail safe after configuration has completed.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the fail safe from disarming.

OnRemotePassiveRendezvousDone

virtual void OnRemotePassiveRendezvousDone(
  void
)=0

Indicates that the Remote Passive Rendezvous process has finished.

OnRemotePassiveRendezvousStarted

virtual void OnRemotePassiveRendezvousStarted(
  void
)=0

Indicates that the Remote Passive Rendezvous process has started.

OnResetConfig

virtual WEAVE_ERROR OnResetConfig(
  uint16_t resetFlags
)=0

Reset all or part of the device configuration.

This function's implementation is expected to reset any combination of network, Weave fabric, or service configurations to a known state, according to the reset flags.

Details
Parameters
[in] resetFlags
The flags specifying which configuration to reset.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the device from resetting its configuration.

OnSystemTestStarted

virtual WEAVE_ERROR OnSystemTestStarted(
  uint32_t profileId,
  uint32_t testId
)=0

Start the specified system test.

Details
Parameters
[in] profileId
The ID of the profile of the requested test.
[in] testId
The ID of the requested test.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the starting of the system test.

OnSystemTestStopped

virtual WEAVE_ERROR OnSystemTestStopped(
  void
)=0

Stop the system test in progress.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the stopping of the system test.

ShouldCloseConBeforeResetConfig

virtual bool ShouldCloseConBeforeResetConfig(
  uint16_t resetFlags
)=0

Determine whether a server connection, if present, should be closed prior to a configuration reset.

This function is used to query the delegate for the desired behavior when processing a configuration reset request. If a server connection is currently active, a TRUE response to this method will cause that connection to be closed prior to the configuration reset being triggered via the OnResetConfig method.

Details
Parameters
[in] resetFlags
The flags specifying which configuration to reset.
Return Values
true
if the connection needs to be closed.
false
if the connection does not need to be closed.

WillCloseRemotePassiveRendezvous

virtual void WillCloseRemotePassiveRendezvous(
  void
)=0

Prepare to stop Remote Passive Rendezvous.

See also:
WillStartRemotePassiveRendezvous(void)

WillStartRemotePassiveRendezvous

virtual WEAVE_ERROR WillStartRemotePassiveRendezvous(
  void
)=0

Prepare for a Remote Passive Rendezvous.

For example, make the 15.4/Thread network joinable.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred while preparing to start Remote Passive Rendezvous.