Project Lift
home
Progress code(s) PRJ32_I/PRJ32_D
Subject Elevator Control System with Design Patterns in Java
Number/Version 3.1
Where is my stuff IO Warrior register
Lecturing material

Goals

In this module you will learn to design, implement and test a scale model and a GUI simulation of an elevator system using UML, Java and Design Patterns. Module description in English. The LaTeX sources of this manual can be found in the svnroot respository of this module, see below.

Connecting the hardware

To be able to use the hardware elevator /usb combination we provide a set of libraries. They are described in the module manual and come with javadoc documentation.

Note that the libraries below assume an ant based project. However, since 2016 we work using maven as a build technology. Anyway, the javadoc is still mostly right.

To give you a flying start with maven, you might want to download the sources of bitfactoryexample (see below) as a zip file.

Recommended lib name lib jar javadoc javadoc zip source jar svn url
SEVenloUtils lib javadoc javadoc zip source jar svn url
SEVenloWarrior lib javadoc javadoc zip source jar svn url
SEVenloWidgets lib javadoc javadoc zip source jar svn url
SEVenloHWIO lib javadoc javadoc zip source jar svn url
SEVenloNetIO lib javadoc javadoc zip source jar svn url

See the netbeans documentation and the module manual on how to create so called ant-libraries (since netbeans 7.2) in netbeans and install binary, javadoc and sources.

We will be using the IOWarrior-40 chip to connect the hardware through USB. If you want to experiment with this library, you can find it here including its java doc documentation. I have used and tested it with Linux.

Installation under Linux

Installing the kit for Linux boils down to installing both native library libiowkit.so and codemercs.jar. The kernel module for the iowarrior, iowarrior.ko, is already integrated into modern Linux kernels.

On my machine the installation should be done into the following directories:

  1. Directory /usr/lib for libiowkit.so
  2. Directory /usr/lib/jvm/java-8-oracle/jre/lib/ext for the utility jar codemercs.jar

All this has been arranged in the repackaged iowSDK.zip. Unpack it in some convenient place like ~/Desktop or /tmp, enter the newly created iowSDK directory and sudo ./buildall.sh. You might need to do a modprobe iowarrior to load the iowarrior kernel module that comes with modern Linuxen. There after you can remove this iowSDK directory.

To get things running and test your hardware and driver setup you can use the following resources:

  • linux libiowkit
  • bitfactoryexample.zip, a zip file containing working bitfactory example jar named BitFactoryExample-1.0-SNAPSHOT-jar-with-dependencies.jar as a fat jar, which goes with
  • a elevator.properties file, required to be found in the directory you start your jar in.

Unpack (unzip) this file in a convenient place and open a command line in the directory bitfactoryexample that is created by the unpacking.

Then on the commandline you should be able to run this simple test app with:


$ cd bitfactoryexample
$ java -jar BitFactoryExample-1.0-SNAPSHOT-jar-with-dependencies.jar
For your convenience there also is a run.sh and a run.bat file. Make the one you need executable and do $ ./run.sh

Installation under windows

The following has been tested under Windows XP, Vista and Windows 7 (excerpt from the readme file in the iowarrior kit)

  • Copy ...\Windows\iowkit api\x86\iowkit.dll to system DLLs directory (winnt\system32 directory in Windows 2000, windows\system32 in Windows >= XP.
    For a 64 bit windows, select the dll from the appropriate directory ...\Windows\iowkit api\x64\
  • Include the ..../Java/jar/codemercs.jar from the iorwarrior SDK in your project or in your java classpath.

Sample application to test your connections

Once you have installed the OS specific part (the libiowkit.so or iowkit.dll) You should then be able to run the samples.jar test program. It should blink the led on the interface printed circuit board.

I also made a warriortester application that can be used to read the inputs and write the outputs of the hardware elevator. It should run if you have installed the os part (dll and lib on windows and .so and .a files on linux). Here is a webstart version.

You can also fetch the zip file which comes with a set of property files, one for the laundry application and one for the elevator application.
Example: starting the application with ./wt.sh sets the inputmask and the pin descriptions according the hardware for the 2012 elevator, with which you can test the driver and java lib.

Sometimes you have to move the cage by hand to the extreme up and down positions to clear the magnetic safety sensors. Otherwise the elevator-hardware might refuse to turn the motor on in one or both directions.


Maven

There is a sample on how to use the sevenlohwio library under the bitfactoryexample in the root repository.

You can also unzip the bitfactoryexample-src.zip file somewhere, like your project directories under 40_sources. Then open the contained maven-netbeans project with NetBeans-IDE and work your way from there.
You can create your own maven project in netbeans and copy (as in overwrite) the pom.xml file in the project files. In the pom file, change the groupId to nl.fontys.sebivenlo.groupXXX and the artefactId to elevator.

Time keeping

During the project you must keep a record of the times you estimate and you really use on the project. To be able to determine the realism of your entries, you should also enter these values for your other study related activities.
For this timekeeping you should use the spreadsheet that is available in timesheet_template in Open Office and timesheet_template in Microsoft excel format as well as the Office 2007 format. Upload the filled out sheet into the repository each time at the end of the week. Deadline is typically at the end of the week (Sunday evening).

Repositories

For each group, a svn repository will be available named after the pattern: https://www.fontysvenlo.org/svn/2016/PRJ32/g<grpnum>
as in https://www.fontysvenlo.org/svn/2016/PRJ32/g5.
All groups have a repository. The project itself also has a shared repository, https://www.fontysvenlo.org/svn/2016/PRJ32/svnroot, in which we share the documentation and the libraries to use. The use of this supplied repository is mandatory.

The authentication is taken from peerweb, meaning you will have to log in with your student number (2xxxxxx) and your peerweb password.

The svnroot repository contains the documentation and the source code version of the utility classes to use with the elevator along with a simple IO warrior test gui to test the configuration for the elevator system. To get you started some widgets are also available.

The repositories for the groups:

    How to deliver your assignment products:

    All electronic products must be handed in via peerweb. See peerweb for all deadlines.
    1. Report: one document describing your analysis, design and its implementation, test installationand user manuel to be handed in on paper too, properly bound at the copy shop. The document should also contain a reference to the repository.
      See the module_manual for what the document should contain. The design diagrams, user interface illustrations etc. are copied into and explained in the report document. In the document code fragments are shown only when relevant. E.g.  when the implementation is discussed in the describing text.
    2. Models: One model file in the Visual Paradigm UML tool. Hand in by svn.
      The models should contain analysis, design and implementation as well as a reverse engineered model of the complete implementation. For practical reasons you may use more then one model file for each of the phases analysis, design and implementation. You may hand in three distinct models.
    3. Implementation: All (re)sources needed to build the project should be in the project repository at all times. The sources should be accompanied with an ant build script. Most of the time the Netbeans build.xml script will do.
      For all but the first week you should produce a executable artefact or runnable program.
      By checking out the project and calling ant jar should result in a functional and runnable jar file. Say the produced jar file is called 'dist/SuperElevator.jar'
      I will use the file like this:
      java -cp dist/SuperElevator.jar nl.fontys.sevenlo.PRJ32.DemoWeekX.
      The prefix nl.fontys.sevenlo.PRJ32 is mandatory for all your packages. You may (maybe should) have additional packages under this top package name. You may also create several Netbeans projects with additional package and directory structures to reflect your functional decomposition.
      Each week that has an executable will have a Main class named nl.fontys.sevenlo.PRJ32.DemoWeek<weeknr>. For each week, except the first, there will be a hand in of a runnable jar file.
Deadlines

Each week has one ore more products to be delivered using the repository. The Tutor will tag the repository for all groups on the same time. This TAG is read only. All that is in the tag is considered as handed in. Missing material is considered as too late.

The final products should be handed in in a different form. The report must be in PDF, printer ready, the software product in a java webstart package and the presentation should be given live of course. You must also hand in one properly bound paper copy of the report at my desk. Any files used during the presentations (including the presentation file) should be in the repository too.

Note that the language of all products and presentations is to be (British) English.

Deadline for the delivery of your report is: Friday December 23rd 2016 16:00 using peerweb and post box. The presentations will taken place on Tuesday Januari 10th 2016 from 9:35 till 11:30. Room 1.01

Background material Project guidelines (dutch, german)
Literature Head First Design patterns, javadoc on sevenloXX packages.
References/Links MOD2

elevator

Valid XHTML 1.0 Transitional