Merge branch 'upstream' into tizen
[platform/upstream/iotivity.git] / resource / docs / cpp-doc / devdox / ca_overview.dox
1 //******************************************************************
2 //
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 /**
22 @page ca_overview CA Overview
23
24 - @ref cao_overview
25 - @ref cao_ddoc
26     - @ref cao_ddoc_freqs
27         - @ref cao_ddoc_freqs_discovery
28             - @ref cao_ddoc_fr1101
29             - @ref cao_ddoc_fr1102
30             - @ref cao_ddoc_fr1103
31             - @ref cao_ddoc_fr1104
32             - @ref cao_ddoc_fr1105
33             - @ref cao_ddoc_fr1106
34             - @ref cao_ddoc_fr1107
35             - @ref cao_ddoc_fr1108
36             - @ref cao_ddoc_fr1109
37         - @ref cao_ddoc_freqs_msg
38             - @ref cao_ddoc_fr1201
39             - @ref cao_ddoc_fr1202
40             - @ref cao_ddoc_fr1203
41             - @ref cao_ddoc_fr1204
42         - @ref cao_ddoc_freqs_obs
43             - @ref cao_ddoc_fr1301
44             - @ref cao_ddoc_fr1302
45             - @ref cao_ddoc_fr1303
46             - @ref cao_ddoc_fr1304
47         - @ref cao_ddoc_freqs_netconfig
48             - @ref cao_ddoc_fr1401
49             - @ref cao_ddoc_fr1402
50             - @ref cao_ddoc_fr1403
51         - @ref cao_ddoc_freqs_control_ip
52             - @ref cao_ddoc_fr2101
53             - @ref cao_ddoc_fr2102
54             - @ref cao_ddoc_fr2103
55             - @ref cao_ddoc_fr2104
56             - @ref cao_ddoc_fr2105
57             - @ref cao_ddoc_fr2106
58         - @ref cao_ddoc_freqs_control_bt
59             - @ref cao_ddoc_fr2201
60             - @ref cao_ddoc_fr2202
61             - @ref cao_ddoc_fr2203
62             - @ref cao_ddoc_fr2204
63             - @ref cao_ddoc_fr2205
64             - @ref cao_ddoc_fr2206
65         - @ref cao_ddoc_freqs_control_ble
66             - @ref cao_ddoc_fr2301
67             - @ref cao_ddoc_fr2302
68             - @ref cao_ddoc_fr2303
69             - @ref cao_ddoc_fr2304
70             - @ref cao_ddoc_fr2305
71             - @ref cao_ddoc_fr2306
72             - @ref cao_ddoc_fr2307
73         - @ref cao_ddoc_freqs_control_zigbee
74             - @ref cao_ddoc_fr2401
75             - @ref cao_ddoc_fr2402
76             - @ref cao_ddoc_fr2403
77             - @ref cao_ddoc_fr2404
78             - @ref cao_ddoc_fr2405
79             - @ref cao_ddoc_fr2406
80         - @ref cao_ddoc_freqs_control_zwave
81             - @ref cao_ddoc_fr2501
82             - @ref cao_ddoc_fr2502
83             - @ref cao_ddoc_fr2503
84             - @ref cao_ddoc_fr2504
85             - @ref cao_ddoc_fr2505
86             - @ref cao_ddoc_fr2506
87     - @ref cao_ddoc_qattr
88         - @ref cao_ddoc_qattr_reliability
89             - @ref cao_ddoc_nfr201
90             - @ref cao_ddoc_nfr202
91         - @ref cao_ddoc_qattr_security
92             - @ref cao_ddoc_nfr301
93             - @ref cao_ddoc_nfr302
94         - @ref cao_ddoc_qattr_maintenance
95             - @ref cao_ddoc_nfr501
96         - @ref cao_ddoc_qattr_portability
97             - @ref cao_ddoc_nfr601
98             - @ref cao_ddoc_nfr602
99             - @ref cao_ddoc_nfr603
100             - @ref cao_ddoc_nfr604
101             - @ref cao_ddoc_nfr605
102         - @ref cao_ddoc_qattr_extensibility
103             - @ref cao_ddoc_nfr701
104     - @ref cao_ddoc_constraints
105         - @ref cao_ddoc_constraints_licence
106             - @ref cao_ddoc_con101
107 <hr>
108
109 @section cao_overview Overview
110
111 The original Connectivity Abstraction design overview diagram was from a presentation format. A similar version has been recreated in dot.
112
113 @dotfile ca_overview.gv
114
115
116 @section cao_ddoc Design doc info
117
118
119 @subsection cao_ddoc_freqs Functional Requirements
120
121
122 @subsubsection cao_ddoc_freqs_discovery Discovery
123
124
125 @paragraph cao_ddoc_fr1101 FR.1101
126 Client can find all resources on the reachable networks.
127 - CA should provide the way to discover all resources on the WiFi/Ethernet/BLE/BT network.
128 - Resources should be represented by dedicated URI.
129 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
130
131 @paragraph cao_ddoc_fr1102 FR.1102
132 Client can find all resources on the specific network.
133 - CA should provide the way to discover all resources on the specified network.
134 - The specified network can be the one of or those of WiFi/Ethernet/BLE/BT network.
135 - Resources should be represented by dedicated URI.
136 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
137
138 @paragraph cao_ddoc_fr1103 FR.1103
139 Client can find specific resource on the reachable networks.
140 - CA should provide discovery method to find specific resource on the WiFi/Ethernet/BLE/BT network.
141 - Resource should be represented by URI.
142 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
143
144 @paragraph cao_ddoc_fr1104 FR.1104
145 Client can find specific resource on the specific network.
146 - CA should provide discovery method to find specific resource on the specific network.
147 - The specified network can be the one of or those of WiFi/Ethernet/BLE/BT network.
148 - Resources should be represented by dedicated URI.
149 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
150
151 @paragraph cao_ddoc_fr1105 FR.1105
152 Server can advertise single resource on the reachable network.
153 - CA should provide advertising method to notify the resource on the WiFi/Ethernet/BLE/BT network.
154 - Resource should be represented by URI
155 - Advertising can include 'alive' or 'disappear'.
156 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
157
158 @paragraph cao_ddoc_fr1106 FR.1106
159 Server can advertise single resource on the specific network.
160 - CA should provide advertising method to notify the resource on the specified network.
161 - The spefied network can be the on of or those of WiFi/Ethernet/BLE/BT network
162 - Resource should be represented by URI
163 - Advertising can include 'alive' or 'disappear'.
164 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
165
166 @paragraph cao_ddoc_fr1107 FR.1107
167 Server can advertise all resources at a time on the reachable network.
168 - CA should provide advertising method to notify the all resources on the WiFi/Ethernet/BLE/BT network.
169 - Resource should be represented by URI
170 - Advertising can include 'alive' or 'disappear'.
171 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
172
173 @paragraph cao_ddoc_fr1108 FR.1108
174 Server can advertise all resource  at a time on the specific network.
175 - CA should provide advertising method to notify the all resources on the specified network.
176 - The spefied network can be the on of or those of WiFi/Ethernet/BLE/BT network
177 - Resource should be represented by URI
178 - Advertising can include 'alive' or 'disappear'.
179 - Add ZigBee and ZWave to supported network. ( 2015.01 ) : TBD
180
181 @paragraph cao_ddoc_fr1109 FR.1109
182 Client can send periodic hearbeat request on the specific resource.
183 - CA should check the status of discovered resource periodically.
184 - Heartbeat policy can be followed by IoTivity specification.
185
186
187 @subsubsection cao_ddoc_freqs_msg Messaging
188
189
190 @paragraph cao_ddoc_fr1201 FR.1201
191 Client can send request message to server
192 - CA should provide the way to send request message to server on the supported network.
193 - CA should notify the event to server when the request message arrives from client.
194
195 @paragraph cao_ddoc_fr1202 FR.1202
196 Server can send response message to client
197 - CA should provide the way to send response messate to client on the supported network.
198 - CA should notify the event to client when the response message arrives from server.
199
200 @paragraph cao_ddoc_fr1203 FR.1203
201 Client and Server can select QoS level for each message
202 - CA should provide the way to select message QoS level to the server and client.
203 - QoS level policy can follow CoAP guideline ( CON / NON / ACK / RESET )
204
205 @paragraph cao_ddoc_fr1204 FR.1204
206 Message can be re-sent if acknowledgement didn't received.
207 - CA should send high QoS level message repeatly until the acknowledgement arrive.
208 - Retransmission policy can follows CoAP guideline.
209
210
211 @subsubsection cao_ddoc_freqs_obs Observation
212
213
214 @paragraph cao_ddoc_fr1301 FR.1301
215 Client can send observation request message to server 
216 - CA should provide the way to send observation request message to server on the supported network.
217
218 @paragraph cao_ddoc_fr1302 FR.1302
219 Server can send observation message 
220 - CA should provider the way to send observation event to the clients which request observation on the supported network.
221
222 @paragraph cao_ddoc_fr1303 FR.1303
223 Client can send observation cancel request message to server
224 - CA should provide the way to send observation cancel request message to server on the supported network.
225
226 @paragraph cao_ddoc_fr1304 FR.1304
227 Server can cancel observation
228 - CA should provide the way to send observation cancel event to the clients which request observation on the supported network.
229
230
231 @subsubsection cao_ddoc_freqs_netconfig Network Configuration
232
233
234 @paragraph cao_ddoc_fr1401 FR.1401
235 Server / Client can select the network interfaces to use.
236 - CA should provide the way to select network interfaces to use for communication.
237
238 @paragraph cao_ddoc_fr1402 FR.1402
239 Server / Client can unselect the network interfaces
240 - CA should provide the way to unselect network interfaces to use for communication.
241
242 @paragraph cao_ddoc_fr1403 FR.1403
243 Server / Client can receive the status changes of network interface
244 - CA should notify whenever the network interface status changes.
245
246
247 @subsubsection cao_ddoc_freqs_control_ip Connectivity Control - Wifi/Ethernet
248
249
250 @paragraph cao_ddoc_fr2101 FR.2101
251 Server / client can listen multicast message
252 - CA should bind multicast port
253 - Multicast IP address and port policy can be followed by IoTivity specification.
254
255 @paragraph cao_ddoc_fr2102 FR.2102
256 Server / client can send multicast message
257 - CA should bind multicast port
258 - Multicast IP address and port policy can be followed by IoTivity specification.
259
260 @paragraph cao_ddoc_fr2103 FR.2103
261 Serve / client can listen unicast message
262 - CA should bind unicast port
263 - Unicast IP address and port policy can be followed by IoTivity specification.
264
265 @paragraph cao_ddoc_fr2104 FR.2104
266 Server / client can send unicast message
267 - CA should bind unicast port
268 - Unicast IP address and port policy can be followed by IoTivity specification.
269
270 @paragraph cao_ddoc_fr2105 FR.2105
271 Server / client can monitor the interface status.
272 - CA should notify the status of interface whenever change the status
273
274 @paragraph cao_ddoc_fr2106 FR.2106
275 Server / client can communicate in secured way
276 - CA should provde the way to send / receive data in secure way
277 - DTLS should be supported as a secure transfer
278
279
280 @subsubsection cao_ddoc_freqs_control_bt Connectivity Control - Bluetooth
281
282
283 @paragraph cao_ddoc_fr2201 FR.2201
284 Client can discover the device has IoTivity server when inquiry time.
285 - CA should scan the device using the specific UUID.
286 - The specific UUID should represent IoTivity service and be unique
287
288 @paragraph cao_ddoc_fr2202 FR.2202
289 Server can register IoTivity service which can be found when inquiry scan time
290 - CA should register the specific UUID to BT service.
291 - The specific UUID should represent IoTivity service and be unique
292
293 @paragraph cao_ddoc_fr2203 FR.2203
294 Client can request bonding to the device has IoTivity server.
295 - CA should request bonding to the device.
296 - CA should delegate the bonding procedure to the platform
297
298 @paragraph cao_ddoc_fr2204 FR.2204
299 Server can accept / deny the bonding request from client device
300 - CA should deletage the bonding procedure to the platform
301
302 @paragraph cao_ddoc_fr2205 FR.2205
303 Server / client can get the bonded device list from BT service
304
305 @paragraph cao_ddoc_fr2206 FR.2206
306 Server / client can communicate throuth the RFCOMM
307 - Serial Port Profile( SPP ) should be provided by platform.
308 - Platform should provide the fundamental operation functions to CA.
309   : connect(), accept(), disconnect(), send(), recv()
310
311 @subsubsection cao_ddoc_freqs_control_ble Connectivity Control - BLE
312
313
314 @paragraph cao_ddoc_fr2301 FR.2301
315 Client can discover the device has IoTivity server when scan time.
316 - CA should scan the device using the specific UUID
317 - The specific UUID should represent IoTivity service ahd be unique
318
319 @paragraph cao_ddoc_fr2302 FR.2302
320 Server can register IoTivity service which can be found when
321 advertising time
322 - CA should register the specific UUID to BT service.
323 - The specific UUID should represent IoTivity service and be unique
324
325 @paragraph cao_ddoc_fr2303 FR.2303
326 Client can request bonding to the device has IoTivity server.
327 - CA should request bonding to the device.
328 - CA should delegate the bonding procedure to the platform
329
330 @paragraph cao_ddoc_fr2304 FR.2304
331 Server can accept / deny the bonding request from client device
332 - CA should deletage the bonding procedure to the platform
333
334 @paragraph cao_ddoc_fr2305 FR.2305
335 Server / client can get the bonded device list from BT service
336
337 @paragraph cao_ddoc_fr2306 FR.2306
338 Server / client can communicate throuth the RFCOMM
339 - General Attribute Profile( GATT ) should be provided by platform.
340 - Platform should provide the fundamental operation functions to CA.
341   : connect(), accept(), disconnect(), send(), recv()
342
343 @paragraph cao_ddoc_fr2307 FR.2307
344 Server / client can send more lager data than 23 bytes
345 - (Optional) Platform may provide 'read long' and 'write long' feature of BLE
346 - CA should fragment and reassemble the lager data
347
348
349 @subsubsection cao_ddoc_freqs_control_zigbee Connectivity Control - ZigBee
350
351
352 @paragraph cao_ddoc_fr2401 FR.2401
353 Client can start forming the ZigBee network
354 - Client means ZigBee coordinator device
355 - ZigBee service should provide the way to start ZigBee network forming
356
357 @paragraph cao_ddoc_fr2402 FR.2402
358 Client can finish the formed ZigBee network
359 - Client means ZigBee coordinator device
360 - ZigBee service should provide the way to finish ZigBee network forming
361
362 @paragraph cao_ddoc_fr2403 FR.2403
363 Client can receive the event whenever the ZigBee end-device joins and leaves
364 - CA should know the identifier of ZigBee end-device when joins and leaves.
365 - CA should know the identifier of ZigBee end-device joined through ZigBee router when joins and leaves.
366 - CA could select the ZigBee end-device to join
367
368 @paragraph cao_ddoc_fr2404 FR.2404
369 Client can convert common ZigBee cluster to IoTivity URI.
370 - CA should convert the common ZigBee cluster to URI.
371 - The common ZigBee cluster can be one of the clusters announced by ZigBee alliance.
372   : eg. Home Automation Profile, Smart Energy Profile, and so on.
373
374 @paragraph cao_ddoc_fr2405 FR.2405
375 Client can convert common ZigBee cluster attributes to IoTivity attributes
376 - CA should convert the common ZigBee cluster to attribute of the URI.
377 - The common ZigBee profile can be one of the clusters announced by ZigBee alliance.
378
379 @paragraph cao_ddoc_fr2406 FR.2406
380 Client can convert CoAP message to ZCL command
381 - CA should convert CoAP message to ZCL command to send ZigBee end-device
382
383
384 @subsubsection cao_ddoc_freqs_control_zwave Connectivity Control - ZWave
385
386
387 @paragraph cao_ddoc_fr2501 FR.2501
388 Client can start creating PAN ( ZWave network )
389 - Client means ZWave controller device
390 - ZWave service should provide the way to start ZWave network creation
391
392 @paragraph cao_ddoc_fr2502 FR.2502
393 Client can finish the created PAN ( ZWave network )
394 - Client means ZWave controller device
395 - ZWave service should provide the way to finish created ZWave network
396
397 @paragraph cao_ddoc_fr2503 FR.2503
398 Client can receive the event whenever the ZWave slave joins and leaves
399 - CA should know the identifier of ZWave slave when joins and leaves.
400 - CA should know the identifier of ZWave slave joined through ZWave router when joins and leaves.
401 - CA could select the ZWave slave to join
402
403 @paragraph cao_ddoc_fr2504 FR.2504
404 Client can convert common ZWave device class to IoTivity URI
405 - CA should convert the common ZWave device class to URI.
406 - The common ZWave device class can be one of the device classes announced by ZWave alliance.
407
408 @paragraph cao_ddoc_fr2505 FR.2505
409 Client can convert common ZWave command class to IoTivity attribute
410 - CA should convert the common ZWave command class to attribute of the URI.
411 - The common ZWave command class can be one of the command classes announced by ZWave alliance.
412
413 @paragraph cao_ddoc_fr2506 FR.2506
414 Client can convert CoAP message to ZWave command
415 - CA should convert CoAP message to command class to send ZWave slave
416
417
418 @subsection cao_ddoc_qattr Quality Attributes
419
420
421 @subsubsection cao_ddoc_qattr_reliability Reliability
422
423
424 @paragraph cao_ddoc_nfr201 NFR.201
425 Network availability detection
426 - Maxinum number of messaging failure is 3 during 10 minutes in available network .
427 - Terminate the connection when the number is over the maximum value.
428
429 @paragraph cao_ddoc_nfr202 NFR.202
430 Messaging
431 - The transmitted message from source has to be deliverd to the destination completely.
432
433 @subsubsection cao_ddoc_qattr_security Security
434
435
436 @paragraph cao_ddoc_nfr301 NFR.301
437 Transfer Channel Protection
438 - should protect the transfer channel using DTLS in CoaP , authentication in BT and other mechanisms in connectivities
439
440 @paragraph cao_ddoc_nfr302 NFR.302
441 Message Protection ( TBD )
442 - should be able to encrypt the message to protect using RSA??
443
444
445 @subsubsection cao_ddoc_qattr_maintenance Maintenance
446
447
448 @paragraph cao_ddoc_nfr501 NFR.501
449 Modularization for connectivities
450 - One connectivity module change shouldn't have an effect on the other connectivity module.
451
452 @subsubsection cao_ddoc_qattr_portability Portability
453
454
455 @paragraph cao_ddoc_nfr601 NFR.601
456 Support on Ubuntu 12.04
457 - The software should be ported on Ubuntu (12.04) without change.
458 - The platform specific portion should be controlled by build configurations.
459
460 @paragraph cao_ddoc_nfr602 NFR.602
461 Support on Android 4.4 / 5.0 and higher
462 - The software should be ported on Android v5.0 and higher without change.
463 - The platform specific portion should be controlled by build configurations.
464 - JNI block can be added
465
466 @paragraph cao_ddoc_nfr603 NFR.603
467 Support on Tizen v2.3 and higher
468 - The software should be ported on Tizen v2.3 and higher without change.
469 - The platform specific portion should be controlled by build configurations.
470
471 @paragraph cao_ddoc_nfr604 NFR.604
472 Support on Arduino Mega
473 - The software should be ported on Arduino Mega without change.
474 - Connectivity function can be supported through the various shields.
475 - The platform specific portion should be controlled by build configurations.
476
477 @paragraph cao_ddoc_nfr605 NFR.605
478 Support on Arduino Due
479 - The software should be ported on Arduino Due without change.
480 - Connectivity function can be supported through the various shields.
481 - The platform specific portion should be controlled by build configurations.
482
483
484 @subsubsection cao_ddoc_qattr_extensibility Extensibility
485
486 @paragraph cao_ddoc_nfr701 NFR.701
487 Connectivity Extension
488 - The Architecture change has to be minimized when expanding Connectivities.
489
490
491 @subsection cao_ddoc_constraints Constraints
492
493
494 @subsubsection cao_ddoc_constraints_licence License
495
496
497 @paragraph cao_ddoc_con101 CON.101
498 Open source license
499 - All source codes should be released under Apache License v2 or compatible.
500
501 */