{"id":32136826,"url":"https://github.com/lxi-tools/liblxi","last_synced_at":"2025-10-21T04:41:48.678Z","repository":{"id":44619736,"uuid":"54966056","full_name":"lxi-tools/liblxi","owner":"lxi-tools","description":"Open source LXI library","archived":false,"fork":false,"pushed_at":"2025-04-03T20:18:24.000Z","size":245,"stargazers_count":104,"open_issues_count":1,"forks_count":30,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-03T21:25:37.677Z","etag":null,"topics":["instruments","linux","lxi","macos","open-source","test"],"latest_commit_sha":null,"homepage":"https://lxi-tools.github.io","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lxi-tools.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-29T10:11:05.000Z","updated_at":"2025-04-03T20:18:28.000Z","dependencies_parsed_at":"2023-11-12T10:21:16.751Z","dependency_job_id":"f8efa2bb-b5ac-45a0-bfb1-1dcd6e59824a","html_url":"https://github.com/lxi-tools/liblxi","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/lxi-tools/liblxi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxi-tools%2Fliblxi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxi-tools%2Fliblxi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxi-tools%2Fliblxi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxi-tools%2Fliblxi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lxi-tools","download_url":"https://codeload.github.com/lxi-tools/liblxi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxi-tools%2Fliblxi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207158,"owners_count":26290614,"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-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["instruments","linux","lxi","macos","open-source","test"],"created_at":"2025-10-21T04:41:47.495Z","updated_at":"2025-10-21T04:41:48.668Z","avatar_url":"https://github.com/lxi-tools.png","language":"C","funding_links":["https://www.paypal.me/lundmar"],"categories":[],"sub_categories":[],"readme":"# liblxi\n\n[![](https://img.shields.io/circleci/build/github/lxi-tools/liblxi)](https://circleci.com/gh/lxi-tools/liblxi/tree/master)\n[![](https://img.shields.io/github/v/release/lxi-tools/liblxi?sort=semver)](https://github.com/lxi-tools/liblxi/releases)\n[![](https://img.shields.io/repology/repositories/liblxi)](https://repology.org/project/liblxi/versions)\n\n\n## 1. Introduction\n\nliblxi is an open source software library which offers a simple API for\ncommunicating with LXI compatible instruments. The API allows applications to\ndiscover instruments on your network, send SCPI commands, and receive\nresponses.\n\nCurrently the library supports VXI-11/TCP and RAW/TCP connections. Future work\ninclude adding support for the newer and more efficient HiSlip protocol which\nis used by next generation LXI instruments.\n\nThe library is based on the VXI-11 RPC protocol implementation which is part of\nthe asynDriver EPICS module, which, at time of writing, is available [here](http://www.aps.anl.gov/epics/modules/soft/asyn/index.html).\n\n### 1.1 What is LXI?\n\nLAN eXtensions for Instrumentation (LXI) is a standard developed by the LXI\nConsortium, an industry consortium that maintains the LXI specification and\npromotes the LXI Standard. The LXI standard defines the communication protocols\nfor modern instrumentation and data acquisition systems using Ethernet.\n\nVisit www.lxistandard.org for more details.\n\nPlease notice that liblxi is not affiliated with the LXI consortium - it is\nan independent open source community effort.\n\n\n## 2. The liblxi API\n\nThe API is small and simple. It includes functions required for discovering and\ncommunicating SCPI messages with LXI devices:\n```\n    int lxi_init(void);\n    int lxi_discover(struct lxi_info_t *info, int timeout, lxi_discover_t type);\n    int lxi_connect(const char *address, int port, const char *name, int timeout, lxi_protocol_t protocol);\n    int lxi_send(int device, const char *message, int length, int timeout);\n    int lxi_receive(int device, char *message, int length, int timeout);\n    int lxi_disconnect(int device);\n```\nNote: `type` is `DISCOVER_VXI11` or `DISCOVER_MDNS`\n\nNote: `protocol` is `VXI11` or `RAW`\n\n\n## 3. API usage\n\nHere is a simple code example on how to use the liblxi API:\n\n```\n     #include \u003cstdio.h\u003e\n     #include \u003cstring.h\u003e\n     #include \u003clxi.h\u003e\n\n     int main()\n     {\n         char response[65536];\n         int device, length, timeout = 1000;\n         char *command = \"*IDN?\";\n\n         // Initialize LXI library\n         lxi_init();\n\n         // Connect to LXI device\n         device = lxi_connect(\"10.42.0.42\", 0, \"inst0\", timeout, VXI11);\n\n         // Send SCPI command\n         lxi_send(device, command, strlen(command), timeout);\n\n         // Wait for response\n         lxi_receive(device, response, sizeof(response), timeout);\n\n         printf(\"%s\\n\", response);\n\n         // Disconnect\n         lxi_disconnect(device);\n     }\n```\nThe example above prints the ID string of the LXI instrument. For example, a\nRigol DS1104Z oscilloscope would respond:\n```\n    RIGOL TECHNOLOGIES,DS1104Z,DS1ZA1234567890,00.04.03\n```\n\nSee src/test for more examples.\n\n\n## 4. Installation\n\n### 4.1 Installation from source\n\nThe latest source releases can be found [here](https://github.com/lxi-tools/liblxi/releases).\n\nTo compile and install successfully from source you need to install the\nfollowing dependencies:\n\n * libtirpc\n * libxml2\n * avahi    (optional)\n\nInstall steps:\n```\n    $ meson setup build\n    $ meson compile -C build\n    $ meson install -C build\n```\nNote: Please do no try to install from source if you are not familiar with\nusing meson.\n\n\n### 4.2 Installation using package manager (Linux)\n\nliblxi comes prepackaged for various GNU/Linux distributions. Please consult\nyour package manager tool to find and install lxi-tools.\n\nIf you would like to see liblxi included in your favorite distribution, please\nreach out to its package maintainers team.\n\n### 4.3 Installation using Homebrew (MacOS, Linux)\n\nIf you have [Homebrew](https://brew.sh) installed:\n\n``` shell\n    $ brew install liblxi\n```\n\n\n## 5. Contributing\n\nliblxi is open source. If you want to help out with the project please feel\nfree to join in.\n\nAll contributions (bug reports, code, doc, ideas, etc.) are welcome.\n\nPlease use the github issue tracker and pull request features.\n\n\nAlso, if you find this free open source software useful please feel free to\nconsider making a donation of your choice:\n\n[![Donate](https://raw.githubusercontent.com/lxi-tools/lxi-tools/master/images/Paypal.png)](https://www.paypal.me/lundmar)\n\n\n## 6. Website\n\nVisit [lxi-tools.github.io](https://lxi-tools.github.io)\n\n\n## 7. License\n\nliblxi includes code covered by the following licenses:\n\n * BSD-3, commonly known as the 3-clause (or \"modified\") BSD license\n * EPICS Open software license\n\nFor license details please see the COPYING file.\n\n\n## 8. Authors\n\nCreated by Martin Lund \\\u003cmartin.lund@keep-it-simple.com\u003e\n\nSee the AUTHORS file for full list of contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxi-tools%2Fliblxi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxi-tools%2Fliblxi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxi-tools%2Fliblxi/lists"}