FairCom Edge ships with many plug-ins, which extend its capabilities. They provide the ability to communicate over HTTP, MQTT, OPC UA, REST, ThingWorx AlwaysOn, etc.
Each plug-in is independently enabled and configured with a plug-in based architecture. They are not enabled by default to maximize security. (Plug-ins are secure, but they increase the attack surface by opening extra network ports and listening across more communication protocols.)
The ctsrvr.cfg configuration file contains a list of plug-ins that run when the HUB starts. This file is located in c-treeEDGE-Installation-Folder\server\config.
The example below shows the plug-in section of the ctsrvr.cfg configuration file on a Linux server:
In this example, the first plug-in is cthttpd. This is the HTTP plug-in that enables the IIoT Hub’s HTTP protocol, web services, and MQTT services. Following the keyword PLUGIN is the name of the folder containing the plug-in’s configuration file. The configuration file must have the same name as the plug-in’s folder but with the .json extension. In the example above, the name of the plug-in folder is cthttpd and this folder contains a configuration file named cthttpd.json.
All plug-in folders must be located in the FairCom Edge Server working directory (for example c-treeEDGE-Installation-Folder\server). You will see the plug-in sub-folders in this location (for example .\web, .\opc, etc.).
A semicolon must follow the name of the plug-in’s folder.
Following the semicolon is the relative file system path to the plug-in’s executable. The path is relative to the folder that contains the plug-in.
In the example above, ./web/libcthttpd.so is the relative path to the plug-in’s executable, which is named libcthttpd.so.
On Microsoft Windows, a plug-in is a Dynamic Linked Library with the extension of .dll. On Linux, a plug-in is a shared object library with the extension of .so. On MacOS, a plug-in is a dynamic library with an extension of .dylib.
To disable a plug-in, put a semicolon (;) before the keyword PLUGIN. To enable a plug-in, remove the semicolon.
Contact FairCom support to request new types of general-use plug-ins. FairCom Professional services can build custom plug-ins for you. You can also build your own plug-ins with help from FairCom support.