@jmkristian/node-vara

1.0.2 • Public • Published

node-vara

Communicate via radio in the style of node Net, using a VARA FM or HF modem.

const VARA = require('@jmkristian/node-vara');
const Bunyan = require('bunyan');

var server = new VARA.Server ({
        host: 'vara-fm-server-host', // default: localhost
        port: 8300, // default: 8300
        dataPort: 8301, // default: port + 1
        logger: Bunyan.createLogger({name: 'VARA'}), /* default: no logging
            An object compatible with the Bunyan logger interface, or null. */
    },
    function onConnection(connection) {
        console.log('connection'
                    + ' from ' + connection.remoteAddress
                    + ' to ' + connection.localAddress);
        connection.write(...); // transmit data
        connection.pipe(...); // receive data
    });

server.listen({
        host: ['A1CALL-1', 'B2CALL-10']  // This server's call signs.
    },
    function onListening(info) { // called when the server begins listening
        console.log('VARA listening %o', info);
    });

Readme

Keywords

Package Sidebar

Install

npm i @jmkristian/node-vara

Weekly Downloads

3

Version

1.0.2

License

Apache-2.0

Unpacked Size

48.6 kB

Total Files

11

Last publish

Collaborators

  • jmkristian