GithubHelp home page GithubHelp logo

schmufu / odbdesign Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nam20485/odbdesign

0.0 0.0 0.0 1.02 MB

A free open source cross-platform C++ library for parsing ODB++ Design archives, accessing their data, and building net list product models. Exposed via a REST API and packaged inside of a Docker image.

Home Page: https://nam20485.github.io/OdbDesign/

License: MIT License

Shell 0.27% JavaScript 0.61% C++ 90.23% Python 2.02% C 0.47% PowerShell 0.51% HTML 0.04% CMake 4.06% Batchfile 0.02% Dockerfile 1.01% SWIG 0.76%

odbdesign's Introduction

OdbDesign

A free open source cross-platform C++ library for parsing ODB++ Design archives, accessing their data, and building net list product models. Exposed via a REST API and packaged inside of a Docker image.

Key Features

OdbDesign ODB++ parser is differentiated from other offerings by these key features:

  1. Performance
  2. Cross-Platform Flexibility
  3. Expertise
  4. Security

Performance

OdbDesign is implemented in C++ and is designed and optimized to be fast. Unlike higher-level languages that use interpreters or virtual machines, that means it is compiled into native code for your machine, whether your platform is Windows, Linux, or Mac.

The parser is also multi-threaded to take advantage of modern multi-core CPUs.

Cross-Platform Flexibility

The library itself can run directly on all major platforms (i.e. Windows, Linux, and Mac) and also exposes a REST API so that parsed data can be accessed from any application or programming language that can connect to a REST API. The REST API and library are also exposed via a Docker image that can be run on any platform that supports Docker.

Both options support running the parser on a different machine than the one running the application that needs the parsed data. This allows the parser to be run on a high-performance server or workstation while the application that needs the data runs on a low-power device like a Raspberry Pi, mobile device, or the web.

Expertise

The maintainer has well over a decade of experience in the PCB Manufacturing and hardware industry. Specifically he has worked on the development of ODB++ parsing and viewer applications for some of the established key players in the industry. Time spent working under the designer of the ODB++ specification has given him a unique perspective on the ODB++ format and how it is used in the industry. This experience is also leveraged to make the parser as fast and efficient as possible.

Security

All code, dependency packages, and Docker images are scanned for security vulnerabilities, using extended security scanning rule profiles (these are more secure than the default base scanning rule profiles).

It is built using the latest available version of the C++ standard and is compiled with the latest available compiler versions. The parser is also built using the latest available versions of all of its dependencies and is regularly updated to use the latest versions of those dependencies as they are released.

These checks are run against all branches starting with development, so there is no chance of a security vulnerability being introduced into the main and release branches. Docker's Scout Suite is used to scan the Docker image for security vulnerabilities, and GitHub's CodeQL is used to scan the code for security vulnerabilities.

Overview

Current Implementation State

The diagram describes the current state of parser implementation and data availability. Green color describes areas of the ODB++ archive file that are implemented and have their data available for use. Red color describes areas that are not parsed so their data is not yet available.

image

CI/CD Build

OpenSSF Security Scorecard

OpenSSF Security Scorecard assesses open source projects for security risks through a series of automated checks.

OpenSSF Scorecard

90% of tested projects have a score of less than 4.0/10, so OdbDesign's 7.2 score represents a remarkably high level of security.

Branches

development

Step Status
Build CMake Build Multi-Platform
Docker Image Docker Publish
Security Code Scan CodeQL Security Scan
Docker Security Scan Docker Scout Scan
Dependency Review Scan Dependency Review

main

Step Status
Build CMake Build Multi-Platform
Docker Image Docker Publish
Security Code Scan CodeQL Security Scan
Docker Security Scan Docker Scout Scan
Dependency Review Scan Dependency Review

release

Step Status
Build CMake Build Multi-Platform
Docker Image Docker Publish
Security Code Scan CodeQL Security Scan
Docker Security Scan Docker Scout Scan
Dependency Review Scan Dependency Review

Architecture

The OdbDesign parser is built as a C++ shared library on all three platforms. An executable running the server links to the library and provides the REST API for accessing the data the library parses. The REST API server can be run by invoking the executable directly or by running the Docker image. The server executable and library can be run on Windows, Linux, or MacOS and the Docker image can be run on any platform that supports Docker.

[Insert Diagram Image]

Library

FileModel vs. ProductModel...

Building from Source

Build Dependencies

If you are building on Windows and have a modern version of Visual Studio installed then all of the dependencies listed below are already installed on your system (except for maybe Docker). You can skip to the next section.

If you are building on a Linux system then the dependencies listed below can be installed using your package manager. For example on Ubuntu you can install them (except for vcpkg and Docker) using the following command:

$ sudo apt install git cmake ninja-build build-essential

Source Code

Get the source code by cloning the GitHub repository:

$ git clone [email protected]:nam20485/OdbDesign.git

Build

Open your favorite terminal and change to the directory where you cloned the source code. This should be something similar to one of the below depending on your platform and where you cloned the source code:

  • ~/src/OdbDesign (Linux/MacOS)
  • C:\Users\<YourName>\Source\OdbDesign (Windows)

Then run the commands from one or more of the sections below, based on what you would like to build...

CMake C++ Project

Visual Studio
  • Open the directory in Visual Studio (this will open the directory as a CMake project)
  • Select a Configuration preset:
    • x64 Release
    • x64 Debug
  • Select a target:
    • OdbDesign.dll (parser shared library)
    • OdbDesignServer.exe (REST API server executable)
  • Build (i.e. Build->Rebuild All or CTRL+SHIFT+B)
Command-Line CMake
Windows
$ cmake --preset x64-debug
$ cmake --build --preset x64-release
Linux
$ cmake --preset linux-debug
$ cmake --build --preset linux-release

Docker Image for REST API Server

$ docker build . -t odbdesign-server

Running the REST API Server

Integration into Other Applications

There are four interfaces that allow use of the library in other applications.

C++ Shared Library

REST API

Python Object Interface

SWIG is used to create a Python interface to the C++ library. The interface is exposed as a Python package that can be installed using pip. Parsing is supported, but currently not all data is available to access via the Python interface.

Using the Python interface for anything beyond basic parsing would require implementation of Python wrapper classes to hold the data you are interested in. A better route for Python integration is probably to use the REST API or to generate Python bindings automatically using the included Google Protobuf definitions.

Google Protobuf Protocol Buffers

Data objects returned from the parser library support serialization to and from Google Protobuf protocol buffers. This allows the data to be easily shared with other applications and programming languages that support protocol buffers. Google Protobuf is a highly optimized binary encoding so it is fast and small.

The protocol buffer definitions are included in the library so they can be used to generate code for other languages - currently C++ bindings are built and used in the library.

License

This project is free and open source under the MIT license.

Credit

Thanks to the following open source projects that are used to create OdbDesign:

OdbDesign would not be possible without the hard work of their developers, staff, and supporters.

Contact

If you are interested in using the parser in your application or code, or have any questions about it please do not hesitate to contact me.

If you need support for integration of the parser into your own product and/or need its feature set extended, I am currently available for consulting.

ODB++

ODB++ is a registered trademark of Siemens and © Siemens 2021

odbdesign's People

Contributors

nam20485 avatar dependabot[bot] avatar step-security-bot avatar

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.