Giter Club home page Giter Club logo

llrp4j's Introduction

eniLINK Platform

eniLINK is a web platform for linked data applications based on the KOMMA framework and Lift.

Get the sources

git clone https://github.com/enilink/enilink

Enilink can be build with Maven. You can simply use mvn package to compile and package the core modules or mvn install to install them within your local Maven repository.

A release version of the enilink platform server can be build via:

mvn -P release package

Afterwards a Karaf assembly can be found within the products/enilink-server/target directory.

llrp4j's People

Contributors

kenwenzel avatar markdegrootnl avatar rom9 avatar voom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

llrp4j's Issues

IoHandler not possible to configure keepAliveAck and keepAliveForward

When creating a new LlrpClient, the class creates an IoHandler. The IoHandler's constructor parameters keepAliveAck and keepAliveForward always default to true, false.

It would be nice if we could somehow configure these values if needed.

private IoHandler createHandler(LlrpContext context) {
IoSession ioSession = new IoSession() {
@Override
public void send(ByteBuffer data) {
nioClient.send(data);
}
};
return new IoHandler(context, ioSession, true, false);
}

NullPointerException handling multiple connections.

Hi,
When I try to establish more than one simultaneous connection to my llrp server the NioHandler launches a NullPointerException with the next message:

Error while processing network channel
java.lang.NullPointerException
	at net.enilink.llrp4j.net.NioServer.run(NioServer.java:80)
	at java.lang.Thread.run(Thread.java:745)

With only one connection it works properly. Is your class 'LlrpServer' currently multithread?
This is my endpoint implementation:

LlrpEndpoint() {

	@Override
	public void errorOccured(String arg0, Throwable arg1) {
		System.err.println(arg0);
		System.err.println(arg1.getMessage());
		arg1.printStackTrace();
	}

	@Override
	public void messageReceived(LlrpMessage message) {
		String messageName = message.getClass().getSimpleName(); 
		Class<?> responseType = message.getResponseType();
		LlrpMessage response = handleMessage(message);
		if (response != null) {
			server.send(response);
		}
	}
};

Add support for TLS

Right now the NioClient only connects via unencrypted sockets. This would create a client that has support for TLS.

I work for Target and we're utilizing this project for our LLRP layer, but we have a requirement that it must be encrypted. I had planned to submit an implementation of this TLS connector if there was an appetite for it, but this project uses base Java NIO for its networking layer, and using SSL engine is notoriously difficult. One of the marketed pros of using this project is that it only has the single SLF4J dependency, but I wanted to ask before I started if it would be ok to add another small dependency for this project which has a great abstraction over SSLEngine.

Sorry for hijacking this issue as basically an email, but let me know your thoughts or if there's a better way to engage the owners on this.

XML File decoding to LlrpMessage

When I try to open and decode an XML file containing an LLRP Message I always get an java.lang.NumberFormatException exception from the ctx.xmlDecoder().decodeMessage();

For example here is the beginning of the SET_READER_CONFIG message :

<?xml version="1.0" encoding="UTF-8"?>
<SET_READER_CONFIG xmlns="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="3">
  <ResetToFactoryDefault>0</ResetToFactoryDefault>
  <ReaderEventNotificationSpec>
    <EventNotificationState>
      <EventType>Upon_Hopping_To_Next_Channel</EventType>

And I got java.lang.NumberFormatException: For input string: "Upon_Hopping_To_Next_Channel"

But when I replace Upon_Hopping_To_Next_Channel by its value 1, it seems to work.

Maybe related to #1

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.