This guide is intended for developers who wish to work on Fosstrak HAL Implementations. It outlines the steps to follow for setting up the development environment and helps developers to find their way through the code.
This section describes the setup of the development environment we use when working on Fosstrak's HAL project. To compile the HAL, simply execute Maven. A Java Development Kit needs to be installed.
First thing you need to do is checking out the code from the SVN repository. See the Source Repository section on how to access the sources.
We use Maven 2 as our build tool. After installation you need to have the M2_HOME environment variable set to your Maven installation directory.
The FEIG OBID i-scan ID.ISC MR101-A implementation needs the Java Communications API to compile successfully and communicate with the reader. Instructions on installing the Java Communications API can be found in the Feig User Guide.
This section helps developers to find their way through the code.
Fosstrak's HAL project consists of multiple modules. Currently, it includes four modules:
This module contains the HardwareAbstraction interface definition and common functionality such as exceptions, descriptors, models, types and utility classes.
This module provides simulators implementing the HardwareAbstraction interface. Each simulator can be used in exactly the same way as an implementation for a hardware reader. Following simulator types are available:
This module implements the HardwareAbstraction interface for the Impinj Speedway reader. The controller communicates with the reader through TCP/IP and the Impinj Mach1 protocol.
This module contains two controllers for readers from FEIG ELECTRONIC:
We use the standard Maven directory layout as follows:
| +-- pom.xml -> top-level POM file | +-- LICENSE.txt, README.txt | +-- src/ | | | `-- site/ -> project documentation | +-- hal-commons/ | ¦ | ' | +-- hal-impl-impinj/ | ¦ | ' | +-- hal-impl-feig/ | ¦ | ' | +-- hal-impl-sim/ | | | +-- pom.xml -> module POM file | | | `-- src/ | | | +-- main/ | | | | | +-- java/ -> java source files | | | | | +-- resources/ -> configuration files and images | | | | | `-- assembly/ -> packaging information | | | +-- site/ -> module documentation | | | `-- test/ | | | `-- java/ -> java unit test source files | `-- target/ -> generated contents
We use Maven as our build tool for the Fosstrak HAL project.
For building the sources, it is sufficient to run the following command:
mvn compile
In order to work on the Fosstrak HAL using Eclipse, follow these instructions:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
mvn eclipse:eclipse
The following command will generate the binaries for the modules.
mvn package
To install Fosstrak HAL in the local Maven repository and use it in other projects, for instance Fosstrak Reader, run the following command:
mvn install
The main web site (containing this documentation) can be generated by using the following command:
mvn site -N
In order to generate all module reports and to test the whole site navigation before a live deploy, you can execute the following command which will generate the web site under the given directory:
mvn site:stage -DstagingDirectory=<directory-to-deploy-site>