3.2.0 • Published 5 years ago

axia-lwrp v3.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Installation

npm install axia-lwrp

Basic Usage

const Lwrp = require("axia-lwrp");

// Connect to an Axia device
let device = new Lwrp({
	name: "xNode",
	host: "127.0.0.1",
	port: 93,
	pass: "",
	reconnect: 5000,
	pollInterval: 1000,
});

// Do something when the device is ready
device.on("ready",deviceInfo=>{
	console.log(deviceInfo);
});

// Set name of DST 1 to "Ch1"
device.write(`DST 1 NAME:"Ch1"`);

name is a friendly name assigned to the LiveWire device. This is optional. Default is device model.

host is the IP address of the LiveWire device you want to connect to. Default is localhost.

port is the LiveWire telnet port of the device. Default is port 93.

pass is the login password of the device. Default is blank.

reconnect indicates how long it will wait before reconnecting when there's a connection error. Default is 5000 milliseconds.

pollInterval indicates how often this sends the list of commands to the device. Default is 1000 milliseconds.

Methods

write(command)

Send a command to device.

run

Start polling. This gets called automatically after object is initialized.

stop

Stop polling. Emits halt event.

addCommand(command)

Adds a command to poll. Added commands will be sent to the device continuously on every interval set in runSpeed. This emits a log event.

removeCommand(command)

Removes a command from poll. This emits a log event.

Events

connected

On successful connection to device.

ready

Emitted when the version of the device has been retrieved.

log

Internal logged messages.

data

On data receive, returning parsed data.

data.*

Return parsed data of all supported indications.

data.INDI

Return parsed data of a specific supported indication. Replace INDI with the indication. See below.

Supported commands

VER

LOGIN password

PASSWD old password

SET key=value

SRC port

DST port

MTR ICH|OCH

LVL ICH|OCH CLIP.LEVEL=value LOW.LEVEL=value

ADD GPI ports

ADD GPO ports

DEL GPI ports

DEL GPO ports

GPO port

CFG GPO

IP

SAVE

Supported indications

VER

SET parameters

SRC port

DST port

MTR

GPO port

GPI port

CFG GPO

IP

ERROR code

To Do

Higher level functions for changing values. i.e., LVL, DST, SRC, VER, etc

3.2.0

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago