nl::Weave::Profiles::DeviceControl

This namespace includes all interfaces within Weave for the Weave Device Control profile.

Summary

The Device Control Profile facilitates client-server operations such that the client (the controlling device) can trigger specific utility functionality on the server (the device undergoing setup) to assist with and enable the device setup and provisioning process. This includes, for example, resetting the server device's configuration and enabling fail safes that define the behavior when the setup procedure is prematurely aborted.

Enumerations

@172{
  kStatusCode_FailSafeAlreadyActive = 1,
  kStatusCode_NoFailSafeActive = 2,
  kStatusCode_NoMatchingFailSafeActive = 3,
  kStatusCode_UnsupportedFailSafeMode = 4,
  kStatusCode_RemotePassiveRendezvousTimedOut = 5,
  kStatusCode_UnsecuredListenPreempted = 6,
  kStatusCode_ResetSuccessCloseCon = 7,
  kStatusCode_ResetNotAllowed = 8,
  kStatusCode_NoSystemTestDelegate = 9
}
enum
Device Control Status Codes.
@173{
  kMsgType_ResetConfig = 1,
  kMsgType_ArmFailSafe = 2,
  kMsgType_DisarmFailSafe = 3,
  kMsgType_EnableConnectionMonitor = 4,
  kMsgType_DisableConnectionMonitor = 5,
  kMsgType_RemotePassiveRendezvous = 6,
  kMsgType_RemoteConnectionComplete = 7,
  kMsgType_StartSystemTest = 8,
  kMsgType_StopSystemTest = 9,
  kMsgType_LookingToRendezvous = 10
}
enum
Device Control Message Types.
@174{
  kArmMode_New = 1,
  kArmMode_Reset = 2,
  kArmMode_ResumeExisting = 3
}
enum
ArmFailSafe Mode Values.
@175{
  kResetConfigFlag_All = 0x00FF,
  kResetConfigFlag_NetworkConfig = 0x0001,
  kResetConfigFlag_FabricConfig = 0x0002,
  kResetConfigFlag_ServiceConfig = 0x0004,
  kResetConfigFlag_OperationalCredentials = 0x0008,
  kResetConfigFlag_FactoryDefaults = 0x8000
}
enum
ResetConfig Flags.
@176{
  kMessageLength_ResetConfig = 2,
  kMessageLength_ArmFailsafe = 5,
  kMessageLength_DisarmFailsafe = 0,
  kMessageLength_EnableConnectionMonitor = 4,
  kMessageLength_DisableConnectionMonitor = 0,
  kMessageLength_RemotePassiveRendezvous = 20,
  kMessageLength_StartSystemTest = 8,
  kMessageLength_StopSystemTest = 0
}
enum
Message Lengths.

Functions

SendLookingToRendezvous(ExchangeContext *ec)
Send a LookingToRendezvous message to the peer.

Classes

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

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

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

Server class for implementing the Device Control profile.

Enumerations

@172

 @172

Device Control Status Codes.

Properties
kStatusCode_FailSafeAlreadyActive

A provisioning fail-safe is already active.

kStatusCode_NoFailSafeActive

No provisioning fail-safe is active.

kStatusCode_NoMatchingFailSafeActive

The provisioning fail-safe token did not match the active fail-safe.

kStatusCode_NoSystemTestDelegate

The system test cannot run without a delegate.

kStatusCode_RemotePassiveRendezvousTimedOut

No devices rendezvoused with the Device Control server during the client-specified rendezvous period.

kStatusCode_ResetNotAllowed

The device refused to allow the requested reset.

kStatusCode_ResetSuccessCloseCon

The ResetConfig method will succeed, but will close the connection first.

kStatusCode_UnsecuredListenPreempted

Another application has forcibly replaced Device Control server as this Weave stack's unsecured connection handler.

kStatusCode_UnsupportedFailSafeMode

The specified fail-safe mode is not supported by the device.

@173

 @173

Device Control Message Types.

Properties
kMsgType_ArmFailSafe

Arm the configuration fail-safe mechanism on the device.

kMsgType_DisableConnectionMonitor

Disable connection liveness monitoring.

kMsgType_DisarmFailSafe

Disarm an active configuration fail-safe.

kMsgType_EnableConnectionMonitor

Enable connection liveness monitoring.

kMsgType_LookingToRendezvous

Looking to Rendezvouz message.

The payload is empty, the only meaningful signal within is the source node id.

kMsgType_RemoteConnectionComplete

Indicate to Device Control client that Remote Passive Rendezvous has completed successfully and connection tunnel is open.

kMsgType_RemotePassiveRendezvous

Request Remote Passive Rendezvous with Device Control server.

kMsgType_ResetConfig

Reset the configuration state of the device.

kMsgType_StartSystemTest

Start the system test.

kMsgType_StopSystemTest

Stop the system test.

@174

 @174

ArmFailSafe Mode Values.

Properties
kArmMode_New

Arm a new fail-safe; return an error if one is already active.

kArmMode_Reset

Reset all device device configuration and arm a new fail-safe.

kArmMode_ResumeExisting

Resume a fail-safe already in progress; return an error if no fail-safe in progress, or if fail-safe token does not match.

@175

 @175

ResetConfig Flags.

Properties
kResetConfigFlag_All

Reset all device configuration information.

kResetConfigFlag_FabricConfig

Reset fabric configuration information.

kResetConfigFlag_FactoryDefaults

Reset device to full factory defaults.

kResetConfigFlag_NetworkConfig

Reset network configuration information.

kResetConfigFlag_OperationalCredentials

Reset device operational credentials.

kResetConfigFlag_ServiceConfig

Reset service configuration information.

@176

 @176

Message Lengths.

Properties
kMessageLength_ArmFailsafe

Arm Failsafe message length.

kMessageLength_DisableConnectionMonitor

Disable Connection Monitor message length.

kMessageLength_DisarmFailsafe

Disarm Failsafe message length.

kMessageLength_EnableConnectionMonitor

Enable Connection Monitor message length.

kMessageLength_RemotePassiveRendezvous

Remote Passive Rendezvous message length.

kMessageLength_ResetConfig

Reset Config message length.

kMessageLength_StartSystemTest

Start System Test message length.

kMessageLength_StopSystemTest

Stop System Test message length.

Functions

SendLookingToRendezvous

WEAVE_ERROR SendLookingToRendezvous(
  ExchangeContext *ec
)

Send a LookingToRendezvous message to the peer.

Details
Parameters
[in] ec
ExchangeContext to use to send the message
Return Values
WEAVE_NO_ERROR
On success.
WEAVE_ERROR_NO_MEMORY
If we could not allocate a buffer for the message.
other