llrp4j-distribution

Distribution project for packaging of LLRP4J modules into a single jar.

License

License

Categories

Categories

Net Distribution Build Tools
GroupId

GroupId

net.enilink.llrp4j
ArtifactId

ArtifactId

llrp4j-distribution
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

pom
Description

Description

llrp4j-distribution
Distribution project for packaging of LLRP4J modules into a single jar.
Project URL

Project URL

http://github.com/enilink/llrp4j

Download llrp4j-distribution

How to add to project

<!-- https://jarcasting.com/artifacts/net.enilink.llrp4j/llrp4j-distribution/ -->
<dependency>
    <groupId>net.enilink.llrp4j</groupId>
    <artifactId>llrp4j-distribution</artifactId>
    <version>1.0.6</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/net.enilink.llrp4j/llrp4j-distribution/
implementation 'net.enilink.llrp4j:llrp4j-distribution:1.0.6'
// https://jarcasting.com/artifacts/net.enilink.llrp4j/llrp4j-distribution/
implementation ("net.enilink.llrp4j:llrp4j-distribution:1.0.6")
'net.enilink.llrp4j:llrp4j-distribution:pom:1.0.6'
<dependency org="net.enilink.llrp4j" name="llrp4j-distribution" rev="1.0.6">
  <artifact name="llrp4j-distribution" type="pom" />
</dependency>
@Grapes(
@Grab(group='net.enilink.llrp4j', module='llrp4j-distribution', version='1.0.6')
)
libraryDependencies += "net.enilink.llrp4j" % "llrp4j-distribution" % "1.0.6"
[net.enilink.llrp4j/llrp4j-distribution "1.0.6"]

Dependencies

compile (2)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.2
ch.qos.logback : logback-classic jar 1.1.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

LLRP4J - LLRP for Java Build Status

LLRP protocol and networking implementation for Java.

LLRP4J implements encoders and decoders for the binary and (proprietary) XML serializations of the Low Level Reader Protocol (LLRP).

LLRP4J consists of the following modules:

  • llrp4j-core: Encoders and decoders for the binary and XML serializations.

  • llrp4j-generator: Java source code generator for annotated POJOs based on XML definition files.

  • llrp4j-llrp-module: The LLRP module that provides Java classes for messages and parameters as defined by the LLRP 1.1 standard.

  • llrp4j-impinj-module: A placeholder for a custom Impinj module whose definition (impinjdef.xml) must be directly obtained from Impinj due to licensing restrictions.

  • llrp4j-net: LLRP client and server implementations using Java NIO.

Get started

final LlrpContext ctx = LlrpContext.create(new LlrpModule());
LlrpEndpoint endpoint = new LlrpEndpoint() {
  @Override
  public void messageReceived(LlrpMessage message) {
    StringWriter writer = new StringWriter();
    try {
      XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
      ctx.createXmlEncoder(true).encodeMessage(message, xmlWriter);
      String xml = writer.toString();
      System.out.println("RECEIVED:\n" + xml);
    } catch (Exception e) {
      // handle exception
    }
  }

  @Override
  public void errorOccured(String message, Throwable cause) {
  }
};
LlrpServer server = LlrpServer.create(ctx, "127.0.0.1").endpoint(endpoint);
LlrpClient client = LlrpClient.create(ctx, "127.0.0.1").endpoint(endpoint);

client.transact(new SET_READER_CONFIG().resetToFactoryDefault(true));

client.close();
server.close();

Get the sources

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

Build LLRP4J

LLRP4J can be build with Maven. You can simply use mvn -P generator package to compile and package all modules or mvn -P generator install to install them within your local Maven repository.

Differences to LLRP Toolkit for Java

A popular implementation of LLRP in Java is the LLRP Toolkit (LTK) for Java. Its development has been stalled since 2012 and hence we decided to create a new LLRP library for Java with the following benefits:

  • Pluggable serializers: LLRP4J does not generate the serialization logic into the message and parameter classes but uses annotations to declare the respective LLRP data types and encoding rules. This enables serializers to leverage runtime reflection for encoding or decoding message and parameter objects.

  • Dynamic modules: LLRP4J can be extended with modules at runtime to add custom messages or parameters. LTK for Java had to know custom messages or parameters at the generation time of the Java source code for messages and parameters.

  • Minimal runtime dependencies: LLRP4J has no additional runtime dependencies other than SLF4J.

  • Better code generator: LLRP4J uses JCodeModel for source code generation that is simpler and better extendable in comparison to the template based approach of LTK for Java.

License

LLRP4J is licensed under the Eclipse Public License v1.0.

Acknowledgements

The networking module is based on the Rox Java NIO Tutorial and the bit buffer implementation is a fork of https://github.com/magik6k/BitBuffer.

net.enilink.llrp4j

eniLINK

Linked data platform based on KOMMA and RDF4J

Versions

Version
1.0.6
1.0.5
1.0.4
1.0.3