Added Plugin Manager Configuration Feature
[platform/upstream/iotivity.git] / service / protocol-plugin / readme
1
2 This guide will help you setup your developing environment for Protocol plug-in Manager and Protocol plug-ins in Ubuntu. 
3
4 1. Preparings
5 Before starting, following tools should be installed. 
6
7 Automake
8 Automake is a tool for automatically generating Makefile.in files compiliant with the GNU Coding Standards. This tool is used for compiling C-Pluff open source which used in Plug-in Manager.
9 $ sudo apt-get install automake
10
11 Libtool
12 GNU libtool is a generic library support script. This tool is used for compiling C-Pluff open source which used in Plug-in Manager.
13         $ sudo apt-get install libtool
14
15 gettext
16 GNU `gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. This tool is used for compiling C-Pluff open source which used in Plug-in Manager.
17         $ sudo apt-get install gettext
18
19 Expat
20 Expat is a stream-oriented XML parser library. This library is used for compiling C-Pluff open source which used in Plug-in Manager.
21         $ sudo apt-get install expat
22
23 Building and Using Protocol Plug-in Manager
24
25 Once the source code is downloaded into a specific folder, oic in this context, you may follow the steps to build and execute Protocol Plug-in Manager.
26 The path for Protocol Plugin is as following;
27
28 ~/oic/oic-resource/service/protocol-plugin $_
29
30  
31 The Protocol Plug-in directory includes following sub directories;
32
33 /plugin-manager Directory for Plug-in Manager
34 /plugins        Directory for Reference Plugins  
35 /lib            Directory for Common Library
36 /sample-app     Directory for Iotivity Sample Application
37 /doc            Directory for Developers Document
38 /build          Directory for Building and Binary Release
39
40
41 2. Compiling C-Pluff library 
42 Before building Protocol-Plugin Manager, C-Pluff library should be compiled as follows.
43
44 ~/oic/oic-service/protocol-plugin/lib/cpluff$ aclocal
45 ~/oic/oic-service/protocol-plugin/lib/cpluff$ autoconf
46 ~/oic/oic-service/protocol-plugin/lib/cpluff$ autoheader
47 ~/oic/oic-service/protocol-plugin/lib/cpluff$ automake
48 ~/oic/oic-service/protocol-plugin/lib/cpluff$ ./configure
49 ~/oic/oic-service/protocol-plugin/lib/cpluff$ make
50
51  
52 3. Run make
53 By running make in the protocol-plugin path, protocol-plugin manager, all plugins and sample applications will be created. 
54  
55 NOTE: To build plugins in 64-bit Ubuntu Linux, OCLib.a and libcoap.a library should be re-compiled with ?fPIC option.
56  
57 ~/oic/oic-service/protocol-plugin/build/linux$make
58
59
60 4. Using Plugins 
61 This version of protocol plug-in source code has following functionality.
62
63 1) provides plug-in manager which can start and stop plug-in library.
64 2) provides plug-in library which can communicate with MQTT protocol Fan and Light.
65 3) provides OIC Sample Client which can get info about Fan and Light with configuration file(pluginmanager.xml).
66
67 So, to test a plug-in, follow below steps.
68
69 1) Locate shared plug-in library and XML file in a specific folder.
70 2) Register the plug-in with directory path input from plug-in manager sample.
71 3) Start the plug-in from plug-in manager sample.
72 4) Run OIC sample client.
73    ex)service/protocol-plugin/sample-app/linux/mqtt$./mqttclient
74   (mqtt broker is already installed in the local system.)
75