14 #include <plugin_manager.h> 15 #include <config_category.h> 17 #include <reading_set.h> 19 typedef void (*INGEST_CB)(
void *,
Reading);
20 typedef void (*INGEST_CB2)(
void *, std::vector<Reading *>*);
44 void registerIngest(INGEST_CB,
void *);
45 void registerIngestV2(INGEST_CB2,
void *);
46 bool isAsync() {
return info->
options & SP_ASYNC; };
47 bool hasControl() {
return info->
options & SP_CONTROL; };
48 bool persistData() {
return info->
options & SP_PERSIST_DATA; };
49 void startData(
const std::string& pluginData);
51 bool write(
const std::string& name,
const std::string& value);
52 bool operation(
const std::string& name, std::vector<PLUGIN_PARAMETER *>& );
54 PLUGIN_HANDLE instance;
56 void (*pluginStartPtr)(PLUGIN_HANDLE);
57 Reading (*pluginPollPtr)(PLUGIN_HANDLE);
58 std::vector<Reading*>* (*pluginPollPtrV2)(PLUGIN_HANDLE);
59 void (*pluginReconfigurePtr)(PLUGIN_HANDLE*,
60 const std::string& newConfig);
61 void (*pluginShutdownPtr)(PLUGIN_HANDLE);
62 void (*pluginRegisterPtr)(PLUGIN_HANDLE, INGEST_CB,
void *);
63 void (*pluginRegisterPtrV2)(PLUGIN_HANDLE, INGEST_CB2,
void *);
64 std::string (*pluginShutdownDataPtr)(
const PLUGIN_HANDLE);
65 void (*pluginStartDataPtr)(PLUGIN_HANDLE,
66 const std::string& pluginData);
67 bool (*pluginWritePtr)(PLUGIN_HANDLE,
const std::string& name,
const std::string& value);
68 bool (*pluginOperationPtr)(
const PLUGIN_HANDLE,
const std::string& name,
int count,
void startData(const std::string &pluginData)
Call the start method in the plugin.
Definition: south_plugin.cpp:147
Definition: config_category.h:56
Class that represents a south plugin.
Definition: south_plugin.h:33
Reading poll()
Call the poll method in the plugin.
Definition: south_plugin.cpp:169
bool operation(const std::string &name, std::vector< PLUGIN_PARAMETER *> &)
Call the plugin operation entry point with the operation to execute.
Definition: south_plugin.cpp:363
std::string shutdownSaveData()
Call the shutdown method in the plugin.
Definition: south_plugin.cpp:264
An asset reading represented as a class.
Definition: reading.h:33
A generic representation of a plugin.
Definition: plugin.h:20
Reading set class.
Definition: reading_set.h:26
void shutdown()
Call the shutdown method in the plugin.
Definition: south_plugin.cpp:244
~SouthPlugin()
South plugin destructor.
Definition: south_plugin.cpp:118
void start()
Call the start method in the plugin.
Definition: south_plugin.cpp:125
void reconfigure(const std::string &)
Call the reconfigure method in the plugin.
Definition: south_plugin.cpp:218
ReadingSet * pollV2()
Call the poll method in the plugin supporting interface ver 2.x.
Definition: south_plugin.cpp:189
SouthPlugin(PLUGIN_HANDLE handle, const ConfigCategory &category)
Constructor for the class that wraps the south plugin.
Definition: south_plugin.cpp:32
bool write(const std::string &name, const std::string &value)
Call the write entry point of the plugin.
Definition: south_plugin.cpp:321
Pass a name/value pair to a plugin.
Definition: plugin_api.h:53