Giter Club home page Giter Club logo

sensd's Introduction

sensd - The Ultimate Sensor Logging and Control System

█▓▒░ Purpose

sensd aims to be a multipurpose robust framework for sensor logging and a control system for mission-critical and high reliability environments. Originally designed for the needs of an aquaponics system, sensd is being made highly adaptable by implementing generic architectural design patterns. The goal is to create a library suitable for a wide range of applications, from wild-life tracking and bioreactors to access control and beyond using pre-packaged generic I/O devices and triggers. With a focus on reliability, safety, and ease of use, sensd aims to empower scientists, engineers, and makers to build monitoring and control systems by reducing boilerplate code.

█▓▒░ Features

  • Straight-forward, simple initialization and configuration.
  • Data logging capabilities to store and retrieve information for later analysis.
  • Generic I/O devices for classification of various device types such as switches, motors, manifold valves, etc.
  • Robust error handling for safe and reliable operation.
  • Hardware agnostic.

█▓▒░ Hardware

The library is built with version 1.66.1 of the Rust programming language, but should be reverse compatible with recent versions. A Unix based host is required (ie: Raspberry Pi). While the library has been designed to decrease low-overhead, no_std has not implemented (yet) for compiling on bare-metal MCU's such as Atmel chips.

█▓▒░ Getting Started

Since this library is still in early development, it has not yet been uploaded to crates.io.

The binaries in the /examples directory are designed to be comprehensive to demonstrate potential use cases and are highly documented. For further documentation, please refer to the docs.

█▓▒░ Contributing

The goal of this project is to become a standard for scientific and industrial applications. Therefore, contributions to the library are more than welcomed.

Remember that contributions can be in the form of bug reports, feature requests, and not just code contributions. Bug reports and feature requests add fortitude and reliability to the library as whole and benefits the community. To get started, simply fork the repository and make your changes. I simply ask, that before submitting a pull request, please make sure to run the test suite and update the documentation as necessary.

Remember, communication is essential for any collaborative project. Let's bring the most loved programming language to the scientific community!

█▓▒░ Features Forthcoming

The following features are planned for the next major releases (in order of priority):

  • PID controller
  • Partitioning of logs (both by size and date)
  • Incorporate no_std feature flag
  • Async operation

sensd's People

Contributors

poorrican avatar

Stargazers

 avatar  avatar

Watchers

 avatar

sensd's Issues

There is no way to schedule commands

Create a struct named ScheduledCommand which stores a Command trait object (eg: GPIOCommand) and a timestamp. Such objects should retain a reference to the instantiating Device and have a single method that

Likewise, PollGroup should have a container which stores these objects. This container should be routinely iterated through and executed then popped from the container at the appropriate time.

Custom implementation of Error and Result is cumbersome

Custom implementations of Error and Result seem to be an anti-pattern and are hard to keep track of. Keep ErrorKind to help distinguish fixable issues. However, errors should simply be returned by the Err() function and not custom code.

README mentions embedded devices

Update REAME to state that embedded devices will be supported soon (because no_std has not been implemented yet), but embedded linux systems are supported.

`Input` and `Output` have no relation with numerical value domain

If a temperature sensor reads a f64 input, and a subscriber generates a bool value to turn on a heater, which is passed to an output.

As it stands, IOType does not check variant type. Numerical comparisons can become performed with bool values and seems to lead to unreliable behavior. Therefore, type checking should become involved to ensure that GPIO devices and abstract subscribers behave as expected.

Add ReturnType and InputType to Input and Output respectively. Then add both I/O types to a Subscriber to indicate any conversion in types.

`Containerized` and `Device` objects should be serializable

Containerized and Device objects should be serializable to facilitate persistent runtime storage. Enabling these at the trait level allows for different implementations with a common interface. CSV will be the data format for log data; TOML will be the data format for storing sensor metadata

There is no common interface devices to interact with log

A trait called HasLog should be created to interact with log. The following functions should be implemented:

  • has_log() -> bool - check if the current device has a log (#55 should be implemented first)
  • add_log(Deferred<OwnedLog>) -> Result<()> - Attach log to device. An error should be returned if owned log already has an owner.

Device requires log upon initialization

This complicates building and testing device instances. To simplify instance initialization, log field should be an option. The changes should also be propagated to DeviceLogBuilder.

There is no way for a `Command` to be given a closure

A instance of Command called DynamicCommand should be created which stores a closure as a field. The struct should have a generic type to store multiple storage types.

To assist typing, an enum should be created that defines factory types as variants.

Each `Group` should have dedicated settings

Instead of using ".dotenv" crate, manually read from a TOML file named as the PollGroup, if no file exists, then implement a load_or_new(&path) function and load default.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.