William Mc Devitt
Upcoming SlideShare
Loading in...5
×
 

William Mc Devitt

on

  • 1,059 views

 

Statistics

Views

Total Views
1,059
Slideshare-icon Views on SlideShare
1,059
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    William Mc Devitt William Mc Devitt Document Transcript

    • RFID Implementation for the Electronic identification of Cattle William McDevitt Banner No: B00362059 University of Ulster, School of Computing and Intelligent Systems
    • Abstract Identification of cattle has been around for many years, because of the need for traceability for food standards and disease control governments have required farmers to record all birth, deaths and movements of cattle, so that if an disease out break does occur, they can track all the possible farms that may have been affected. This information is critical in cases where there is a risk to humans, such as the recent dioxin contamination issue recently reported in the news where animal feed was contaminated. Using the information from the Feed manufacturers of the farms they supplied, and then tracing the animals that had been processed by meat plants from them herds, the Food standards agency was able to carry out a risk analysis on the dangers to the public. The meat industry has been in the spot light over recent years with outbreaks such as BSE and blue tongue, so the requirement to ensure that all information gathered is correct has pushed the meat industry to look at ways of improving it information recording. This in turn lead to a EID working group being setup with members of the Farmers Union, representatives from Department of Agriculture and representatives from the meat plants via the Northern Ireland Meat exports association. This report documents the current problems with animal identification within meat plants and shows the research carried out on RIFD technology. The Design of the software is based upon the recommendations given by the Department of Agriculture I.T. technologies in terms of RFID equipment. As member of the NIMEA IT committee we have proposed how the meat plant systems will interact and this report explains this operation. The implementation of the system is described in detail and is accompanied by the test cases carried out on it. The final chapters are an evaluation of the system and the conclusions drawn through this project.
    • Acknowledgements I would like to thank my wife Shauna and my two girls Abbie and Hannah who have given me the time and peace to work on this project and the last five years of studying that have led to this. I would also like to thank Dr Kevin Curran my project supervisor who backed my idea and has given me guidance and support throughout this project. It has been very much appreciated. I would also like to take this opportunity to thank all the lecturers who’s teaching through out my five years of study at Magee College have contributed to the project, and even at work and will continue to do so in the future.
    • Table of Contents Abstract......................................................................................................................................................................................2 Acknowledgements....................................................................................................................................................................3 Abbreviations.............................................................................................................................................................................6 Declaration.................................................................................................................................................................................8 1Introduction..............................................................................................................................................................................9 1.1 Problem.......................................................................................................................................................................9 1.2 Aims and Objectives .................................................................................................................................................10 1.3 Thesis outline............................................................................................................................................................10 2 Animal Traceability............................................................................................................................................................11 2.1 Reasons for Traceability............................................................................................................................................11 2.2 Food Standards Agency...........................................................................................................................................11 2.3 Department of Agriculture and Rural Development (N. Ireland)................................................................................13 2.4 Animal and Public Health Information System (APHIS).............................................................................................13 2.5 Animal Information gathered by Meat plants..............................................................................................................15 3 Radio Frequency Identification.........................................................................................................................................17 3.1 Uses of RFID technology..........................................................................................................................................17 3.2 RFID Standards.............................................................................................................................................................18 3.2.2 ISO 11785..............................................................................................................................................................18 3.2.2 ISO 11784..............................................................................................................................................................20 3.3.2 ISO 14223/1...........................................................................................................................................................20 3.3 RFID Technology in Livestock Identification .................................................................................................................21 3.3.1 RFID Tags .............................................................................................................................................................21 3.3.2 RFID Reading System............................................................................................................................................22 3.4 Issues with using RFID technology for identification of Animals ...................................................................................24 4 Software Requirements Specification...............................................................................................................................25 4.2 Logical Diagrams...........................................................................................................................................................25 4.2.1 Current Work Flow Diagram...................................................................................................................................25 4.2 Proposed Work Flow Diagram....................................................................................................................................26 4.3 System Description....................................................................................................................................................27 4.3.1 Presenting animals at Lairage................................................................................................................................27 4.3.2 Confirmation into the Lairage..............................................................................................................................27 4.3.3 Movement into the abattoir.....................................................................................................................................28 4.4 Requirements............................................................................................................................................................28 4.4.1 Functional Requirements.......................................................................................................................................28 4.4.2 Non-Functional.......................................................................................................................................................30 4.5 Hardware Requirements..........................................................................................................................................31 4.5.1 Fixed RFID Reader at the entrance to the Lairage.................................................................................................31 4.5.2 Portable Hardware.............................................................................................................................................32 5 System Design...................................................................................................................................................................33 5.1 Use Case Diagrams.......................................................................................................................................................34 5.2 Use Case Decriptions....................................................................................................................................................35 5.3 Class Diagram...............................................................................................................................................................41 5.4 Data Design............................................................................................................................................................42 5.4.2 Entity Relationship Diagram...............................................................................................................................42 6 Hardware Selection............................................................................................................................................................43 7.1 Fixed Reader System..................................................................................................................................................45 7.1.1Fixed Reader Acrhitecture Diagram........................................................................................................................45 7.1.2Menu Screen...........................................................................................................................................................46 7.1.3Register Movement Document................................................................................................................................47 7.1.4Scan Animals..........................................................................................................................................................48 7.1.5Non-Confirmed Animals..........................................................................................................................................51 7.1.6Test Mode...............................................................................................................................................................52 7.2 Mobile Reader System .................................................................................................................................................54 7.2.1Mobile Reader System Acrhitecture Diagram..........................................................................................................54 7.2.2Menu screen...........................................................................................................................................................55
    • 7.2.3Scan Animals..........................................................................................................................................................56 7.2.4Find Animal.............................................................................................................................................................57 7.2.5View Animal Details.................................................................................................................................................59 7.2.6Test Reader............................................................................................................................................................59 7.3 Database ......................................................................................................................................................................61 7.3.1 Implementation of tblEIDAnimal Table...................................................................................................................61 7.3.2 Implementation of tblStatuses Table......................................................................................................................61 8 Testing .................................................................................................................................................................................62 8.1 White Box testing...........................................................................................................................................................62 8.2 Black Box testing...........................................................................................................................................................62 8.3 Evaluation......................................................................................................................................................................63 8.3.1 Functional Requirements Evaluation......................................................................................................................63 8.3.2 Non-Functional Requirements Evaluation..............................................................................................................64 8.3.3 Performance Evaluation.........................................................................................................................................64 8.3.3 Conclusion.............................................................................................................................................................65 9 Conclusion............................................................................................................................................................................66 Appendix A: Project Plan for Implementation...........................................................................................................................69 Appendix B: MC2 Movement Document .................................................................................................................................71 Appendix C: Lairage Layout for Fixed RFID Reader................................................................................................................72 Appendix D: Antenna mounting instructions............................................................................................................................73 .................................................................................................................................................................................................73 Appendix E: DARD Webservice descriptions...........................................................................................................................74 MeatAddToMovementNotInput webservice Description......................................................................................................74 WS_MeatAnimalInfo webservice description.......................................................................................................................77 WS_MeatConfirmMove Webservice description..................................................................................................................81 WS_MeatRegisterVDoc.......................................................................................................................................................84 WS_MeatAssignKillNo.........................................................................................................................................................87 Appendix F Fixed Reader VB.net Source Code.......................................................................................................................90 Appendix G Fixed Reader VB.net Compact Framework Source Code....................................................................................90 Appendix H White Box (Unit Testing).......................................................................................................................................91 Appendix I Black Box Testing..................................................................................................................................................98 Appendix J Requirements Analysis Meeting Presentation.....................................................................................................102
    • Abbreviations E-MPL Electronic Meat Plant Lairage DARD Department of Agriculture and Rural Development MC2 Movement Certificate RFID Radio-frequency identification EID Electronic Identification PDA Personal Digital Assistant (Handheld Computer) APHIS Animal and Public Health Information System HDX Half Duplex Tag FDX Full Duplex Tag IP http://www.protectingpeople.co.uk/fire_tech/ip_explained.htm ETSI European Telecommunications Standards Institute EMC Electromagnetic compatibility PC Personal Computer UPS Uninterruptible Power Supply
    • Table of Figures Figure 1: DARD Ear Tag.........................................................................................................................................................12 Figure 2: APHIS System.........................................................................................................................................................13 Figure 3: Record specification for the ABNET download.........................................................................................................15 Figure 4: Diagram of the transmission between Reader and HDX tag....................................................................................18 Figure 5: Diagram of transmission between Reader and FDX tag...........................................................................................19 Figure 6 : Protocols used to communicate between transponder and Reader.........................................................................19 Figure 7 : Button and Leaf RFID tag and internal circuit..........................................................................................................22 Figure 8: Bolus RFID tag ........................................................................................................................................................22 Figure 9 Fixed RFID Eartag Reader........................................................................................................................................23 Figure 10 Portable RFID Eartag Reader..................................................................................................................................23 Figure 11: Fixed Reader Use Case..........................................................................................................................................34 Figure 12: Mobile Reader Use Case .......................................................................................................................................34 Figure 13: EID system Comparison.........................................................................................................................................44 Figure 14: Fixed Reader Architecture Diagram........................................................................................................................45 Figure 15: Menu Screen..........................................................................................................................................................46 Figure 16: Register Permit Entry Screen..................................................................................................................................47 Figure 17: Read Animals Screen.............................................................................................................................................50 Figure 18: Non-Confirmed Animals..........................................................................................................................................51 Figure 19: Test Mode Password Screen..................................................................................................................................52 Figure 20: Test Mode screen...................................................................................................................................................53 Figure 21: Mobile System Menu Screen..................................................................................................................................55 Figure 22: Mobile System Scan Animal Screen.......................................................................................................................57 Figure 23: Find Animal Screen.................................................................................................................................................58 Figure 24: Mobile System Animal Details Screen....................................................................................................................59 Figure 25: Mobile System Test Reader Screen.......................................................................................................................60 Figure 26: Requirements Trace Table.....................................................................................................................................63 Figure 27: Performance evaluation Graph...............................................................................................................................64
    • Declaration “I hereby declare that for a period of two years following the date on which the dissertation is deposited in the Library of the University of Ulster, the dissertation shall remain confidential with access or copying prohibited. Following the expiry of this period I permit the Librarian of the University of Ulster to allow the dissertation to be copied in whole or in part without reference to me on the understanding that such authority applies to the provision of single copies made for study purposes or for inclusion within the stock of another library. This restriction does not apply to the copying or publication of the title and abstract of the dissertation. IT IS A CONDITION OF USE OF THIS DISSERTATION THAT ANYONE WHO CONSULTS IT MUST RECOGNISE THAT THE COPYRIGHT RESTS WITH THE AUTHOR AND THAT NO QUOTATION FROM THE DISSERATION CAN NO INFORMATION DERIVED FROM IT MAY BE PUBLISHED UNLESS THE SOURCE IS PROPERLY ACKNOWLEDGED.” William McDevitt
    • 1 Introduction The Foyle food group is one of many beef producers in Northern Ireland who have a responsibility to produce beef to a high quality standard that is fit for human consumption and in accordance to the regulations set out by Food law enforced by the Food Standards Agency 1. In order to prove that its beef is fit for human consumption, the Foyle food group must record information on all each animal that it slaughters and be able to trace any finished product back to its animal origin. Each animal that enters an abbatoir must be be accompanied by a movement permit. A Movement permit is taken from a booklet issued to the farmer by the Department of Agriculture and Rural Development of Northern Ireland (DARD). Each page in the booklet has a unique serial number. A farmer who brings animals to slaugther must write on a permit the eartag identification number of each animal. Legislation dictates that an Abbatoirs must operate in two production modes, Under thirty months mode and Over thirty months mode because an animal over 30 months is suspicate to BSE or mad cow diesase, therefore a brain sample must be taken for each animal that is older than 30 months old. 1.1 Problem At the current time Abattoir staff accompanied by DARD officials verifies each animal that is brought to slaughter. This process makes DARD partly responsible for any errors in the process so DARD has decided to remove their staff from this process. Wrong animals can enter the food chain caused by the following issues in its identification: • A farmer writes a wrong eartag identification number on a movement permit or presents a wrong animal to the abattoir. A single final digit can be the difference between an over 30 months animal in a farmers herd be mistaken for an under 30 Months animal. • A digit or digits are miss-keyed when transferring from the written permit to the APHIS2 system. The APHIS system alerts staff on animals that need attention before slaughter, such as tests, age discrepancies etc. The consequences of the above errors are: • If an over thirty months animal is killed in Under thirty months mode without a brain sample test, it cannot be determined if any beef that has come into contact with this animal is now safe for human consumption. So all the beef must be destroyed with a huge financial loss to the company. • An animal that may have been completely unfit for human consumption could cause illness to customers. In order to avoid the above issues DARD have suggested that Electronic Identification (EID) of Animals be implemented by the abattoirs to help eliminate these errors. In order for this process to work abattoirs must ensure that they force farmers to have their cattle electronically tagged before presenting them for slaughter. 1 2 Animal and Public Health Information System, A DARD system used to track animals used by Both Farmers and Industry. Explained in More detail in Chapter 2 9
    • To help abattoirs through this transition DARD have carried out a lot of research on behalf of the meat industry. This research has been used to give recommendations to meat plants on how to implement Electronic Identification systems for cattle. DARD has also provided a number of web services so that meat plants can integrate their EID systems to the APHIS system. 1.2 Aims and Objectives The purpose of this project is to design, develop and implement a suitable cattle Identification system using radio frequency Identification (RFID) readers to reduce human error in the process of verifying cattle received at the abattoir. The system will be implemented into two plants within the Foyle Food group. Omagh Meats and Foyle meats are the two plants that this system will be designed for. 1.3 Thesis outline Chapter 2 describes the purposes of animals traceability and the use of information within beef production, how it gathered, used and descriptions of the other organisations that either provide some of the information or use it themselves. Chapter 3 describes Radio Frequency Identification, the international standards and the standards used in the identification of animals. Issues associated with using RFID technology to identify animals are also explained. Chapter 4 describes the system requirements as expressed by the meat plant management and lairage staff. It is the methodical approach to gather requirements and presenting them to the stakeholder to validate that all their requirements for the new system will be met. Chapter 5 begins the logical design of the software by identifying the main components required and mapping them out using the unified modelling language in the form of Use case diagrams and descriptions and the design of a class diagram that will later be translated into class using visual Basic .net. This chapter also describe the logical data design of the software system using an Entity relationship diagram. Chapter 6 describes the choice of hardware compared with the required hardware specification. It shows the comparison between different EID equipment and the which one best suits this project. Chapter 7 describes the implementation of the fixed reader and Mobile reader system, it give a detail explanation of how the system operates from a user point of view and the technical detail behind each function. Chapter 8 shows the extensive testing carried out on the system, both Black and white box testing and the results and actions obtained from those tests. This section also give an evaluation of the software and whether it means the requirements laid out ion the requirement section of this document. Chapter 9 concludes the finding during the research and the design of this application along with ideas of future work that may improve the system. 10
    • 2 Animal Traceability Traceability is defined in the General Food Law Regulation 178/2002 as: ‘The ability to trace and follow a food, feed, food producing animal or substance…through all stages of production, processing and distribution The legal requirements for a meat plant under the general food law regulation 178/2002 insist that any food business must: • Identify the suppliers of food, feed, food-producing animals and ingredients to their businesses. • Identify the businesses to which products have been supplied. • Maintain appropriate records and ensure that such information is made available to competent authorities on demand. (Bridgend County Borough Council, 2007). 2.1 Reasons for Traceability One of the main reasons why traceability is so important in beef production is due to out breaks of diseases that affect cattle such as BSE or blue tongue. As an example of the importance keeping these animals out of the food chain I will discuss the risk involved in a diseased animal entering the food chain and the actions required by meat plants enforced by government bodies to prevent it. In 1996 BSE was first confirmed in cattle, Bovine Spongiform Encephalopathy (BSE) is a disease that affects adult cattle. BSE attacks the brain and central nervous system of the animal and eventually causes death (FSA, 2008). BSE develops in cattle, but it belongs to a family of prion diseases, several of which can affect humans. The most commonly known disease in this group among humans is Creutzfeldt-Jakob Disease (CJD) (FSA, 2008). In order to prevent the spread of CJD from cattle to humans, a ban was put on abbatoirs so that they could not slaughter animals older than 30 months for human up until 5 November 2005. This rule know as the Over Thirty Month rule was brought into affect after research showed that only cattle over 30 months old where suppectible to the disease. A BSE testing scheme was developed so that over 30 months cattle could be used in the food chain providing each animal tested negative for BSE. Each abbatoir must adhere to specific guidelines: • Slaughter Over 30 months animals separate from under 30 Months animals. Operate the Abbatoir in two Modes UTM or OTM. • Take a brain sample from each Over 30 month animal and have it tested for BSE by the approved FSA body assigned to test the samples. 2.2 Food Standards Agency The food standards agency is a government watchdog set up in 2000 to monitor food producers. The agency works with local authorities and DARD. They audit food law enforcement activities 11
    • carried out by DARD’s veterinary service in Northern Ireland. Although DARD are responsible for ensuring that meat plants adhere to food Law regulations, they report to the FSA. The FSA can audit any food business at any time and pick a finished product and ask for the traceability information for that product such as the animals that where used in it’s production, the animals life history, when it was slaughtered and de-boned. They can also request to see a list of customers that meat from a specific animal was sent to. Information on each animal begins when it is born; a farmer is required to register the birth of an animal within 27 days of birth. This information is entered into the APHIS system by either the Farmer direct on the RURAL NI website or by submitting an MC1 form by post to the DARD. The farmer will use the next indivdual animal number. He will then register the animal with the following information: • Herd Number • Farmer Name • Herd Address • Identification Number • Colour • Breed • Sex • Date of Birth • Dam (mother) Identification Number • Sire(father) Breed • Sire Identification Number, If known Two eartags will then be dispatched to the farmer at a cost with the animals indentificatin number on it.The breakdown of the tag is shown in Figure 1 below: Figure 1: DARD Ear Tag3 When a farmer moves an animal to another farm for sale, to the market,an abattoir or an animal dies they must report the movement or death within seven days to DARD. 3 http://www.dardni.gov.uk/index/animal-health/animal-identification-registration-movements/animal- movements-cattle/animal-movements-cattle-tracing.htm 12
    • 2.3 Department of Agriculture and Rural Development (N. Ireland) The Department of Agriculture and Rural Development (DARD) aims to promote sustainable economic growth and the development of the countryside in Northern Ireland. The Department assists the competitive development of the agri-food, fishing and forestry sectors of the Northern Ireland economy, having regard for the need of the consumers, the welfare of animals and the conservation and enhancement of the environment (DARD, 2008). Although the scope of DARD is a massive one, in a meat plant DARD are responsible for the health and welfare of animals, Meat inspection and the independant grading of animals which determines the price a farmer is paid for their animals, which is based on the confirmation of an animal and it’s fat content. DARD are also responsible for animal diesase control, so farms are monitored on a regular basis and information is gathered on farms and even movement restrictions are imposed on herds to stop the spread of disease. An animal brought to slaughter must be verified to be Fit to slaughter by DARD vetinarians who are on site at each meat plant. All these decisions are made based on the information that is available to both DARD vets and meat plant from the APHIS system. 2.4 Animal and Public Health Information System (APHIS) The APHIS system is key to the operation of any meat plant, if this system is offline for any reason then the meat plants in Northern Ireland cannot slaughter animals with out written consent from DARD. This action will only take affect after two hours down time of APHIS. This system is so critical because of the information is holds and all decisions based on whether an animal is fit for slaughter is based on this information. This system restricts the slaughter of animals based on the information held on that animal. APHIS is the first point in indentifying animals that enter a meat plant. The Farmer presents the written movement permit to the staff at the abattoir, they then key in the Farmers herd number and are presented with a full list of animal identification numbers in numerical order as shown in Figure 2. Figure 2: APHIS System 13
    • The operator selects the animals from the list on the screen that the farmer has written on the movement permit. And clicks the > button which will then populate the table to the right with the animal details. After all animals are selected the operator selects the OK Button and the animals are moved from the farmers herd to the Meat plant herd. Any animals that are not to be slaughtered or need the Vets attentions are highlighted in red on the screen along with the statuses of the animal that need attention, such as a Date of birth query, or a test that need to be carried out on the animal. The process then generates a printed list known as a Liarage list. This list is used when the animals are put into single file before they are stunned. Two operators then carry out a visual check on the animals, verifying the eartag ideintifer with that on the list. This check is critical, after this check the animal is slaughtered with 10 mins of this check and if the animal is wrongly identified and the animal is slaughtered then this is in violation of the legislation and could lead to prosecution or meat unfit for human consumption being processed and sent to a customer. In order to move an animal from the Meat plant herd to the abattoir and mark it as Dead, the operator applies a four digit kill number which is used by the meat plants on a cycle from 1 to 9999 and is made unique based on the combination of Kill number and date. The factory kill number is applied to each animal to verify that the checks have been carried out and this notifies the APHIS system that this animal has now been slaughtered. Another part of aphis used by meat plants is the ABNET download system. As soon as the kill number is applied to the animal a record is sent to to the meat plant web based download application. The record for each animal contains the following fields. Character Field Value Description Positions 1 Record Status Status of transferred animal, Unconfirmed, Confirmed, Removed, Moved Out, Amended (kill number), TSE Category modified 2 – 21 Animal Tag Number Animal number 22-31 Permit Number Number of movement document 32-36 Kill Number Kill number assigned to animal 37-44 Date of Birth Animals Date of Birth 45-47 Breed Animals breed 48-50 Colour Animals Colour 51 Sex Animals Sex Male or Female 52 FQAS Indicator Y indicates that animal is eligible for FQAS scheme. 53-60 Kill Date Date animal was killed 61 DBES Indicator Y indicate that animal is eligible for DBES scheme 62-81 Country of Origin Indicates country of origin. 82-84 Number of Farm move Number of farms that animal has moved through during it lifespan. 85-92 Move in date to previous herd Date of last move prior to move into abattoir. 93-96 Lifetime FQA Y indicates that animal has had FQ during it lifespan. 97-98 Late Movement Notification 99-100 No Movement Notification 101-102 Bad Movement Trace 103 TSE Sample Flag Y indicates animal selected for TSE sampling N indicates animal not selected 104-105 TSE Category Surveillance Category/Reason for test e.g. HH 106-108 Dam Breed Breed of animal’s dam 14
    • 109-111 Sire Breed Breed of animal’s sire 112-119 Date of last progeny DOB of animal’s most recent progeny 120 Over 24 month Flag Y indicates animal is over 24 months N indicates animal is under 24 months 121 Over 30 month Flag Y indicates animal is over 30 months N indicates animal is under 30 months 122 Over 48 month Flag Y indicates animal is over 48 months N indicates animal is under 48 months Figure 3: Record specification for the ABNET download 2.5 Animal Information gathered by Meat plants The information provided by APHIS is then matched to information gathered by the meat plant production system by kill number and date. The animals eartag is verified again on the kill Line at an Eartag checking terminal where an operator removes the eartag from the animal and types its ideintifcation number along with its kill no into a terminal, this terminal verfies that the killno and identification no match those downloaded from Aphis. The next step is for a BSE sample label to be printed at another terminal where a brain sample is taken and placed in a jar and a label with that animals details is placed on this jar. All the information on this label is taken from the infomration provided By aphis and includes: • Kill No • Animal Identification Number • Testing category (reason brain sample was taken) • Date of Birth • Kill Date • And a Barcode conating all of the above information so it can be scanned with a bracode reader at the labortary The next stage on the line is where the first piece of information is gathered, the carcass at this stage is spilt into two sides and are weighed on an overhead track scale and the weight of each side is recorded against the kill no. A grade is also applied at this stage, which is determined by a meat inspector from DARD’s veterinary service. There are two scales, a confirmation scale that determines the shape of the carcass and how much beef is on it and the second determines the fat content. The next piece of information is the sex of the animal. A label is then attached to each side of beef that can be inspected by any of the food authorities, the label conatins the following information: • Slaughtered In : EC abbattoir identifier number • Kill no: four digit factory identifier • Kill Date: Date of slaughter • Born In: Country animal was born in. • Reared in: the countries the animal was reared in • Sex: Bull, Steer, Hiefer Cow, see appendex of descriptions • Weight: side weight reading from scale • Grade: grade applied by the meat inspector. 15
    • This information is mainatined by production system and reports are generated for the factory personnel, DARD vetinary staff and other external bodies. This information gathered at the scale is also used to determine the price a farmer should be paid for each of their cattle, key factors that determine the price which is calculated as pence per kilo are Farm quality assured status, grade of carcass, country of origin. 16
    • 3 Radio Frequency Identification Radio-frequency identification (RFID) is an automatic identification method, relying on storing and remotely retrieving data using devices called RFID tags or transponders. The technology requires some extent of cooperation of an RFID reader and an RFID tag. (Wikipedia, 2008) 3.1 Uses of RFID technology RFID technology has been around for some time, but its real business application benefits are just now coming to life. RFID technology is based on Radar technology can can be traced back to world war II and was being used by the germans and japanese along with the americans and british. Scientists then carried out research that showed how Radio Frequency energy could be used to identify objects. The research carried on and was then developed over the decades for other uses that we know today (RFID Journal 2008) . RFID technology works on the basis similar to that of the barcode reading method, a tag holds a number or code that is a unqiue reference to that object depending on the standard used. The RFID tag or transponder contains a circuit that when interegated by the RFID reader transmits this number to the reader where it is interpreted by the system and called upon by the software system. It is a contactless technology just likes barcodes only the barcode must be visible to the reader, wheras RFID technology uses readio waves so a trasponder can be embedded into the object. RFID technology has such uses as: • Passports: with passports the RFID transponder contains the identity information of the passport holder not just a unique reference code. The passport can be scanned upon entry into a country at customs and the transponder can be updated to include information such as the entry and exits dates from countries. • Toll Roads: RFID readers can read informataion from the transponder at high speed, so it’s use in the collection of tolls is very useful. The toll bridge lanes are fitted with readers and each car has an tranponder fitted on the windscreen, when a car passes under the reader the unqiue id for that car is recorded, so a bill can later be send to the car owner, or if prepaid the cost of that toll will be reduced from the balance. • Proxy Cards: Cards such as employee ID and clocking cards use RFID technology where an employee will hold the card infront of a RFID reader and the unique number of that card will be transmitted to the reader and the software will then interpret this unique ID to an employee record on a database. • Stock Control and Supply Chain Management: using RFID tags on stock a company can track all the inventory that enters or leaves a warehouse by having an RFID reader at all entry and exit points, if a pallet of stock passes the RFID reader it can detect the qty of stock by the number of individual tags that it has just read. • Track and Trace: RFID technology can now be used to track objects within a certain area, if the object is moved the movement of the RFID tag is tracked by the carefully placed readers where a co-ordinates map is created. Similar to the way global positioning system works. • Electronic Artical survilence: This technology is known to most, as you walk out of a shop there are usually two antennas either side of you and on any products you buy a tag is attached that has a value of either true or false. False if the tags have not been paid for, meaning the sales assistant in the shop has not scanned it after the purchase or it has been stolen and true if the tag has been scanned. The desktop scanner basically changes the 17
    • value of the tag, so that the antenna and reader at the shop exit will alarm if any tags pass by it with a false value (RFID Journal 2008). 3.2 RFID Standards Everything we touch in our life is in some way governed by standards, whether they are actual standards, de-facto standards, or even just commonly agreed ideas (www.hightechaid.com, 2008). Due to the nature of the uses of RFID technology, many standards have emmerged that make the technology useful for those applications. Most of the developments in RFID technology are governed by the standards developed by the International Organization for Standardization. A standard is initiated when a stakeholder requests the need for a standard with ISO. RFID technology in the identification of animals are controlled by 3 standards and for this project they are the standards the hardware must meet, as they are the standards being used by the cattle eartag manuafcturers and are the standard recommended by technologist at DARD who are advising the meat plants on this technology and its implementation. 3.2.2 ISO 11785 This standard describes the protocols to be used between the transponder and readers. This protocol uses a low frequency and there are two protocols used for the communication between the transponder and the reader • HDX: Know as half duplex because when the reader is sending out a signal, the tag builds up it energy and when the reader then stops and the tag sends its response. Figure 4: Diagram of the transmission between Reader and HDX tag4 4 http://www.ti.com/rfid/shtml/news-releases-06-30-08.shtml 18
    • • FDX or FDX – B: know as full duplex at the transponder response to the reader while the reader continues to transmit. Figure 5: Diagram of transmission between Reader and FDX tag5 The table below shows the protocols used to communicate between the reader and transponder: Full Duplex (FDX or FDX- Half Duplex Protocol B) (HDX) Modulation ASK FSK Frequency 129-133.2 kHz 124.2 kHz=1 135.2-139.4 kHz 134.2 kHz=0 Differential Biphase Channel code (DBP) none Symbol time 0.23845 ms 0.1288 ms 1 0.1192 ms 0 Telegram (bit) 128 112 Figure 6 : Protocols used to communicate between transponder and Reader6 5 http://www.ti.com/rfid/shtml/news-releases-06-30-08.shtml 6 http://www.ti.com/rfid/shtml/news-releases-06-30-08.shtml 19
    • 3.2.2 ISO 11784 This standard describes how the code stored on the transponder or tag is to be built up in conformance to the ISO 11785 standard. The codes are described below: • First 3 digits are the tag manufacturers code Depending on the type of tag or the protocol used the remaining code is for each type is described below: Telegram layout: HDX • 8 Startbits 01111110, • 1 Animal-No animal indicator, • 14 'Reserved for future use'bits, • 1 Extra data indicator bit, • 10 Country code according to ISO 3166, • 38 ID bits, • 16 CCITT CRC over the previous 64 bits, • 24 Application bits, FDX • 11 Startbits 00000000001, • 38 ID bits, • 10 Country code according to ISO 3166, • 1 Extra application bits, • 15 Reserved bits, • 1 Animal bit, • 18 CCITT CRC over the previous bits, with the 9th and the 18th bit of the CRC set to 1, • 24 Application bits (Wikipedia, 2008) 3.3.2 ISO 14223/1 This Standard specifies the structure of the radio frequency code for advanced transponders for animals. The technical concept of advanced transponders for animal identification described is based upon the principle of radio frequency identification and is an extension of the standards ISO 11784 and ISO 11785. This part of the standard describes the air interface between transceiver and advanced transponder. 20
    • 3.3 RFID Technology in Livestock Identification Cattle indentification has become more crtical in recent times to control the spread of disease between animals. Australia was the first counrty to embrace electronic cattle identification, due to the demands on traceability from the counties who imported their beef. The facts below show the importance of tracking the beef: • Each year, Australian's eat an estimated 36.2 kg of beef per person. • Australia currently exports over 65 per cent of its total beef production. • Australia is free of diseases such as BSE and FMD and has strict quarantine proposals designed to ensure that our disease-free status is maintained. • The value of Australia's total beef exports in 2004-05 was approximately A$4.9 billion. • The value of Australia's total live cattle exports in 2004-05 was approximately A$464 million. (Austrialian Government, 2008) When the export business is this big they must ensure confidence in their products, and electronic indentification helps do this. This also appllies to the meat industry in Northern Ireland, as retail companies and consumers alike have the knowledge that the beef they are getting is fully traceable and companies are prepared to implement such systems to ensure that the quality is monitored and maintained both at the meat plant but also from their suppliers. RFID technology in livestock identification is also being embraced by some farmers who find that it helps they get the top price for their animals, one such sheep farmer I know from County Down has a full RFID system that integrates with a weighing scale, he can monitor the amount of feed each lamb gets and he can track the weight as often as he wants. The lamb industry usually only pays for lambs upto certain weight so this farmer knows exactly when these animals are ready and with the drafting system he has, a lamb steps on to a scale, gets weighed and identified, and if the weight is correct the lamb is directed into one pen which is all the sheep to to slaughter, and if now he is redirected into another pen and put back out to graze. 3.3.1 RFID Tags RFID tags come in two varieties: • Active tags contain their own power source which gives then a long read range. It also give the ability to store more data as then can have a high memory store. There battery life is usually about 10 years are they operate very well in harsh environments. This makes them more expensive. (rfident.org, 2008) • Passive: these tags have no internal power and get there energy from the radio waves transmitted by the reader. Because the tags have no power supply it makes them small and thin. Depending on the power of the reader these tags can be activated anywhere from 10 millimetres to 6 metres. To keep costs down for farmers the main type of tag used is the passive tag. (rfident.org, 2008) 21
    • With identification of cattle as described with the standards in section 3.2 of this document there are two protocols used, being HDX and FDX. So within Northern Ireland a farmer has choice of any of these two. This decision will again must likely be made on the cost of the tag, unless the farmer decides to use the tags as part on a farm or cattle management system for themselves. Due to this fact the meat plants have to have the facilities to accept both types of tags. The RFID enabled eartag come in a number of styles as described below • Button and Leaf where the RFID circuit is contained within the button tag and the leaf tag is a visual tag for the farmer to use with out the need for an RFID reader Figure 7 : Button and Leaf RFID tag and internal circuit7 The microchip in figure 7 is where the unique ID number of the tag is stored and it will contain a 15 digit alphanumeric code that will be read in hexadecimal format to reference the information store on the aphis system • Bolus is an RFID Tag embedded into a ceramic casing and place internally into the intestine of the animal Figure 8: Bolus RFID tag8 For our application the farmers have been recommended to buy only the Leaf and button type tags. 3.3.2 RFID Reading System The RFID reading system is required to read the tags that will be supplied to the farmers must meet the hardware specification as described in section 4.5 of this document as per the recommendation from DARD. Cattle RFID reader systems can be categorised into two types: 7 (www.eidap.com/cattle_tag.asp) 8 (www.eidap.com/cattle_tag.asp) 22
    • 3.2.2.1 Fixed reader system: A Fixed reader system comprised of the main reader unit and usually two antennae one placed on each side of the cattle race as per figure 8. The reader is the small unit attached to the top of the large panel which is the antenna. The antenna is used to transmit the signal to the tag and to receive the data returned by the tag. Most of the readers on the market can either store the identifications number internally to be download to a computer at a later stage or can be send via a serial cable to the rs232 comport on a pc as they are read. Figure 9 Fixed RFID Eartag Reader9 3.2.2.2 Portable Readers Portable readers were developed mainly for farmers to go out in the field and scan there cattle as they graze. If this reader is complimented with a cattle management software application and a mobile PDA device is can be a very useful tool for the farmer in terms of tracking his animals and for developing them for finishing. The portable reader is waved over the eartag of the animal and gives a reach of 12cm form the end of the reader for health and safety reasons. Most Portable readers store the identification number internally but they can be sent wirelessly via Bluetooth or via a serial cable attached to a PC or a PDA device. Figure 10 Portable RFID Eartag Reader10 9 http://www.powerhousemuseum.com/hsc/refugee/img/traceback_3.jpg 10 http://www.cohera-tech.com.au/product_agriculture_124.jpeg 23
    • 3.4 Issues with using RFID technology for identification of Animals • Radio signals can be blocked by materials such as metal etc. • Metal structures touching or near the antenna can distort the signal as they become part of the antenna • Due to the fact that the readers have to read in both Duplex and half duplex modes this lowers the read capability due to the fact that it has less time to collect the data from the tag • Only one tag can be read at time, a collision occurs when two tags are in the magnetic field at the same time, which will most likely result in a misread. • The low frequency used for the animal identification makes it susceptible to noise and interference from electrical components such as wiring and running water. This makes it difficult to setup in such a harsh environment that has to be hosed down regularly like the lairage of a meat plant. • The choice of equipment is critical and live testing must be carried out to determine the noise level around the place of the reader so the reader can be adjusted to operate in the maximum capacity. 24
    • 4 Software Requirements Specification The purpose of this section is to clearly define the Animal Electronic identification system that will be used by the Foyle Food Group within its Foyle and Omagh plants. It will describe the system for the purposes of the Lairage operators to receive animals with EID tags. The Requirement analysis was conducted in a meeting with the Factory directors, factory managers, cattle procurement managers and lairage operators where we discussed the webservices being provided by DARD on the APHIS system and whether they meet our needs, I proposed an initial system of two fixed RFID readers but after discussion the requirements discussed in the following sections is what was deemed to be the best solution for the tow factory both Omagh Meats and Foyle Meats. Appendix J shows the presentation given at this meeting. 4.2 Logical Diagrams 4.2.1 Current Work Flow Diagram The following Diagram shows the current process of receiving live animals. Lairage Intake of Animals :: Before EID New Operator Farmer DARD Lairage Operators (DARD Replacement) DARD Enter MC 2 document on to E-MPL Farmer presents system MC2 document Animals Moved To Lairage Lairage List Animals printed off UnLoaded Animals Placed in Pens until ready for Slaughter Checks carried out as per Cattle Moved to Liarage List and E-MPL Clipping Pen system updated Cattle Moved to Kill Line Chute Kill No Applied Cattle Posted To Final Checks carried out Scanplant system and Sex Updated Kill No’s entered onto E- MPL Animals Moved to Kill Line and Declared as DEAD on APHIS 25
    • 4.2 Proposed Work Flow Diagram The following Diagram shows the proposed process of receiving live animals with EID. Lairage Intake of Animals:: With Two Readers: Entry of Liarage & Mobile Reader @ Kill Chute DARD Farmer RFID Reader Lairage Operators Farmer presents MC 2 document Or Has Created n E-Permit Night Before Animals Scanned and Automatically Animals Animals Moved to Liarage Confirmed on UnLoaded on the E -MPL E-MPL Systems Lairage List sent to Printer Animals Placed in Pens until ready for Slaughter Checks carried out as Cattle Moved per Liarage List and to Clipping E-MPL system Pen updated Cattle Moved to Kill Line Chute MOBILE PDA READER:: Animal Scanned By PDA reader Finals Checks Final Checks carried required are displayed on out screen including Animal Information required for MOBILE PDA final checks READER:: Kill No Applied to animal and entered along with sex of animal on PDA Middleware sends Kill No to Aphis marking the Animal as Dead and Moved to the Kill Line, Middleware also moves animals to the Kill Line on Scanplant Production system. 26
    • 4.3 System Description 4.3.1 Presenting animals at Lairage The reception of live animals consists of two moves on the Aphis system, the first move is the movement of animals from the herd to the Lairage, the second being the movement from the Lairage to the abattoir where the animal is marked as DEAD on the APHIS system. The sections following describe this process in more detail. When the animals are unloaded from the trailer they pass a fixed RFID reader, an application running will receive each of the identification numbers from the RFID reader, each of these numbers will be passed to the APHIS system using a web service supplied by DARD. The web service will accept one number at a time and return the following information • Animal Eartag • Colour • Breed • Sex • DOB • Current statuses • Current Herd No. (This should match the no of the farmer that has brought them to the factory) If the animal’s details cannot be found on APHIS an error will be returned. The web service at this stage will create an Electronic version of the MC2 document (see Appendix B for the paper version of this document) as the numbers are passed to the web service, or if they were placed on an electronic document by the farmer previous to delivery then they will be checked off against this document. If animals do not have electronic tags the ear tags will have to be manually entered onto the E-MPL system or can be scanned if their passports have a barcode. If an animal arrives that is not on a previously created electronic movement document then this animal will be added to a new permit as more than likely this animal will be accepted. 4.3.2 Confirmation into the Lairage E_MPL is the only method for confirming all animals into the Lairage, irrespective of whether or not the animals are EID tagged. The user will log into the E-MPL web application select the “Move into Lairage” Option and enters the movement document the list of animals will be displayed, a column on the screen will show each of the cattle that have been read by the fixed RFID, it will also show animals that have been placed on an previously created electronic document by the farmer that have not been read by the RFID reader, in the case that he has selected an animal but has not brought it to the factory. These animals can be removed from the permit on the E-MPL system. The Lairage operator must then confirm all the animals and print off the Lairage list for the vets for any animal’s statuses that need to be checked. 27
    • 4.3.3 Movement into the abattoir At this stage animals are in a single line chute usually in a group of up-to 12, the operator will have a PDA with an RFID reader (be it an SD Card or a Bluetooth wand reader) and because they are within reach of the animal’s eartag it should be easily scanned. The PDA will be running an application that will receive the EID number return the animals details for final visual checks then the operator will enter the Kill No that has been applied to the animal, the application will then send this Kill no to a second web-service that will check that the animal was previously moved into the Lairage, and that any Statuses that needed attention have been checked off and cleared. If this is successful then the animal will be marked as DEAD on the APHIS system and Final animal details will be returned to the PDA application to alert the operator that this was accepted. The application will also move the animals to the Kill Line on the Scanplant Production system with user interaction. 4.4 Requirements 4.4.1 Functional Requirements 4.4.1.1 Register a V Movement document (Permit) When a farmer arrives at the Lairage with animals he will be required to provide his Herd No and a Permit Number and this will be entered into the application on the PC at the front of the Lairage. (Optional: This can be done by typing in the herd no and permit number or we can issue cards with a magnetic stripe that stores that farmers herd number so the farmer could swipe this card and then enter his permit number. This would be useful for farmers delivering cattle when the Lairage operators are not available.) The application will register this document with APHIS and will acknowledge if this was successful or not with a message on the screen. The system will return an error if the document does not match ones issues to that herd no, if it has been previously used on a different day, or has been marked as LOST by APHIS. 4.4.1.2 Adding Animals to Movement Documents After the V or E document has been registered, a prompt will be given to allow the animals begin to pass the readers, as each animal passes the reader its RFID tag will be read and the identifier will be passed to APHIS one at time. Animals will be added to the V or E permit, but cannot be added to a Movement License S document or a move out of Market document M. As each animal passes the reader a list of the animals will be generated on screen with the information returned by Aphis such as: • Permit No • Success Flag • EID TAG identifier • Animal Eartag Number The screen will display a count of the animals that have been read and the operator must verify that the no of cattle match this, as the animals cannot be brought back to be re-read at this stage 28
    • they must be added manually to the permit using the APHIS E-MPL (electronic meat plant Lairage) web application. A list of animals that where not added to the Movement document but where read by the RFID reader will be displayed on screen. These must be verified and fixed using the E-MPL application. These would include animals that are currently not registered into the HERD number that was used, for example recently purchased but not registered. 4.4.1.3 Automatically move animals into Lairage Herd After the animals are read by the RFID reader and added to the Movement document as detailed in section 4.4.1.2. The operator must verify that he wants to confirm the movement of the successful animals into the Lairage herd. When the Operator confirms that Information is OK he will hit the Confirm into Lairage Button and the application will move the animals into the Lairage herd on APHIS. The application will then confirm that the animals have been moved into the Lairage herd. The list below shows they rules for Movement to Lairage An animal falls into one of four categories when moving to lairage/abattoir: 1. It is banned to move to the lairage and therefore cannot move to the abattoir e.g. o Herd has CII, ENF, ACHVE or an L&R banned status o Animal has an L&R banned status 2. It is allowed to move to the lairage but is banned from moving on to the abattoir e.g. o Animal born before August 1996 o Animal has a status which makes it ineligible for slaughter e.g. BSEJ, BSER etc. 3. It is allowed to move to the lairage and on to the abattoir but requires VO authorisation e.g. o A licence is required to move the animal to the lairage 4. It is allowed to move to the lairage and on to the abattoir and VO authorisation has either been received or is not actually required. Information messages may still be returned to the user but the move will have taken place e.g. o Animal not confirmed by buyer and therefore has had NMN applied The Normal Lairage list will then be available from E-MPL application. However the Lairage application will provide the following reports • Showing animals that are ready for Abattoir • Showing animals that are Band from Moving to abattoir • Showing animals that require VO authorization • Showing animals that are banned from moving to Lairage • Animals that have been read but have not moved into Lairage such as wrong herd etc. The system will be capable of emailing the VO for animals that require their authorization as soon at they are confirmed into the Lairage. A pager system could also be put into place if required, or a text to mobile phone 29
    • 4.4.1.4 Assign Kill No and confirm into Abattoir A Handheld reader with a PDA device running an application developed in-house will be used to apply the Kill no to each animal and confirm it into he abattoir herd on aphis. This process will also integrate with the Scanplant Kill line Lairage ROLA application; so that it will place the animals onto the Kill line as it gets confirmed. This is currently a manual process that is required by the Lairage operators. 1. The operator will scan the electronic ear tag of the animal with the handheld reader. 2. The animal details such as ear tag number, any statuses will be displayed on the screen of the PDA. 3. If the animal is OK to proceed to abattoir, a visual check of the on screen animal ear tag and the physical animal ear tag must be carried 4. To confirm this, the operator will key in the Kill no of this animal and hit the move to Abattoir button which will then move the animal to the abattoir herd on the Aphis system. 5. A Message will be displayed on the screen to acknowledge whether the move was successful and if not why not. 4.4.1.5 Non EID tagged animals If an animal arrives at the lairage that does not have an EID tag, internal procedures will need to be put in place to process the animal, such as temporarily tagging the animal through the lairage. It is not within the scope of this project to deal with animals not EID tagged or linking the APHIS animal number to a new EID number. 4.4.1.6 Imports for Direct Slaughter Animals that are imported into Northern Ireland will be registered on APHIS at the port of arrival. These animals will then be placed on a licence to move them from the port to the place of slaughter. Therefore there is no further enhancement necessary within the scope of this project to confirm these animals into the lairage herd, as procedures already described in this document will be used to confirm the animals into the lairage. E-MPL is being modified by DARD to allow the lairage operators to scan passports directly into E_MPL. This will reduce typing errors. Normal checks will still be required for these animals. 4.4.2 Non-Functional 4.4.2.1 Usability Both Lairage entrance application and the PDA application should be simple to use with clear messaging of information. 30
    • 4.4.2.2 Scalability This application will be developed for both Omagh Meats and Foyle Meats. It is intended for use by Lairage staff and maybe farmers for the first reader when the operators are not available. This system will be designed so that it can be expanded in the future. 4.5 Hardware Requirements The sections below describe the hardware specification required for this system, which includes the standards required for the harsh environment and conditions under which the system must operate. NOTE: Prior to installation of any equipment into our site, a site survey is to be conducted to ascertain the extent of the work required. 4.5.1 Fixed RFID Reader at the entrance to the Lairage The technical descriptions below are a Minimum standard for the fixed RFID reader at the entrance to the Lairage. • Antenna and Readers must be ISO 11785 compliant and must be able to read both FDX(B) and HDX RFID devices • Readers and Antenna must have an IP Rating of IP65 • Antenna and readers must be constructed of material that will survive harsh environments • The reader must be able to recover the whole code from the transponder and pass the required data to the controlling PC in hexadecimal format. • The supplier is to provide reliable and robust communications from the antenna to the reader and from the reader to the controlling PC. • The antenna and reader configuration must be able to read 100% of all electronic tags passing the antenna with in a width of up-to 1.2 meters. • The reader must have EC type approval (i.e. CE Marked) • Have been tested and passed EMC compliance in accordance with ETSI 300 330-2 • The manufacturer must manufacture to a quality assurance procedure – ISO 9001 – 2000 or equivalent. • The reader must be equipped with audio and visual warning tone/lights to shows its operation and to signify a tag read. • The reader must be able to be synchronized with readers from the same manufacturer. • The reader and antenna must be installed using anti shock materials and connectors resistant to dust and humidity • Military cabling, connectors and armoured conduit is to be used to ensure robustness installation. • The hardware must come with a software development Kit (SDK) so that FFG can develop the middleware between the Reader and the APHIS web service. • FFG will provide PC’s, UPSs, electric power, networking to the PC and the Software interface to the APHIS system. 31
    • • The supplier will produce training and Skills transfer document and any training required to operate the system. • FFG will carry out the final acceptance testing before sign off and acceptance. 4.5.2 Portable Hardware This reader may be a PDA with a built in RFID reader that reads ISO 11785 standard tags, or maybe a handheld readerWand with Bluetooth that can be connected to a PDA. FFG can purchase the PDA separately if a wand reader is the chosen portable reader. The technical descriptions below are a Minimum standard for the portable RFID reader at the single file chute to the abattoir: • Hand held readers must be ISO 11785 compliant and must be able to read both FDX (B) and HDX RFID devices. • Must have and IP rating of IP55 or greater • Survive a drop of 1 meter onto concrete • Have been tested and passed EMC compliance in accordance with ETSI 300 330-2 • Have read range of 26cm for both FDX (B) and HDX RFID devices, or be able to reach tags at arms length safely over cattle (extended wand) in the case of a Built in RFID reader. • Have EC Type approval (i.e. CE marked) • Manufactured to quality assurance procedure ISO 9001-2000. The minimum specification for the PDA devices is: • Minimum Windows Mobile® 5.0 • Survive a drop of 1 meter onto concrete • Must have and IP rating of IP55 or greater • 520MHz process speed • Minimum of 128mb RAM • Integrated Bluetooth or 9-pin RS-232 serial connector • Integrated WLAN 802.11b/g • 320 x 240 pixel (1.4 VGA) • TFT Touch screen, Front light • Table Cradle with charger • Pistol Grip • Full numeric keyboard, navigation and function keys • Integrated laser bar code scanner 32
    • 5 System Design The purpose of this section is to detail the design for the Electronic identification of Cattle as they enter the factory. The document should illustrate user-interfaces and describe the process flow within the application, also, describing back-end processes where appropriate. Interactions with the database are also described, including the design of any new or modified database objects. The lairage EID fixed reader application will allow farmers to register their movement document before animals pass the reader to record the movements. A farmer will enter their Herd number using the numeric keypad on the touch screen terminal next to the EID readers. The system will verify the herd number using the webservices available against the movement document to ensure it belongs to that herd and has not been used previously. If the verification of the movement document is successful the farmer will be notified by an on screen prompt and he will then hit a button to begin the scanning of the animals using the readers as they walk off the lorry. The system will display the animal’s details as they are read and register them as entered into the lairage on the aphis system. On the screen the system will colour code each animal based on the status details returned from Aphis via the webservices. I.e. Green if animal is ready for slaughter, Red if the animals require further checks before slaughter. The system will also show the total number of animals read by the EID reader to highlight any animals that may have been missed due to a missed read or a faulty RFID tag. In the event of any animals being missed by the RFID reader, the lairage operators will then have to register these animals manually using DARD’s E-MPL application. The next stage in process it to register the animal’s movement into the abattoir and mark them as dead on the aphis system. This will be done using the PDA and the handheld RFID readers. The animals are lined up in single file in the chute and each one will be scanned and the lairage operator will enter a four digit kill number unique for that day for that animal and the Sex of the animal will also be recorded. 33
    • 5.1 Use Case Diagrams Fixed Reader EID System Verify Document Against Herd No Start EID Reading «uses» Farmer Process Register Animals Into Lairage APHIS Stop EID Reading Process Figure 11: Fixed Reader Use Case Mobile Reader EID System Scan Animal «uses» Verify Animal is In Lairage APHIS Lairage Operator Enter Kill No and «uses» Sex Register Animals Movement to abattoir Figure 12: Mobile Reader Use Case 34
    • 5.2 Use Case Decriptions Use Case Name Verify Document Against Herd No Scenario Verify that the Document no is assigned to that herd Trigger Farmer enters herd No and MC2 movement document at the terminal Brief Descriptions A farmer will arrive with a load of animals, he will go to the touch screen terminal enter in his Herd No and His MC2 movement document No Actors Farmer, System Related Use Cases None Pre-Conditions Farmer Must have a MC2 document that is assigned to his Herd By DARD Post Conditions None Flow Of Events Actor System 1. Farmer goes to terminal and enters Herd Number and Document No using the touch screen Key pad 2. System Validates the Herd No Against the Document No and Registers the Movement document on APHIS using the WS_MeatRegisterVDoc web service 3. System Acknowledges to Farmer if the Validation is successful or Not. Exception Conditions 1. If the Document Number is not assigned to that Herd Number on APHIS a message is displayed on screen. The farmer will not be able to scan any animals until a valid document number has been presented. 2. A document can only be used on One day; if the document has been previously used then a message will be displayed on screen. The farmer will not be able to scan any animals until a valid document number has been presented. 35
    • Use Case Name Start EID Reading Process Scenario start the system to begin reading information from the RFID reader Trigger Farmer Hits the Scan Animals button on the terminal Brief Descriptions The farmer is ready to start scanning animals using the RFID reader Actors Farmer, System Related Use Cases Register Animals Into Lairage Pre-Conditions Farmer Must have a MC2 document verified All Animals that pass the RFID reader but be registered with APHIS and stored Post Conditions in a local Database Flow Of Events Actor System 1. Farmer Hits button to start Scanning animals 2. Software opens Com Port to RFID reader 3. Accept one tag at a time and start a thread to call the web service 4. Repeat event 3 Exception Conditions 1. A bad read from a tag, where the unique number is not in the correct format, Notify the user on screen after the all the other animals have been scanned. 2. If there is No response from reader after Port is notify the user as soon as possible before the animals start to pass the reader. 36
    • Use Case Name Register Animals Into Lairage Scenario Register the animal on APHIS system Trigger A new thread is started by the system with a ID from an RFID tag Brief Descriptions The system will initiate this new thread when a Tag is read by the reader, and the unique number will be passed to APHIS via the web service WS_MeatAddToMovementNot. And WS_MeatConfirmMove Actors System Related Use Cases Start EID Reading Process A number in the correct format must be passed to the thread to begin the Pre-Conditions process DARD webservices but be online and working Post Conditions None Flow Of Events Actor System 1.New Thread started after a cattle ID number is passed 2.Webservice called and Cattle ID number passed 3.Response accepted from web service with notification as to whether registration was successful 4. Colour Animal row on the screen dependant on the status of the animal and the status of the registration. I.e. if the Animal requires checks from the VET colour it red. 5. Save animals details returned from web service to local database. Exception Conditions 1. If the DARD webservice is down, record the ID numbers and store them within the local database so the user can register them later when the webservices are back on line. 37
    • Use Case Name Scan Animal Scenario Accept ID from Handheld RFID scanner The Lairage Operator Hits the scan animal button on the PDA screen and scans Trigger an animal eartag with the handheld reader Brief Descriptions The system will initiate this new thread when a Tag is read by the reader, and the unique number will be checked in the local database to make sure it was previously registered into the Lairage Actors Lairage Operator, PDA System Related Use Cases Verify Animal is in Lairage The Bluetooth connection between the Handheld reader and the PDA must be Pre-Conditions established. DARD webservices but be online and working Post Conditions None Flow Of Events Actor System 1. User hits the scan animal button on the PDA then Scans the Animal with the handheld reader. 2. open com port and accepts ID number 3. Check the ID in the Local database to see if the animal has been previously registered into the lairage 4. Return animals details to the screen if found in the local database Exception Conditions 1. If the Animals is not in the local database, notify the user on the PDA screen to get check it out on the E-mpl system. 38
    • Use Case Name Enter Kill No and Sex of animal Scenario Record Kill No and sex of animal. Trigger The user enters the unique Kill no for the animal and the sex of the animal Brief Descriptions The system records the Kill No and sex of the animal to be passed to APHIS Actors Lairage Operator, PDA System Related Use Cases Register Animals movement to Abattoir The animal must be previously registered in the Lairage as per the Verify Pre-Conditions Animal is in Lairage Post Conditions None Flow Of Events Actor System 1. User enters the unique Kill no for this animal and selects the sex of the animal on the drop down list 2. The animals Kill no and Sex are recorded to the local Database Exception Conditions 1. If the animal was never registered into the lairage then this process cannot be done. 39
    • Use Case Name Register Animals movement to Abattoir Register the animal as dead on the APHIS system by passing its Kill no to Scenario the WS_MeatAssignKillNo web service Trigger The user enters the unique Kill no for the animal and the sex of the animal Brief Descriptions The system records the Kill No and sex of the animal to be passed to APHIS web service WS_MeatAssignKillNo Actors PDA System Related Use Cases Enter Kill No and Sex of animal Pre-Conditions The lairage operator must have assigned a Kill No to the animal Post Conditions None Flow Of Events Actor System 1. the system calls the WS_MeatAssignKillNo Web service passing it the Kill Number of the animal along with the RFID tag passed previously by the handheld RFID reader 4.Response accepted from web service with notification as to whether registration was successful Exception Conditions 1. If the animal’s movement to the abattoir was not successful the system will notify the user on screen with the reason why. The animal may need to be put to the side until the issue is resolved. 40
    • 5.3 Class Diagram Animal -EIDTag -AnimalTagNUmber -HerdNo -Herd Surname -PermitNumber -KillNumber -Sex -Colour -MoveDate -CurrentLocation -Breed Status -Sex Has -StatusCode -DateOfBirth -Description -RequiredAction +MovetoLairage() +MovetoAbattoir() 1 0..* +RecordAnimalStatus() +VerifyINLairage() +RecordAnimalDetails() +GetAnimalDetails() -UpdateAnimalToDB() -AddAnimalToDB() +GetNextBatchNo() +GetAnimalDataGrid() -RegVDoc() -AddToMovementDoc() -ConfirmIntoLairage() -GetAphisAnimalInfo () 41
    • 5.4 Data Design 5.4.1 Data Requirements The system will have a small database used to record the information passed back by the webservices when registering the movements. This will be mainly used for the tracing of the animals in and out of the lairage. The main production system which has an extensive database that uses the ABNET download information. This information is required for processing the animals in the abattoir. All this information is not required in the lairage for the identification of the animals. 5.4.2 Entity Relationship Diagram tblEidAnimal tblStatuses PK EIDNo PK AnimalTagNo FK1 AnimalTagNo PK Status PermitNo MoveDate BatchNo Colour Breed Sex DOB Status KillNo 42
    • 6 Hardware Selection As with any business purchase it is usually necessary to get three quotes. Not only was the target to get value for money but also to get a system was easy to implement and maintain. The system had to meet specific standards as per the tags that would be supplied from the Tag manufactures. Below are the criteria I selected that the RFID system must have in order to meet the system requirements: • Animals need to be Single File: This criterion was used to measure if the animals have to be in single file as they are being read, or if the systems be evaluated can read multiple animals at the same time. After investigating all the systems we did not of them could read multiple animals at the same time, due to the ISO standards being used. This would have saved us having to modify the building to read the animals as they get unloaded off the trailer. • ISO 11785/ 11786: The tags being supplied to the Farmer are of this ISO standard so the system must be capable of reading tag manufactured to this standard. • HDX/ FDX readable: They system must be capable of reading both of these types of ear tags. These two types are available to the farmers from suppliers so we are bound to accept both types. • 12 Month Warranty: This is an option that is standard with must products but we must make sure the system is reliable. • Back up Battery Pack: this option gives us the opportunity to continue reading animals even if we have a power outage. • Self Tuning from Noise Interference: One of the main problems with RFID readers is that they are very susceptible to noise interference, and there is no one on site that is an electronics engineer, it was important that the system can tune out any noise interference on its own. • Fix Reader Read Range: this is the maximum distance that an RFID tag can be read away from the antenna of the fixed reader. • IP Rating for Fixed Readers: this is the Waterproof and dust rating for the fixed reader, because of the environment in which they are operators it was recommended that they be at least IP65 rated, which means it is totally protected from dust and Protected against strong jets of water. • Serial communication: The requirement for the communication between the PC and the RFID readers is too use the com ports so it must be capable of serial communication. • Audio and Visual Warnings: The system must be capable of both audio and visual warnings to alert the user as each tag is read, as the environment is noisy a visual alert is required.. • Local technical support: In the event that something does go wrong with the readers, we need to be sure that technical support is available, as we have the IT technical team on site, we need to be sure that if something more complicated goes wrong that cannot be instructed over the phone that technical support is available to come on site and resolve the issue. • Mobile Readers Read Range: this is the maximum distance at which the user must hold the handheld reader away from a RFID eartag and still get a reading. 43
    • 3 cattle EID system where investigated against the chosen criteria above, the table below shows how they compare to that criteria: Criteria Dalton ATL Shearwell Animals Need to be single File HDX FDX Readable 12 Month Warranty Back up Battery Pack Self tuning from Noise interference AllFlex Readers from another Mobile Readers Read range 15cm supplier 30 cms Fixed readers Range 150 cm 120cm 130 cm IP rating for Fixed Readers 67 65 64 Serial Communication ISO 11785 / 11786 Audio and Visual Warnings Partnership to be setup with local Local Support company Figure 13: EID system Comparison Gallagher EID system (Supplied By Dalton Ltd)11: The Gallagher reader system is widely used in Australia and is an off the shelf product, easy to setup and install. ATL Cattle EID system12: ATL specialise in milking parlour EID systems, not specifically suitable foe the abattoir. ATL design and manufacture all their own EID readers but where unable to deliver a system that can read both HDX and FDX tags, so it was immediately deemed unsuitable for our application. Shearwell EID system13: Shearwell data systems begin working this technology back in 1990, they are very knowledgeable in this area and provide EID system for all types of farm animals, and unfortunately their EID system did not meet some of the minimum specification requirements for the tasks we required. As a result of this investigation, we decided that the Gallagher EID system from Dalton met our requirements, but as this is a new type of implementation for this type of product we asked Dalton to come on site and carry out a live demo of their system with Cattle which they did. The demonstration proved successful. 11 http://www.dalton.co.uk/co.uk/products/pages_pr/electron/e_anten.htm 12 http://www.agricultural-technology.co.uk/autoid/walkthrough_autoid.php 13 http://www.shearwell.co.uk/electronicID/equipment.aspx 44
    • 7 Implementation 7.1 Fixed Reader System The fixed reader system will be developed in Visual Basic .NET 3.5, using MS Visual Studio 2008. The system will be a client-Server based system, the client will run a front end application that will interface to the Aphis webserver running webservices and a Local database server running sqlserver 2005 with a local Animal Database that will store the animal information returned from the APHIS webservices. The cleint application will be run on a touchscreen PC with MS Windows XP, it will be connetcted the the selected Dalton RFID Animal Identification system as described in section 6 of this document, via a RS232 serial comunications cable. 7.1.1 Fixed Reader Acrhitecture Diagram Figure 14 below shows an architectrure diagram showing how the system is setup as desribed in section 6.1 Touch Screen Workstation Aphis Animal Database RFID Animal APHIS Tag Reader WebServer Animal Identification System Local Aphis Webserver Interface to RFID Animal Redaer Database WebServices Interface to Aphis WebServices Local Database Server Store Returned Animal Details Figure 14: Fixed Reader Architecture Diagram 45
    • 7.1.2 Menu Screen The first screen on the system is a menu screen, this screen gives the user control over the system without the need for a systems administrator, and some options on the screen are password protected so that only users trained in those functions are given access to them. The menu options are: • Read Animals: this option is used to register movement documents against a herd number and to read animals using the RFID animal identification system and register them into the lairage on the APHIS system using the available webservices. • Non Confirmed Animals: This option is used as contingency in the case that internet access on that site goes down. The farmers can still enter their herd number and movement document number; the system will then read each of the animal RFID tags and store the electronic identification in the local Database. A user can later go into this menu option and view a list of the animals read by the RFID identification system but not yet registered on the aphis system. They can now select the option to process the animals now via the web services and register them into the lairage. • Test Mode: This option allows the users to test the application and PC communication with the RFID reader. This lets the user select different serial port setting and by passing RFID tags pas the RFID reader, the user can see if the communication is working properly. This option works without registering animals via the webservices. • Exit: This option exits out the application back to the windows application. The figure 15 below shows what the screen looks like: Figure 15: Menu Screen 46
    • 7.1.3 Register Movement Document The first step in using the system is for a user to enter a Herd Number and a Movement document number that has the list of the animals. The user will select the Read Animals option on the menu and will then be presented with a screen with a keypad that has all 10 number digits and keys V and E which are the first characters that different types of documents start with i.e. V is the first digit in the serial number of a paper based movement document, whereas the E is the first digit of an electronic movement document. The key pad has also a backspace key and a Delete key. The limited number of keys will help eliminate any mis-keying by the user. The keys on the screen are big enough for large fingers to press, and are clear and visible as there may be some older farmers using this system who may have poor eye sight. The screen has two text boxes one for the herd number and one for the movement document number. The Herd number text box gets the focus when the screen is first loaded so the farmer begins by entering their herd number directly using the keypad. After six digits are entered into the Herd Number text box, the focus on the screen automatically moves to the movement document text box as all herd numbers are six Digits in length, although the user can set the focus back on any text box by tapping it on the screen and using the del or backspace keys to manipulate the text within if they need to change it. The screen shot below shows how the farmer enters the details required: Figure 16: Register Permit Entry Screen 47
    • After the movement document number has been entered the user then hits the Scan animals, at this stage an object of the Herd class type is instantiated and the herd number and Movement document are passed to the RegisterMovementDocument method which calls the WS_MeatRegisterVDoc web service which is described in Appendix E. The generic input required for the web service such as the factory business id is passed along with the Herd number and the Document number. The web service will return information confirming if the registration has been successful, if not it will return the reason why, which will then be returned by the method and displayed as a message box on the screen for the farmer. Below are some of the reasons why the web service will return an error and not register the document successfully: • Document has not been issued to the that farmer • Document has been previously used to a different herd or for a move to this lairage but with a different move date • Document is not unused e.g. has a status of LOST If the registration is successful then the user will then be presented with the reader screen without being presented with a message. If Internet access is down or the APHIS webservices are not available for any reason, the system will prompt the user that the system is unavailable and if they still want to read the animals and register them later when the APHIS webservices become available. 7.1.4 Scan Animals After the Register permit above has completed, the user is then presented with the Reader screen which when loaded opens the serial ports using the settings stored in the configuration file and waits for information to be received. As the data is received it is divided up to in to string of characters 16 digits long in the form of a hexadecimal number (i.e. 8000F580014FD27E), which is how the RFID eartags are registered on the APHIS system when the farmer purchases the tags. As each 16 digit identifier is received an animal object is instantiated, and the a new thread is started using the MovetoLiarage method by passing in the Herd Number, Permit Number and the EID number read from the RFID eartag. Threading is used here so there is no delay in the reading of tags from the serial port, we can expect an eartag from the identification system every one second and if we delay the reading of the next tag we may miss it. As each thread begins it calls the addAnimaltoDB method of the animal class and this adds the EID number, Herd number and permit number to a new record In the Animal Table on the database. The reason we firstly ad just these fields is in case the web service is unavailable or an error is returned, we can report to the user that this animal has not been registered. The thread will then call the private function AddToMovementDoc which will connect to the webservice which has been set up as a web reference within visual studio for this application. 48
    • Again the generic input will be passed to the webservice along with Herd number, Permit number and EID tag number. The system will return, the same fields again and the animals real tag number that it visible on the eartag along with a success flag. When adding animals to a movement document APHIS will reject any animals under the following criteria: • Open Movement document could not be found: Meaning this document has ben been registered yet • Animal does not belong to this Herd: on the APHIS system the herd number supplied with this animal does match that in the APHIS database If any of these scenarios are encountered the system will record them in the database under the status table and will report this to the user when all the animals in the batch have been read. After adding animals to the movemnt document, they must now be confirmed into the lairage, in order to do this we pass the same information that we did in the previous step of adding the animal to a movement document , into another webservice called WS_MeatConfirmMove, which if successful will return the Animal Tag number, and a list of statuses such as “An AST test is required”. This APHIS web service runs numerous checks on the animals such as movement restrictions on a HERD, for example if an animal in a herd is diagnosed with a serious disease or illness then there is usually a ban on the movement of any animal from that herd. These are returned as statuses and must be reported to the Lairage operators so they can contact a Vet officer to authorise or make decisions on such cattle. With all the information returned from the two webservices we are now ready to update the record on local database, we now have a third webservice to call which will give us more information about the animal. This web service is called WS_MeatAnimalInfo and it returns the following information after being passed the EID number from the animals RFID eartag: • Animal No • EID Tag No • Colour • Breed • Sex • DOB (the DOB stored against the animal will always be returned regardless if the animal has a status of IDQ or DOBQ) • Status list • If an AST test is required • Permit Number • Move Date • From Herd No. (Market Code if presented from market) • Surname of presenting herd • Statuses existing on herd with associated status reasons We now have to save this information to the database, this is done by calling the UpdateAnimalToDB method which will add the remain animal object property values populated from the webservices. 49
    • Feedback is given to the user by populating a data grid on the screen as each of the threads completes. The Data grid shows the information in the loacl anima table database, and colour codes each animal row based on the status: • Amber: Animal has been read by the RFID reader • Green: The animal has been added to a movement document and has been confirmed into the lairage • Red: the register has not competed successfully, one of the process has failed and the reason will be displayed A large animal counter is displayed on the screen to let the users know how many animals have been read by the RFID reader in the case that on has failed to read because of a faulty tag for example. The screen also displays the status of the other systems it interacts with in the status bar as shown in figure 17 below. The statuses shown are: • EID Reader Status: this indicates that the system can communicate with the RFID reader via the serial port • DB status: this indicates whether there is a connection to the local DB • APHIS status: this indicates that the APHIS webservices are available. Figure 17: Read Animals Screen This screen has been designed in large text as the users need to be away from the screen and the reader as the animals pass for health and safety reasons. The data grid colour coding will give a quick indication to the user if all the animals have been registered. 50
    • When all the animals in the batch have been completed the user hits the All Animals Scanned button and this closes the open serial ports and returns the user to the Menu screen, ready to process another batch of animals. 7.1.5 Non-Confirmed Animals One of the requirements of the system was to reduce user input and eliminate typing mistakes. And in-order to meet this objective the system can still read animal tags even if they cannot register them using the APHIS webservices if they become unavailable. The Non-Confirmed Animals option will present the user with a list of animals that have previously been read but have not been registered on the APHIS system. The tags are collected under the normal function but if the aphis service is down then the user is prompted as described in section 7.1.3. This screen allows the user to select individual animals or all animals and move then into the lairage using the information previously entered when the user first tried to register them using the functions from 7.1.3 and 7.1.4 that was stored in the local database. Once they select the animals and hit the Register Animals button the system uses the same methods as in section 7.1.3 and 7.1.4 to register the permit and add the animals to the movement document and confirm them into the lairage. The system will highlight the data grid rows as per the functionality in section 7.1.4 for each animal as it is processed. Figure 18: Non-Confirmed Animals 51
    • However if the local network is down and the system has no access to the database then this function will not be available and DARD’s E-MPL system most be used to carry out this functionality as the animals have to be unloaded from the trailer and processed manually. 7.1.6 Test Mode The test mode screen allows an administrator to test the functionality between the PC and the RFID reader. This screen is protected by a password, when the user selects the Test Mode option from the main menu they are presented with a Password screen as shown below: Figure 19: Test Mode Password Screen The user is required to enter a numeric password using the screen shown in fig 19, which I set in the application configuration file, and once this is confirmed the user is then presented with the Test Mode screen. The screen contains the following COM port settings fields that the user can adjust to test the communications between the PC and the RFD reader: • Available Ports: this displays a list of available com ports on the PC; the user can select different COM ports and connect the RFID reader to these ports, in case a COM port fails on the PC. • Baud Rate: this is the baud rate that must match the Baud rate on the RFID reader. • Data Bits: this is the com port data bits setting that again must match the RFID Data bits setting. • Parity: this is the com port parity setting that must match that of the RFID reader • Stop Bits: the stop bits setting again must match that of the RFID reader. These options are made configurable in case in the future the type of RFID reader or Make is changed, the new reader can be tested and the Application configuration files which have the same setting options can be re-configured to use the new reader. 52
    • Figure 20: Test Mode screen The screen shown in fig 20 above shows a list box and this list box will populate with the list of RFID tag numbers as they are read by the RFID reader, after the user selects the correct COM port settings and hits the Connect Button, providing that the COM port settings are correct. This can be used to test RFID ear tags that may be did not read the first time, to test if they are faulty or not, as a fine may be imposed on the farmer for the NON-EID reads were the Lairage staff then has to manually register the animal using the E-MPL system. 53
    • 7.2 Mobile Reader System The mobile reader system will be developed in Visual Basic using the compact .NET 3.5, using MS Visual Studio 2008. The system will be a client-Server based system, the client will run on a Windows mobile PDA device over a wireless network and connect to the Gallagher handheld EID reader via bluetooth. The PDA device will also connect to the same local MS SQLserver 2005 database server as the fixed reader system, and will also use some webservices provided by DARD on the APHIS system. The same animal class is used in this mobile system as in the fixed system and as future requirement may be to do the same functionality as the fixed reader only using the mobile handheld readers, or as backup to the fixed reader system. 7.2.1 Mobile Reader System Acrhitecture Diagram Aphis Via WIFI Via BlueTooth Animal Database APHIS WebServer Via WiFI Animal Identification System Local Aphis Webserver Interface to RFID Animal Redaer Database WebServices Interface to Aphis WebServices Local Database Server Store Returned Animal Details 54
    • 7.2.2 Menu screen When the application loads the user is presented with a menu screen, giving the user the system options. Only the Lairage operators will be using this system unlike the fixed reader system where the famers are able to enter their own details. The menu options are: • Scan Animals: This option is used to scan an indivdula animal in-order to register it as dead on the aphis system. Part of this process is a check that the correct animal is being slaughtered at this stage. • Find Animal: This option allows the operators to track down an animal in a group of animals without having to phyiscally read eartags which can be dangerous when trying to read an eartag next to an animal. The operator can enter or select and animal eartag number and scan a group of animals and when that animal is scanned the user is alerted. This option allows us to utilise the technology in more than one way so that it aids the operators in the lairage. • View Animal Details: This menu option returns the details of an animal stored on the local database, in case the operator need to verify them for some reason i.e. tests are required by the vet. The operator can scan the animal and it’s current statuses previously returned and stored in the database by the fixed reader system will be presented on screen. • Test Reader: Like the test mode on the fixed reader system, this option allows the user to test the communications between the Gallagher handhled EID reader and the PDA device. • Exit: This option exits out the application back to the windows application. The screen shot below shows the menu screen as presented to the user: Figure 21: Mobile System Menu Screen 55
    • 7.2.3 Scan Animals The Scan Animal screen when loaded opens the COM port set in the config file and waits for an EID identification number again in the 16 digit hexadecimal format. As the identification number is receieved an Animal object of the Animal class is instaniated and the EID number is passed to the set as the EID tag property and the GetAnimalDetails method is called, which will go to the local database and retrieve the details for this animal that have previously been returned by the webservices called by the fixed reader system when the animal was being registered and confirmed into the lairage. The system will then display the following information to the screen: • Eartag Number • Herd Nnumber • Statuses i.e TB test etc. This information will be used by the operator to physically verfiy the animals details by doing a quick visual check of the eartag attached to the animal. The user will then select the sex of the animal and enter a Kill no that will be used to identify the animal on the slaughter production line as the yellow eartags are removed during the process and this kill number and the date it was kill is used to identify that animal on the slaughter line production system. The sexes of cattle affect the price paid to the farmer and must be recorded for labeling purposes of the carcass before it is hung in the Chill store. The sex is being recorded by the EID system on the loacl database, but the production system will look up this sex of this animal when the production system gets the final animal record which is downloaded via the text based file and imported to the slaughter line production system. The sex would have had to be then manually entered on the production system by the operator when the animal recorded was imported and displayed to the user. So we are elinimating the need for the user to walk to another computer in the lairage office and update more detail for each animal as they do presently. After the user has selected the Sex of the animal and entered the Kill Number, they hit the Assign Kill No button and the system will then call the MoveToAbbatoir method of the animal class where the EID Tag Number along wth the Kill No. This method in turn then calls the WS_MeatAssignKillNo webservice which will check to see if this Kill No is unique for the day and that the animal has had any statuses it had cleared or authorised and that it was already confirmed into the lairage by the first reader. This method will return an error message to the PDA screen if the Kill No has previously been used or the animal has not had its statuses cleared by the Vet. If this registration has been successful the user will be presented with a message box on the screen to indicate this. The screen shot below shows the screen as displayed on the PDA for the user to carry out this operation: 56
    • Figure 22: Mobile System Scan Animal Screen 7.2.4 Find Animal The find animal function on the PDA is an added feature not requested utilises the equipment inorder to help the lairage operators. There is a requirement that operators sometimes have to find an animal that requires testing and to do this they have to walk amongst animals and physically read their eartags which is dangerous, with this system they can be more that arms length away form an animal and still have th ability to read its tag. Basically the system will reference the local database and display in a drop down list of the animals that have been confirmed in to the lairage but not yet slaughtered. A user can either select an animal or filter the animals by a specific Herd number to reduce the number of animals they have to scroll through on the drop down list and they then begin to scan a group of animals in a pen where they believe the animal currently is, the system wll reference each EID number it recieves against the database and gets the animal eartag and compares that with the one the user has selected, if they match the system will sound an alert and the background color of the form will change every 0.5 of a second to indicate to the user that the last animal scanned is the animal they are looking for. The system will use the GetAnimalDetails method of the Animal class, using the EidTagNo as the reference, the getAnaimalDetails method is written in such as a way that if it is passed either the EID tag No or the Animal Eartag number it will use either for the serach on the database as both are unique to the one animal. 57
    • The EID number will be passed to the PDA via a COM port which is configured in the application configuration file and this COM port is opened on the loading of the form and then closed again when the user exits the form. The screen shot belows shows how the find animals screen looks on the PDA: Figure 23: Find Animal Screen The Find Animal screenshots above show that the background color changes from Red to blue to red again every 0.5 second to indicate to the user along with a sound alert that they have found the animal they are looking for. The screen background will be white before the animal is found. 58
    • 7.2.5 View Animal Details The view animals details screen allows the user to scan animal and get all its details from the local database such as Eartag Number, herd Number, colour etc, including any statuses that animal may have. This allows the user to quickly check an animal with out having to finds it paper documents, that they maybe unsure of i.e. is the animal ready for slaughter or does it require authorisation from the Vet?. The system opens the COM port on the form loading the scanning of an eartag is the trigger for the system to go and get the animals details from the local database. It will search the animal table based on the EID tag no and return these details to the screen. It will continue the same process for each EID tag no it recieves until the user selects the Exit button. The fields returned and the layout of the screen are shown below: Figure 24: Mobile System Animal Details Screen 7.2.6 Test Reader The test reader function works in the same manner as the Test Mode on the fixed reader system, it allows the user to change the COM port setting in order to test the communication between the handheld reader and the PDA. This functionality maybe com useful if the COM port fails on the PDA or the RFID handheld reader changes in the future. The user can set the Com port setting and scan RFID tags and the RFID tags will be displayed correctly in the list box on the screen if the communication is successful. 59
    • Figure 25: Mobile System Test Reader Screen 60
    • 7.3 Database 7.3.1 Implementation of tblEIDAnimal Table The table schema belows shows th implementation of the tblEIDAnimal Table on MS SQLServer 2005 7.3.2 Implementation of tblStatuses Table The table schema belows shows the implementation of the tblStatuses Table on MS SQLServer 2005. 61
    • 8 Testing Before the release of the software we must ensure that the operators in the manner it was deisgned to do, in order to do this they system is subject to two types of testing: 8.1 White Box testing This is a process of breaking the system down into units or functions and testing them seperately, the out come from this is confindence in each separate code unit, for this purpose well will be each method of the animal class to ensure it does the required functions. The test was done by instanisating a new animal class and setting the required Class properties to certain crieria that the system will use and calling the method individually and monitoring the results. Each unit will be tested for the following test cases: • General Functionality • Success and Faliure • Boundary Conditions ( conditions where some paramateres may not be set correctly and return a false result) The Result of the White Box testing can be found in Appendix H. 8.2 Black Box testing This process consists of testing the system as a wholes from start to finish. The black box testing result can be found in Appendix I. 62
    • 8.3 Evaluation As the system has passed all it testing criteria, this evaluation determines whether the system has met all if requirements as specifed in the Requirement anaylsis section of this document. 8.3.1 Functional Requirements Evaluation The table belows shows how the Function requirements where met in the final implementation Requirements Document Element No Implementation Element No How Requirement is met From the Menu screen the user selects Scan Animals; they are presented with the Register Permit Screen and are required to enter A herd number and a V document Number. The system then registered the Document No 4.4.1.1 Register a V but only if the Document Number Movement 7.1.3 Register Movement is assigned to that Herd on the document (Permit) Document APHIS system After the permit No is registered the system Loads the Scan Animals screen and as each EID 4.4.1.2 Adding animals tag is read by the Animals to system, the animal is added to Movement the movement document on the Documents 7.1.4 Scan Animals (Fixed Reader) APHIS system. After the Animal is added to the Movement document they system automatically confirms it into the lairage, which registers 4.4.1.3 Automatically the Movement from the farmers move animals into herd into the Factory Lairage Lairage Herd 7.1.4 Scan Animals (Fixed Reader) Herd. The Mobile reader is used to scan animal before it is slaughtered, the user must then visually verify that it is the correct animal, enter a Kill No into the screen and select the sex. They hit the Assign Kill No button which will register the animal’s 4.4.1.4 Assign Kill movement into the Abattoir and No and confirm into 7.2.3 Scan Animals (Mobile assign that Kill no to it on the Abattoir Reader) APHIS system. Figure 26: Requirements Trace Table 63
    • 8.3.2 Non-Functional Requirements Evaluation There were two non-functional requirements specified for the system: • Usability: they system is easy to use and the messagin on the screen is very clear, this has been the finding after conducting a user trial of Two lairage operators and two farmers • Scalability: The confirmation files allows the system to be used on any site, and it allows the system to be setupo with different Identify information based on the factory that is connecting to the APHIS webservices. The system is also configurable for other RFID Reader in case in the future, we change equipment suppliers. 8.3.3 Performance Evaluation The graph below shows the comparasion of the time it takes the EID reader to confirm animals into the lairage,compared with the operator using the E-mpl system for a batch of 10 animals. Figure 27: Performance evaluation Graph 64
    • 8.3.3 Conclusion The test results and the evaluation prove that the system meets all its requirements and it does it all in the correct manner. The system is also capable of handling any exceptions for the scenarios we tested although after going live with the system, we are probably going to come across scenarioes we have not accounted for. 65
    • 9 Conclusion In order to ensure the correct animal information is being gathered when an animal is presented for slaughter and the cattle are being correctly identified, it is clear that mistakes can be made and that RFID although not fully can improve this issue. In effect it has the capability to eliminate human error when reading eartags when an animal is presented. In terms of the using RFID to identify the animals it seems a cost effective way, although the standards used are aging, they have been proven by the success of Australia having all its cattle electronically tagged and with the equipment manufacturers working to improve read rates from tags, within the limits of those standards, it should be a very successful implementation. With the research has come the knowledge of the potential pitfalls of a bad installation of the RFID readers, including the interference of noise and because most of the lairage is built from metal gates and fencing the a special run will have to be built for the cattle to run through keep the metal away from the antennas. This research has proved critical in the choice of hardware, so that the best possible system could be implemented and that it operated in the harsh conditions of the lairage. The implementation of the software lead to some design changes in order to meet the requirements as there was elements that could not be completed with the initial design, such as the counter that had to be added for the unconfirmed animals and the fact that the animals being unloaded by each farmer had to be grouped in batches for traceability purposes. Overall they system through all the development life cycle stages and reviewing each one meant that the system was delivered in the requirement timeframe and to the requirements specified at the requirement analysis meeting. Future Work The system meets all the necessary requirements that were set out in the requirements analysis stage, but the technology could be used to further enhance the work of the lairage operators by having an alert system that calls the Vet to come to inspect an animals based on the statuses returned by APHIS, an email or text message could be sent from the system rather than the Vet having to be phoned each time to check animals. The system deos not identify any animals that have no EID Tags or a faulty tag, which means the operators have to identify them manually. The system could be used to control pneumatic gates that sorts the cattle based on the information returned from APHIS, i.e. ones that need inspected, ones that are ready for slaughter and one that have not been EID read could be placed into separate pens. 66
    • References Bridgend County Borough Council (2007) - Food Safety – Guidance on Traceability = Available at: http://www.bridgend.gov.uk/Web1/groups/public/documents/services/022178.hcsp FSA (2008) – About BSE and other TSEs Available at: http://www.food.gov.uk/bse/what/. DARD (2008) - About DARD Available at: http://www.dardni.gov.uk/index/about-dard.htm Wikipedia (2008) – RFID: Available at: http://en.wikipedia.org/wiki/RFID RFID Journal (2008) The History of RFID Technology Available at: http://www.rfidjournal.com/article/view/1338/1/129 www.hightechaid.com (2008) A Standards Update - Why do we need standards? Available at: http://www.hightechaid.com/stdsupdate/stds_update2.htm Wikipedia (2008) - ISO 11784 & 11785 Available at: http://en.wikipedia.org/wiki/ISO_11784_&_11785 Australian Government (2008), Beef Exports Available at: http://www.dfat.gov.au/facts/affaoverview.html rfident.org (2008) RFID Tags- Radio Frequency Identification Tags Available at: http://www.rfident.org/#History%20of%20RFID 67
    • 68
    • Appendix A: Project Plan for Implementation January Feburary Activities 09/01/09 16/01/09 23/01/09 30/01/09 06/02/09 13/02/09 20/02/09 27/02/09 INVESTIGATIVE/SELECTIVE Select RFID equipment supplier SYSTEM IMPLEMENTATION Create Fixed Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Create Portable Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Evaluation of Final system on tagging cattle & users Built in slack for unplanned problems INTEGRATION AND TESTING WRITE UP OF THESIS 69
    • March April Activities 06/03/09 13/03/09 20/03/09 27/03/09 03/04/09 10/04/09 17/04/09 24/04/09 01/05/09 INVESTIGATIVE/SELECTIVE Select RFID equipment supplier SYSTEM IMPLEMENTATION Create Fixed Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Create Portable Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Evaluation of Final system on tagging cattle & users Built in slack for unplanned problems INTEGRATION AND TESTING WRITE UP OF THESIS Activities Comments INVESTIGATIVE/SELECTIVE Select RFID equipment supplier SYSTEM IMPLEMENTATION Create Fixed Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Create Portable Reader Application (Prototype) Demo Prototype to Users and re-evaluate and complete Delayed due to work commitments Evaluation of Final system on tagging cattle & users Delayed due to work commitments Built in slack for unplanned problems INTEGRATION AND TESTING Some More coding required after testing Final Write Updelayed due to Daughter Being admtted to Hospital WRITE UP OF THESIS for a week 70
    • Appendix B: MC2 Movement Document 71
    • Appendix C: Lairage Layout for Fixed RFID Reader Design for crush to get cattle into single lane s that the RFIF reader is within read range of the cattle eartags: 9500mm 10200mm 7500mm 7500mm 5000mm 850mm 7500mm 7500mm 8000mm 3000mm 3000mm mm 03 61 7500mm 7500mm 9200mm 9200mm 72
    • Appendix D: Antenna mounting instructions 73
    • Appendix E: DARD Webservice descriptions MeatAddToMovementNotInput webservice Description <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://InfoObjects.aphisMeat.amtsybex.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="services.AphisMeatServices" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="services.AphisMeatServices"> - <wsdl:types> - <xsd:schema targetNamespace="http://InfoObjects.aphisMeat.amtsybex.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="MeatAddToMovementNotInput"> - <xsd:sequence> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="fromHerdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="genericInput" type="ns1:GenericInput" minOccurs="0" nillable="true" /> <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="pinNo" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="GenericInput"> - <xsd:sequence> <xsd:element name="callingLocation" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="channel" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="clntRefNo_BusId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="environment" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="password" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="username" type="xsd:string" minOccurs="0" nillable="true" / > </xsd:sequence> </xsd:complexType> - <xsd:complexType name="MeatAddToMovementNotOutput"> - <xsd:sequence> 74
    • <xsd:element name="animalNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="error" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="errorCode" type="xsd:int" minOccurs="0" /> <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="requestId" type="xsd:long" minOccurs="0" /> <xsd:element name="success" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema targetNamespace="services.AphisMeatServices" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:element name="WS_MeatAddToMovementNot"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="pobjInput" type="ns1:MeatAddToMovementNotInput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element name="WS_MeatAddToMovementNotResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="out" type="ns1:MeatAddToMovementNotOutput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="WS_MeatAddToMovementNotResponse"> <wsdl:part element="tns:WS_MeatAddToMovementNotResponse" name="parameters" /> </wsdl:message> - <wsdl:message name="WS_MeatAddToMovementNotRequest"> <wsdl:part element="tns:WS_MeatAddToMovementNot" name="parameters" /> </wsdl:message> - <wsdl:portType name="WS_MeatAddToMovementNotPortType"> - <wsdl:operation name="WS_MeatAddToMovementNot"> <wsdl:input message="tns:WS_MeatAddToMovementNotRequest" name="WS_MeatAddToMovementNotRequest" /> <wsdl:output message="tns:WS_MeatAddToMovementNotResponse" name="WS_MeatAddToMovementNotResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="WS_MeatAddToMovementNotHttpBinding" type="tns:WS_MeatAddToMovementNotPortType"> 75
    • <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="WS_MeatAddToMovementNot"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="WS_MeatAddToMovementNotRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="WS_MeatAddToMovementNotResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="WS_MeatAddToMovementNot"> - <wsdl:port binding="tns:WS_MeatAddToMovementNotHttpBinding" name="WS_MeatAddToMovementNotHttpPort"> <wsdlsoap:address location="http://xnet02.dardni.gov.uk/AphisMeatServicesTest/services/WS _MeatAddToMovementNot" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 76
    • WS_MeatAnimalInfo webservice description <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://InfoObjects.aphisMeat.amtsybex.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="services.AphisMeatServices" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="services.AphisMeatServices"> - <wsdl:types> - <xsd:schema targetNamespace="http://InfoObjects.aphisMeat.amtsybex.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="MeatAnimalInfoInput"> - <xsd:sequence> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="genericInput" type="ns1:GenericInput" minOccurs="0" nillable="true" /> <xsd:element name="moveDate" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="pinNo" type="xsd:int" minOccurs="0" /> <xsd:element name="requestType" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="GenericInput"> - <xsd:sequence> <xsd:element name="callingLocation" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="channel" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="clntRefNo_BusId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="environment" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="password" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="username" type="xsd:string" minOccurs="0" nillable="true" / > </xsd:sequence> </xsd:complexType> - <xsd:complexType name="MeatAnimalInfoOutput"> - <xsd:sequence> <xsd:element name="error" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="errorCode" type="xsd:int" minOccurs="0" /> 77
    • <xsd:element name="plannedMoveList" type="ns1:ArrayOfPlannedMove" minOccurs="0" nillable="true" /> <xsd:element name="requestId" type="xsd:long" minOccurs="0" /> <xsd:element name="success" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ArrayOfPlannedMove"> - <xsd:sequence> <xsd:element name="PlannedMove" type="ns1:PlannedMove" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="PlannedMove"> - <xsd:sequence> <xsd:element name="animalList" type="ns1:ArrayOfAnimalDetails" minOccurs="0" nillable="true" /> <xsd:element name="fromHerdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdStatusList" type="ns1:ArrayOfHerdStatus" minOccurs="0" nillable="true" /> <xsd:element name="moveDate" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="surname" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ArrayOfAnimalDetails"> - <xsd:sequence> <xsd:element name="AnimalDetails" type="ns1:AnimalDetails" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="AnimalDetails"> - <xsd:sequence> <xsd:element name="DOB" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="ageStatus" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="animalNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="astRequired" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="brStatus" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="breed" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="colour" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="fqStatus" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="sex" type="xsd:string" minOccurs="0" nillable="true" /> 78
    • <xsd:element name="status" type="tns:ArrayOfString" minOccurs="0" nillable="true" /> <xsd:element name="tbStatus" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="vdmStatus" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ArrayOfHerdStatus"> - <xsd:sequence> <xsd:element name="HerdStatus" type="ns1:HerdStatus" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="HerdStatus"> - <xsd:sequence> <xsd:element name="status" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="statusReason" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema targetNamespace="services.AphisMeatServices" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:element name="WS_MeatAnimalInfo"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="pobjInput" type="ns1:MeatAnimalInfoInput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:complexType name="ArrayOfString"> - <xsd:sequence> <xsd:element name="string" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:element name="WS_MeatAnimalInfoResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="out" type="ns1:MeatAnimalInfoOutput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="WS_MeatAnimalInfoRequest"> <wsdl:part element="tns:WS_MeatAnimalInfo" name="parameters" /> </wsdl:message> 79
    • - <wsdl:message name="WS_MeatAnimalInfoResponse"> <wsdl:part element="tns:WS_MeatAnimalInfoResponse" name="parameters" /> </wsdl:message> - <wsdl:portType name="WS_MeatAnimalInfoPortType"> - <wsdl:operation name="WS_MeatAnimalInfo"> <wsdl:input message="tns:WS_MeatAnimalInfoRequest" name="WS_MeatAnimalInfoRequest" /> <wsdl:output message="tns:WS_MeatAnimalInfoResponse" name="WS_MeatAnimalInfoResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="WS_MeatAnimalInfoHttpBinding" type="tns:WS_MeatAnimalInfoPortType"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="WS_MeatAnimalInfo"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="WS_MeatAnimalInfoRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="WS_MeatAnimalInfoResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="WS_MeatAnimalInfo"> - <wsdl:port binding="tns:WS_MeatAnimalInfoHttpBinding" name="WS_MeatAnimalInfoHttpPort"> <wsdlsoap:address location="http://xnet02.dardni.gov.uk/AphisMeatServicesTest/services/WS _MeatAnimalInfo" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 80
    • WS_MeatConfirmMove Webservice description <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://InfoObjects.aphisMeat.amtsybex.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="services.AphisMeatServices" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="services.AphisMeatServices"> - <wsdl:types> - <xsd:schema targetNamespace="http://InfoObjects.aphisMeat.amtsybex.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="MeatConfirmMoveInput"> - <xsd:sequence> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="fromHerdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="genericInput" type="ns1:GenericInput" minOccurs="0" nillable="true" /> <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="pinNo" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="GenericInput"> - <xsd:sequence> <xsd:element name="callingLocation" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="channel" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="clntRefNo_BusId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="environment" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="password" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="username" type="xsd:string" minOccurs="0" nillable="true" / > </xsd:sequence> </xsd:complexType> - <xsd:complexType name="MeatConfirmMoveOutput"> - <xsd:sequence> <xsd:element name="animalNo" type="xsd:string" minOccurs="0" nillable="true" / > 81
    • <xsd:element name="confirmationMsg" type="tns:ArrayOfString" minOccurs="0" nillable="true" /> <xsd:element name="confirmationStatus" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="error" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="errorCode" type="xsd:int" minOccurs="0" /> <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="requestId" type="xsd:long" minOccurs="0" /> <xsd:element name="success" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema targetNamespace="services.AphisMeatServices" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:element name="WS_MeatConfirmMove"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="pobjInput" type="ns1:MeatConfirmMoveInput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:complexType name="ArrayOfString"> - <xsd:sequence> <xsd:element name="string" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:element name="WS_MeatConfirmMoveResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="out" type="ns1:MeatConfirmMoveOutput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="WS_MeatConfirmMoveRequest"> <wsdl:part element="tns:WS_MeatConfirmMove" name="parameters" /> </wsdl:message> - <wsdl:message name="WS_MeatConfirmMoveResponse"> <wsdl:part element="tns:WS_MeatConfirmMoveResponse" name="parameters" / > </wsdl:message> - <wsdl:portType name="WS_MeatConfirmMovePortType"> - <wsdl:operation name="WS_MeatConfirmMove"> 82
    • <wsdl:input message="tns:WS_MeatConfirmMoveRequest" name="WS_MeatConfirmMoveRequest" /> <wsdl:output message="tns:WS_MeatConfirmMoveResponse" name="WS_MeatConfirmMoveResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="WS_MeatConfirmMoveHttpBinding" type="tns:WS_MeatConfirmMovePortType"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="WS_MeatConfirmMove"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="WS_MeatConfirmMoveRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="WS_MeatConfirmMoveResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="WS_MeatConfirmMove"> - <wsdl:port binding="tns:WS_MeatConfirmMoveHttpBinding" name="WS_MeatConfirmMoveHttpPort"> <wsdlsoap:address location="http://xnet02.dardni.gov.uk/AphisMeatServicesTest/services/WS _MeatConfirmMove" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 83
    • WS_MeatRegisterVDoc <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://InfoObjects.aphisMeat.amtsybex.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="services.AphisMeatServices" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="services.AphisMeatServices"> - <wsdl:types> - <xsd:schema targetNamespace="http://InfoObjects.aphisMeat.amtsybex.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="MeatRegisterVDocInput"> - <xsd:sequence> <xsd:element name="fromHerdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="genericInput" type="ns1:GenericInput" minOccurs="0" nillable="true" /> <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="pinNo" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="GenericInput"> - <xsd:sequence> <xsd:element name="callingLocation" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="channel" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="clntRefNo_BusId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="environment" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="password" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="username" type="xsd:string" minOccurs="0" nillable="true" / > </xsd:sequence> </xsd:complexType> - <xsd:complexType name="MeatRegisterVDocOutput"> - <xsd:sequence> <xsd:element name="error" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="errorCode" type="xsd:int" minOccurs="0" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> 84
    • <xsd:element name="permitNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="requestId" type="xsd:long" minOccurs="0" /> <xsd:element name="success" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema targetNamespace="services.AphisMeatServices" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:element name="WS_MeatRegisterVDoc"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="pobjInput" type="ns1:MeatRegisterVDocInput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element name="WS_MeatRegisterVDocResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="out" type="ns1:MeatRegisterVDocOutput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="WS_MeatRegisterVDocRequest"> <wsdl:part element="tns:WS_MeatRegisterVDoc" name="parameters" /> </wsdl:message> - <wsdl:message name="WS_MeatRegisterVDocResponse"> <wsdl:part element="tns:WS_MeatRegisterVDocResponse" name="parameters" / > </wsdl:message> - <wsdl:portType name="WS_MeatRegisterVDocPortType"> - <wsdl:operation name="WS_MeatRegisterVDoc"> <wsdl:input message="tns:WS_MeatRegisterVDocRequest" name="WS_MeatRegisterVDocRequest" /> <wsdl:output message="tns:WS_MeatRegisterVDocResponse" name="WS_MeatRegisterVDocResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="WS_MeatRegisterVDocHttpBinding" type="tns:WS_MeatRegisterVDocPortType"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="WS_MeatRegisterVDoc"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="WS_MeatRegisterVDocRequest"> <wsdlsoap:body use="literal" /> 85
    • </wsdl:input> - <wsdl:output name="WS_MeatRegisterVDocResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="WS_MeatRegisterVDoc"> - <wsdl:port binding="tns:WS_MeatRegisterVDocHttpBinding" name="WS_MeatRegisterVDocHttpPort"> <wsdlsoap:address location="http://xnet02.dardni.gov.uk/AphisMeatServicesTest/services/WS _MeatRegisterVDoc" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 86
    • WS_MeatAssignKillNo <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://InfoObjects.aphisMeat.amtsybex.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="services.AphisMeatServices" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="services.AphisMeatServices"> - <wsdl:types> - <xsd:schema targetNamespace="http://InfoObjects.aphisMeat.amtsybex.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="MeatAssignKillNoInput"> - <xsd:sequence> <xsd:element name="automaticKillNo" type="xsd:int" minOccurs="0" /> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="genericInput" type="ns1:GenericInput" minOccurs="0" nillable="true" /> <xsd:element name="killNo" type="xsd:int" minOccurs="0" /> <xsd:element name="pinNo" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="GenericInput"> - <xsd:sequence> <xsd:element name="callingLocation" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="channel" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="clntRefNo_BusId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="environment" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="herdNo" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="password" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="username" type="xsd:string" minOccurs="0" nillable="true" / > </xsd:sequence> </xsd:complexType> - <xsd:complexType name="MeatAssignKillNoOutput"> - <xsd:sequence> <xsd:element name="animalNo" type="xsd:string" minOccurs="0" nillable="true" / > 87
    • <xsd:element name="confirmationMsg" type="tns:ArrayOfString" minOccurs="0" nillable="true" /> <xsd:element name="confirmationStatus" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="eidTagNo" type="xsd:string" minOccurs="0" nillable="true" / > <xsd:element name="error" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="errorCode" type="xsd:int" minOccurs="0" /> <xsd:element name="killNo" type="xsd:int" minOccurs="0" /> <xsd:element name="requestId" type="xsd:long" minOccurs="0" /> <xsd:element name="success" type="xsd:int" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema targetNamespace="services.AphisMeatServices" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:element name="WS_MeatAssignKillNo"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="pobjInput" type="ns1:MeatAssignKillNoInput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:complexType name="ArrayOfString"> - <xsd:sequence> <xsd:element name="string" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - <xsd:element name="WS_MeatAssignKillNoResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="out" type="ns1:MeatAssignKillNoOutput" nillable="true" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="WS_MeatAssignKillNoRequest"> <wsdl:part element="tns:WS_MeatAssignKillNo" name="parameters" /> </wsdl:message> - <wsdl:message name="WS_MeatAssignKillNoResponse"> <wsdl:part element="tns:WS_MeatAssignKillNoResponse" name="parameters" /> </wsdl:message> - <wsdl:portType name="WS_MeatAssignKillNoPortType"> - <wsdl:operation name="WS_MeatAssignKillNo"> <wsdl:input message="tns:WS_MeatAssignKillNoRequest" name="WS_MeatAssignKillNoRequest" /> 88
    • <wsdl:output message="tns:WS_MeatAssignKillNoResponse" name="WS_MeatAssignKillNoResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="WS_MeatAssignKillNoHttpBinding" type="tns:WS_MeatAssignKillNoPortType"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="WS_MeatAssignKillNo"> <wsdlsoap:operation soapAction="" /> - <wsdl:input name="WS_MeatAssignKillNoRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="WS_MeatAssignKillNoResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="WS_MeatAssignKillNo"> - <wsdl:port binding="tns:WS_MeatAssignKillNoHttpBinding" name="WS_MeatAssignKillNoHttpPort"> <wsdlsoap:address location="http://xnet02.dardni.gov.uk/AphisMeatServicesTest/services/WS _MeatAssignKillNo" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 89
    • Appendix F Fixed Reader VB.net Source Code Appendix G Fixed Reader VB.net Compact Framework Source Code 90
    • Appendix H White Box (Unit Testing) UnitMethod Test Test Type Expected Result Actual Result Success Action Test a V document that V document should register V document registered registered RegVDoc successfully PassFail Successfully Successfully Pass Error message returned from Test a V Webservice document V Document does Not to say that should registered because V document not fail the doc is not assigned to registered to RegVDoc registration PassFail Herd that Herd No Pass Animal Test that the system Details stored creates a new animals Animal Details stored in Animal AddAnimalToDB record PassFail in Animal Database Database Pass Test that the system Animal Details not will not store any stored in Animal Exception details and can handle Database because EID caught in errors when No EID number was not code and AddAnimalToDB number is supplied PassFail supplied handled Pass Test that the system will handle exceptions General Exception caught and Exception when the database is Testing handled by code as caught in not available to the (Database the database was not code and AddAnimalToDB system Offline) accessible handled Pass Animal Test that the system Details can update an animals updated details and that the correctly in correct animal record is Animal Details updated Animal UpdateAnimalToDB updated PassFail in Animal Database Database Pass 91
    • Test that the system Animal Details not will not update any updated in Animal Exception details and can handle Database because EID caught in errors when No EID number was not code and UpdateAnimalToDB number is supplied PassFail supplied handled Pass Test that the system will handle exceptions General Exception caught and Exception when the database is Testing handled by code as caught in not available to the (Database the database was not code and UpdateAnimalToDB system Offline) accessible handled Pass System returns the next Batch number System Test that the system which is 1 greater than returned the returns the correct new the last batch number next batch GetNextBatchNo Batch no PassFail used number Pass Boundary (Start of New Day, Batch Number Function Check that the system begins with Retuned generates the correct Date in the 90401001 new batch no at the Format Function returns which was GetNextBatchNo start of the day YMMDD999 90401001 correct Pass Check that the datagrid Method returns a Datagrid object gets filled with Datagrid object filled Object the correct animal with animal details returned with details when passed a when passed a batch Information GetAnimalDataGrid Batch No PassFail number populated Pass Method will return a Check that the datagrid blank datagrid object does not get populated as it will be unable to Empty when there are no find record in the Datagrid animal in the batch no database that match object GetAnimalDataGrid passed. PassFail this Batch No returned Pass 92
    • Datagrid returned with Boundary the full 50 (Return 50 animals as animals on expected, but the datagrid it is hard for Add a Scroll up which is a the user to and Scroll down lot more scroll through button to the that the the animals screen, and add AVG as only 10 a new Text box number of are displayed to the screen that animals on screen at counts the presented any time. And number of Check that the datagrid by each Datagrid object if some fail animals not can handle a large farmer at a generated with the full the user may registered GetAnimalDataGrid amount of animals. time) 50 animals not see them. Fail successfully Webservice returned a success flag and the animal was added to the Webservice should Movement Test that animal will be return a success flag document on added to a movement and the method should the APHIS AddtoMovementDoc document PassFail complete successfully system Pass Webservice returned a failure flag and the Webservice should animal was return a Failure flag not added to Test that animal will not because the animal the be Added to a does not belong to that Movement movement document herd No and the document on when the status should method should the APHIS AddtoMovementDoc not allow it. PassFail complete successfully system Pass 93
    • Webservice returned a success flag and the animal was confirmed Test that an animal will Webservice should into the be confirmed into the return a success flag Lairage on lairage on the APHIS and the method should the APHIS ConfirmIntoLairage system. PassFail complete successfully system Pass Webservice returned a failure flag and the Webservice should animal was Test that animal will be return a Failure flag not confirmed not be confirmed into because the animal into the the lairage when the was not added to a lairage on the status should not allow movement document APHIS ConfirmIntoLairage it PassFail previously system Pass Webservice returned the correct Test that the system details for the returns the correct Webservice returns EID number animal details when animal details for supplied to it passed a valid EID animal with that EID by this GetAPHISAnimalInfo number PassFail tag method Pass Webservice returned a message Test the webservice Webservice returned a stating it was returns a valid error message to say animal unable to message when it does not exist as a retrieve the supplied a fictitious EID fictitious EID number animal GetAPHISAnimalInfo no. PassFail was supplied details. Pass 94
    • Test that the class All Animal properties are Class properties class populated correctly should be populated properties when the method with the animal details populated completes after being based on the EID correctly from GetAnimalDetails passed a valid EID no. PassFail number supplied the database Pass Test that the class Animal Class properties are Not Class properties properties populated and are left should be not where all set to nothing when the populated with any NOTHING method completes after animal details as the after the being passed a invalid EID number supplied completion of GetAnimalDetails EID no. PassFail does not exist the method Pass Animal Class Test that the class Class properties properties properties are Not should be not where all populated and are left General populated with any NOTHING set to nothing when the Testing animal details as the after the database is not (Database database was not completion of GetAnimalDetails available to the system Offline) accessible the method Pass ALL method Move to lairage calls successfully Test that the move to the a number of completed lairage method methods, so all should and the completes all it method complete successfully correct and function calls based on the information MoveToLairage successfully. PassFail parameters supplied returned Pass Method Test that the move to successfully lairage method can completed handle any exceptions Method handles without and it completes even if Failure of any other failure and all any of the method and methods it calls and exceptions function calls are handles any are caught MoveToLairage unsuccessful. PassFail exceptions caught and handled Pass 95
    • Test that the method returns true when it Returned finds in the database True as the that the current location returns true as the animal is of the animal is in the animal is currently in valid and in VerifyInLairage lairage PassFail the lairage the lairage Pass Test that the method returns False when it finds in the database that the current location Returned of the animal is not in returns false as the false as VerifyInLairage the lairage PassFail animal does not exist expected Pass General Testing (Animal moved out of Lairage and slaughtered, Test that this method we cannot returns false when an Move the returns False as the animal has been same animal is in the local previously moved from animal to database but has Returned the lairage to the the Abattoir moved to the abattoir false as VerifyInLairage abattoir twice) previously expected Pass Animal moved successfully to the Animal is moved Abattoir and successfully to the the APHIS Test that an animal can Abattoir and the APHIS webservice be moved to the webservice returns a returned a abattoir successfully via success flag and the success flag the webservice and the animal location is and the location is updated on updated on the animal MoveToAbattoir the database PassFail database location was Pass 96
    • updated on the database Webservice returned a message stating that the animal was not confirmed into the Animal will be not lairage and Test that if an animal is moved to the abattoir nothing was not confirmed into the because it was never updated on lairage it cannot be confirmed into the the local MoveToAbattoir moved to the abattoir. PassFail lairage database Pass Check that the correct number of an animal One record statuses returned for an added to the animal from the APHIS database webservice are stored Status record added to with the correctly in the the database for the correct RecordAnimalStatus database PassFail correct animal animal id Pass Check that no statuses are recorded in the database if none are No records returned by the no Status records are added to the RecordAnimalStatus webservice. PassFail added to the database database Pass 97
    • Appendix I Black Box Testing Component Function Expected Result Actual Result Success Action Menu Read Animals Form is Read Animals Form is Read Animals Button operates as loaded and the menu loaded and the menu expected screen is hidden screen is hidden Yes Unconfirmed Animals Unconfirmed Animals Unconfirmed Animals button Form is loaded and the Form is loaded and the operates as expected menu screen is hidden menu screen is hidden Yes Test Mode Form is Test Mode Form is Test Mode Button operates as loaded and the menu loaded and the menu expected screen is hidden screen is hidden Yes Menu Form is closed and the Application Menu Form is closed and Exit Button Operators as expected Quits the Application Quits Yes Register Permit Permit fails to register Permit Registration failed because and a message is Message displayed on is it not assigned to Herd No displayed on screen to screen to say no permit Supplied alert the user no was supplied Yes Permit registers Permit registers successfully and the successfully and the Read animals form is Read animals form is Permit Registered Successfully loaded loaded Yes Read Animals EID tag number is read by the RFID reader and passed to the system via the COM port and is EID tag accepted by the EID tag Accepted by the system accepted by the system system successfully Yes 98
    • Datagrid on screen is populated by the New row added to the Animal Details displayed by the animals details returned datagrid displaying the system from the webservices correct animal details Yes the datagrid row will be highlighted in amber on the screen before the the datagrid row was Animal Row on Datagrid Highlighted animal is confirmed into highlighted amber until Amber for animal being processed the lairage the animal was confirmed Yes The datagrid row is highlighted green when the webservices have added the animal to the movement doc and The datagrid row for this Animal Row on Datagrid Highlighted confirmed the animal animal was highlighted Green for successful animal into the lairage green Yes An animal was scanned that already was previously registered so Animal Row on Datagrid Highlighted the webservices should Red for failed registration from fail and the animal The animal row on the webservices ( i.e. animal does not should be highlighted in datagrid was highlighted exist) Red on the datagrid red as expected Yes As each EID tag is scanned the Animal The counter increases by Counter on the screen one for each EID tag Animal Counter on Screen Updated should increase scanned Yes The Failed animal counter on the screen should increase by one each time an animals The counter increases by Failed Animal Counter on Screen registration fails for any one for each failed animal Updated reason registration Yes UnconfirmedAnimals 99
    • The system displays all the unconfirmed The system displayed all System displays unconfirmed animals in the database the currently unconfirmed animals Only on the datagrid animals as expected Yes User can select individual Animals by Individual animal touching them on the selection works as User can select individual animals screen expected Yes System only tried to register the selected System Registers only selected animals not all the System only attempted to animals when the Register Selected currently unconfirmed register the selected animals Button is selected animals animals Yes System attempts to System Registers all animals when register all the currently the Register All animals Button is unconfirmed animals on system registered all the selected the screen unconfirmed animals Yes As each unconfirmed animal is registered Each animal was Datagrid removes registered successfully it is removed from the screen animals from screen after they have removed from the as it was registered as been registered datagrid on the screen expected Yes Test Mode Password screen displays a message to Password screen refuses entry to the user that the Message displayed on test mode screen on wrong password entered was screen to alert the user password wrong the password was wrong Yes The Test mode screen loads and the password the test mode screen is Password screen load Test Mode screen is unload from loaded and the password screen on correct password the screen screen is unloaded Yes User can change all COM port User can change the Com port setting can be parameters COM port setting changed Yes 100
    • Connect button connects the system to Connect Button operates as the RFID reader System connected to the expected successfully RFID reader as expected Yes Disconnect button disconnects the system System disconnected Disconnect Button operates as from the RFID reader from the RFID reader as expected successfully expected Yes The correct EID numbers are displayed EID list box populated with EID in the list box on the The list box is populated numbers when scanned at the RFID screen as they are with the correct EID tag reader scanned numbers as expected Yes 101
    • Appendix J Requirements Analysis Meeting Presentation 102