class DeviceControlDelegate

Defined at line 136 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/device-control/DeviceControl.h

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

Public Methods

bool ShouldCloseConBeforeResetConfig (uint16_t resetFlags)

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.

Parameters

resetFlags [in] The flags specifying which configuration to reset.
WEAVE_ERROR OnResetConfig (uint16_t resetFlags)

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.

Parameters

resetFlags [in] The flags specifying which configuration to reset.
WEAVE_ERROR OnFailSafeArmed ()

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.

WEAVE_ERROR OnFailSafeDisarmed ()

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.

void OnConnectionMonitorTimeout (uint64_t peerNodeId, IPAddress peerAddr)

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.

Parameters

peerNodeId [in] The node ID of the remote peer to which the connection liveness has timed out.
peerAddr [in] The address of the remote peer.
void OnRemotePassiveRendezvousStarted ()

Indicates that the Remote Passive Rendezvous process has started.

void OnRemotePassiveRendezvousDone ()

Indicates that the Remote Passive Rendezvous process has finished.

WEAVE_ERROR WillStartRemotePassiveRendezvous ()

Prepare for a Remote Passive Rendezvous. For example,

make the 15.4/Thread network joinable.

TODO: More detail regarding usage required.

void WillCloseRemotePassiveRendezvous ()

Prepare to stop Remote Passive Rendezvous.

TODO: More detail regarding usage required.

bool IsResetAllowed (uint16_t resetFlags)

Check if resetting the specified configuration is allowed.

Parameters

resetFlags [in] The flags specifying which configuration to reset.
WEAVE_ERROR OnSystemTestStarted (uint32_t profileId, uint32_t testId)

Start the specified system test.

Parameters

profileId [in] The ID of the profile of the requested test.
testId [in] The ID of the requested test.
WEAVE_ERROR OnSystemTestStopped ()

Stop the system test in progress.

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.

Parameters

ec [in] The ExchangeContext over which the message was received.
msgProfileId [in] The profile id of the received message.
msgType [in] The message type of the received message.
msgInfo [in] A WeaveMessageInfo structure containing information about the received message.
result [in] 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.
bool IsPairedToAccount ()

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

TODO: make this pure virtual when product code provides appropriate implementations.