User Tools

Site Tools


protocol_plug_manager_for_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

protocol_plug_manager_for_linux [2015/04/21 06:08]
Myungjae Lee content moved from https://www.iotivity.org/documentation/iotivity-services/protocol-plug-manager
protocol_plug_manager_for_linux [2015/04/21 10:20] (current)
Myungjae Lee
Line 5: Line 5:
  
 This guide will help you create your own protocol plug-in for IoTivity. By installing the plug-in at runtime, your device can communicate with IoTivity applications. This guide will help you create your own protocol plug-in for IoTivity. By installing the plug-in at runtime, your device can communicate with IoTivity applications.
- +{{ :​iotivity-ppm-overview.png?​nolink&​600 ​|}}
-{{ :​iotivity-ppm-overview.png?​480 |}}+
  
 ==== Overall flows ==== ==== Overall flows ====
Line 12: Line 11:
 Using the Plugin Manager API, an application can start plugins located in a specific folder. After starting, the plugin will try to find it’s device using it's own protocol and will create a resource server when the device is found. Then the application can find and communicate with the resource using the base API as a normal IoTivity resource, as shown in the following diagram. Using the Plugin Manager API, an application can start plugins located in a specific folder. After starting, the plugin will try to find it’s device using it's own protocol and will create a resource server when the device is found. Then the application can find and communicate with the resource using the base API as a normal IoTivity resource, as shown in the following diagram.
  
-{{ ::​iotivity-ppm-flow.png?​640 |}}+{{ ::​iotivity-ppm-flow.png?​nolink&​750 ​|}}
  
 ==== Using Plugin Manager ==== ==== Using Plugin Manager ====
Line 22: Line 21:
 For plugin configuration,​ the PluginManager.xml file should be located in the folder with the application'​s executable file. Then, Plugin Manager can load the config information when the application creates Plugin Manager instance. By editing the configuration file, the application developer can change the plugins folder, the max number of plugins in the following: For plugin configuration,​ the PluginManager.xml file should be located in the folder with the application'​s executable file. Then, Plugin Manager can load the config information when the application creates Plugin Manager instance. By editing the configuration file, the application developer can change the plugins folder, the max number of plugins in the following:
  
-<​code>​+<​code ​xml>
 <?xml version="​1.0"​ encoding="​utf-8"?>​ <?xml version="​1.0"​ encoding="​utf-8"?>​
 <​pluginManager>​ <​pluginManager>​
Line 36: Line 35:
 Before starting plugins, you should locate the plugin binary in the path specified in the plugin configuration. Plugins should be in the path with separated folder Before starting plugins, you should locate the plugin binary in the path specified in the plugin configuration. Plugins should be in the path with separated folder
  
-<​code>​+<​code ​bash>
 /sample-app /sample-app
    - sample-executable    - sample-executable
Line 60: Line 59:
 The following XML description is a plugin manifest file for Philips Hue Plugin. The following XML description is a plugin manifest file for Philips Hue Plugin.
  
-<​code>​+<​code ​xml>
 <?xml version="​1.0"​ encoding="​UTF-8"?>​ <?xml version="​1.0"​ encoding="​UTF-8"?>​
 <plugin <plugin
Line 76: Line 75:
 With the plugin information described in the manifest file, the application can start plugins. With the plugin information described in the manifest file, the application can start plugins.
  
-<​code>​+<​code ​cpp>
 PluginManager *m_pm = new PluginManager();​ PluginManager *m_pm = new PluginManager();​
 std::​vector<​Plugin>​ plugins = m_pm->​getPlugins();​ std::​vector<​Plugin>​ plugins = m_pm->​getPlugins();​
protocol_plug_manager_for_linux.txt · Last modified: 2015/04/21 10:20 by Myungjae Lee