Skip to content

yPluginApi

Sébastien Gallou edited this page Jun 23, 2016 · 4 revisions

Plugin API

The plugin API provides some services to plugins :

  • Declaring, checking if already declared, getting details on devices and keywords
  • Getting the event handler, used to wait events from Yadoms or from your plugin (timer, data reception...)
  • Indicating the plugin current state to Yadoms
  • Recording (= historizing) new data acquisitions
  • Getting the informations (provided in the package.json) about the plugin
  • Getting the current configuration of the plugin instance

See IYPluginApi.h file for full API documentation (located in yadoms/sources/shared/shared/plugin/yPluginApi).

Recommandations

Here are some recommandations about the usage of the API plugin.

Historization

2 types of method are available to historize data. The first historizes a keyword at a time, the second historizes a list of keywords. For performance issues, prefer to use the second form (which takes a list of keywords) as soon as you have several keywords to historize.

Keyword declaration

For the same reason as historization, prefer to use the declaration method taking a keyword list as soon as you have several keywords to declare.

Clone this wiki locally