{"id":21969571,"url":"https://github.com/cinderblock/xln","last_synced_at":"2026-05-19T02:02:48.867Z","repository":{"id":57401666,"uuid":"45666654","full_name":"cinderblock/XLN","owner":"cinderblock","description":null,"archived":false,"fork":false,"pushed_at":"2015-11-18T03:38:52.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T22:39:04.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cinderblock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-06T07:31:36.000Z","updated_at":"2019-05-11T03:39:22.000Z","dependencies_parsed_at":"2022-09-15T18:31:52.177Z","dependency_job_id":null,"html_url":"https://github.com/cinderblock/XLN","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/cinderblock/XLN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2FXLN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2FXLN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2FXLN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2FXLN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinderblock","download_url":"https://codeload.github.com/cinderblock/XLN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinderblock%2FXLN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266404941,"owners_count":23923491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T14:22:22.997Z","updated_at":"2026-05-19T02:02:48.818Z","avatar_url":"https://github.com/cinderblock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XLN\n\nSPCI interface for XLN series Programmable DC Power Supplies\n\n*This is still a work in progress*\n\n## Usage\n\n```\nnpm install xln --save\n```\n\n```\nimport {tcpXLN} from 'xln';\n\nvar conn = new tcpXLN({host: 'hostname or IP'}, () =\u003e {\n  // Connected\n\n  // Read the device's model number, serial number, firmware version, etc.\n  conn.getIDN(idn =\u003e {\n    console.log('Device info: ' + idn);\n\n    // Now we can do more stuff with the connection\n    // You can't use more than one xln function at a time\n\n    // Setup a 12V source\n    conn.setSourceVoltage(12, () =\u003e {\n      // 1A current limit\n      conn.setSourceCurrent(1, () =\u003e {\n        // Enable the output\n        conn.setOutput(true, () =\u003e {\n          // Delay just a little bit before checking the current\n          setTimeout(() =\u003e {\n            conn.getMeasuredCurrent(current =\u003e {\n              console.log(current);\n              // values are returned as strings\n\n              // Current might look like this right now: '0.000'\n              console.log((parseFloat(current) \u003e 0) ? 'Load detected' : 'No load');\n\n              // Do more stuff...\n\n              // Close the connection\n              conn.end();\n            });\n          }, 400);\n        });\n      });\n    });\n  });\n});\n\nconn.on('error', err =\u003e {\n  console.log('Connection error');\n  // Error as reported by nodejs Socket\n  console.log(err);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinderblock%2Fxln","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinderblock%2Fxln","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinderblock%2Fxln/lists"}