OneDriver.Framework 1.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OneDriver.Framework --version 1.4.0
                    
NuGet\Install-Package OneDriver.Framework -Version 1.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OneDriver.Framework" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OneDriver.Framework" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="OneDriver.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OneDriver.Framework --version 1.4.0
                    
#r "nuget: OneDriver.Framework, 1.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OneDriver.Framework@1.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OneDriver.Framework&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=OneDriver.Framework&version=1.4.0
                    
Install as a Cake Tool

OneDriver.Framework

Version: v1.040
Release Date: April 2025

Overview

OneDriver.Framework is a modular and extensible C# library designed to abstract and unify the implementation of hardware drivers for measurement instruments and automation systems. It establishes a standardized approach for devices, parameters, validation, channels, and process data, making it easier to extend support for various protocols and device types.

This release lays the foundation for cross-domain drivers such as power supplies, IO-Link masters, Modbus interfaces, and other sensor/actuator controllers.


๐Ÿงฑ Project Structure

  • Module Layer
    The core abstractions for devices, parameters, channels, and process data.

  • Validator Layer
    Pluggable validation logic for device connection strings or other input formats.

  • PowerSupply.Abstract
    An example of a concrete domain-specific implementation extending the base framework.


โœจ Core Concepts

Devices

BaseDevice<TParams> is the base class for any hardware abstraction. It includes lifecycle methods like Connect() and Disconnect(), with parameter validation support via the IValidator interface.

Derived examples:

  • BaseDeviceWithChannels<TDeviceParams, TChannelParams>
  • BaseDeviceWithProcessData<TParams, TProcessData>

Parameters

All device and channel parameters derive from BaseDeviceParam and BaseChannelParam, using PropertyHandlers to support reactive property handling and dynamic access.

Validation

The IValidator interface defines the validation logic for device-specific initialization strings.
Example: ComportValidator uses regex to validate serial port strings like COM3;9600.

Channels

Channels are managed via collections (ObservableCollection<BaseChannel<T>>) and extended to handle both static and dynamic process data.

Process Data

BaseProcessData provides timestamped and extendable structures for runtime measurement values, logs, or state snapshots. Works with data tunnel to fire events for continuously updating process data.


๐Ÿ“ฆ Namespaces

  • OneDriver.Framework.Base โ€“ Base property management
  • OneDriver.Framework.Module โ€“ Core device abstractions
  • OneDriver.Framework.Module.Parameter โ€“ Parameter models
  • OneDriver.Framework.Libs.Validator โ€“ Validators
  • OneDriver.Framework.ModuleBuilder โ€“ Process data interfaces
  • OneDriver.PowerSupply.Abstract โ€“ Example device domain

๐Ÿ”Œ Example: Power Supply Abstraction

public abstract class CommonDevice<TDeviceParams, TChannelParams, TChannelProcessData> :
    BaseDeviceWithChannelsPd<TDeviceParams, TChannelParams, TChannelProcessData>, IPowerSupply

Implements:

  • SetVolts(), SetAmps()
  • AllChannelsOn(), AllChannelsOff()

Parameters like MaxVolts, DesiredVolts, ControlMode are managed through CommonDeviceParams and CommonChannelParams.


โœ… Getting Started

  1. Create your device-specific Params classes by extending BaseDeviceParam and BaseChannelParam.
  2. Implement a validator using IValidator.
  3. Extend BaseDevice or its variants.
  4. Plug your device class into your app or service layer.
  5. Write unit tests to validate behavior.

๐Ÿ› ๏ธ Build and Compatibility

  • Framework: .NET 8.0
  • IDE: Visual Studio 2022+
  • OS Support: Windows, Linux (cross-platform)

๐Ÿ“œ License

MIT License โ€“ See LICENSE file.


๐Ÿงช Tests

This framework is designed with testability in mind. Use xUnit or your preferred testing framework to mock and test device behavior.


๐Ÿ“ˆ Future Plans

  • IO-Link master device abstraction
  • CANopen and Modbus master implementation
  • gRPC-based remote access to IDevice-derived objects
  • Graphical interface for parameter management

๐Ÿ™Œ Contributions

We welcome contributions. Please open issues or pull requests with proposed improvements or additional protocol support.


๐Ÿ‘จโ€๐Ÿ’ป Author

Rahul Bajaj
ยฉ 2025 OneDriver Project


Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on OneDriver.Framework:

Package Downloads
OneDriver.PowerSupply.Abstract

Package Description

DeviceDescriptor.Abstract

Package Description

OneDriver.Master.Abstract

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 367 5/27/2025
1.4.0 310 4/2/2025
1.3.1 193 3/26/2025
1.3.0 144 3/26/2025
1.2.3 320 3/23/2025
1.1.22 148 3/23/2025