lib/opc-parse-stream.js
function OpcParseStream(options) {
    WritableStream.call(this);

    options = options || {};

    this._pushback = null;

    /**
     * @type {OpcParseStream.DataFormat}
     */
    this.dataFormat = options.dataFormat || OpcParseStream.DataFormat.BUFFER;

    /**
     * @type {number}
     */
    this.channel = ~~options.channel || 0;

    /**
     * @type {number}
     */
    this.systemId = ~~options.systemId || 0xffff;
}
function OpcParseStream(options) {
    WritableStream.call(this);

    options = options || {};

    this._pushback = null;

    /**
     * @type {OpcParseStream.DataFormat}
     */
    this.dataFormat = options.dataFormat || OpcParseStream.DataFormat.BUFFER;

    /**
     * @type {number}
     */
    this.channel = ~~options.channel || 0;

    /**
     * @type {number}
     */
    this.systemId = ~~options.systemId || 0xffff;
}
A writable stream to act as a sink for the binary OpenPixelControl-protocol.
For protocol-details see http://openpixelcontrol.org/

Channel and System-Id (for sysex-messages) can be configured using
`options.channel` and `options.systemId`.

There are two options for the internal data-format that can be configured
with `options.dataFormat`:

- `OpcParseStream.DataFormat.BUFFER` (default): uses buffer-instances with
3 byte per pixel (RGB-order). These are a bit smaller and more efficient
than using Uint32Arrays, as the data can be directly forwarded from the
network-packets.

- `OpcParseStream.DataFormat.UINT32_ARRAY`: uses an unsined 32-bit integer
per pixel in an Uint32Array. Data format is `0x00rrggbb`.


There are two ways how this can be used this in your project:

- using events: The OpcParseStream will emit 'setpixelcolors' and
'sysex'-events whenever data has been received, the data-format for
pixel-data depends on the `options.dataFormat` setting.

- extend: you can also inherit from this prototype and override the
`setPixelColors()` and `sysex()` method to handle the data. The
default-implementation provided here just emits the events mentioned
above.

@param {OpcParseStream.Options} options
@extends {WritableStream}
@constructor