npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lichtblick/asam-osi-types

v3.7.0

Published

ASAM Open Simulation Interface (ASAM OSI) types for Typescript

Downloads

147

Readme

ASAM OSI Types

License GitHub Issues NPM Version

ASAM OSI Types provides TypeScript type definitions for the Open Simulation Interface (OSI) specification. OSI facilitates the interoperability of simulation environments in automated driving and advanced driver-assistance systems (ADAS) development.


Features

  • Comprehensive TypeScript type definitions for the OSI specification.
  • Simplifies development by enabling static type checking in TypeScript.
  • Maintains compatibility with the official OSI schema versions.
  • Designed for use in simulation and modeling projects involving OSI.

Installation

Install the package using npm or yarn:

npm install asam-osi-types

or

yarn add asam-osi-types

Build and Scripts

Here are the available commands and scripts for working with the project:

Build

npm run build

or

yarn build

Compiles the TypeScript code into JavaScript. The compiled output is stored in the dist/ folder.

Setup

npm run setup

or

yarn setup

Installs the OSI dependencies

Generate

npm run generate

or

yarn generate

Generates protobuf files

Lint

npm run lint

or

yarn lint

Lints the project using ESLint to enforce consistent code style.

Test

npm run test

or

yarn test

Runs the test suite to ensure the code functions as expected.

Clean

npm run clean

or

yarn clean

Removes the build output (dist/) and cleans up the workspace.

Additional Commands

npm run format

or

yarn format

Formats the codebase using Prettier to maintain consistent styling.

Usage

Here’s how to use the provided type definitions in a TypeScript project:

import { OsiMessage } from "asam-osi-types";

// Example: Define an OSI Message
const message: OsiMessage = {
  header: {
    timestamp: {
      seconds: 1627500000,
      nanos: 123456789,
    },
    frame_id: "example-frame",
  },
  content: {
    exampleField: "value",
  },
};

console.log(message);

API Documentation

Main Types

  • OsiMessage: Represents the base message format in OSI.
  • Header: Metadata for OSI messages, including timestamps and IDs.
  • Timestamp: Specifies time information.

For detailed type definitions, explore the source files in the src folder.


Local Testing

To test the package locally, build the project and run the following command to create a symbolic link for the package

npm link

Create a local typescript test project with an index.ts file

mkdir test-project && cd $_ && touch index.ts

Initialize project

npm init -y

Link test project with the package

npm link asam-osi-types

Import types into the test-project

import * as types from "asam-osi-types";

Versioning

The versioning for the project is handeled automatically via the github actions CI/CD workflow, it will always reflect the current version of the OSI repository.

Local versioning can be applied to the project through the package.json file, but it will not be reflected in the npm package metadata since it is overwritten when publishing.

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature-name.
  3. Commit your changes: git commit -m 'Add feature-name'.
  4. Push to the branch: git push origin feature-name.
  5. Submit a pull request.

Please ensure all code adheres to the Mozilla Public License 2.0 and follows the repository's coding standards.


Related Projects


License

This project is licensed under the Mozilla Public License 2.0. For more details, see the LICENSE file.