GithubHelp home page GithubHelp logo

outlaw-dma / node-red-contrib-netvar-utils Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maiquu/node-red-contrib-netvar-utils

0.0 0.0 0.0 179 KB

Network Variable List utility nodes for node-red

License: MIT License

JavaScript 28.53% Shell 0.73% TypeScript 54.46% Nearley 5.53% HTML 5.70% Mustache 5.05%

node-red-contrib-netvar-utils's Introduction

node-red-contrib-netvar-utils

This module provides set of utility nodes in Node-RED for creating, parsing NVL (Network Variable List) UDP packets.

Nodes

  • nvl-json: Outputs JSON object with falsy values based on the configured NVL.
  • nvl-reader: Parses received NVL packets and returns the entire NVL as JSON object. Will only send output when it receives the last expected packet. Outputed JSON object has the same structure as the one created via nvl-json.
  • nvl-emitter: Outputs NVL packet(s) using given JSON object. Input JSON object must have the same structure as the ones outputed via nvl-json and nvl-reader.

Created using @alexk111's node-red template

Example

JSON Structure

VAR_GLOBAL
  flag: BOOL;
  counter: WORD;
  message: STRING(50);
  wordArray: ARRAY [1..5] OF WORD;
  timeMatrix: ARRAY [1..2] OF ARRAY [1..3] OF WORD;
  threeD: ARRAY [0..1, 0..1, 0..1] OF WORD;
END_VAR 

will be converted to:

{
  "flag": false,
  "counter": 0,
  "message": "",
  "wordArray": [0,0,0,0,0],
  "timeMatrix": [
    [0,0,0],
    [0,0,0]
  ],
  "threeD": [
    [[0,0], [0,0]],
    [[0,0], [0,0]]
  ]
}

Supported Data Types

https://github.com/Maiquu/node-red-contrib-netvar-utils/blob/e7a1abb9e9e802938581f19a3a0f66b8598b7195/src/nodes/shared/types.d.ts#L58

TODO

  • BigInt
  • More detailed documentation for nodes
  • Options to define how input is received and how output is delivered
  • STRUCT
  • Tests

License

MIT

node-red-contrib-netvar-utils's People

Contributors

maiquu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.