User Tools

Site Tools


requirements_of_a_plugin

A Plugin utilizing IoTivity's Bridging Project's Mini Plugin Manager (MPM) framework should adhere to the following rules (there is no committee enforcing this aside from code review, so please make best effort to be a good actor):

M=Mandatory, S=Suggested, O=Optional

  • [M] Add README to your plugin directory so users/developers know exactly how to use, modify, and maintain your plugin.
  • [M] Make proper usage of Plugin Interface API pluginCreate() \\Pre-malloc any plugin lifetime memory req'd.
  • [M] Make proper usage of Plugin Interface API pluginStart() \\Start any UI, Network, threads, etc. req'd for translation to be effective.
  • [M] Make proper usage of Plugin Interface API pluginStop() \\Shutdown all UI, Network, threads, etc.
  • [M] Make proper usage of Plugin Interface API pluginDestroy() \\De-alloc any lifetime req'd memory.
  • [S] Make proper usage of Plugin Interface API pluginScan() \\Start discovery and translation. Do not make end user assumptions (ie. Don't add a resource to the IoTivity stack until you get pluginAdd() req.).
  • [S] Make proper usage of Plugin Interface API pluginAdd() \\create or make an IoTivity resource active. Optionally return a byteArray. This byteArray is treated as a black box by MPM and endUser.
  • [S] Make proper usage of Plugin Interface API pluginRemove() \\delete or make an IoTivity resource inactive. If adhering to pluginReconnect(), must delete IoTivity resource endpoint data from your.
  • [O] Make proper usage of Plugin Interface API pluginReconnect() \\In pluginAdd, you can optionally decide to track your proprietary plugin's endpoint data and IoTivity resource endpoint data and serialize it into a byteArray. This byteArray is returned to pluginReconnect() to allow this plugin to reconnect without user intervention in case of a power cycle. This byteArray can be in any format or size you'd like. It is your plugin' context per device. Your plugin must simply know how to pack and parse it. No other layer needs to understand it outside of a byteArray of some size.
requirements_of_a_plugin.txt · Last modified: 2017/07/01 20:12 by Joseph Morrow