npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wallcontrol10-protocol

v1.0.0

Published

Encode and decode Datapath WallControl 10 command line interface.

Downloads

4

Readme

Introduction

wallcontrol10-protocol is Node module. The main purpose of it is to decode Datapath WallControl 10 responses.

Main features

  • no external dependencies
  • regardless of connection type (tcp/serial)
  • decode and encode functions
  • no flow control
  • helper constans for connection
  • easy extensible

Usage

const WC10 = require('wallcontrol10-protocol');
let socket = net.createConnection(23, '192.168.4.111', () => {
  let enc = WC10.encode('wcmd -wall=Blueprint -lauoyts');
  console.log('>', enc)
  socket.write(enc.encoded);
})
socket.on('data', data => {
  console.log('<', WC10.decode(data));
})
/* Expected output
> {
  command: 'wcmd -wall=Blueprint -layouts',
  encodedStr: 'wcmd -wall=Blueprint -layouts -echo\n',
  encoded: <Buffer 77 63 6d 64 20 2d 77 61 6c 6c 3d 42 6c 75 65 70 72 69 6e 74 20 2d 6c 61 79 6f 75 74 73 20 2d 65 63 68 6f 0a>,  
  duration: 1400
}
< {
  raw: <Buffer 20 3d 77 63 6d 64 20 2d 77 61 6c 6c 3d 42 6c 75 65 70 72 69 6e 74 20 2d 6c 61 79 6f 75 74 73 20 2d 65 63 68 6f 0d 0a 45 78 69 74 43 6f 64 65 3a 30 0d ... 65 more bytes>,
  rawStr: ' =wcmd -wall=Blueprint -layouts -echo\r\n' +
    'ExitCode:0\r\n' +
    'Int-vis5\r\n' +
    'Vis4-5\r\n' +
    'Onet WP\r\n' +
    'Layout1\r\n' +
    'trzy\r\n' +
    'clear\r\n' +
    'All sources\r\n' +
    '\r\n',
  status: 'OK',
  req: 'layouts',
  value: [
    'Int-vis5',
    'Vis4-5',
    'Onet WP',
    'Layout1',
    'trzy',
    'clear',
    'All sources'
  ],
  extra: { exitCode: 0, exitMsg: 'Success', wall: 'Blueprint ' },
  params: [ { name: 'wall', value: 'Blueprint ' } ]
}

*/

Commands

Wallcontrol10 protocol uses a set of ASCII based commands. They are rather simple and easy to understand. They are described in WallControl 10 Client help/Tools/Command Line Interface. You must use them yourself. Commonly used and most useful commands are:
wcmd -wallstate[=wall_name] - Get info about of all/specific wall.
wcmd [-wall=wall_name] -layouts - Get layout names for wall.
wcmd [-wall=wall_name] -layout=layout_name - Apply layout for a wall.
wcmd [-wall=wall_name] -layout - Get current layout name for a wall.
wcmd [-wall=wall_name] -inputs - Get info about sources.
wcmd [-wall=wall_name] -openwindows - Get list of opened windows with their properties.
WARNING: WallControl 10 server uses ASCII encoding. Do not use non-ASCII characters in layouts, input aliases, favouritrs or wall names. For names containing spaces use ""

encode(cmd) function

This function does not do any special processing. It simply appends -echo\n to the end of cmd. This helps in analyzing the responses.

  • cmd <string> - required. A native WallControl 10 command. Return value is cmdObj <Object>. The most important property is encoded which contains encoded command as Buffer. This buffer must be send to wall server. Other properties are helper ones.

decode(data) function

Decodes response from WallControl 10 server

  • data <Buffer|string> - data read from TCP socket or serial port

Returns response <Object> - an response object containing properties:

  • raw <Buffer> - same as data
  • rawStr <string> - raw as string
  • exitCode <number> - response exit code from server.
  • req <string> - a command name (request). Used to identify a response. See commands array
  • value <string|[string]|Object|[Object]> - decoded value. Return type depends on command
  • extra <Object> - other values which may be useful

The function does not control completeness of response data. It verifies if data is a valid response and tries to decode it. If data is not a valid response, a simple error object is returned.