SoftwarePractice.org: Home | Courseware | Wiki | Archive

T10 Tagged Object Finder

From SoftwarePractice.org

Contents

Introduction

RFID stands for Radio Frequency IDentification, and consists of a Tag and Reader/Scanner. A RFID Tag is small in size, usually no bigger than the size of a patch and no smaller than a rice grain. The Tag consists of a microchip, and an antenna. A microchip is used for reading or storing data, while the antenna is for receiving and transmitting a radio signal. The radio signals are generated by the RFID Reader/Scanner, and is done in line of sight.

RFID Tags are currently used in the following industries: Passports, electronic transport tolling, inventory & product tracking, animal identifiation, human implants and libraries.

Project Requirements & Scope

Project Requirements

The software application being developed for the mobile device must be able to scan and read data from RFID Tags within a 10 meter radius. There will be a main button that will enable the user to scan for tags within range, and provide feedback onto the screen, showing its location and distance relative to the device. The software is to display all tags found within range, and show more detailed information of the tag when selected. There will also be a list of previously stored tags, which the user can add, replace or delete the current tag information with the one selected on the list.

So essentially, the requirements are:

  • The application must read RFID Tags within a 10 meter radius.
  • The application must have a button to scan tags within range.
  • The application must display distance of each tag from device.
  • The application must enable the selection of a tagged object for more detail.
  • Found tags can be added to a list of previously stored tags.
  • The application must replace the tag information in the store if the information is newer than the one already on the list.
  • The store can be browsed, and the user can modify or delete tags.

Assumptions

  • The mobile device is to scan tagged objects placed on a horizontal surface, on the same level as the device. Therefore the plain of view consists of only x-y co-ordinates.
  • The application will only read the data from the RFID tags only. There will be no functionality for the reader to write on the tags.
  • The software will operate with the use of a touch screen and stylus to either select, or input data.

Meet The Team

David Truong

(Username: David Truong)


Having completed his engineering degree, David plans to take over the world.

Lloyd Rangiah

(Username: Mercthunder)


With a near complete Bachelor of Engineering (Software) degree, Lloyd has big plans for life after university.

Lloyd's Logbook

Shane Williams

(Username: 10172690)

Shane is nearing the end of his computer system engineering degree.

Shane's Logbook

Anne Karunakaran

(Username: ankarunak)

Anne enjoys engineering, and is a HD programmer in: C, C++, C#, VB.Net, VB, .NET, Java, COBOL, ASP, SQL, Perl, HTML, Java Script, Python, ORACLE, PHP and many more. With over 5 years industry experience as a professional programmer, she will surely HD this course.

Anne's Logbook

MUP Phases

The Miniture Unified Process is broken up into 4 sections:

Inception

Ground Rules

(1) Meetings are to be taken during the tutorial session on Thursday. Any section that is not completed, the team will stay back and complete it together, or at home, but must be completed before the next lecture/tutorial session.

(2) If there are an extra meetings required, then the team shall meet up at UTS Library, and book a Discussion Room for completion of milestones.

(3) Communication other than face-to-face shall be done via Email.

(4) All team members must not slack off, and pull their weight.

Schedule

Image:Chart.jpg

The bars are allocated in the following order:

Task Name Duration Start Finish
Team Formation & Registration 1 Day Thu 16/08/07 Thu 16/08/07
Java Revison 11 Days Fri 17/08/07 Fri 31/08/07
Inception 4 Days Fri 17/08/07 Wed 22/08/07
CRC Cards 5 Days Thu 23/08/07 Wed 29/08/07
Test Cases 5 Days Thu 30/08/07 Wed 5/09/07
Sequence Diagrams 5 Days Thu 6/09/07 Wed 12/09/07
GUI Creation 3 Days Thu 13/09/07 Mon 17/09/07
Milestone Review 2 Days Mon 17/09/07 Tue 18/09/07
Milestone Review (Final) 1 Day Wed 19/09/07 Wed 19/09/07
Milestone Presentation 1 Day Thu 20/09/07 Thu 20/09/07

Key System Elements

The Key System Elements shows how the software and hardware components are linked together.

Image:System Elements.jpg

RFID Tags: These are the tags that have data installed onto the chip, possibly uploaded by a tag writer. The tag has information that is stored on a chip, which transmit the information using radio waves to the tag reader.

RFID Reader: This component sends a constant radio signal to detect tags within range. The tag then recieves the radio waves, and transmit a distored radio wave based on the information stored on the tag. The reader then reads this return information, and converts it to digital data for other components to use.

Flash Memory: The mobile device will have a small storage device to store the software. Since flash memory has no moving parts, it is not only fast, but also battery friendly, which is perfect for a portable device like a tag reader. The flash memory will store the application software, but also the database used to store cache, and temporary files during use of application.

Database: The database will be located on the memory, and will serve as a location to store tagged objects.

Power Supply Unit: As the title suggests, this supplies the power to run all software and hardware of the mobile device.

LCD Touchscreen: The touchscreen will show 256k colours, have a resolution dependent on the mobile device, and will recognise touches by fingers and stylus to input commands.

Key Stakeholders

Image:Stakeholders.jpg

Key Risks

Elaboraton

Usage Scenarios

Scenario 1: Bird Aviary - RFID tags can be attached to an injured or special bird within the aviary. The device can then be used to bring up a map and display the locality of the specific bird within the enclosure. This will be handy for animal enthusiasts, as it allows them to tag birds that are in special need, or require special care

Scenario 2: Courier Service / Truck Drivers - Courier attaches RFID tags to parcels within the truck, and then adds information about each parcel into the database on the device. This allows the courier to locate specific parcels easily for delivery. RFID tags can also be used by truck drivers, where tags are placed on shelves, so the drivers can easily deduce where to place each item being delivered.

Essential Use Cases

Image:t10usecase1.JPG Image:t10usecase2.JPG Image:t10usecase3.JPG

Use Case Diagram

Image:T10OODusecase.PNG

Class Diagram

Initial Class Diagram

Image:classnew.jpg

Final Class Diagram

Image:Class_update.jpg

CRC Cards

Class Name: GUI
Responsibilities Collaborators
Interface with user all other classes
Class Name: Tag Reader
Responsibilities Collaborators
Reads data from RFID tags GUI - for starting the search
Picks up RFID tags within a radius of 10m
Calculates the distance between each tagged object and the device


Class Name: Tag
Responsibilities Collaborators
Stores tags Databse - updated information of tags are stored in here
Updates location of the tag Tagged Reader - finds tagged objects


Class Name: Database
Responsibilities Collaborators
Has the list of tagged object and information on them Tag Reader - gets location information of tagged objects
Tag - Updates location information of tags
GUI- to view and access
Class Name: Map
Responsibilities Collaborators
Displays found tags in reference to the mobile device GUI - displays the map
Shows the tagged object and the calculated distance between the tag and the device Tag Reader - to find the tag and to calculate the distance between the tag and device


Class Name: Tag Information
Responsibilities Collaborators
Edits and deletes Tag information onto the database Database - updated information is edited in the Database
GUI - to view tag details

Sequence diagrams

Collaboration Diagram

Image:collaboration1.jpg


Sequence Diagram

Image:seq.jpg

Final Sequence Diagrams

Modify Tag


Image:Edit.jpg

Remove Tag


Image:Remove.jpg

Scan Tags


Image:Scantags.jpg

View Tag Information


Image:Tagdata2.jpg

View as List


Image:List2.jpg

Store Tag


Image:Store.jpg

User Interface Sketches

These Interface Sketches are designed for use with a stylus, so there is no button externally to select actions on the screen. The sketch below is an early prototype to show how the GUI would look, and how each screen is linked.

Image:GUI Version 11.jpg

User Interface

Prototype Interface

The mobile device will be implemented as a PDA (Personal digital assistant) where the user can interact with the graphical user interface using a stylus on the touch screen.

Image:T10gui.JPG

Final User Interface

The following 5 screens show the main features of the final GUI.

Image:GUI Final.jpg

Screen 1: This screenshot shows the program just after pressing the SCAN button. After pressing the SCAN button, the tags within range are shown on the Map portion of the screen. To find out more about a tag, the user can select the tag from the map, or from the drop down menu located in the Tags Found section. Once a found tag is selected, the user can get more information about a tag by pressing TAG DATA button, or store the tag into the database by pressing STORE TAG button. The distance is displayed once a tag is selected.

Screen 2: Pressing the TAG DATA button will make the program show a popup menu, which shows the relevant information stored in the selcted tag. Pressing the OK button will bring the user back to the original scrren.

Screen 3: To store a tag into the database, we need to click on the STORE TAG button to store the selected tag. We can store more tags by selecting another tag, and repeating the above process. To view the stored tags, click on LIST button, which is located inside the View Panel. This will then show the stored tags in the upper plane, as shown on the screen.

Screen 4: To edit the description on the tag, select a tag from the drop down menu, then type the new description in the text field labelled: Desc. Once the new description has been entered, click the EDIT DATA button to store the new description. The new description should now be updated instantly on the screen.

Screen 5: To remove a tag, select a tag from the drop down menu, then click the REMOVE button. The selected tag should now be removed from the screen, and database.

Construction

Class Specifications

Class: TagFinderGUI

Purpose: The TagFinderGUI class has data that allows user to see the buttons, labels, boxes, dialog boxes, radio buttons, etc. It forms the GUI.

Class: Map

Purpose: Displays found tagged objects.For convenience, the Map class embedded into the GUI class.

Class: Tag

Purpose: This class has several responsibilities:

  • It stores the tag id, the tag’s x and y coordinates, and a description of how it was last used.
  • It also retrives the x and y coordinates of a certain tag id
  • User is also able to set up the x and y coordinates for a specific tag id.

Class TagFinderController:

Purpose:

Class: Database

Purpose:

  • Allows you to add a new tag to the database
  • Allows you to update a tag that is already in the database.
  • Allows you to search for a tag that is already in the database
  • Calculates the distance between the selected tag and the tagreader.
  • Allows you to update the tag reader coordinates, x, and y
  • Allows to delete tag and associated info.


General user interaction:


Attributes:

Class: TagReader

Purpose

To set the default X and Y position of the Tag Reader

  • Allows user to set the X and Y coordinates of the Tag Reader
  • Returns the value of the X and Y postion of the tag reader to a class that requests it.

Test Cases

System Test

The following table displays system tests for the Tag Reader.

Image:T10SystemTestV1.JPG

Testing

Contracts

TagReader Class

Method Pre Condition Post Condition
1. updateTagReaderCoord(): Int, Int 0<x<10 and 0<y<10 Updates values of x and y coordinates
2. getTagReaderCoordx() xcoords Sets value for xcoord
3. getTagReaderCoordy() ycoords Sets value for ycoord

Tag Class

Method Pre Condition Post Condition
1. updateCoord(): Int, Int, String null Sets value of the X & Y coordinates in type Int, and description String
2. getTagID() tagnum Gets the value of Type Int
3. getCoordx() xcoords Gets the X value of type Double
4. getCoordy() ycoords Gets the Y value of type Double
5. generateCoord() null Generates the X and Y values of type Double
6. getDescription() description Gets the description of type String
7. randomise() null Randomise the X and Y values of type Double

Database Class

Method Pre Condition Post Condition
1. addNew(): Int arrayIndex < 10 Adds a new tag to array with tag number type Int
2. updateXY(): Int, Int, Int, String i < 10 && arrayTag[i] != null Updates the X and Y of type Int, as well as description of type String
3. distance(): Int distTag != null Get the distance of type Int
4. delTag(): Int i < 10 && arrayTag[i] != null Deletes a tag based on id of type Int
5. updateReaderCoords(): Int, Int xcoords, ycoords Updates the tag reader x and y coords of type Int
6. String[][] getTagInfoOrdered() null NO IDEA LLOYD
7. randomLocs() a = 0; a < arrayIndex; a++ Randomises the X and Y of tag
8. getTagDescription(): Int t is valid Returns the description of a tag based on its id of type Int
9. getTag(): Int t is valid Returns the array element based on type int t
10. getTagX(): Int t is valid Returns the X coordinate of a specified tag based on its id of type int
11. getTagY(): Int t is valid Returns the Y coordinate of a specified tag based on its id of type int
12. getNumberOfTags() arrayIndex Returns the number of elements in array
13. storeTag(): Int t is valid Sets the boolean value of tag to true based on the tag id of type Int
14. removeTag(): Int t is valid Sets the boolean value of tag to false based on the tag id of type Int
15. isSaved(): Int t is valid Returns the saved tag based on the tag id of type Int

TagFinderGUI Class

Method Pre Condition Post Condition
1. showToggle(): Int, Int x && y => 0 Sets the x and y of toggle panel
2. initTagPanels(): Int, Int x && y => 0 Sets the x and y of the tag panel
3. distance(): Int distTag != null Get the distance of type Int
4. delTag(): Int i < 10 && arrayTag[i] != null Deletes a tag based on id of type Int
5. showMapPanel(): Int, Int xcoords, ycoords Updates the tag reader x and y coords of type Int
6. showMapPanel(): Int, Int X && Y >= 0 Sets the position of the map panel
7. initListPanel(): Int, Int X && Y >= 0 Sets the X and Y positoin of the list panel
8. listPanel(): Int, Int X && Y >= 0 Sets the X and Y positon of the list panel
9. showDist(): double d is valid Shows the distance of tag on the screen
10. noSelection() null Sets the buttons to false until a tag is selected
11. initTags() a = 0; a < NO_OF_TAGS sets the radio buttons on the map panel to have "00x" where x is the tag id.
12. setRBTag(): Int null Sets the radio button selected to the element associated in the array
13. toggle(): boolean null sets the panel to show or not show depending on the boolean state.
14. metresToPixels(): double pixels Converts meters into pixels
15. clearTagList() tagListIndex > 1 Clears the taglist
16. showSaved(): int, boolean saved shows the saved tags from the drop down menu.
17. clearSavedTagList() savedTagListIndex > 1 clears the tag from the drop down menu.
18. showTagInfo(): String null shows the tag informatio popup screen

TagFinderController Class

Method Pre Condition Post Condition
1. updateSaved() i<DB.getNumberOfTags() Updates the saved lists into database.
2. updateListBox() i<10 Updates the list box

Unit Tests

Image:Unittest1.JPG Image:Unittest2.JPG Image:Unittest3.JPG

Conclusion

Working on this project has enhanced our skills and knowledge in many ways. One major skill that we definitely improved was our team work skills and hence communication skills. Communication skills were neccessary for coordinating meetings and discussions on ideas for the project.

The task of writing the code to match its design specification proved to be a wonderful learning experience as designing before writing the actual code made writing the program much easier and allowed creativity to grow in developing the functionality of the system. Additional functionalities such as making the GUI a touch screen could have been implemented on to the system if it was not for time contraints. Nevertheless, we are satisfied with our working system.

We are confident that the tag reader prototype fulfils the the design criteria. Overall, working on the tag reader proved to be a challenging and a good learning experience.

References

  • Bennett, S. McRobb, S. Farmer, R. 2006, Object-Oriented Systems Analysis And Design -Using UML, 3rd edn, McGraw Hill, New York.
  • Wikipedia, 2007. [RFID Definition], viewed 31 August 2007, < http://en.wikipedia.org/wiki/RFID >
  • C Thomas Wu, "An Introduction to Object Oriented Programming with Java", McGraw-Hill, 3rd edition, 2004.

Instructor Comments

Personal tools