{"_id":"@arendi/blt","_rev":"1-b33ab9af853ad9aaa44e2211858040a2","name":"@arendi/blt","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@arendi/blt","version":"1.0.0","author":{"name":"Arendi Products GmbH"},"license":"ISC","_id":"@arendi/blt@1.0.0","maintainers":[{"name":"arendi","email":"rashid.talib@arendi.ch"}],"homepage":"https://arendi.ch/blt2450","dist":{"shasum":"b36911da0c2992f6146be1801ffdb509e2bd3a6d","tarball":"https://registry.npmjs.org/@arendi/blt/-/blt-1.0.0.tgz","fileCount":90,"integrity":"sha512-SmnRT7O1bF1sF6wHxaMhK/gHeVJAU+lBl2dXu+OsxCSiOKkBJyQ6p5YFNs7/umvdG+JK+pM9CoLfQeIEMKiikg==","signatures":[{"sig":"MEYCIQDra04jXxMUHFmw4luJAOrBVJO8Z4izwIv7lEkJjtRU6gIhAI1/ggyraJw43VoTjRia9wYI+6Jl/WkJLtnHJMo63dXM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":519701},"main":"dist/src/index.js","types":"dist/src/index.d.ts","engines":{"node":">=16"},"gitHead":"abf5fee28e2ff95e21dfa823561846bf2648f980","scripts":{"doc":"typedoc src/*.ts --name ArendiBLT24","lint":"eslint . --ext .ts","test":"node ./dist/test/apiTest","build":"tsc","format":"prettier --config .prettierrc src/**/*.ts test/**/*.ts --write"},"_npmUser":{"name":"arendi","email":"rashid.talib@arendi.ch"},"_npmVersion":"9.8.1","description":"TypeScript / JavaScript client library for communicating with BLT24 WebSocket server API","directories":{},"_nodeVersion":"18.18.2","dependencies":{"events":"^3.3.0","websocket":"^1.0.34","@arendi/testing":"^2.0.0","@raesch/ext-promise":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.8.3","@types/node":"^18.7.16","@typescript-eslint/parser":"^5.36.2","@typescript-eslint/eslint-plugin":"^5.36.2"},"_npmOperationalInternal":{"tmp":"tmp/blt_1.0.0_1739711632412_0.23275023404875483","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@arendi/blt","version":"1.1.0","description":"TypeScript / JavaScript client library for communicating with BLT24 WebSocket server API","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"test":"node ./dist/test/apiTest","build":"tsc","format":"prettier --config .prettierrc src/**/*.ts test/**/*.ts --write","lint":"eslint . --ext .ts","doc":"typedoc src/*.ts --name ArendiBLT24"},"author":{"name":"Arendi Products GmbH"},"license":"ISC","devDependencies":{"@types/node":"^18.7.16","@typescript-eslint/eslint-plugin":"^5.36.2","@typescript-eslint/parser":"^5.36.2","typescript":"^4.8.3"},"dependencies":{"@arendi/testing":"^2.1.0","@raesch/ext-promise":"^1.0.3","events":"^3.3.0","websocket":"^1.0.34"},"homepage":"https://arendi.ch/blt2450","engines":{"node":">=16"},"_id":"@arendi/blt@1.1.0","gitHead":"e40dd7a48cf68d71be1fdf0114ccf851e347a4a5","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-u9tIDNLxoi9wbMbAwRXIIrHfh8ebbLwEAUJEbnjZqEF7LYXZQR9MVU8B28UrsfSxlNp+sH/MOLahagYOX1dX7A==","shasum":"8382d4a601fddba5fa7b022f04ca034eac0eb7ba","tarball":"https://registry.npmjs.org/@arendi/blt/-/blt-1.1.0.tgz","fileCount":90,"unpackedSize":496829,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDY61JN/sDn65ncG7GE9qOVUa6LRA9CCbVEqFz1Ya95RQIhAO0IuNXz3bWWneghI9z1M+CX51bIHig/KflFz3mPJ7j3"}]},"_npmUser":{"name":"arendi","email":"rashid.talib@arendi.ch"},"directories":{},"maintainers":[{"name":"arendi","email":"rashid.talib@arendi.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blt_1.1.0_1739727513888_0.6559700643871604"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-16T13:13:52.290Z","modified":"2025-02-16T17:38:34.245Z","1.0.0":"2025-02-16T13:13:52.640Z","1.1.0":"2025-02-16T17:38:34.087Z"},"author":{"name":"Arendi Products GmbH"},"license":"ISC","homepage":"https://arendi.ch/blt2450","description":"TypeScript / JavaScript client library for communicating with BLT24 WebSocket server API","maintainers":[{"name":"arendi","email":"rashid.talib@arendi.ch"}],"readme":"# BLT24 WebSocket client API\r\n\r\nThis package contains JavaScript and TypeScript source files for communicating with the BLT24 WebSocket server API.\r\n\r\n## Prerequisite\r\n\r\n### WebSocket server\r\n\r\nAn instance of the WebSocket server must be running in order for the following sample code to run. To install the WebSocket server, download\r\nand execute the installer from https://www.arendi.ch/blt2450\r\n\r\n### Node\r\n\r\nNode.js (at least v16) must be installed on the target machine: https://nodejs.org\r\n\r\n---\r\n\r\n## Installation\r\n\r\nInstall with npm:\r\n\r\n```shell\r\nnpm install \"@arendi/blt\"\r\n```\r\n\r\n---\r\n\r\n## Usage\r\n\r\n```javascript\r\nconst {\r\n  Interface,\r\n  WsInterface,\r\n  Blt24,\r\n  Blt24List,\r\n  Blt24Mode,\r\n  DtmChannel,\r\n  DtmLength,\r\n  DtmPattern,\r\n  DtmPhy\r\n} = require('@arendi/blt');\r\n\r\n// Create WebSocket interface and Blt24 list\r\nconst wsInterface = new WsInterface();\r\nconst blt24List = new Blt24List(wsInterface);\r\n\r\n/* inside async function */\r\n// Open interface and get list of all Blt24 tester\r\nawait wsInterface.Open('ws://localhost:5000/blt24/');\r\nawait blt24List.Refresh(); // optional\r\nconsole.log('Blt24 tester list:', blt24List.list);\r\n\r\n// Get Blt24 tester with a given serial number\r\nconst blt24 = blt24List.Get('123456789ABC-DE');\r\nif (blt24) {\r\n  // Activate DTM mode and start Rx test with an interval of 1000ms\r\n  blt24.SetMode(Blt24Mode.Dtm);\r\n  blt24.DtmRxStart(DtmChannel.Ch19, DtmLength.L37, DtmPattern.Prbs9, DtmPhy.Phy1Mbps, null, 1000);\r\n\r\n  // Receive Dtm test results\r\n  while (true) {\r\n    const dtmData = blt24.Read('DtmResultIndication');\r\n    console.log(`Packet Error Rate (PER): ${dtmData.per}`);\r\n  }\r\n}\r\n```\r\n\r\n### Development\r\n\r\n#### Build\r\n\r\nTo build the project from source, perform the following steps:\r\n\r\n- clone the repository to a local folder\r\n\r\n````\r\n\r\n- Open the created folder and run\r\n  ```bash\r\n  npm install\r\n  npm run build\r\n  ```\r\n\r\nThe 'npm run build' command described above must be executed in order to compile and copy any changes made to the source files located in the src directory\r\n\r\n#### Test\r\n\r\n- Run test\r\n  ```bash\r\n  npm run test\r\n  ```\r\n````\r\n","readmeFilename":"README.md"}