AgentLite-Node.js
From ESS-WIKI
Revision as of 17:18, 18 December 2018 by Eric.liang (talk | contribs) (Created page with "= Introduction = AgentLite-Node.js is a light weight south-bound agent in Node.js. There are 3 main components of "1. Net-Protocol ( ./lib/WISECore3.3.js)", 2. main pro...")
Contents
Introduction
AgentLite-Node.js is a light weight south-bound agent in Node.js. There are 3 main components of "1. Net-Protocol ( ./lib/WISECore3.3.js)", 2. main program ( AgentLite3.3.js) and 3. plugin module ( ./module/plugin_temp.js). Develop need to develop a plugin.js.
AgentLite-Node.js
Configure
./config/agent_config.json : in JSON Format
<code>{
"ServerIP":"127.0.0.1",
"ServerPort": 1883,
"DeviceName": "SNMP_Handler",
"DevType": "Service",
"version": "v1.0.1"
}</code>
Plugin
Callback functions
Export Interfaces
int Handler_Initialize( param )
| Parameter | Description |
|---|---|
| param.sendcbf | reply action function point |
| param.sendreportcbf | auto report function point |
| param.sendcapabilitycbf | send capability function point |
| param.sendeventcbf | send event message function point |
| param.sendreplytopiccbf | send update data by reply action topic ( Monitor page ) function point |
Handler_Uninitialize
1. g_strHandlerName : Plugin Name
2.
Source Code
gitlab http://advgitlab.eastasia.cloudapp.azure.com/EdgeSense/AgentLite-Node.js