ecue-programmer-stream

0.0.3 • Public • Published

Basic Usage

 
const ecuePogrammerStream = require('../src/ecue-programmer-stream')
 
// Create a socket that we will talk through. 
const dgram = require('dgram');
const socket = dgram.createSocket('udp4', {address: '192.168.123.19'});
socket.bind(4000);
 
// Set an rxjs stream of state changes coming from Programmer
const stateStream = ecuePogrammerStream.StateStream(socket);
 
stateStream.all.subscribe(
    packet=>console.log(packet)
);
 
// Create a command dispatcher to send commands to Programmer. We can use the same socket we
// used for the input stream, although you don't have to.
// There is an optional 3rd argument that takes an rxjs stream to pipe commands from a websocket
// or any other source. 
const commandDispatcher = ecuePogrammerStream.CommandDispatcher(socket, {address:'192.168.123.11'});
 
// Send a CUELIST_PLAY command to the server. 
setInterval(()=>{
    console.log(commandDispatcher);
    commandDispatcher.send({command: 'CUELIST_PLAY', params:[1,3]});
},2000);
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i ecue-programmer-stream

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • rubyrubenstahl