{"id":24285011,"url":"https://github.com/roboplc/roboplc","last_synced_at":"2025-04-11T23:20:10.267Z","repository":{"id":225729502,"uuid":"766702405","full_name":"roboplc/roboplc","owner":"roboplc","description":"A framework for PLCs and real-time micro-services","archived":false,"fork":false,"pushed_at":"2025-04-10T21:37:12.000Z","size":914,"stargazers_count":170,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T22:30:58.865Z","etag":null,"topics":["linux","plc","realtime","rust"],"latest_commit_sha":null,"homepage":"https://www.roboplc.com","language":"Rust","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/roboplc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-04T00:32:27.000Z","updated_at":"2025-04-10T21:37:16.000Z","dependencies_parsed_at":"2024-03-10T04:26:13.324Z","dependency_job_id":"17ac07f2-3715-4961-b56c-442a661188c1","html_url":"https://github.com/roboplc/roboplc","commit_stats":null,"previous_names":["eva-ics/roboplc"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboplc%2Froboplc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboplc%2Froboplc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboplc%2Froboplc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboplc%2Froboplc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roboplc","download_url":"https://codeload.github.com/roboplc/roboplc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492985,"owners_count":21113176,"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","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":["linux","plc","realtime","rust"],"created_at":"2025-01-16T06:17:50.353Z","updated_at":"2025-04-11T23:20:10.249Z","avatar_url":"https://github.com/roboplc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2\u003e\n  RoboPLC\n  \u003ca href=\"https://crates.io/crates/roboplc\"\u003e\u003cimg alt=\"crates.io page\" src=\"https://img.shields.io/crates/v/roboplc.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n  \u003ca href=\"https://docs.rs/roboplc\"\u003e\u003cimg alt=\"docs.rs page\" src=\"https://docs.rs/roboplc/badge.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003c/h2\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/roboplc/roboplc/main/roboplcline_.png\"\nwidth=\"200\" /\u003e\n\n[RoboPLC](https://www.bohemia-automation.com/software/roboplc/) is an ultimate\npack of a framework and tools for creating real-time micro-services, PLCs and\nindustrial-grade robots in Rust.\n\nThe crate is designed to let using all its components both separately and\ntogether.\n\nRoboPLC is a part of [EVA ICS](https://www.eva-ics.com/) industrial\nautomation platform.\n\nReal-time-safe data synchronization components are re-exported from the\n[RTSC](https://docs.rs/rtsc) crate which is a part of RoboPLC project and can\nbe used directly, with no requirement to use RoboPLC.\n\nRoboPLC eco-system provides:\n\n* [roboplc-cli (robo)](https://info.bma.ai/en/actual/roboplc/flashing.html) - a\n  CLI tool to create and manage RoboPLC projects\n\n* [RoboPLC manager](https://info.bma.ai/en/actual/roboplc/config.html) - a web\n  interface and HTTP API to monitor and manage RoboPLC-based systems\n\n\u003cimg src=\"https://info.bma.ai/en/actual/_images/manager-program.png\" width=\"550\" /\u003e\n\n## Technical documentation\n\nAvailable at \u003chttps://info.bma.ai/en/actual/roboplc/index.html\u003e\n\n## Examples\n\nCan be found at \u003chttps://github.com/roboplc/roboplc/tree/main/examples\u003e\n\n## DataBuffer\n\n[`buf::DataBuffer`] covers a typical data exchange pattern when data\nframes are collected (cached) from a single or multiple producers, then taken\nby a single consumer in bulk and submitted, e.g. into a local database or into\nan external bus.\n\n\u003cimg\nsrc=\"https://raw.githubusercontent.com/roboplc/roboplc/main/schemas/databuffer.png\"\nwidth=\"350\" /\u003e\n\n* always has got a fixed capacity\n\n* thread-safe out-of-the-box\n\n* frames may be forcibly pushed, overriding the previous ones, like in a ring-buffer.\n\n## Hub\n\n[`hub::Hub`] implements a data-hub (in-process pub/sub) model, when multiple\nclients (usually thread workers) exchange data via a single virtual bus instead\nof using direct channels.\n\nThis brings some additional overhead into data exchange, however makes the\narchitecture significantly clearer, lowers code support costs and brings\nadditional features.\n\n\u003cimg\nsrc=\"https://raw.githubusercontent.com/roboplc/roboplc/main/schemas/hub.png\"\nwidth=\"550\" /\u003e\n\n* classic pub/sub patterns with no data serialization overhead\n\n* based on [`policy_channel`] which allows to mix different kinds of data and\n  apply additional policies if required\n\n* a fully passive model with no \"server\" thread.\n\n## pdeque and policy_channel\n\nA policy-based deque [`rtsc::pdeque::Deque`] is a component to build policy-based\nchannels.\n\n[`policy_channel`] is a channel module, based on the policy-based deque.\n\nData policies supported:\n\n* **Always** a frame is always delivered\n* **Latest** a frame is always delivered, previous are dropped if no room\n  (acts like a ring-buffer)\n* **Optional** a frame can be skipped if no room\n* **Single** a frame must be delivered only once (the latest one)\n* **SingleOptional** a frame must be delivered only once (the latest one) and\n  is optional\n\nAdditionally, components support ordering by data priority and automatically\ndrop expired data if the data type has got an expiration marker method\nimplemented.\n\n[`policy_channel`] is a real-time safe channel, mean it may be not so fast as\npopular channel implementations (it may be even slower than channels provided\nby [`std::sync::mpsc`]). But it is **completely safe for real-time\napplications**, mean there are no spin loops, data is always delivered with\nminimal latency and threads do not block each other.\n\n## Real-time\n\n[`thread_rt::Builder`] provides a thread builder component, which extends the\nstandard thread builder with real-time capabilities: scheduler policies and CPU\naffinity (Linux only).\n\n[`supervisor::Supervisor`] provides a lightweight task supervisor to manage\nlaunched threads.\n\n## Controller\n\n[`controller::Controller`] is the primary component of mixing up all the\nfunctionality together.\n\n\u003cimg\nsrc=\"https://raw.githubusercontent.com/roboplc/roboplc/main/schemas/controller.png\"\nwidth=\"550\" /\u003e\n\n## I/O\n\n[`io`] module provides a set of tools to work with field devices and SCADA\nbuses.\n\nCurrently supported:\n\n* Modbus (RTU/TCP) via [`io::modbus`] ([Modbus client/master\n  example](https://github.com/roboplc/roboplc/blob/main/examples/modbus-master.rs),\n  [Modbus server/slave\n  example](https://github.com/roboplc/roboplc/blob/main/examples/modbus-slave.rs)),\n  requires `modbus` crate feature.\n\n* Raw UDP in/out via [`io::raw_udp`]\n  ([Raw UDP in/out example](https://github.com/roboplc/roboplc/blob/main/examples/raw-udp.rs))\n\n* Subprocess pipes via [`io::pipe`]\n  ([Subprocess pipe example](https://github.com/roboplc/roboplc/blob/main/examples/pipe.rs))\n\n* [EVA ICS](https://www.eva-ics.com/) EAPI in/out via [`io::eapi`] ([EVA ICS\n  example](https://github.com/roboplc/roboplc/blob/main/examples/eapi.rs)),\n  requires `eapi` crate feature\n\n* SNMP v1/2/3 via [`snmp2`](https://crates.io/crates/snmp2) external crate.\n\n* [ADS](https://crates.io/crates/roboplc-io-ads) connector for [Beckhoff\n  TwinCAT](https://infosys.beckhoff.com/english.php?content=../content/1033/tcinfosys3/11291871243.html\u0026id=),\n  requires a license for commercial use\n\n* [IEC 60870-5](https://crates.io/crates/roboplc-io-iec60870-5) client,\n  requires a license for commercial use\n\n## Related crates\n\nRoboPLC project provides additional crates, which can be used both with RoboPLC\nand separately:\n\n* [RTSC](https://crates.io/crates/rtsc) - Real-Time Synchronization Components,\n  a set of real-time safe data synchronization components, the core components\n  of RoboPLC\n\n* [atomic-timer](https://crates.io/crates/atomic-timer) - an atomic timer\n  component for typical automation tasks\n\n* [rpdo](https://crates.io/crates/rpdo) - RoboPLC Data Objects protocol for\n  data synchronization between processes and devices\n\n* [ehmi](https://crates.io/crates/ehmi) - HMI components for `egui` interfaces.\n\n* [metrics-exporter-scope](https://crates.io/crates/metrics-exporter-scope) -\n  an oscilloscope-like exporter for [metrics](https://crates.io/crates/metrics)\n  eco-system\n\n* [heartbeat-watchdog](https://crates.io/crates/heartbeat-watchdog) - heartbeat\n  and watchdog components for mission-critical systems monitoring\n\n* [rvideo](https://crates.io/crates/rvideo) - video stream debugging\n\n* [rflow](https://crates.io/crates/rflow) - allows quickly create chat-like\n  diagnostic interfaces for headless programs\n\n## Locking safety\n\nNote: the asynchronous components use `parking_lot_rt` locking only.\n\nBy default, the crate uses [parking_lot](https://crates.io/crates/parking_lot)\nfor locking. For real-time applications, the following features are available:\n\n* `locking-rt` - use [parking_lot_rt](https://crates.io/crates/parking_lot_rt)\n  crate which is a spin-free fork of parking_lot.\n\n* `locking-rt-safe` - use [RTSC](https://crates.io/crates/rtsc)\n  priority-inheritance locking, which is not affected by priority inversion\n  (Linux only, recommended Kernel 5.14+).\n\nNote: to switch locking policy, disable the crate default features.\n\nThe locking policy can be also selected in CLI when creating a new project:\n\n```shell\nrobo new --locking rt-safe # the default for CLI-created projects is rt-safe\n```\n\n## Using on other platforms\n\nThe components [`thread_rt`], [`supervisor`] and [`controller`] can work on\nLinux machines only.\n\nDespite of that, \"cargo check\" should work on Windows and OSX to let developers\ncode RoboPLC-based programs on these platforms. In case if this fails with any\ncrate feature, please report an issue.\n\n## Migration from 0.4.x\n\n* Certain `thread-rt` module components have been moved to\n  [`rtsc`](https://crates.io/crates/rtsc) crate. RoboPLC re-exports them,\n  adding compatibility with simulated mode.\n\n* `thread_rt::set_simulated` has been moved to [`set_simulated`].\n\n* `thread_rt` components `CpuGovernor` and `SystemConfig` have been moved to\n  [`system`] crate module.\n\n* `openssl-vendored` feature has been removed, as [EVA\n  ICS](https://www.eva-ics.com/) EAPI has got now `openssl` as an optional\n  dependency for certain specific features only.\n\n## Migration from 0.3.x\n\n* `pchannel` and `pchannel_async` have been renamed to [`policy_channel`] and\n  [`policy_channel_async`] respectively.\n\n* By default, the crate uses\n  [parking_lot](https://crates.io/crates/parking_lot) for locking. To switch to\n  more safe real-time locking, disable the crate default features and enable\n  either `locking-rt` or `locking-rt-safe`. **This is important for real-time\n  applications and must be enabled manually**.\n\n* As [RTSC](https://crates.io/crates/rtsc) components are lock-agnostic, which\n  requires to specify generic locking types, the modules [`channel`],\n  [`policy_channel`], [`buf`] and [`semaphore`] are now wrappers around RTSC\n  modules with the chosen locking policy.\n\n* [`hub_async`] now requires `async` feature to be enabled.\n\n## MSRV\n\nMinimum supported mainstream Rust version of RoboPLC is synchronized with the\n[Ferrocene](https://ferrocene.dev/) Rust compiler. This allows to create\nmission-critical software, compliant with ISO 26262 (TCL 3/ASIL D), IEC 61508\n(T3) and IEC 62304.\n\nCurrent MSRV: mainstream 1.81.0, Ferrocene 24.11.0. Certain features may work\nwith older Rust versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboplc%2Froboplc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froboplc%2Froboplc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboplc%2Froboplc/lists"}