mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
fix: load node from 2.2 persistence
This commit is contained in:
@@ -1,34 +1,9 @@
|
||||
{
|
||||
"plugins": [
|
||||
"libplugin-mqtt.so",
|
||||
"libplugin-sparkplugb.so",
|
||||
"libplugin-websocket.so",
|
||||
"libplugin-ekuiper.so",
|
||||
"libplugin-monitor.so",
|
||||
"libplugin-modbus-tcp-comm.so",
|
||||
"libplugin-modbus-tcp.so",
|
||||
"libplugin-modbus-rtu.so",
|
||||
"libplugin-modbus-qh-tcp.so",
|
||||
"libplugin-opcua.so",
|
||||
"libplugin-EtherNet-IP.so",
|
||||
"libplugin-Profinet.so",
|
||||
"libplugin-qna3e.so",
|
||||
"libplugin-a1e.so",
|
||||
"libplugin-s7comm.so",
|
||||
"libplugin-s7comm-for-300.so",
|
||||
"libplugin-s5fetch-write.so",
|
||||
"libplugin-fins-tcp.so",
|
||||
"libplugin-ads.so",
|
||||
"libplugin-df1.so",
|
||||
"libplugin-iec104.so",
|
||||
"libplugin-iec61850.so",
|
||||
"libplugin-dlt645-2007.so",
|
||||
"libplugin-bacnet.so",
|
||||
"libplugin-knx.so",
|
||||
"libplugin-focas.so",
|
||||
"libplugin-HJ212.so",
|
||||
"libplugin-nona11.so",
|
||||
"libplugin-license-server.so",
|
||||
"libplugin-file.so"
|
||||
]
|
||||
}
|
||||
Vendored
-1
Submodule extern/uthash deleted from 44a66fe8e0
@@ -24,7 +24,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "adapter/adapter_info.h"
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "adapter_info.h"
|
||||
#include "persist/json/persist_json_plugin.h"
|
||||
|
||||
typedef neu_json_plugin_req_plugin_t neu_persist_plugin_info_t;
|
||||
@@ -92,6 +94,8 @@ int neu_persister_create(const char *schema_dir);
|
||||
*/
|
||||
void neu_persister_destroy();
|
||||
|
||||
sqlite3 *neu_persister_get_db();
|
||||
|
||||
/**
|
||||
* Persist nodes.
|
||||
* @param node_info neu_persist_node_info_t.
|
||||
|
||||
@@ -67,8 +67,8 @@ int neu_manager_add_node(neu_manager_t *manager, const char *node_name,
|
||||
return NEU_ERR_NODE_EXIST;
|
||||
}
|
||||
|
||||
ret = neu_plugin_manager_create_instance(manager->plugin_manager,
|
||||
plugin_name, &instance);
|
||||
ret = neu_plugin_manager_create_instance(manager->plugin_manager, info.name,
|
||||
&instance);
|
||||
if (ret != 0) {
|
||||
return NEU_ERR_LIBRARY_FAILED_TO_OPEN;
|
||||
}
|
||||
|
||||
@@ -242,19 +242,19 @@ int neu_plugin_manager_find(neu_plugin_manager_t *mgr, const char *plugin_name,
|
||||
static const plugin_name_t name[] = {
|
||||
{ "mqtt", "MQTT" },
|
||||
{ "ekuiper", "eKuiper" },
|
||||
{ "modbus-tcp", "Modbus TCP" },
|
||||
{ "modbus-tcp", "Modbus TCP community" },
|
||||
{ "a1e", "Mitsubishi 1E" },
|
||||
{ "ads", "Beckhoff ADS" },
|
||||
{ "bacnet", "BACnet/IP" },
|
||||
{ "dlt645", "DLT645-2007" },
|
||||
{ "EtherNet-IP", "EtherNet/IP(CIP)" },
|
||||
{ "fins", "Omron FINS" },
|
||||
{ "fins", "Omron FINS TCP" },
|
||||
{ "focas", "Fanuc Focas Ethernet" },
|
||||
{ "iec104", "IEC60870-5-104" },
|
||||
{ "knx", "KNXnet/IP" },
|
||||
{ "modbus-qh-tcp", "Modbus TCP QH" },
|
||||
{ "modbus-rtu", "Modbus RTU" },
|
||||
{ "modbus-plus-tcp", "Modbus TCP Advance" },
|
||||
{ "modbus-plus-tcp", "Modbus TCP" },
|
||||
{ "nona11", "NON A11" },
|
||||
{ "opcua", "OPC UA" },
|
||||
{ "qna3e", "Mitsubishi 3E" },
|
||||
|
||||
@@ -465,6 +465,11 @@ int neu_persister_create(const char *schema_dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sqlite3 *neu_persister_get_db()
|
||||
{
|
||||
return global_db;
|
||||
}
|
||||
|
||||
void neu_persister_destroy()
|
||||
{
|
||||
sqlite3_close(global_db);
|
||||
|
||||
Reference in New Issue
Block a user