![]() |
Fledge
An open source edge computing platform for industrial users
|
Class that represents a north plugin. More...
#include <north_plugin.h>
Public Member Functions | |
NorthPlugin (PLUGIN_HANDLE handle, const ConfigCategory &category) | |
Constructor for the class that wraps the north plugin. More... | |
uint32_t | send (const std::vector< Reading *> &readings) |
Call the send method in the plugin. | |
void | reconfigure (const std::string &) |
Call the reconfigure method in the plugin. | |
void | shutdown () |
Call the shutdown method in the plugin. | |
bool | persistData () |
void | start () |
Call the start method in the plugin with no persisted data. | |
void | startData (const std::string &pluginData) |
std::string | shutdownSaveData () |
Call the shutdown method in the plugin and return plugin data to parsist as JSON string. | |
bool | hasControl () |
void | pluginRegister (bool(*write)(char *name, char *value, ControlDestination destination,...), int(*operation)(char *operation, int paramCount, char *names[], char *parameters[], ControlDestination destination,...)) |
Call the plugin_register entry point of the plugin if one has been defined. | |
NorthPlugin (const PLUGIN_HANDLE handle) | |
Constructor for the class that wraps the OMF north plugin. More... | |
void | shutdown () |
std::string | shutdownSaveData () |
uint32_t | send (const std::vector< Reading * > &readings) const |
Send vector (by reference) of readings pointer to historian server. More... | |
PLUGIN_HANDLE | init (const ConfigCategory &config) |
Initialise the plugin with configuration data. More... | |
bool | persistData () |
void | start () |
void | startData (const std::string &pluginData) |
![]() | |
Plugin (PLUGIN_HANDLE handle) | |
const PLUGIN_INFORMATION * | getInfo () |
PLUGIN_HANDLE | getHandle () |
Public Attributes | |
PluginData * | m_plugin_data |
Additional Inherited Members | |
![]() | |
PLUGIN_HANDLE | handle |
PluginManager * | manager |
PLUGIN_INFORMATION * | info |
Class that represents a north plugin.
The purpose of this class is to hide the use of the pointers into the dynamically loaded plugin and wrap the interface into a class that can be used directly in the north subsystem.
This is achieved by having a set of private member variables which are the pointers to the functions in the plugin, and a set of public methods that will call these functions via the function pointers.
NorthPlugin::NorthPlugin | ( | PLUGIN_HANDLE | handle, |
const ConfigCategory & | category | ||
) |
Constructor for the class that wraps the north plugin.
Create a set of function points that resolve to the loaded plugin and enclose in the class.
NorthPlugin::NorthPlugin | ( | const PLUGIN_HANDLE | handle | ) |
Constructor for the class that wraps the OMF north plugin.
Create a set of function pointers.
handle | The loaded plugin handle |
PLUGIN_HANDLE NorthPlugin::init | ( | const ConfigCategory & | config | ) |
Initialise the plugin with configuration data.
config | The configuration data |
uint32_t NorthPlugin::send | ( | const std::vector< Reading * > & | readings | ) | const |
Send vector (by reference) of readings pointer to historian server.
readings | The readings data |