secure parking

Upload: kaleem-ullah

Post on 07-Jul-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 SECURE PARKING

    1/84

    1

    IN THE NAME OF ALLAH THE MOST BENEFICIALAND THE MOST MERCIFUL

  • 8/18/2019 SECURE PARKING

    2/84

    2

    PROJECT REPORT

    “Secure Parking System” 

    A DISSERTATION SUBMITTED AS PARTIAL

    FULFILLMENTOF THE REQUIREMENTS FOR THE DEGREE OF

    BACHELOR OF SCIENCES IN COMPUTER SYSTEM ENGINEERING

    (BSC COMPUTER SYSTEM ENGINEER)

    UNDERTAKEN BY

    Zain Mehdi 2011-COE-13

    Kaleem-ullah 2011-COE-18

    Amber Ayub 2011-COE-21

    SUPERVISED BY

    ENGR.Usman Humayun

    DEPARTMENT OF COMPUTER ENGINEERING

    BAHAUDDIN ZAKARIYA UNIVERSITY MULTAN

    PAKISTAN

  • 8/18/2019 SECURE PARKING

    3/84

    3

    DEPARTMENT OF COMPUTER ENGINEERING

    COLLEGE OF ENGINEERING & TECHNOLOGY,

    BAHAUDDIN ZAKARIYA UNIVERSITY, MULTAN 

    C E R T I F I C A T E

    This is to certify that thesis/project submitted by the group members has

    been found satisfactory, in partial fulfillment of the requirements for the

    degree of BSc (Computer Engineering).

    Group Members: 

    Zain Mehdi 2011-COE-13

    Kaleem-ullah 2011-COE-18

    Amber Ayub 2011-COE-21

    SUPERVISED BY........................................................

    ENGR.Usman Humayun

    External Examiner 

    ………………………………………….. 

    Head of Department ………………………………………….. ENGR.Usman Humayun

  • 8/18/2019 SECURE PARKING

    4/84

    4

    DEDICATION

    To the sign of love,

    Our Respected Teacher

    Engr. Usman Humayun

    And

    Our Parents

    Whose

    Precious prayers and frankness,

    Enable us to complete successfully

    Our present work.

  • 8/18/2019 SECURE PARKING

    5/84

    5

    ACKNOWLEDGMENT

    Thanks to ALLAH the one and only who enabled us to complete our project and we

    are also in-debited to Holy Prophet (PBUH) whose life is a living example for every

    Muslim.

    Thanks to our loving Parents, family and friends  who encouraged us in every

    despair moment and enabled us to face the challenges of this project with brave heart.

    Our acknowledgment is due to people for their help in the completion of this project.

    Especially, our Supervisor Engr. Usman Humayun whose commitment and guidingmethod really helped us to get up whenever We fall during the project and accepted

    the idea to pursue this project as a final year project. Thanks to all the teachers of our

    department who helped us in our project. Without their help we cannot complete our

     project.

    Finally, Congratulations to my dearest family members who encouraged me

    throughout my life. Their support is valuable for me to stay at Computer Engineering

    Department BZU, Multan.

  • 8/18/2019 SECURE PARKING

    6/84

    6

    TABLE OF CONTENTS 

    PROJECT REPORT ...................................................................................................... 2 

    C E R T I F I C A T E .................................................................................................... 3 

    DEDICATION ............................................................................................................... 4 

    ACKNOWLEDGMENT................................................................................................ 5 

    LIST OF ACRONYMS ............................................................................................... 12 

    ABSTRACT ............................................................................................................... 133 

    CHAPTER 1 SECURE PARKING SYSTEM............................................................. 14 

    INTRODUCTION ....................................................................................................... 14 

    1.1 SECURE PARKING SYSTEM ........................................................................... 16 

    1.2 Types of Parking System ....................................................................................... 16 

    1.3 STATEMENT OF THE PROBLEM ..................................................................... 18 

    1.4 THE PURPOSE OF THE STUDY ........................................................................ 20 

    1.5 IMPORTANCE OF THE STUDY ...................................................................... 21 

    1.6 LIMITATIONS OF THE STUDY......................................................................... 22 

    CHAPTER 2 SECURE PARKING OVERVIEW ....................................................... 23 

    2.1 Airport parking Overview ...................................................................................... 24 

    2.2 PARKING GUIDANCE INFORMATION SYSTEM .......................................... 25 

    2.2.1 PGI SYSTEM EVALUATION .......................................................................... 25 

    2.3 ECONOMICS OF PARKING ............................................................................... 26 

    2.4 PARKING PAYMENT ......................................................................................... 26 

    Chapter 3  SOFTWARE TOOLS ................................................................................. 27 

    MICROSOFT VISUAL STUDIO ............................................................................... 28 

    3.1 Introduction ............................................................................................................ 28 

    3.2 Getting Started ....................................................................................................... 29 

    3.2.1 Integrated Development Environment (IDE) ...................................................... 29 

  • 8/18/2019 SECURE PARKING

    7/84

    7

    3.2.2 Create New Project ............................................................................................. 30 

    3.2.3 Solution Explorer ................................................................................................ 31 

    3.2.4 Toolbox ............................................................................................................... 32 

    3.2.5 Code Window ..................................................................................................... 33 

    3.2.6 Properties window .............................................................................................. 33 

    3.2.7 Build Tools.......................................................................................................... 34 

    3.2.8 Debug Menu: ...................................................................................................... 35 

    3.2.9 Start ..................................................................................................................... 36 

    3.2.10 MAIN PAGE: ................................................................................................... 37 

    3.3 Check_In Button .................................................................................................... 38 

    3.4 Check_out Button .................................................................................................. 40 

    3.5 Show Data Button .................................................................................................. 42 

    3.6 Add New User........................................................................................................ 42 

    3.6.1 Save Button ......................................................................................................... 43 

    3.6.2 Delete Button ...................................................................................................... 44 

    3.6.3 Reset Customer Database ................................................................................... 44 

    3.6.4 Reset Employee Database ................................................................................... 45 

    3.6.5 Reset LOGIN_IF Database ................................................................................. 46 

    3.6.6 Show Employee INFO ........................................................................................ 47 

    3.6.7 Show Login INFO............................................................................................... 48 

    3.6.8 Go-back ............................................................................................................... 48 

    3.7 Reporter.................................................................................................................. 49 

    3.7.1 Total Money Received ........................................................................................ 49 

    3.7.2 NO of Cars Parked .............................................................................................. 50 

    3.7.3 Get Report ........................................................................................................... 50 

    3.8 About...................................................................................................................... 51 

    3.9 Sign Out ................................................................................................................. 51 

    DATABASE IN VISUAL STUDIO (SERVICE BASED DATABASE) ................... 52 

    3.10 NAME OF THE DATABASE............................................................................. 52 

    3.11 Create a table........................................................................................................ 53 

    3.12 Create the Primary Key ........................................................................................ 53 

    3.13 Tables Structure ................................................................................................... 53 

    3.14 Create the rest of your columns ........................................................................... 53 

  • 8/18/2019 SECURE PARKING

    8/84

    8

    3.15 To Create a SQL Server Express Database .......................................................... 54 

    3.16 Save your table:.................................................................................................... 66 

    3.17 Implemented coding in the project: ..................................................................... 67 

    CHAPTER 4  HARDWARE TOOLS  ........................................................................ 68 

    4.1 Barcode Reader ...................................................................................................... 69 

    4.2 Barcode readers and scanners ................................................................................ 70 

    4.3 History.................................................................................................................... 71 

    4.4 Types of Barcode Reader ....................................................................................... 71 

    4.5 Working of Barcode Reader ................................................................................ 74 

    4.6 BARCODE READER FUNCTIONAL PARTS ................................................... 75 

    4.7 Benefits of Barcode Reader ................................................................................... 77 

    4.8 The Original Barcode Scanners ............................................................................ 79 

    4.9 Barcode Uses ........................................................................................................ 80 

    4.10 Some Traditional Barcodes: ................................................................................. 83 

    REFRENCES ............................................................................................................... 84 

  • 8/18/2019 SECURE PARKING

    9/84

    9

    LIST OF TABLES

    Table 1 Main Window ................................................................................................. 37 

    Table 2 Before Check-In Button .................................................................................. 38 

    Table 3 After Check-In Button .................................................................................... 39 

    Table 4 Before Check_Out Button .............................................................................. 40 

    Table 5 After Check_Out Button ................................................................................. 41 

    Table 6 After Check_Out Button Yes .......................................................................... 41 

    Table 7 Show Data Button ........................................................................................... 42 

    Table 8 Data Save Window ......................................................................................... 43 

    Table 9 Delete Data Window ....................................................................................... 44 

    Table 10 Before Reset Customer Database Window ................................................... 44 

    Table 11 After Reset Customer Database Window ..................................................... 45 

    Table 12 Before Reset Employee Database ................................................................. 45 

    Table 13 After Reset Employee Database ................................................................... 46 

    Table 14 Before Reset LOGIN_IF Database ............................................................... 46 

    Table 15 After Reset LOGIN_IF Database ................................................................ 46 

    Table 16 Employee INFO ............................................................................................ 47 

    Table 17 Show Login INFO ........................................................................................ 48 

    Table 18 Go back Window .......................................................................................... 48 

  • 8/18/2019 SECURE PARKING

    10/84

    10

    LIST OF FIGURES

    Figure 1 traditional and automated parking .............................................. 17

    Figure 2 State of the Problem ................................................................... 19

    Figure 3 Airport parking overview ........................................................... 24

    Figure 4 Economics of Parking Overview ............................................... 26

    Figure 5 Map shows price category relative to parking ........................... 26

    Figure 6 Visual Studio Window .............................................................. 28

    Figure 7 Starting Visual Studio Window ................................................. 29

    Figure 8 New Project Window ................................................................... 30

    Figure 9 Solution Explorer Window ........................................................ 31

    Figure 10 Tool-Box Window ................................................................... 32

    Figure 11 Secure Parking Window ........................................................... 32

    Figure 12 Code Window ........................................................................... 33

    Figure 13 Properties window .................................................................... 33Figure 14 Build Tools Window ................................................................ 34

    Figure 15 Debug Window ........................................................................ 35

    Figure 16 LOGIN Window ...................................................................... 36

    Figure 17 Add New User Window ........................................................... 42

    Figure 18 Save Window ........................................................................... 43

    Figure 19 Report Window ........................................................................ 49Figure 20 Money Received Window ........................................................ 49

    Figure 21 No of cars parked ..................................................................... 50

    Figure 22 Project Window ........................................................................ 54

    Figure 23 Add database window .............................................................. 55

    Figure 24 Solution B1 Window ................................................................ 55

    Figure 25 Open Database ......................................................................... 56

  • 8/18/2019 SECURE PARKING

    11/84

    11

    Figure 26 NEWQ.mdf Window................................................................ 57

    Figure 27 Add new Table Window .......................................................... 57

    Figure 28 Properties Window ................................................................... 60

    Figure 29 Is Identity Properties Setting .................................................... 61

    Figure 30 Server Explorer Window.......................................................... 64

    Figure 31 Open Table Data ...................................................................... 65

    Figure 32 save table window .................................................................... 66

    Figure 33 Barcode Reader1 ...................................................................... 69

    Figure 34 Barcode Reader2 ...................................................................... 70

    Figure 35 Wand Scanner .......................................................................... 71

    Figure 36 Slot Scanner ............................................................................. 72

    Figure 37 CCD scanner ............................................................................ 72

    Figure 38 Camera Reader ......................................................................... 73

    Figure 39 Laser Scanner .......................................................................... 73

    Figure 40 Working Mechanism of a Barcode Reader .............................. 74

    Figure 41 Single Point LED ..................................................................... 75Figure 42 Orginal Barcode ....................................................................... 79

    Figure 43 BARCODE SYMBOLOGY .................................................... 81

    Figure 44 Traditional Barcodes ................................................................ 83

  • 8/18/2019 SECURE PARKING

    12/84

    12

    LIST OF ACRONYMS

    SPS Secure Parking System

    SQL Structured Query Language

    PGI Parking Guidance Information

    MVS Microsoft Visual Studio

    BCR Bar-Code Reader

    IDE INTEGRATED DEVELOPMENT ENVIRMENT

  • 8/18/2019 SECURE PARKING

    13/84

    13

    ABSTRACT

    Due to the increasing number of vehicles on the roads, traffic problems always

    Exist. The current unmanaged car parks and transportation facilities make it

    difficult to accommodate the increasing number of vehicles in a proper,

    Convenient manner so it is necessary to have a car parking management system

    in big car parks. This study is aimed at analyzing a car parking management system.

    This system allocates available parking space to a given driver to park their

    Vehicle, renews the availability of the parking space when the car leaves and

    Computes the charges due. Implementing this system will increase parking

    Utilization. The system does this by providing more efficient and effective parking

    Enforcement.

  • 8/18/2019 SECURE PARKING

    14/84

    14

    CHAPTER 1

    SECURE PARKING SYSTEM

    INTRODUCTION

  • 8/18/2019 SECURE PARKING

    15/84

    15

    INTRODUCTION

    Due to tremendous advancement in technology the prices of vehicles are now

    economical to have it. But in comparison with this in cities there is shortage of

     parking zones and because of this everybody tries to park his vehicle properly, which

    creates chaos at parking place. Therefore in today’s fast growing technological world,

    regulation of parking is very important issue. With the growing number of vehicles

    and the consequent shortage of parking space, there is haphazard and totally

    unregulated parking of vehicles all over and there is all big issue of security. Thus this

    situation calls out for secure parking system that not only guideline in parking in

    given area but also keeps their car Secure.

    To provide to the need, here we present a miniature model of a secure car parking

    system that set number of cars that can be entered in secure parked in an area at any

    given time based on the parking space availability. The entry and exit point of

    vehicles are same and both time for security purpose issued barcode are checked.

    Status signals indicate whether space is currently available in the parking lot, and

    whether a car is currently in the process of entering or leaving the parking space. Oursystem also guides the driver by indicating which parking slot is issued to park your

    vehicles at any given time. This feature saves the time of parking and also fuel.

    This chapter will provide the overview of the project title, its background and the

     problems statement. In addition, this chapter will also discussed the objectives of the

     project implementation, the scope of works to be done and the limitations that have

     been encountered upon the completion of this project.

  • 8/18/2019 SECURE PARKING

    16/84

    16

    1.1 SECURE PARKING SYSTEM

    A Secure Parking system is such a parking system which provide you security of

    your vehicle. In Secure parking system, our system provide two barcode card forsecurity purpose of vehicles. If you are permanent member of our system then our

    system provide permanent card and card provided by the technical desk and when you

    entered in secure parking system then our system check issued barcode card and if

    you are visitor then our system check visitor barcode at both entry and exit time. In

    almost every major cities and airport in the world, parking is expensive and limited

    and also there is big issue of security. Inconsistent flow of information from parking

    guidance information systems in the busiest cities and airports usually creates alongqueue of line during car entry and exit. The main purpose for this thesis is to provide a

    secure car parking system using C# in Visual Studio and a hardware tool Barcode

    Reader. The implementation and a probabilistic analysis of the application are

     presented as well. The graphical user interface and the optimization of the

    functionality of the application can facilitate the secure and swift parking mechanism.

    1.2 Types of Parking System 

    There are two types of car parking systems: traditional and automated. In the long

    term, automated car parking systems are likely to be more cost effective when

    compared to traditional parking garages. Automatic multi-story automated car park

    systems are less expensive per parking slot, since they tend to require less building

    volume and less ground area than a conventional facility with the same capacity. Both

    automated car parking systems and automated parking garage systems

    reduce pollution —   cars are not running or circling around while drivers look for

     parking spaces. Now a days car parking has been one of the major problems inurban areas have been confronting with. For example in Karachi, Lahore city number

    of cars are increasing day by day. But the parking lots or parking areas are not

    increasing proportionally and also there is no secure system for car parking. As a

    reason traffic jam is getting severe and the overall traffic condition is deteriorating.

    This calls for multi-story car parking system which can be extremely beneficial in

    this situation.

    https://en.wikipedia.org/w/index.php?title=Ground_area&action=edit&redlink=1https://en.wikipedia.org/wiki/Pollutionhttps://en.wikipedia.org/wiki/Pollutionhttps://en.wikipedia.org/w/index.php?title=Ground_area&action=edit&redlink=1

  • 8/18/2019 SECURE PARKING

    17/84

    17

    A multi-story car-park (also called a parking garage, parking structure, parking ramp,

     parkade, parking building or parking deck) is a building designed for car parking and

    where there are a number of floors or levels on which parking takes place. It is

    essentially a stacked car park. Many car parks are independent buildings dedicated

    exclusively to that use.

    Figure 1 traditional and automated parking

  • 8/18/2019 SECURE PARKING

    18/84

    18

    1.3 STATEMENT OF THE PROBLEM

    Today there is big issue of security of vehicles. People parked their car but when they

    comeback after their jobs are done then their car are theft. So they face much more

    difficult problems to find out their car. So we decide make a project which provide

    you security of your vehicles. People parked their Vehicles in our Secure parking

    system and freely they go to their jobs. Their vehicles are secure and nobody can theft

    their Vehicles. Secure Parking System facilities has become a huge problem. There is

    lack of secure parking system for parking Vehicles due to increased unplanned

    housings in many places of the capital. There has been increase in the number ofvehicles, but without sufficient parking spaces. Such growing number of small

    vehicles especially motorcycles and micro buses have created mess in the city

    including the increase in traffic jam. Another challenge due to the increased number

    of vehicles is undisciplined driving, which created obstacle for the traffic management

    system in Pakistan. To improve all these, there is a need to create such system which

     provide the solution of these problems.

    Customers often choose the parking service in order to reduce their cost. Parkingfacilities at airports usually use state-of-the-art technology. If a PGI system is

    implemented at the airport, this system can only display the number of vacant lots and

    the direction to the lots. The system cannot provide information about the exact

    location, the price rate, other alternatives and free space in advance. This information

    is only visible when the driver approaches the parking lots.

    Another major drawback is the time it takes to find a vacant lot, especially in peak

    hours. A study (Park study 2011) showed that 86 % of drivers face difficulty finding a

     parking space. Finding space during peak hours can take more than 10 minutes for

    more than 66% of the visitors. During rush hour drivers mostly park their car an

    improper way, a car may be parked in such way that it occupies two parking lots

    rather than one. Improper parking happens when a driver is not careful about another

    derivers’ rights. The driver may notice his/her improper parking after leaving his car. 

  • 8/18/2019 SECURE PARKING

    19/84

    19

    Figure 2 State of the Problem

  • 8/18/2019 SECURE PARKING

    20/84

    20

    1.4 THE PURPOSE OF THE STUDY

    The basic purpose of the work is to investigate and to design a system that can

     provide a solution to the long existing problem. The main objectives can be

    summarized as to develop a system that capable to show the solution of parking

    security difficulties. It is also aimed to develop a system that can save the time and

    cost by introducing Barcode Reader technology that can utilize its input and Output to

    the fullest and to offer the parking owner a sophisticated yet a great Solution to their

     problem. Finally, with this project it is intended to provide Knowledge on how

     programmable Barcode Reader works after being programmed by using C# Language

    and to understand the ability of a small Device to perform multitask.

    To ensure that car parking is provided in accordance with the State Planning Policy

    Framework and Local Planning Policy Framework. To ensure the provision of an

    appropriate number of car parking spaces having regard to the demand likely to be

    generated, the activities on the land and the nature of the locality. To support

    sustainable transport alternatives to the motor car. To promote the efficient use of car

     parking spaces through the consolidation of car parking facilities. To ensure that car

     parking does not adversely affect the amenity of the locality. To ensure that the designand location of car parking is of a high standard, creates a safe environment for users

    and enables easy and efficient use.

  • 8/18/2019 SECURE PARKING

    21/84

    21

    1.5 IMPORTANCE OF THE STUDY

    The importance of this project is to provide Secure Parking System for car and other

    vehicle. It also provide data of people which enter in our secure parking system and

    their data also use for military purpose. The study of this project also provide many

    advantages which we will discuss below.

    1. Possible Block are avoided:

    In the rush hour, long traffic block always appear at the gates. To cut down such

    redundancy, the system must be escalated.

    2. It makes management easy:

    Once Secure Parking System designed is complete, the building can have a fully

    integrated central management system through a teamwork.

    3. It saves time:

    Clients can easily and efficiently enter or leave secure parking.

    4. It offers better service:

    Secure Parking System offers all services so that the customer confidentiality may be

    maintained.

    5. It provides precise monitoring:

    The secure parking system clearly indicates all the required information and the

    integrity that contain the check-in date the check-out date the name of the employee

    that parked the car the name of the person that the car belong to, his cnic and

    Car-no.

  • 8/18/2019 SECURE PARKING

    22/84

    22

    1.6 LIMITATIONS OF THE STUDY

    The following are the limitations of the study:

    1.  Our system is focusing on the management of the parking vehicles that enter or

    leave the parking lot.

    2.  The extra hardware needed such as the boomer the automated door and the light

    signs are the optional behavior extending our system

    3.  The main feature of our secure parking management system is the most

    economical automated system ever produced with all the functionalities.

    4.  The designed system cannot fully display the digital map of the parking lot. Or

    direct the customers to his parking location instead of this we used color badges

    for the distinction of the parking places of the cars.

  • 8/18/2019 SECURE PARKING

    23/84

    23

    CHAPTER 2SECURE PARKING OVERVIEW

  • 8/18/2019 SECURE PARKING

    24/84

    24

    2.1 Airport parking Overview

    Parking lots which are located outside the airport boundary are known as "off-airport

     parking". Even though these parking lots are outside the airport boundaries, it is worth

    checking the transfer time in order to be punctual at the airport. Fortunately if the

    drivers are willing to travel a bit further from the terminal, they can park in there and

    can save money and time.

    Figure 3 Airport parking overview

  • 8/18/2019 SECURE PARKING

    25/84

    25

    2.2 PARKING GUIDANCE INFORMATION SYSTEM

    A Parking Guidance Information System (PGI) presents dynamic information on parking in controlled areas. The system is combined with traffic monitoring,

     processing, and changeable message signs in order to provide the service. Searching a

    vacant space at the airport without a relevant information is a major cause of

    conjunction and pollution during rush hours. The role of a Parking Guidance

    Information System is to reduce the parking search traffic in large parking facilities

     by directing drivers to car parks where occupancy levels are low. The PGI indicates

    the number of available parking lot of a particular parking zone, thus giving the total

    number of empty spaces in the specified parking zone. However, the system does not

    Fully display all the necessary information in a full scale, for example the PGI does

    not tell the driver where exactly to park the car.

    2.2.1 PGI SYSTEM EVALUATION

    In recent years, excessive parking search time has been identified as a significant

    contributor to airport congestion and as an important influence in destination choice.

    Recent studies of parking behavior have found that parking search time can constitute

    up to 25% of the average total travel time, and it usually takes about 1.5 to 2 times the

    value of the driving time.

    It reduced search time by allocating drivers to the appropriate facility is about 25%.

    To some extent diverting drivers away from an attempt to park on-street is only

    indicated by a single arrow to the parking zone. It is quite sophisticated to allocate the

    exact position. Reducing queuing is not quite moderate if the system is compared with

    the design desktop application

    .

  • 8/18/2019 SECURE PARKING

    26/84

    26

    2.3 ECONOMICS OF PARKING

    The dynamic change of parking facility affects the economic affiliations of the sector.Airport parking is the most congested parking place for motor vehicle as well as time-

    consuming and expensive. The following trend diagram shows how airport parking

    affects the investment return cost in aviation and non-aviation portfolio.

    Figure 4 Economics of Parking Overview

    2.4 PARKING PAYMENT

    Parking payments are usually made through inserting a coin into the cash dispatch

    machine or using a card when upon exit. In this thesis proposal, the drivers can pay a

     parking fee manually, e.g. credit card or cash. Once the, the driver can have a chance

    to get a seasonal membership so that she/he has reduced parking fee. The driver can

    get the tickets from the system tickets and parking fees paid offices.

    Figure 5 Map shows price category relative to parking

  • 8/18/2019 SECURE PARKING

    27/84

    27

    Chapter 3

    SOFTWARE TOOLS

  • 8/18/2019 SECURE PARKING

    28/84

    28

    MICROSOFT VISUAL STUDIO

    3.1 Introduction

    Microsoft Visual Studio is an integrated development environment (IDE) from

    Microsoft. It can be used to develop console and graphical user interface applications

    along with Windows Forms applications, web sites, web applications, and web

    services in both native code together with managed code for all platforms supported

     by Microsoft Windows, Windows Phone, Windows CE, .NET Framework, .NET

    Compact Framework and Microsoft Silverlight. Visual Studio 2013 is a tool-rich

     programming environment containing the functionality that you need to create large

    or small C# projects running on Windows 7, Windows 8, and Windows 8.1. You can

    even construct projects that seamlessly combine modules written in different

     programming languages such as c#, C++, Visual Basic, and F#. First, you will open

    the Visual Studio 2013 programming environment and learn how to create a windows

    form application.

    Figure 6 Visual Studio Window

  • 8/18/2019 SECURE PARKING

    29/84

    29

    3.2 Getting Started

     Now we start to use Microsoft Visual Studio.

    3.2.1 Integrated Development Environment (IDE)

    The Visual Studio product family shares a single integrated development environment(IDE) that is composed of several elements: the Menu bar, Standard toolbar, varioustool windows docked or auto-hidden on the left, bottom, and right sides, as well as theeditor space. The tool windows, menus, and toolbars available depend on the type of

     project or file you are working in. Below we see the Visual Studio IDE (IntegratedDevelopment Environment): First time when you open visual studio then it look likeas

    Figure 3.2.1 Visual studio Window

    Figure 7 Starting Visual Studio Window

  • 8/18/2019 SECURE PARKING

    30/84

    30

    3.2.2 Create New Project

    The first thing you do when you want to create a new application is to create a new project. This can be done from the Start Page or from the File menu:

    Figure 8 New Project Window 

    Then the “New Project” window appears: In this window you will select an appropriate template based on what kind ofapplication you want to create, and a name and location for your project and solution.The most common applications are:

    We work on window from aplication using c# and create multiple forms.We alsocreate sql database on visual studio using database serviced application.

  • 8/18/2019 SECURE PARKING

    31/84

    31

    3.2.3 Solution Explorer

    Solutions and projects contain items that represent the references, data connections,

    folders, and files that you need to create your application. A solution container can

    contain multiple projects and a project container typically contains multiple items.

    Figure 9 Solution Explorer Window 

  • 8/18/2019 SECURE PARKING

    32/84

    32

    3.2.4 Toolbox

    The Toolbox contains all the necessary controls, etc. you need to create your user

    interface. See Figure below.

    Figure 10 Tool-Box Window

    And our project look like as after adding tool box such as

    Figure 11 Secure Parking Window 

  • 8/18/2019 SECURE PARKING

    33/84

    33

    3.2.5 Code Window

    When you double click on window form design then open code window. If codewindow does not open then right click on form design and now go in code window.

    Figure 12 Code Window

    3.2.6 Properties windowEach control we have on our user interface has lots of Properties we can set.

    Figure 13 Properties window 

  • 8/18/2019 SECURE PARKING

    34/84

    34

    3.2.7 Build Tools

    In Visual Studio we have lots of Build and Debugging Tools.Build menu: Below we see the Build menu:

    Figure 14 Build Tools Window

    The most used tool is “Build Solution” (Shortcut Key: F6).

  • 8/18/2019 SECURE PARKING

    35/84

    35

    3.2.8 Debug Menu:

    Below we see the Debug menu: The most used tool is “Start Debugging”(Shortcut Key: F5).

    Figure 15 Debug Window 

  • 8/18/2019 SECURE PARKING

    36/84

    36

    3.2.9 StartWhen you start your project then your project are run and if there is no error in your

     program then output window appear otherwise output window does not show. So in

    our case there is no error in our program and when program run then output windowshown blew in figure

    Figure 16 LOGIN Window

  • 8/18/2019 SECURE PARKING

    37/84

    37

    3.2.10 MAIN PAGE:

    After giving user name and password then new window appear as

    Table 1 Main Window

  • 8/18/2019 SECURE PARKING

    38/84

    38

    3.3 Check_In Button

    When you enter data manually in given field and press check-in button then data are

    entered in data Grid view such as:Before click button check-in window appear as

    Table 2 Before Check-In Button

  • 8/18/2019 SECURE PARKING

    39/84

    39

    After click button check-in then window look as

    Table 3 After Check-In Button 

  • 8/18/2019 SECURE PARKING

    40/84

    40

    3.4 Check_out Button

    When you click on check-out button then your car are left the secure parking systemand new window open and asked you money has paid or not .Now we check _out id1021 then new window open look like as:Before check-out button press

    Table 4 Before Check_Out Button

  • 8/18/2019 SECURE PARKING

    41/84

    41

    After  check-out button press then system ask confirmation yes or no.if he paid moneythen press button yes otherwise press button no. 

    Table 5 After Check_Out Button

    After yes then your vehicle are check_out.

    Table 6 After Check_Out Button Yes

  • 8/18/2019 SECURE PARKING

    42/84

    42

    3.5 Show Data Button

    When you click on show data button then it show all record that are entered in parkingsystem

    Table 7 Show Data Button 

    3.6 Add New User

    This allowed only admin of secure parking system .When he Press new user buttonthen new window open such as:

    Figure 17 Add New User Window 

  • 8/18/2019 SECURE PARKING

    43/84

    43

    3.6.1 Save Button

    In this window admin add permanent users such as

    Figure 18 Save Window

     Now click on save button then data are saved such as

    Table 8 Data Save Window

  • 8/18/2019 SECURE PARKING

    44/84

    44

    3.6.2 Delete Button

    When you press delete button then user are delete such as E_ID 222 has delete andshow as

    Table 9 Delete Data Window

    3.6.3 Reset Customer Database

    When you click on reset customer button then all data are removed from secure parking system and now you are entered new database.

    Table 10 Before Reset Customer Database Window

  • 8/18/2019 SECURE PARKING

    45/84

    45

    When you click on yes button then all data are removed such as

    Table 11 After Reset Customer Database Window 

    3.6.4 Reset Employee Database

    When you click on reset customer button then all data are removed from secure parking system and now you are entered new database.

    Table 12 Before Reset Employee Database 

  • 8/18/2019 SECURE PARKING

    46/84

    46

    When you click on yes button then all data are removed such as

    ` Table 13 After Reset Employee Database

    3.6.5 Reset LOGIN_IF Database

    When you click on reset customer button then all data are removed from secure

     parking system and now you are entered new database.

    Table 14 Before Reset LOGIN_IF Database

    Click on yes button then

    Table 15 After Reset LOGIN_IF Database

  • 8/18/2019 SECURE PARKING

    47/84

    47

    3.6.6 Show Employee INFO

    When admin click on this button then it show all employee information such as

    Table 16 Employee INFO 

    You can add delete and search new users and admins in this data table. Moreoverthese users and admins log-in and log-out info can be seen in the SHOW LOGININFO table you can also search in there by the EMPLOYEE-ID.

  • 8/18/2019 SECURE PARKING

    48/84

    48

    3.6.7 Show Login INFO

    When admin click on this button then it show all employee information which arelogin such as

    Table 17 Show Login INFO

    3.6.8 Go-back

    When you click on go back button then you go to the main window such as

    Table 18 Go back Window

  • 8/18/2019 SECURE PARKING

    49/84

    49

    3.7 Reporter

    When you click on reporter button then new window open look like as

    Figure 19 Report Window

    3.7.1 Total Money Received

    When click on this button then it show total money of vehicle which are entered insecure parking system such as

    Figure 20 Money Received Window

  • 8/18/2019 SECURE PARKING

    50/84

    50

    3.7.2 NO of Cars Parked

    When you click on this button then show number of cars which are parkedSuch as

    Figure 21 No of cars parked

    3.7.3 Get ReportIf you see that which car are entered during this date then click on this button then itshow all record of car which are entered during this date such as

    Table 3.7.3 Get Report Window

  • 8/18/2019 SECURE PARKING

    51/84

    51

    3.8 About

    When you click on this button then new window open and which show information ofsecure parking system such as

    Figure 3.8 about window

    3.9 Sign Out

    When user finished his work/duties then it sign out your user id. When user click onsign out button then window look like as

    Figure 3.9 sign out window

  • 8/18/2019 SECURE PARKING

    52/84

    52

    DATABASE IN VISUAL STUDIO

    (SERVICE BASED DATABASE)

    For database we continue using Microsoft VISUAL STUDIO 2013 because it is easyto handle for the beginners and can be editable during the project construction

     process. In this section, you’ll learn how to cr eate a database with SQL Server

    Express. You can do all this within the Visual C# .NET software. Once you have a

    database, you’ll learn how to pull records from it, and display them on a Windows

    Form. You will also learn how to navigate through the records in your database, and

    how to add new records.

    3.10 NAME OF THE DATABASE

    Probably the most important requirement of creating a database is to give it a name.

    There are rules you must follow when naming a database:

    A name can start with either a letter, a digit, an underscore (_) or a non-readable

    character. Examples are _n, act, and %783, second after the first character (letter,

    digit, underscore, or symbol), the name can have combinations of underscores,

    letters, digits, or symbols. Examples are _ n24 or act_52_t.A name can include

    spaces. Example are c0untries st@ts, govmnt (records), or gl0b# $urvey|| Because of

    the flexibility of Transact-SQL, it can be difficult to maintain names in a database.

    Based on this, there are conventions we will use for our objects. In fact, we will

    adopt the rules used in C/C++, C#, Pascal, Java, and Visual Basic, etc. In our

    databases:

    After the first character, we will use any combination of letters, digits, or underscores.

    A name will not start with two underscores

  • 8/18/2019 SECURE PARKING

    53/84

    53

    3.11 Create a table.

    A database can only store data if you create a structure for that data. A table holds the

    information that you enter into your database, and you will need to create it before

    you can proceed. Expand the new database in your Databases folder, and right-click

    on the Tables folder and select "New Table...".Windows will open on the rest of the

    screen which will allow you to manipulate your new table.

    3.12 Create the Primary KeyIt is highly recommended that you create a Primary Key as the first column on your

    table. This acts as an ID number, or record number, that will allow you to easily recall

    these entries later. To create this, enter "ID" in the Column Name field, type int into

    the Data Type field, and uncheck the "Allow Nulls." Click the Key icon in the toolbar

    to set this column as the Primary Key.

    You don't want to allow null values because you always want the entry to be at least

    "1". If you allow nulls, your first entry will be "0".

    In the Column Properties window, scroll down until you find the Identity

    Specification option. Expand it and set "(ls Identity)" to "Yes". This will

    automatically increase the value of the ID column for each entry, effectively

    automatically numbering each new entry.

    3.13 Tables StructureTables are composed of fields, or columns. Each column represents one aspect of a

    database entry. For example, if you were creating a database of employees, you might

    have a "First Name" column, a "Last Name" column, an "Address" column, and a

    "Phone Number" column.

    3.14 Create the rest of your columns

    When you finish filling out the fields for the Primary Key, you will notice that new

    fields appear underneath it. These allow you to enter in your next column. Fill out the

    fields as you see fit, and ensure that you pick the right data type for the information

    that will be entered in that column:

  • 8/18/2019 SECURE PARKING

    54/84

    54

    Nchar (# )  : This is the data type you should use for text, such as names, addresses,

    etc. The number in parentheses is the maximum number of characters allowed for this

    field. Setting a limit ensures that your database size stays manageable. Phone numbers

    should be stored with this format, as you don't perform mathematical functions on

    them.

    Int :This is for whole numbers, and is typically used in the ID field.

    Decimal(x , y )   :This will store numbers in decimal form, and the numbers within

    the parentheses denote the total number of digits and the number digits following the

    decimal, respectively. For example decimal (6 , 2) would store numbers

    as 0000.00.

    3.15 To Create a SQL Server Express DatabaseStart a new project, and call it anything you like as we're only using this project to

    create a database. But do remember where on your hard drive you saved this project

    to, usually in your Documents folders, under Visual Studio, then Projects. When a

    database is created, it will be saved in the project folder. You’ll need to browse to

    this folder to add the database as resource when we create a new project. 

    Right Click on B1 > Add New Item.

    Figure 22 Project Window

  • 8/18/2019 SECURE PARKING

    55/84

    55

    From the Add New Item dialogue box, look for the Service-based database item, as inthe image below:

    Figure 23 Add database window

    In the Name box at the bottom, type NEWQ.mdf. Then click the Add button

    Figure 24 Solution B1 Window

  • 8/18/2019 SECURE PARKING

    56/84

    56

    When you save your project, the database will get saved along with all the solution

    files. Now that you have created the database itself, you need to create at least onetable to go in it. To create a table, right click on the database in the Solution Explorer.

    From the menu that appears, select Open:

    Figure 25 Open Database

  • 8/18/2019 SECURE PARKING

    57/84

    57

    When you click Open, you'll see the Database Explorer appear on the left hand side of

    your screen (it's called Server Explorer in Visual Studio 2013):

    Figure 26 NEWQ.mdf Window

    To create a new table, right click on Tables. From the menu that appears, select Add

    New Table 

    Figure 27 Add new Table Window 

  • 8/18/2019 SECURE PARKING

    58/84

    58

    When you click on Add New Table you should see the table designer open up in the

    center of your screen. We'll now create a new table in the database. To see how to do

    that click below, right. When you click Add New Table you'll see this screen appear

    in the middle

    Table 3.6.6 Table Design Window

    The first thing we can do is to give the table a name. In the bottom half of the screen

    above, delete the word Table between the square brackets. Type the name

    tbl_employees instead:

  • 8/18/2019 SECURE PARKING

    59/84

    59

    CREATE TABLE [dbo].[EMP]

    Table 3.6.7 Table EMP Window

     Now click the Update button, which is top left of the table designer: You should thensee the following screen:

    Figure 3.6.8 Table Update database window

  • 8/18/2019 SECURE PARKING

    60/84

    60

    Click Update Database to return to the table designer. We can now set up thecolumns that are going into the table.

    The first column name, Id, has already been set up:

    Table 3.6.9 Table Design data Type 

    The Data Type is OK on int, which is short for Integer. The column has a key symbolto the left, which means it is the Primary Key. This is OK, too. The Allow Nulls is

    unchecked, which is what you want for a Primary Key. This means you can't have

    duplicate item for this column.

    One thing we can do for the Id column is to have it update itself automatically. When

    you add a new item to the database, the next integer in the sequence will be added to

    the Id column. To set the Id column to Auto Increment, highlight the Id row then take

    a look at the properties area bottom right. Expand the Identity Specification item

    Figure 28 Properties Window

  • 8/18/2019 SECURE PARKING

    61/84

    61

     Now set Is Identity to True:

    Figure 29 Is Identity Properties Setting

    The Identity Increment has a default of 1, meaning 1 will get added to the Id column

    every time a new entry is added to the table.With the Id column set up, we can add

    more columns.

  • 8/18/2019 SECURE PARKING

    62/84

    62

    Click in the Name box just below Id at the top of your table designer. Now type the

    new column heading first name. We want this to be text. So for the Data Type,

    select nvarchar(50), meaning a maximum of 50 characters:

    Table 3.6.12 Select data type Table Design Window

  • 8/18/2019 SECURE PARKING

    63/84

    63

    The Allow Nulls is ok checked.

    Add a third column by clicking into the Name box again. This time, type last name.

    Set the Data Type to nvarchar(50), just as before. Leave Allow Nulls checked. We

    only need two more columns, job title and department. Add this using the same

    technique as above. When you're done, your table designer will look like this:

    Table 3.6.13 EMP Design Window

    Again, click the Update button to save your changes. Now have a look at the DatabaseExplorer on the left. You should find that your new columns are displayed:

  • 8/18/2019 SECURE PARKING

    64/84

    64

    Figure 30 Server Explorer Window 

     Now that we have all the columns set up, we can add some data to the table.

  • 8/18/2019 SECURE PARKING

    65/84

    65

    To add data to your table, right click the name of your table in the Database Explorer.Then click Show Table Data:

    Figure 31 Open Table Data

    When you click on Show Table Data you'll see a new screen appear in the middle.This one:

    Table 3.6.16 Show Table Data 

  • 8/18/2019 SECURE PARKING

    66/84

    66

     Now that you have a database with some data in it, we can move on. Before you close

    this solution, remember where you saved it to, and the name of your project. If you

    left everything on the defaults when you installed Visual Studio, then your projects

    will be in your Documents folder. The database will be in the folder created for this

    database project. Save your work, and you will have created your very first Compact

    SQL Server Express database

    3.7 Save your table:When you are finished creating your columns, you will need to save the table before

    entering information. Click the Save icon in the toolbar, and then enter in a name for

    the table. Naming your table in a way that helps you recognize the contents is

    advisable, especially for larger databases with multiple tables.

    Figure 32 save table window

  • 8/18/2019 SECURE PARKING

    67/84

    67

    3.8 Implemented coding in the project:

    MAIN APPLICATION Code:Using System;

    using System.Collections.Generic;

    using System.ComponentModel;using System.Data;

    using System.Data.SqlClient;

    using System.Drawing;

    using System.IO.Ports;

    using System.Linq;

    using System.Text;

    using System.Threading.Tasks;

    using System.Windows.Forms;

    using System.Threading;

    namespace B1

    {

    public partial class MAIND : Form

    {

    SqlConnection cn = new

    SqlConnection(@"DataSource=(LocalDB)\v11.0;AttachDbFilename=C:\Users\ZAIN

    MEHDI\Documents\Visual Studio 2013\B1-----\B1\NEWQ.mdf;Integrated

    Security=True");

    SqlCommand cmd = new SqlCommand(); SqlCommand cmd1 = new SqlCommand();

    SqlDataReader reader; DataTable table;

    SerialPort _serialPort; private delegate void SetTextDeleg(string text);

    public MAIND()

    {

    ADDNEW.Enabled = LOGINF.admin; temp.Text = LOGINF.emp;

    temp.Enabled = false; lsin.Text=LOGINF.emp; LOADTABLE();}

    private void MAIND_Load(object sender, EventArgs e)

    {cmd.Connection = cn;

    // all of the options for a serial device

    // PortName = "COM1", Baud Rate = 19200, Parity = None,

    // Data Bits = 8, Stop Bits = One, Handshake = None

    _serialPort = new SerialPort("COM2",9600, Parity.None, 8,StopBits.One);

    _serialPort.Handshake = Handshake.None;

    _serialPort.DataReceived+=newSerialDataReceivedEventHandler(sp_DataReceived)

    ;

    _serialPort.ReadTimeout = 500;

    _serialPort.WriteTimeout = 500;

    _serialPort.Open();}

    public void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)

    {

    Thread.Sleep(500);

    string data = _serialPort.ReadLine();

    this.BeginInvoke(new SetTextDeleg(si_DataReceived), new object[]{ data });

    }

    private void si_DataReceived(string data)

    {

    BARCODE.Text = data.Trim();

    }

  • 8/18/2019 SECURE PARKING

    68/84

    68

    Chapter 4

    Hardware Tools

  • 8/18/2019 SECURE PARKING

    69/84

    69

    4.1 Barcode Reader

    A barcode reader (or barcode scanner) is an electronic device that can read and output

     printed barcodes to a computer. Like a flatbed scanner, it consists of a light source, a

    lens and a light sensor translating optical impulses into electrical ones. Lines of

    different widths and sizes representing data, that when read determine what the

    scanned object is. Barcodes are often used to help organize and index information or

     prices about an object. Barcodes used by the U.S. postal service that helps speed the

    delivery of mail is another perfect example of how a barcode could be used. The

     picture is an example of what a barcode of an address. A barcode reader, also called a

     price scanner or point-of-sale scanner, is a hand-held or stationary input device used

    to capture and read information contained in a bar code. A barcode reader consists of

    a scanner, a decoder (either built-in or external), and a cable used to connect the

    reader with a computer. Because a barcode reader merely captures and translates the

     barcode into numbers and/or letters, the data must be sent to a computer so that a

    software application can make sense of the data. Barcode scanners can be connected

    to a computer through a serial port, keyboard port, or an interface device called

    a wedge. A barcode reader works by directing a beam of light across the bar code and

    measuring the amount of light that is reflected back. (The dark bars on a barcode

    reflect less light than the white spaces between them.) The scanner converts the light

    energy into electrical energy, which is then converted into data by the barcode reader 

     

    Figure 33 Barcode Reader1

  • 8/18/2019 SECURE PARKING

    70/84

    70

    Figure 34 Barcode Reader2

    4.2 Barcode readers and scanners

    A barcode reader (BCR) or scanner, also known as a point of sale (POS) scanner is a

    hardware device capable of reading a barcode. It can also print out the details of the

     product or log information about that product into a database. A perfect example of a

     barcode reader is a super market barcode scanner that reads and logs the price of a

     product. In the picture is an example of a Barcode reader from HP.  Today,

    many smartphones with the proper  apps are also capable of scanning and reading

     barcodes.

    http://www.computerhope.com/comp/hp.htmhttp://www.computerhope.com/jargon/s/smartphone.htmhttp://www.computerhope.com/jargon/a/applicat.htmhttp://www.computerhope.com/jargon/a/applicat.htmhttp://www.computerhope.com/jargon/s/smartphone.htmhttp://www.computerhope.com/comp/hp.htm

  • 8/18/2019 SECURE PARKING

    71/84

    71

    4.3 History

    In 1932 an ambitious project was conducted by a small group of students headed by

    Wallace Flint at the Harvard University Graduate School of Business Administration.

    The project proposed that customers select desired merchandise from a catalog byremoving corresponding punched cards from the catalog. These punched cards were

    then handed to a checker who placed the cards into a reader. The system then pulled

    the merchandise automatically from the storeroom and delivered it to the checkout

    counter. A complete customer bill was produced and inventory records were updated.

    4.4 Types of Barcode Reader

    There are five basic kinds of barcode readers -- pen wands, slot scanners, Charge-

    Couple Device scanners, image scanners, and laser scanners. A pen wand is the

    simplest barcode reader. It contains no moving parts and is known for its durability

    and low cost. A pen wand can present a challenge to the user, however, because it has

    to remain in direct contact with the bar code, must be held at a certain angle, and has

    to be moved over the bar code at a certain speed.

    Figure 35 Wand Scanner

  • 8/18/2019 SECURE PARKING

    72/84

    72

    A slot scanner remains stationary and the item with the bar code on it is pulled by

    hand through the slot. Slot scanners are typically used to scan bar codes on

    identification cards.

    Figure 36 Slot Scanner

    A CCD scanner has a better read-range than the pen wand and is often used in

    retail sales. Typically, a CCD scanner has a "gun" type interface and has to be

    held no more than one inch from the bar code. Each time the bar code is scanned,

    several readings are taken to reduce the possibility of errors. A disadvantage of

    the CCD scanner is that it cannot read a bar code that is wider than its input face.

    Figure 37 CCD scanner

  • 8/18/2019 SECURE PARKING

    73/84

    73

    An image scanner, also called a camera reader, uses a small video camera to

    capture an image of the bar code and then uses sophisticated digital image

     processing techniques to decode the bar code. It can read a bar code from about 3

    to 9 inches away and generally costs less than a laser scanner.

    Figure 38 Camera Reader

    A laser scanner, either hand-held or stationary, does not have to be close to the bar

    code in order to do its job. It uses a system of mirrors and lenses to allow the

    scanner to read the bar code regardless of orientation, and can easily read a bar

    code up to 24 inches away. To reduce the possibility of errors, a laser scanning

    may perform up to 500 scans per second. Specialized long-range laser scanners

    are capable of reading a bar code up to 30 feet away.

    Figure 39 Laser Scanner

  • 8/18/2019 SECURE PARKING

    74/84

    74

    4.5 Working of Barcode Reader

    To understand how a barcode scanner works, we have to explore the different parts of

    the device. Basically, there are 3 functional parts to the barcode scanner itself,the illumination system, the sensor / converter, and the decoder.

    Barcode scanners begin by illuminating the code with red light. The sensor of the barcode scanner detects the reflected light from the illumination system and generatesan analog signal with varying voltage that represent the intensity (or lack of intensity)of the reflection. The converter changes the analog signal to a digital signal which isfed to the decoder. The decoder interprets the digital signal, does that math required toconfirm and validate that the barcode is decipherable, converts it into ASCII text,formats the text and sends it to the computer the scanner is attached to.

    Figure 40 Working Mechanism of a Barcode Reader 

  • 8/18/2019 SECURE PARKING

    75/84

    75

    3.13  BARCODE READER FUNCTIONAL PARTS

    Illumination SystemsThe illumination system is the method by which the bars and spaces on the barcode

    are illuminated. There are a variety of illumination systems commonly used in

     barcode scanners:

    Single Point LEDThis technology is exclusive to the barcode wand reader and the barcode slot reader.

    The illumination of the barcode comes from either a single or pair of LED's and is

    focused through a single ball-type opening. This technology requires the ball to

     physically touch the barcode being scanned.

    Figure 41 Single Point LED

    Since the illumination is on a single point, the operator has to provide motion to the

     barcode past the light source. In the case of a barcode wand, the operator drags the

    illumination ball across the barcode. For swipe or slot readers, the barcode is typically

     printed on a credit-card like media. The operator pulls the card through a fixed slot,

     past the illuminating head.

    Slot and wand readers are inexpensive, and can accommodate any length of barcode.

    There are several disadvantages of the single point illumination method. Slot and

    wand readers require the operator to control the speed at which the barcode passes in

    front of the illumination head. Because barcodes must be in contact with the

    illumination head to read, the barcode can easily be damaged by abrasion of the head

    on the media that hosts the printed barcode. Although the illumination head is

    hardened, it will wear out and must be replaced regularly.

  • 8/18/2019 SECURE PARKING

    76/84

    76

    Sensor and Converter:

    A photo detector senses the reflected light and generates an analog signal with

    varying voltage. The voltage fluctuates based on whether the sensor sees the reflected

    light from the white spaces because the black bars absorb the red light.

    The technology used in the sensor can vary depending on the illumination method.

    The output is always the same - a voltage wave form with peaks for the white spaces,

    and troughs for the black spaces in the barcode. In an imaging barcode scanner, the

    sensor covers the entire scan target and generates a 2-dimensional wave form. In both

    cases, this analog signal is sent to the converter. The converter changes the analog

    signal to a digital signal. This signal is the digital representation of what the sensor

    detected from the reflected light. Now that the barcode scanner has a digital signal,

    the signal is transferred to the barcode scanner decoder .

    https://www.carolinabarcode.com/barcode-scanner-decoder-a-70.htmlhttps://www.carolinabarcode.com/barcode-scanner-decoder-a-70.html

  • 8/18/2019 SECURE PARKING

    77/84

    77

    3.14 

    Benefits of Barcode Reader

    Barcodes are often overlooked as a method for cutting costs and saving time. A

    valuable and viable choice for businesses looking to improve efficiency and reduce

    overhead, barcodes are both cost-effective and reliable.

    1.  Barcodes eliminate the possibility of human error. The occurrence of

    errors for manually entered data is significantly higher than that of

     barcodes. A barcode scan is fast and reliable, and takes infinitely less timethan entering data by hand.

    2.  Using a barcode system reduces employee training time. It takes only

    minutes to master the hand-held scanner for reading barcodes.

    Furthermore, employees do not have to gain familiarity with an entire

    inventory or pricing procedure. This also makes employee training less

    expensive, since they do not have to be paid for extra training time, and

    another employee does not have to be compensated for training them.

    3.  Barcodes are inexpensive to design and print. Generally they cost mere

     pennies, regardless of their purpose, or where they will be affixed. They

    can be customized economically, in a variety of finishes and materials.

    4.  Barcodes are extremely versatile. They can be used for any kind of

    necessary data collection.  This could include pricing or inventory

    information. Additionally, because barcodes can be attached to just about

    any surface, they can be used to track not only the products themselves,

     but also outgoing shipments and even equipment.

    5.  Inventory control improves. Because barcodes make it possible to track

    inventory so precisely, inventory levels can be reduced. This translates

    into a lower overheard. The location of equipment can also be tracked,

    reducing the time spent searching for it, and the money spent replacing

    equipment that is presumed lost.

    http://www.verifiedlabel.com/labels-bar.aspxhttp://www.verifiedlabel.com/labels-bar.aspx

  • 8/18/2019 SECURE PARKING

    78/84

    78

    6.  Barcodes provide better data. Since one barcode can be used for inventory

    and pricing information, it is possible to quickly obtain data on both.

    Furthermore, barcodes can be customized to contain other relevant

    information as needed. They provide fast, reliable data for a wide variety

    of applications.

    7.  Data obtained through barcodes is available rapidly. Since the

    information is scanned directly into the central computer, it is ready

    almost instantaneously. This quick turnaround ensures that time will not

     be wasted on data entry or retrieval.

    8.  Barcodes promote better decision making. Because data is obtained

    rapidly and accurately, it is possible to make more informed decisions.

    Better decision making ultimately saves both time and money.

    9.  Both inexpensive and user-friendly, barcodes provide an indispensable tool for

    tracking a variety of data, from pricing to inventory. The ultimate result of a

    comprehensive barcoding system is reduction in overhead.

  • 8/18/2019 SECURE PARKING

    79/84

    79

    4.8 The Original Barcode Scanners

    I've dipped into the archives of the US Patent and Trademark Office and pulled out

    the records of the original barcode pattern scanner, invented by N. Joseph Woodland

    and Bernard Silver. I've colored and numbered it to quickly illustrate how it worked.

    In the top picture, you can see the entire apparatus, including the barcode scanner,

    which is shown in the center in blue; in the lower picture, you can see a more detailed

    view of the scanner itself:

    Figure 42 Orginal Barcode

    http://www.uspto.gov/http://www.uspto.gov/

  • 8/18/2019 SECURE PARKING

    80/84

    80

    1. 

    Like modern packages in grocery stores, Woodland and Silver envisaged items

    would have barcodes printed on one face.

    2.  You place the item to be scanned with its barcode face down on a conveyor

    made of some transparent material.

    3. 

    A variety of lights shine up on the barcode.

    4.  The scanner picks up light reflected off the barcode.

    5. 

    The scanner sends a signal to a sorting mechanism that can push the item in

    different directions.

    6.  The item is pushed onto different conveyors according to its particular barcode.

    7. 

     Now looking in close up at the scanner: It has a lens on top that spreads the

    light reflected off the barcode.

    8.  The light from the lens spreads out onto a larger glass surface.

    9.  An electric motor and axle (red) move a scanning head (green).

    10. 

    Guided by the grooves in the axle, the scanning head moves from side to side.11. A photoelectric cell (orange) inside the scanning head picks up the pattern of

    light and dark areas from the barcode, sending corresponding signals to a

    detector circuit.

    4.9 Barcode Uses

    If you run a busy store, you need to keep track of all the things you sell so you can

    make sure the ones your customers want to buy are always in stock. The simplest wayof doing that is to walk around the shelves looking for empty spaces and simply

    refilling where you need to. Alternatively, you could write down what people buy at

    the checkout, compile a list of all the purchases, and then simply use that to reorder

    your stock. That's fine for a small store, but what if you're running a giant branch of

    Wal-Mart with thousands of items on sale? There are many other difficulties of

    running shops smoothly. If you mark all your items with their prices, and you need to

    change the prices before you sell the goods, you have to re price everything. And

    what about shoplifting? If you see a lot of whisky bottles missing from the shelves,

  • 8/18/2019 SECURE PARKING

    81/84

    81

    can you really be certain you've sold them all? How do you know if some have been

    stolen?

    Using barcode technology in stores can help to solve all these problems. It lets you

    keep a centralized record on a computer system that tracks products, prices, and stock

    levels. You can change prices as often as you like, without having to put new price

    tags on all your bottles and boxes. You can instantly see when stock levels of certain

    items are running low and reorder. Because barcode technology is so accurate, you

    can be reasonably confident that any items that are missing (and don't appear to have

     been sold) have probably been stolen — and maybe move them to a more secure part

    of your store or protect them with RFID tags. 

    A barcode-based stock system like this has three main parts. First, there's a

    central computer  running a database (record system) that keeps a tally of all the

     products you're selling, who makes it, what each one costs, and how many you have

    in stock. Second, there are the barcodes printed on all the products. Finally, there's

    one or more checkout scanners that can read the barcodes.

    How barcodes represent the numbers 0-9

    Figure 43 BARCODE SYMBOLOGY 

  • 8/18/2019 SECURE PARKING

    82/84

    82

    A barcode is a really simple idea: give every item that you want to classify its own,

    unique number and then simply print the number on the item so

    an electronic scanning device can read it. We could simply print the number itself, but

    the trouble with decimal numbers is that they're easy to confuse (a misprinted eight

    could look like a three to a computer, while six is identical to nine if you turn it upside

    down — which could cause all sorts of chaos at the checkout if you scanned your

    cornflakes the wrong way up). What we really need is a completely reliable way of

     printing numbers so that they can be read very accurately at high speeds. That's the

     problem that barcodes solve.

    If you look at a barcode, you probably can't make head or tail of it: you don't know

    where one number ends and another one begins. But it's simple really. Each digit in

    the product number is given the same amount of horizontal space: exactly 7 units.

    Then, to represent any of the numbers from zero through nine, we simply color those

    seven units with a different pattern of black and white stripes. Thus, the number one is

    represented by coloring in two white stripes, two black stripes, two white stripes, and

    one black stripe, while the number two is represented by two white stripes, one black

    stripe, two white stripes, and two final black stripes.

    You've probably noticed that barcodes can be quite long and that's because they have

    to represent three different types of information. The first part of a barcode tells you

    the country where it was issued. The next part reveals the manufacturer of the

     product. The final part of the barcode identifies the product itself. Different types of

    the same basic product (for example, four-packs of Coca-Cola bottles and six-packs

    of Coca-Cola cans) have totally different barcode numbers.

    Most products carry a simple barcode known as the UPC (universal product code) — 

    a line of vertical stripes with a set of numbers printed underneath it (so someone can

    manually key in the product number if the barcode is misprinted or damaged in the

    store and won't scan through the barcode reader). There is another kind of barcode

    that is becoming increasingly common and its stores much more information. It's

    called a 2D (two-dimensional) barcode) and you sometimes see it on things like self-

     printed postage stamps.

    http://www.explainthatstuff.com/electronics.htmlhttp://www.explainthatstuff.com/how-data-matrix-codes-work.htmlhttp://www.explainthatstuff.com/how-data-matrix-codes-work.htmlhttp://www.explainthatstuff.com/electronics.html

  • 8/18/2019 SECURE PARKING

    83/84

    83

    4.5 Some Traditional Barcodes:

    Figure 44 Traditional Barcodes

  • 8/18/2019 SECURE PARKING

    84/84

    REFRENCES

    http://www.csharp-station.com/

    http://www.codeproject.com/

    https://www.safaribooksonline.com

    https://www.lassiemarlowe.com

    http://stackoverflow.com

    http://www.dreamincode.net

    http://www.computerhope.com

    http://www.barcode.ro

    http://whatis.techtarget.com

    http://www.explainthatstuff.com

    http://www.verifiedlabel.com

    http://www.toutorialspoint.com

    http://www.msdnfourms.com

    http://www.programming in Urdu C#.com

    http://www.W3Schols.com

    http://www.GitHub.comhttp://www.DLLFinder.com

    WINDOWS FORM PROGRAMMING C#

    VISUAL_STUDIO_2015_SUCCINCTLY

    http://www.csharp-station.com/http://www.codeproject.com/https://www.safaribooksonline.com/https://www.lassiemarlowe.com/http://stackoverflow.com/http://www.dreamincode.net/http://www.computerhope.com/http://www.barcode.ro/http://whatis.techtarget.com/http://www.explainthatstuff.com/http://www.verifiedlabel.com/http://www.toutorialspoint.com/http://www.msdnfourms.com/http://www.w3schols.com/http://www.github.com/http://www.dllfinder.com/http://www.dllfinder.com/http://www.github.com/http://www.w3schols.com/http://www.msdnfourms.com/http://www.toutorialspoint.com/http://www.verifiedlabel.com/http://www.explainthatstuff.com/http://whatis.techtarget.com/http://www.barcode.ro/http://www.computerhope.com/http://www.dreamincode.net/http://stackoverflow.com/https://www.lassiemarlowe.com/https://www.safaribooksonline.com/http://www.codeproject.com/http://www.csharp-station.com/