{"_id":"@bitaffair/tsl-umd-protocol","_rev":"9-39bc167d80ccdee1baa0fe872338b2d0","name":"@bitaffair/tsl-umd-protocol","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.1":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.1","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.1","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"dist":{"shasum":"7d224a69d879a8e3094cd4fb5e8e94701dc8cf04","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.1.tgz","fileCount":20,"integrity":"sha512-TqvXYe4KyO4bTApKbmEIYZImLqzM9cy/IuA2q1T1tulspxxwbPzYDdvZDGf9ODkZrpx8Utw5icp/+SD25uomeQ==","signatures":[{"sig":"MEUCIBc4NbFvDTT7EZkV3lc6mJlVyDygbuU+0cvtmx8ujpPGAiEA2fUD5kZB4jDa543XWjrOP3stoHX4+Yts6VQOAc9j7CA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43168},"main":"index.js","type":"module","exports":{"import":"./index.js","require":"./index.cjs"},"gitHead":"e1f911b521f4d9dc5149f255be0e222c8ce935f7","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup index.js --file index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.1_1720527869763_0.4421767015612448","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.2","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.2","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"dist":{"shasum":"19cd0d5577363a84515d6f902c7d29c214cb1263","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.2.tgz","fileCount":20,"integrity":"sha512-1A2ZqgmA579Iqr7KW+vom4d2DfwnlWI/Ai/QriKqu87iaJnbaZ/obDv9zUq+h5ICrhYMPmWARk3yRkriXaRNyQ==","signatures":[{"sig":"MEQCIG6fVNuNfPMhZyo/W4ui/KbrvvikY4oogbZUo5UKGuLIAiBKGHUnlslretduQO56ut2Dnugqze1LE70YjbKnM6zp1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43454},"main":"index.js","type":"module","exports":{"import":"./index.js","require":"./index.cjs"},"gitHead":"b40d4b32e28bfc4949a5205f6f0a52326ea87f0d","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup index.js --file index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"repository":{"url":"git+https://github.com/bitaffair/tsl-umd-protocol.git","type":"git"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.2_1720528274371_0.7063991125587867","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.3","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.3","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"dist":{"shasum":"3744640234b5d749b2fbc570d3a28ca5404451b3","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.3.tgz","fileCount":20,"integrity":"sha512-NQ6jOWcQfl1S4QU2tTDnx/WNL9ALYyMyTYnDpPJgLJGcbzj+KjhgHywcOdolPEf389LcF00n2/L9OVbIS3ylHw==","signatures":[{"sig":"MEUCIASkDGFqicAH2gFEpda9febDc5v4H/UpUMdC6ZiYVu72AiEApBTItbOMMEKAKr0IRU0+AyAb5cpmJ7dPDO+dE8guVyM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43689},"main":"index.js","type":"module","exports":{"import":"./index.js","require":"./index.cjs"},"gitHead":"29945717294aec49bfac58ac64c1168ec283f42e","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup index.js --file index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"repository":{"url":"git+https://github.com/bitaffair/tsl-umd-protocol.git","type":"git"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.3_1720532576285_0.04504377687308092","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.4","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.4","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"dist":{"shasum":"0b84156eff8c720195e539a79f3db3d1107c07c4","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.4.tgz","fileCount":20,"integrity":"sha512-nRpeu/NJ/KcMfKYsxeJXtNPBNsGH+Aeog8hgnFPYRgZLxjUGJ/T0QMyOBiHB4qx4tPev4qUpxRWK3+3RWf4zpg==","signatures":[{"sig":"MEYCIQCgt8B2wYZ5btMerFVhXzwc1mnyco3SIET4Qs0m401JXAIhAKsrEl3eWCTHU43To99l9Q0hCAIwqM+s2bzG1vCHecz1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43915},"main":"index.js","type":"module","exports":{"import":"./index.js","require":"./index.cjs"},"gitHead":"d04a81bd902513af874edfe7f4392532658c3c7d","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup index.js --file index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"repository":{"url":"git+https://github.com/bitaffair/tsl-umd-protocol.git","type":"git"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.4_1720542086395_0.6907392035173696","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.5","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.5","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"dist":{"shasum":"b59562879e8c7259b00058b3310118ba0410cd0b","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.5.tgz","fileCount":20,"integrity":"sha512-7v0GcSsPap/Gj1Bx5L9LZ1HK/bpJAvxLYyaHmT2CXMK56ZA3s/Rbk/ZFk+UuXD0muioBJbfp3+Xunwi+KGQYxQ==","signatures":[{"sig":"MEUCIGSqN7AJtvRaChxl+n/MdZSd9juYlD1u2UtJnNNyYxfBAiEA8KiNDujSaWGawlacLjsqnbQ0RumwGIdH0xobzgrOnHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43979},"main":"./lib/index.js","type":"module","exports":{"import":"./lib/index.js","require":"./dist/index.cjs"},"gitHead":"561bfd217de0ec0825695eb0aac3314017cc4c4a","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup ./lib/index.js --file ./dist/index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"repository":{"url":"git+https://github.com/bitaffair/tsl-umd-protocol.git","type":"git"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.5_1720543403078_0.9409279519141531","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.6","keywords":["tally","tsl","umd","protocol"],"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","_id":"@bitaffair/tsl-umd-protocol@1.0.6","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"dist":{"shasum":"f2bcd800d943088653fd3bf1d6c9db724eb4a097","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.6.tgz","fileCount":20,"integrity":"sha512-pVwPgZC6eiCo9wElTlqPV2nsq8G48m6gTIYrLpTE14sb3odsDoahGKxenE5noO8ekfxV0dB3XpHvAmYJKtsmtA==","signatures":[{"sig":"MEQCIEztGglkNNbh5bfYSG2oM6WdPiuB5VITl36vZH9hH8t1AiAfyNH4borJQCamc1NxpP5kDRg+Z0PQN1L9Ha+YwhuHgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48794},"main":"./lib/index.js","type":"module","exports":{"import":"./lib/index.js","require":"./dist/index.cjs"},"gitHead":"a645b55305edfbfae0e9e28d7f37a2f23f3c6e0c","scripts":{"test":"mocha ./test/*.spec.*","build":"npx rollup ./lib/index.js --file ./dist/index.cjs --format cjs","test:watch":"npm run test -- --watch --parallel","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"repository":{"url":"git+https://github.com/bitaffair/tsl-umd-protocol.git","type":"git"},"_npmVersion":"10.5.0","description":"Compose and parse tsl-umd messages in different versions","directories":{},"_nodeVersion":"21.7.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","rollup":"^4.18.1","@hapi/code":"^9.0.3"},"_npmOperationalInternal":{"tmp":"tmp/tsl-umd-protocol_1.0.6_1720636415563_0.9494352932292198","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@bitaffair/tsl-umd-protocol","version":"1.0.7","description":"Compose and parse tsl-umd messages in different versions","main":"./lib/index.js","scripts":{"test":"mocha ./test/*.spec.*","test:watch":"npm run test -- --watch --parallel","build":"npx rollup ./lib/index.js --file ./dist/index.cjs --format cjs","prepublishOnly":"npm test && npm run build"},"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","keywords":["tally","tsl","umd","protocol"],"type":"module","devDependencies":{"@hapi/code":"^9.0.3","mocha":"^10.6.0","rollup":"^4.18.1"},"exports":{"import":"./lib/index.js","require":"./dist/index.cjs"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/bitaffair/tsl-umd-protocol.git"},"homepage":"https://github.com/bitaffair/tsl-umd-protocol","bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"_id":"@bitaffair/tsl-umd-protocol@1.0.7","gitHead":"2dcb4d8211021a4f61a416aa67a86c36e6fc3473","_nodeVersion":"21.7.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-2lGBDcI9E3yFrjfGHmxUA+Twv/vpyc5Fxp/ouBQt6hAU1CeIRKSW2MYl7QyRWB8E+MliigqUtn3aW/jzXfjKAg==","shasum":"d3f9d23bd4eb054e003f8aeca7eee8067a62b771","tarball":"https://registry.npmjs.org/@bitaffair/tsl-umd-protocol/-/tsl-umd-protocol-1.0.7.tgz","fileCount":20,"unpackedSize":49435,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZn8gBR/voYJfLWyySLpwSJjZvhGdd4E6tVHQE0rd1mQIhAO3nnGOt2BLdUgeow1deBRsVw1lpKU0TlEFdZxwtJrys"}]},"_npmUser":{"name":"platdesign","email":"mail@platdesign.de"},"directories":{},"maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tsl-umd-protocol_1.0.7_1720638441077_0.7825455953957989"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-09T12:24:29.684Z","modified":"2024-07-10T19:07:21.503Z","1.0.0":"2024-07-09T12:17:38.979Z","1.0.1":"2024-07-09T12:24:30.005Z","1.0.2":"2024-07-09T12:31:14.717Z","1.0.3":"2024-07-09T13:42:56.437Z","1.0.4":"2024-07-09T16:21:26.647Z","1.0.5":"2024-07-09T16:43:23.224Z","1.0.6":"2024-07-10T18:33:35.696Z","1.0.7":"2024-07-10T19:07:21.291Z"},"bugs":{"url":"https://github.com/bitaffair/tsl-umd-protocol/issues","email":"hello@bitaffair.io"},"author":{"name":"Christian Blaschke","email":"cb@bitaffair.io"},"license":"MIT","homepage":"https://github.com/bitaffair/tsl-umd-protocol","keywords":["tally","tsl","umd","protocol"],"repository":{"type":"git","url":"git+https://github.com/bitaffair/tsl-umd-protocol.git"},"description":"Compose and parse tsl-umd messages in different versions","maintainers":[{"name":"platdesign","email":"mail@platdesign.de"}],"readme":"# @bitaffair/tsl-umd-protocol\n\n[![Test CI](https://github.com/bitaffair/tsl-umd-protocol/actions/workflows/testing.js.yml/badge.svg)](https://github.com/bitaffair/tsl-umd-protocol/actions/workflows/testing.js.yml)\n\nThis module contains all versions of TSL-UMD protocol to control *tally lights* and *under monitor displays*. Its single purpose is to `compose` and `parse` binary messages. Sending and receiving is not part if it. All details about the protocol are based on the specification in [this document](https://tslproducts.com/media/1959/tsl-umd-protocol.pdf). This library is **inofficial** and therefore is **not developed or supported by [TSL Products](https://tslproducts.com/)**.\n\n\n## Installation\n```shell\nnpm install @bitaffair/tsl-umd-protocol\n```\n\n\n## Usage\n\nEach major version can be imported separately containing a `compose` and a `parse` method.\n\n```javascript\nimport { v3, v4, v5 } from '@bitaffair/tsl-umd-protocol';\nconst { compose, parse } = v3 // or v4 or v5;\n\n// use compose method to create the binary message\nconst buffer = compose(messageObject);\n\n// use parse method to create message object from binary message\nconst parsedMessageObject = parse(buffer);\n```\n\nImplemented versions:\n| Import | Versions | \n| :----: | :------- |\n| v3     | v3.1     |   \n| v4     | v4.0     |   \n| v5     | v5.0     |   \n\n\n## v3.1\n\n- `address` *(Number)* Display address (0-126)\n- `brightness` *(Number)* Brightness (0-3)\n- `label` *(String)* Display label (max. 16 chars ASCII)\n- `version` *(String, Always: 3.1)*\n- `t1` *(Boolean)* Tally 1 status\n- `t2` *(Boolean)* Tally 2 status\n- `t3` *(Boolean)* Tally 3 status\n- `t4` *(Boolean)* Tally 4 status\n\n## v4.0\n\n- `address` *(Number)* Display address (0-126)\n- `brightness` *(Number)* Brightness (0-3)\n- `label` *(String)* Display label (max. 16 chars ASCII)\n- `version` *(String, Default: 4.0)*\n- `displayL` & `displayR` *(Object)* with same structure:\n  - `LH` *(Number)* Left tally color (0-3)\n  - `RH` *(Number)* Right tally color (0-3)\n  - `TXT` *(Number)* Text color (0-3)\n\n\n## v5.0\n\n- `screen` *(Number | String, Default: 0)* Select a specific screen. If not set it will be 0. Use `all` or `65535` to address all screens.\n- `version` *(String, Default: 5.0)* \n- `displays` *(Array, required)* An array of objects:\n  - `brightness` *(Number)* Brightness (0-3)\n  - `LH` *(Number)* Left tally color (0-3)\n  - `RH` *(Number)* Right tally color (0-3)\n  - `TXT` *(Number)* Text color (0-3)\n  - `label` *(String)* Display label (Unicode by default)\n- `UNICODE` *(Boolean, Default: true)* If set to `false` labels will be ASCII encoded during composition.\n- `STREAM` *(Boolean, Default: false)* If set the returned buffer is prepared for stream transport with DLE/STX prefix and stuffed DLE characters. Use this for TCP or other stream interfaces.\n\n### StreamUnwrapTransformer()\n\nIt implements a [Transform](https://nodejs.org/api/stream.html#new-streamtransformoptions) which can be used on fragmented source streams (like a TCP socket) to get clean, unwrapped and parsable buffers from chunks.\n\n**Example usage on a TCP socket:**\n```javascript\nimport net from 'node:net';\nimport { v5 } from '@bitaffair/tsl-umd-protocol';\n\nnet.createServer(socket => {\n  const transformer = new v5.StreamUnwrapTransformer();\n\n  transformer.on('data', buf => {\n    const obj = v5.parse(buf);\n    // go on from here\n  });\n\n  socket.pipe(transformer);\n});\n\n```\n\n\n\n## License\n(The MIT License)\n\nCopyright (c) 2024 Bitaffair GmbH <hello@bitaffair.io>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}