* initial creation of API documentation
[platform/upstream/iotivity.git] / docs / guides / ProgrammersGuide.txt
1 /*!
2
3 @page OCGuides Programmer's Guide
4
5 @section Terminology
6
7 <b>Device</b>
8 A constrained device that has the Thin Block stack installed which enabled one or more services for other Thin Block or Unified Block devices to consume.
9
10 <b>Resource</b>
11 A resource is a component in a server that can be viewed and controlled by another Thin Block or Unified Block device. There are different resource types, for example a temperature sensor, a light controller etc.
12
13 Resources can be arranged in a hierarchal manner to form a tree of resources. This generic method of structure enables one to model many different topologies of resources.
14
15 \li Example: A light controller could be a resource.
16 \li Example: A light array could be a set of resources organized in a flat (non-hierarchical manner).
17 \li Example: A garage door opener could be a resource, it could host two resource \96 light and lock.
18
19 A more detailed description of resources and management of resources along with code snippets is provided later in this document.
20
21 <b>Operations</b>
22 Operations are actions that a Thin Block or Unified Block can perform on attributes associated with a particular resource. Resource attributes can have different operations on it based on the nature of the resource type fundamentally these are GET and PUT operations. Additionally attributes can also be declared to be observable to support remote devices to subscribe to changes to it.
23
24 \li Example: One of the child resources on the garage door opener is the light control; it has a GET operation that allows a device to get the current light state (on / off).
25
26
27
28 */