Skip to content

programming-digital-twins/pdt-cfw-components

Repository files navigation

Programming Digital Twins - Client Framework Components

Overview

This is the source repository for client framework software components (written primarily in C#) related to my Digital Twins Programming course at Northeastern University. The intent of this repository is to provide students with a baseline client framework library that provides core integration functionality for the digital twin application components (which are housed in a separate repository). For convenience to the reader, much of the basic functionality has already been implemented (such as configuration logic, consts, interfaces, and test cases).

These classes and their relationships respresent a notional design that aligns with the requirements listed in Programming Digital Twins Requirements. These requirements encapsulate the programming exercises presented in my course Buliding Digital Twins.

Project Objectives

The LabBenchStudios-PDT-Unity research project is intended to be used with this pdt-cfw-components repository and has three primary objectives:

(1) Build a largely F/OSS Digital Twin framework that can work with other Programming Digital Twins projects and their repositories to sync live data, DTDL models, and a JSON-based constraint mapping layer, and render within a COTS physics sim engine (e.g., Unity 6).

(2) Use a digital twin asset's configuration data to auto-generate a GPT AI prompt to query one or more locally running LLM's to retrieve predictive maintenance recommendations for the specific system within the Digital Twin environment.

(3) Provide a baseline technology platform for my Northeastern University College of Engineering graduate students (and me) to learn and experiment with various Digital Twin use cases.

Helpful Links

PDT Kanban Board: Programming Digital Twins Requirements

Please see the following links for some helpful information about the PDT exercises and other associated repositories. Please note that many of the exercises and sample source code in this repository is based on some of the patterns and exercises from my book, Programming the Internet of Things Book.

Usage

See the instructions in PDT-CFW-01-001 for details on building this library and its dependencies.

NOTE: If you're reading Programming the Internet of Things: An Introduction to Building Integrated, Device to Cloud IoT Solutions, you'll see a partial tie-in with the exercises described in some of the chapters and lab modules exercises. While Programming the IoT exercises are mostly Python and Java, this repository is implemented in C#; it does, however, share some of the same functionality as the Programming the IoT Gateway Device App (GDA), but without the application wrapper and state machine component.

This repository aligns to exercises in Programming Digital Twins, and partially to Programming the Internet of Things

These components are all written in C#, and have been partially tested using .NET 4.1 on Windows 11. It is intended that this library be built into a dll and then linked into the Digital Twin App (housed in a separate repository).

Organization

Repository Navigation

PdtCfwComponents

This repository is comprised of the following top level paths:

  • PdtCfwComponents: Contains the following source trees:
    • LabBenchStudios/Models
      • Dtdl: Contains sample DTDL models.
      • Types: Contains type config mapping JSON model files - used for mapping telemetry to sample DTDL models.
    • LabBenchStudios/Src/Main/ProgrammingDigitalTwins
      • Common: Contains shared components.
      • Connection: Contains integration-related components (e.g., MQTT, persistence, etc.).
      • Data: Contains data serialization / deserialization / translation components.
      • Historian: Contains data historian and caching components.
      • Model: Contains model mapping and parsing logic components.
      • Plexus: Contains the central 'nervous system' components (facilitating model integration).
      • Prediction: Contains a very basic prediction abstracton engine for interacting with LLM's.
      • Util: Contains basic utility classes.

PdtCfwComponents.Tests

This repository is comprised of the following top level paths:

  • PdtCfwComponents.Tests: Contains the following test (source) trees:
    • LabBenchStudios/Src/Test/ProgrammingDigitalTwins
      • Connection: Contains unit / integration tests for the integration-related components (e.g., MQTT, persistence, etc.).
      • Data: Contains unit tests for the data serialization / deserialization / translation components.
      • Historian: Contains unit tests for the data historian components.
      • Model: Contains unit tests for the data model components.
      • Plexus: Contains unit tests for the plexus components.
      • Prediction: Contains unit tests for the prediction components.
      • Util: Contains unit tests for the utility components.

Here are some other files at the top level that are important to review:

NOTE: The directory structure and all files are subject to change based on feedback I receive from readers of my blog and students in my Building Digital Twins class, as well as improvements I find to be helpful for overall repo betterment. Any 'dot' files (those files beginning with a '.', such as .gitignore are in place to help make development more efficient and will likely undergo significant change and / or replacement and / or removal as needs require.

Other things to know

Pull requests

PR's are disabled while the codebase is being developed.

Updates

Much of this repository, and in particular unit and integration tests, will continue to evolve, so please check back regularly for potential updates. Please note that API changes can - and likely will - occur at any time.

REFERENCES

This repository has external dependencies on other open source projects. I'm grateful to the open source community and authors / maintainers of the following libraries:

Core component dependencies and third party references:

NOTE: This list will be updated as others are incorporated.

IMPORTANT NOTES

This code base is under active development.

If any code samples or other technology this work contains, describes, and / or is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

LICENSE

  • JSON models (DTDL and Config): See LICENSE-MODELS.md if you plan to use the non-code resources (e.g., JSON model files, etc.)

  • Source codes (C#): See LICENSE-CODE.md if you plan to use this code (e.g., C# code, etc.)

About

This repository houses the client framework (C#) specific components for the Programming Digital Twins course content.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE-CODE.md
Unknown
LICENSE-MODELS.md

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages