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

@synapticon/motion-master-proto

v5.2.2

Published

Generated TypeScript source code files from Motion Master proto.

Downloads

82

Readme

motion-master-proto

Motion Master Proto contains statically generated code used to communicate with the Motion Master. This library is meant to be used by all applications that will interact with the Motion Master protobuf messages and it contains the code generated for TypeScript, Java, C++ and JavaScript. The protobuf.js is used to generate the TypeScript code and protoc is used for all other languages.

protobuf.js

Install

npm install motion-master-proto --save

Usage

Import:

import * as motionMasterProto from 'motion-master-proto';
export import motionmaster = motionMasterProto.motionmaster;

Create devices message example:

let devices = motionmaster.Devices.create();

See how this library is used in Motion Master Simulator.

Develop

Replace motion-master.proto file with the latest version and run $ npm run build.

When developing consider symlinking a package folder with npm-link.

Generate

$ pbjs --target static-module --wrap commonjs --out motion-master.proto.js motion-master.proto
$ pbts --out motion-master.proto.d.ts motion-master.proto.js

C++

Usage

Include:

#include <motion-master.pb.h>

using namespace motionmaster;

Example - Create a status meesage with a single device:

Status status;
Devices *devices = status.mutable_devices();
Devices::Device *device = devices->add_device();
device->set_device_id(i);
device->set_device_type(Devices::CIA402_DRIVE);
device->mutable_firmware()->set_version("0.0.1");

Generate

protoc --cpp_out=$PWD -I=$PWD $PWD/motion-master.proto

or simply execute the following script:

$ generation_scripts/compile_protocol_buffer_C++_API.sh

Java

Usage

Build the Java library as a local Maven package (from the "Java" directory):

$ mvn clean install -DskipTests

and include it inside the "pom.xml" file of the Java project:

<dependencies>
    <dependency>
        <groupId>com.synapticon.motionmaster-api</groupId>
        <artifactId>motionmaster-api</artifactId>
        <version>0.0.34</version>
    </dependency>
</dependencies>

Generate

protoc --java_out=$PWD -I=$PWD $PWD/motion-master.proto

or simply execute the following script:

$ generation_scripts/compile_protocol_buffer_Java_API.sh

JavaScript

The code generated for JavaScript is used only for the SOMANETdrive web application and can be considered as legacy code.

Generate

$ protoc --js_out=import_style=commonjs,binary:$PWD -I=$PWD $PWD/motion-master.proto

or simply execute the following script:

$ generation_scripts/compile_protocol_buffer_JavaScript_API.sh