All Projects → jmmoser → node-drivers

jmmoser / node-drivers

Licence: MIT license
Industrial protocol drivers in node.js

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to node-drivers

Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (+930%)
Mutual labels:  tcp, udp, driver, modbus
STUP-Protocol
Secure/Speedup TCP-like UDP protocol
Stars: ✭ 12 (-40%)
Mutual labels:  tcp, udp, protocol
ethereum-dissectors
🔍Wireshark dissectors for Ethereum devp2p protocols
Stars: ✭ 82 (+310%)
Mutual labels:  tcp, udp, protocol
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+2835%)
Mutual labels:  tcp, udp, protocol
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+545%)
Mutual labels:  tcp, udp, protocol
Modbus-STM32-HAL-FreeRTOS
Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
Stars: ✭ 272 (+1260%)
Mutual labels:  tcp, modbus, plc
Iotclient
这是一个物联网设备通讯协议实现客户端,将会包括主流PLC通信读取、ModBus协议、Bacnet协议等常用工业通讯协议。本组件终身开源免费,采用最宽松的MIT开源协议,您可以随意修改和商业使用(商业使用请做好评估和测试)。
Stars: ✭ 311 (+1455%)
Mutual labels:  tcp, modbus, plc
Qtswissarmyknife
QSAK (Qt Swiss Army Knife) is a multi-functional, cross-platform debugging tool based on Qt.
Stars: ✭ 196 (+880%)
Mutual labels:  tcp, udp, modbus
Hazel Networking
Hazel Networking is a low level networking library for C# providing connection orientated, message based communication via TCP, UDP and RUDP.
Stars: ✭ 194 (+870%)
Mutual labels:  tcp, udp, protocol
Stream
NodeJS Modbus Stream
Stars: ✭ 114 (+470%)
Mutual labels:  tcp, udp, modbus
Mts
Project of Multi-protocol Test Tool opensourced by Ericsson
Stars: ✭ 34 (+70%)
Mutual labels:  tcp, udp, protocol
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (+980%)
Mutual labels:  tcp, udp, protocol
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+12975%)
Mutual labels:  tcp, udp, protocol
overload
📡 Overload DoS Tool (Layer 7)
Stars: ✭ 167 (+735%)
Mutual labels:  tcp, udp
Industrial-Security-Auditing-Framework
ISAF aims to be a framework that provides the necessary tools for the correct security audit of industrial environments. This repo is a mirror of https://gitlab.com/d0ubl3g/industrial-security-auditing-framework.
Stars: ✭ 43 (+115%)
Mutual labels:  modbus, plc
XAsyncSockets
XAsyncSockets is an efficient Python/MicroPython library of managed asynchronous sockets.
Stars: ✭ 28 (+40%)
Mutual labels:  tcp, udp
okhoxi-serac
冰塔协议-传输层协议
Stars: ✭ 33 (+65%)
Mutual labels:  tcp, udp
AndroidNetMonitor
This project aims to collect and analyze traffic information of Android.(采集手机发送和接收的报文简要信息,并且根据socket记录每个报文对应哪个手机app)
Stars: ✭ 25 (+25%)
Mutual labels:  tcp, udp
mongoose
Embedded Web Server
Stars: ✭ 8,968 (+44740%)
Mutual labels:  tcp, udp
dperf
dperf is a DPDK based 100Gbps network performance and load testing software.
Stars: ✭ 1,320 (+6500%)
Mutual labels:  tcp, udp

node-drivers

A layered approach to protocol drivers.

Install

npm install node-drivers

Examples

Read and list tags from a Logix5000 processor:

const { TCP, CIP } = require('node-drivers');

const tcpLayer = new TCP('1.2.3.4');
const logix5000 = new CIP.Logix5000(tcpLayer);

console.log(await logix5000.readTag('tagname'));

/** Read an element from a 1-dimensional tag */
console.log(await logix5000.readTag('TagThatIs1DArray[0]'));

/** Read an entire 1-dimensional tag */
console.log(await logix5000.readTag('TagThatIs1DArray'));

/** Read the first 4 elements of a 1-dimensional tag */
console.log(await logix5000.readTag('TagThatIs1DArray', 4))

/**
 * Read a slice of a 1-dimensional tag
 * example returns an array containing the values of elements 3 through 7
 */
console.log(await logix5000.readTag('TagThatIs1DArray[3]', 5));

/** Read an element of a structure member of a tag */
console.log(await logix5000.readTag('tag.member[0].anothermember'));

/**
 * Read all tags scoped to a program
 * returns an object containing all of the scoped tags
 */
console.log(await logix5000.readTag('TheProgramName'));

/** Read a program scoped tag */
console.log(await logix5000.readTag('TheProgramName.tag'));

/**
 * Read a tag using the symbol instance id
 * (available in controller version 21 and above)
 */
console.log(await logix5000.readTag(2130));

/** List all global tags */
for await (const tag of logix5000.listTags()) {
  console.log(tag);
}

/** List all tags scoped to a program */
for await (const tag of logix5000.listTags('Program:Alarms')) {
  console.log(tag);
}

await tcpLayer.close();

Read/Write a tag from a PLC-5, SLC 5/03, or SLC 5/04 processor using PCCC embedded in CIP:

const { TCP, CIP, PCCC } = require('node-drivers');

const tcpLayer = new TCP('1.2.3.4');
const cipLayer = new CIP(tcpLayer);
const pccc = new PCCC(cipLayer);

/** Write an integer */
console.log(await pccc.typedWrite('N10:47', 1000));

/** Read an integer */
console.log(await pccc.typedRead('N10:47'));

/** Write a float */
console.log(await pccc.typedWrite('F8:1', 5.5));

await tcpLayer.close();

Find all EtherNet/IP devices in a subnet using the UDP broadcast address or by explicitly pinging each host:

const { UDP, CIP } = require('node-drivers');

const udpLayer = new UDP('1.2.3.255');
const eipLayer = new CIP.EIP(udpLayer);

/** Broadcast */
console.log(await eipLayer.listIdentity());


/** Explicitly */
const hosts = [];
for (let i = 1; i < 255; i++) {
  hosts.push(`1.2.3.${i}`);
}

/* hosts overrides whatever host was specified in the Layers.UDP() constructor */
console.log(await eipLayer.listIdentity({ hosts }));

await udpLayer.close();

Retrieve information from an EtherNet/IP device over TCP:

const { TCP, CIP } = require('node-drivers');

const tcpLayer = new TCP('1.2.3.4');
const eipLayer = new CIP.EIP(tcpLayer);

console.log(await eipLayer.listInterfaces());

console.log(await eipLayer.listServices());

/** no response, used to test underlying transport layer */
await eipLayer.nop();

await tcpLayer.close();

Communicate with a Modbus device over TCP:

const { TCP, Modbus } = require('node-drivers');

const tcpLayer = new TCP('1.2.3.4');
const modbusLayer = new Modbus(tcpLayer);

// read holding register 40004
console.log(await modbusLayer.readHoldingRegisters(3, 1));

await tcpLayer.close();

Drivers/Protocols

  • CIP
    • EtherNet/IP
    • Logix5000
  • PCCC
    • embedded in CIP
  • Modbus
    • TCP frame format
  • TCP
  • UDP
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].