Fledge
An open source edge computing platform for industrial users
All Classes Functions Variables Pages
plugin_api.h
1 #ifndef _PLUGIN_API
2 #define _PLUGIN_API
3 /*
4  * Fledge storage service.
5  *
6  * Copyright (c) 2017,2018 OSisoft, LLC
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Mark Riddoch, Massimiliano Pinto
11  */
12 #include <string>
13 
14 #define TO_STRING(...) DEFER(TO_STRING_)(__VA_ARGS__)
15 #define DEFER(x) x
16 #define TO_STRING_(...) #__VA_ARGS__
17 #define QUOTE(...) TO_STRING(__VA_ARGS__)
18 
23 typedef struct {
25  const char *name;
27  const char *version;
29  unsigned int options;
34  const char *type;
36  const char *interface;
38  const char *config;
40 
44 typedef struct {
45  char *message;
46  char *entryPoint;
47  bool retryable;
48 } PLUGIN_ERROR;
49 
53 typedef struct plugin_parameter {
54  std::string name;
55  std::string value;
57 
63 typedef void * PLUGIN_HANDLE;
64 
68 typedef enum controlDestination {
70  DestinationAsset,
72  DestinationService,
74  DestinationBroadcast,
76  DestinationScript
77 } ControlDestination;
78 
82 #define SP_COMMON 0x0001
83 #define SP_READINGS 0x0002
84 
85 #define SP_ASYNC 0x0004
86 
87 #define SP_PERSIST_DATA 0x0008
88 
89 #define SP_INGEST 0x0010
90 
91 #define SP_GET_MANAGEMENT 0x0020
92 
93 #define SP_GET_STORAGE 0x0040
94 
95 #define SP_DEPRECATED 0x0080
96 
97 #define SP_BUILTIN 0x0100
98 
99 #define SP_CONTROL 0x1000
100 
104 #define PLUGIN_TYPE_STORAGE "storage"
105 #define PLUGIN_TYPE_SOUTH "south"
106 #define PLUGIN_TYPE_NORTH "north"
107 #define PLUGIN_TYPE_FILTER "filter"
108 #define PLUGIN_TYPE_NOTIFICATION_RULE "notificationRule"
109 #define PLUGIN_TYPE_NOTIFICATION_DELIVERY "notificationDelivery"
110 
111 #endif
unsigned int options
The set of option flags that apply to this plugin.
Definition: plugin_api.h:29
const char * config
The default JSON configuration category for this plugin.
Definition: plugin_api.h:38
const char * interface
The interface version of this plugin.
Definition: plugin_api.h:36
const char * version
The release version of the plugin.
Definition: plugin_api.h:27
const char * name
The name of the plugin.
Definition: plugin_api.h:25
The plugin infiornation structure, used to return information from a plugin during the laod and confi...
Definition: plugin_api.h:23
const char * type
The plugin type, this is one of storage, south, filter, north, notificationRule or notificationDelive...
Definition: plugin_api.h:34
Structure used by plugins to return error information.
Definition: plugin_api.h:44
Pass a name/value pair to a plugin.
Definition: plugin_api.h:53