microscpi Crate
This crate provides a simple interface to create an async SCPI (Standard Commands for Programmable Instruments) command interpreter, particularly well-suited for embedded devices. It aims to offer a lightweight, efficient, and easily extensible solution for parsing and handling SCPI commands without requiring heap memory allocations.
Features
- No heap memory allocation required: The crate is designed to function without the need for dynamic memory allocation, making it ideal for constrained embedded systems.
- Compile-time SCPI command tree creation: Commands are defined at compile-time, ensuring efficiency and reducing runtime overhead.
- Support for async command handler functions: Asynchronous command handling is fully supported, allowing non-blocking operations in embedded or other concurrent environments.
Example
The following is a minimal example demonstrating how to use the microscpi crate to create an SCPI command interface that handles the SYSTem:VALue? command asynchronously.
use ;
pub async
Crate Usage
To use this crate in your project, add the following line to your Cargo.toml file:
[]
= "0.1.0"
Make sure to include the async runtime such as tokio or another suitable runtime for executing async functions.
Example for adding tokio:
[]
= { = "1", = ["full"] }
License
This project is licensed under the MIT License.