iotivity 0.9.0
[platform/upstream/iotivity.git] / service / soft-sensor-manager / SampleApp / tizen / SSMTesterApp / RELEASE.txt
1 Release notes
2 Release date: Aug 5th, 2014. 
3 OS: Ubuntu 12.0.4 and above
4 Requires boost version 1.55 to build. 
5 NOTE: Boost is not distributed but should be installed in the Ubuntu machine. 
6
7 What\92s new?
8 Class OCPlatform (Header file: OCPlatform.h)
9 registerResource API (signature update)
10 \95This API provides the ability to register the resource with its name, type and list of properties
11 \95Signature of this API has changed. The API takes reference to resource handle which will be filled upon successful registration. Other parameters include resource URI, resource Type, resource interface, entity handler address and resource property (whether discoverable, observable etc.). 
12 \95NOTE: This applies to server side functionality. 
13 \95NOTE: This API might get modified to accommodate for resource collection in future.
14
15 notifyObservers API
16 \95This new API provides the ability to notify core that resource\92s attributes have changed. When entity handler is ready to indicate core that a resource has changed, notifyObservers API needs to be invoked.
17 \95This API takes resource handle as the only parameter. 
18 \95NOTE: This applies to server side functionality. 
19 \95NOTE: This API might get modified to accommodate for resource collection in future.
20
21 Class OCResource (Header file: OCResource.h)
22
23 get API
24 \95This new API provides the ability to get the attributes of a resource. This API takes a callback as parameter. Callback will be invoked with Attribute map which will provide representation of the resource. Callback will also include error code for GET operation. 
25 \95NOTE: This applies to client side functionality. 
26 \95NOTE: This API might get modified to accommodate for resource collection in future.
27
28 put API
29 \95This new API provides the ability to set the attributes of a resource via PUT. 
30 \95This API takes Attribute map, query parameter map and a callback as parameters. Callback will be invoked with Attribute map which will provide current representation of the resource. Callback will also include error code for PUT operation. 
31 \95NOTE: This applies to client side functionality. 
32 \95NOTE: This API might get modified to accommodate for resource collection in future.
33
34 Observe API
35 \95This new API provides the ability for the client to set observation on a resource
36 \95This API provides callback as a parameter. Callback will be invoked with attribute map and with an error code for this operation. 
37 \95NOTE: This applies to client side functionality. 
38
39 cancelObserve API
40 \95This new API provides the ability for the client to cancel observation on a resource
41 \95This API provides callback as a parameter. Callback will be invoked with error code for this operation. 
42 \95NOTE: This applies to client side functionality. 
43 Class OCResourceRequest (Header file: OCResourceRequest.h)
44 NOTE: This applies to server side functionality. 
45
46 getRequestType API
47 \95This new API provides the ability to retrieve the type of request. This could be GET, PUT (and in future POST and DELETE).
48
49 getQueryParams API
50 \95This new API provides the ability to retrieve the query parameters from the URL request. 
51
52 getRequestHandlerFlag API
53 \95This new API provides the ability to retrieve the request handler flag on the URL request. This could be either INIT, REQUEST or OBSERVE flag. 
54
55 getResourceRepresentation API
56 \95This new API provides the ability to retrieve attribute representation of the resource. 
57
58 Class OCResourceResponse (Header file: OCResourceResponse.h)
59 NOTE: This applies to server side functionality. 
60
61 setErrorCode API
62 \95This new API provides the ability to set the error code
63
64 setResourceRepresentation API
65 \95This new API provides the ability to set the attribute representation of a resource.  
66
67 Other Notes:
68 1.      Security model is still open. 
69 2.      APIs have OCStackResult as return type. This is will indicate success or failure for the API operation. 
70 3.      Resource collection/hierarchy APIs are not checked into the code base. They will be given as separate header files.  
71 4.      Query parameters are not used in this deliverable.
72 5.      Only single client observer has been tested.
73 6.      Maximum length of URI supported is 64 bytes
74 7.      Maximum length of response (for GET, PUT) from server is 128 bytes.
75
76
77 How to build:
78 1.      Root folder oic-resource consists of \91OIC\92 folder.  Inside OIC folder there is a Makefile. 
79 2.      Before building, make sure to have contents from oic-utilities repo at the folder level where oic-resource is.  
80 3.      Use \91make\92 to build the entire OIC code. This would build the C++ SDK, stack and samples. 
81
82 Samples:
83 1.      We have a sample for hosting a resource on a server and a sample for client which will be able to discover resources. 
84 2.      Server sample location: OIC/examples/simpleserver.cpp
85 3.      Client sample location: OIC/examples/simpleclient.cpp
86 4.      In simpleserver.cpp, inside main, 
87
88 PlatformConfig cfg;
89 cfg.ipAddress = "134.134.161.33";
90
91 Modify the above IP address to the IP address of the machine where this server is running. 
92
93 Similarly, in simpleclient.cpp, inside main, modify the IP address to the IP address of the machine where the client is running. 
94
95 The server and client can run in same machine or in different machines.
96
97 5. To run simpleServer do \91./simpleServer\92 and to run simpleClient do \91./simpleClient\92.
98