diff options
author | Bryan Lewandowski <bryanlew@google.com> | 2016-03-07 13:37:51 -0800 |
---|---|---|
committer | Bryan Lewandowski <bryanlew@google.com> | 2016-04-05 15:06:12 +0000 |
commit | e2d68d4c17eab35f04c131f9651086b956b97088 (patch) | |
tree | 17949417f77f0a896b8d11b7c13494aead9bccd5 | |
parent | 39b96b6b0c4a1480f0ea81f032e720ad2b62d6c4 (diff) | |
download | libweave-e2d68d4c17eab35f04c131f9651086b956b97088.tar.gz |
Add general-use-and-purpose comment for Device interface.
Change-Id: Id6c24bb037790e1d8fd328225b84e036fe70179e
Reviewed-on: https://weave-review.googlesource.com/2860
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
-rw-r--r-- | include/weave/device.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/weave/device.h b/include/weave/device.h index b79e6a3..5d455de 100644 --- a/include/weave/device.h +++ b/include/weave/device.h @@ -23,6 +23,25 @@ namespace weave { +// This interface defines interactions with a Weave device. Implemented in +// weave::DeviceManager. The general use of this class is to: +// - Define the traits for the Weave schema the device is +// interested in using the AddTraitDefinitions() and +// AddTraitDefinitionsFromJson() functions. +// - Define the components for the Weave schema the device is +// interested in using the AddComponent() function. +// - Set the initial/default values of "state" portions of the schema using +// the SetStatePropertiesFromJson() and SetStateProperties() functions. +// - Specify callback functions when a command (defined in the Weave schema) +// is received by the device using the AddCommandHandler() function. +// +// A daemon will typically create one instance of a class implementing +// Device and will retain it for the life of the daemon using the Create() +// function. +// +// For detailed examples of the usage of this class, see the examples/daemon +// directory. + // States of Gcd connection. enum class GcdState { kUnconfigured, // Device was not registered. |