Giter VIP home page Giter VIP logo

hokuyo-optical-parallel-io-java8's Introduction

hokuyo-optical-parallel-io-java8

Introduction

This library is HOKUYO Optical-Parallel-IO control implementation on Java8.
HOKUYO DME-G/H is able to read and write 8-bit-parallel-IO-data by UDP/IP.

Supports

Create new instance and open

DMEConfig config = new DMEConfig();
config.bindSocketAddress(new InetSocketAddress("192.168.0.10", 0));
config.addConnect(new InetSocketAddress("192.168.0.1", 10940));

DME dme = DME.open(config);

Add Listener for Receive-packet

dme.addReceiveListener((DMEReceivePacket r) -> {

    boolean output1_on = r.isOn(DMEOutput.Output1);
    boolean output2_on = r.isOn(DMEOutput.Output2);
    boolean output3_on = r.isOn(DMEOutput.Output3);
    boolean output4_on = r.isOn(DMEOutput.Output4);
    boolean output5_on = r.isOn(DMEOutput.Output5);
    boolean output6_on = r.isOn(DMEOutput.Output6);
    boolean output7_on = r.isOn(DMEOutput.Output7);
    boolean output8_on = r.isOn(DMEOutput.Output8);

    boolean go_on    = r.isMode(DMEMode.GO_ON);
    boolean reset_on = r.isMode(DMEMode.RESET_ON);
});

Send Mode-packet

dme.send(
    DMEMode.MODE_OFF,   /* or DMEMode.MODE_ON   */
    DMEMode.SELECT_OFF  /* or DMEMode.SELECT_ON */
    );

Send Send-packet

dme.send(
    DMEInput.Input1_OFF, /* or DMEInput.Input1_ON */
    DMEInput.Input2_OFF, /* or DMEInput.Input2_ON */
    DMEInput.Input3_OFF, /* or DMEInput.Input3_ON */
    DMEInput.Input4_OFF, /* or DMEInput.Input4_ON */
    DMEInput.Input5_OFF, /* or DMEInput.Input5_ON */
    DMEInput.Input6_OFF, /* or DMEInput.Input6_ON */
    DMEInput.Input7_OFF, /* or DMEInput.Input7_ON */
    DMEInput.Input8_OFF  /* or DMEInput.Input8_ON */
    );

hokuyo-optical-parallel-io-java8's People

Contributors

kenta-shimizu avatar

Stargazers

 avatar

Watchers

 avatar  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.