software requirements specification · pdf filesoftware requirements specification ... and the...

39
Software Requirements Specification Prepared by Püsödökod for the project MeasureGuide METU Department of Computer Engineering CENG 491 Senior Design Project I Fall 20152016

Upload: donhi

Post on 28-Mar-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Software Requirements Specification

Prepared by Püsödökod

for the project MeasureGuide

METU ­ Department of Computer Engineering CENG 491 Senior Design Project I

Fall 2015­2016

Preface

This document contains the software requirements specification for the “MeasureGuide” project. The template of this document was adapted by Emre Akbas from two sources: the IEEE 830[1] and the “Modern SRS package” [2].

This software requirements specification provides the scope and purpose of the project and gives the overall description of it. However, this information is subject to change since it is an iterative process.

This document is prepared by team Pösödökod. The group members of the Püsödökod are the following.

Sevim Begüm Sözer e1881507

Öykü Özlem Çakal e1881697

Sinan Sarıoğlu e1881457

Mert Ünsal e1942648

1

Table of Contents Preface 1. Introduction

1.1 Problem Definition 1.2 System Overview 1.3 Definitions, acronyms, and abbreviations 1.4 Assumptions and dependencies

2. Overall description 2.1 Product functions

2.1.1 Use­case model survey Table 2: List of functions of MeasureGuide application 2.1.2 Actor survey

2.2 Interfaces 2.2.1 User Interfaces 2.2.2 Hardware Interfaces 2.2.3 Software Interfaces 2.2.4 Communications Interfaces

2.3 Constraints 3. Specific requirements

3.1 Functional Requirements 3.2 Nonfunctional Requirements

3.2.1 Usability 3.2.2 Reliability 3.2.3 Performance 3.2.4 Supportability

4 Data Model and Description 4.1 Data Objects 4.2 Data Dictionary

4.2.1 MeasurementDevice Class 4.2.2 Function Class 4.2.3 User Class 4.2.4 ControlledScreen Class 4.2.5 ScreensController Class 4.2.6 CropImage Class 4.2.7 Checker Class 4.2.8 SwitchRotary Class 4.2.9 Cable Class 4.2.10 Led Class

5 References

2

Table Number Table Name

Table 1 List of definitions, abbreviations and acronyms

Table 2 List of functions of MeasureGuide application

Table 3 Use case table of ‘Select Camera’ function

Table 4 Use case table of ‘Select Device’ function

Table 5 Use case table of ‘Selection of Function’ function

Table 6 Use case table of ‘Measuring Voltage’ function

Table 7 Use case table of ‘Testing Diodes’ function

Table 8 Use case table of ‘Measuring Resistance’ function

Table 9 Use case table of ‘Measuring Capacitance’ function

Table 10 Use case table of ‘Check Switch Condition’ function

Table 11 Use case table of ‘Record the Min/Max/Avg Value’ function

Table 12 Use case table of ‘Hold Data’ function

Table 13 Use case table of ‘Value Subtraction’ function

Table 14 Use case table of ‘Measuring DC Current B440 mA’ function

Table 15 Use case table of ‘Measuring DC Current L440 mA’ function

Table 16 Use case table of ‘Measuring AC Current B440 mA’ function

Table 17 Use case table of ‘Measuring AC Current L440 mA’ function

Table 18 Use case table of ‘Checking Info from Manual’ function

Table 19 Measure guide System Response Time Table

Table 20 MeasurementDevice class

Table 21 Function class

Table 22 User class

Table 23 ControlledScreen class

Table 24 ScreensController class

Table 25 CropImage class

3

Table 26 Checker class

Table 27 SwitchRotary class

Table 28 Cable class

Table 29 Led class

Figure Number Figure Name

Figure 1 Interaction of MeasureGuide components

Figure 2 Activity Diagram of MeasureGuide Application

Figure 3 Use Case Diagram

Figure 4 MeasureGuide page to choose the function

Figure 5 U1241B Handheld Digital Multimeter

Figure 6 MeasureGuide Environment

Figure 7 Class Diagram

4

1. Introduction This document includes the software requirements specification for MeasureGuide Project and provides a complete information about all functions and specifications of project.This part gives a brief information of the whole software requirement specification. The purpose of this part is to give some basic ideas to readers related to this project. The main purpose of this document is to provide a software requirement specification report of the MeasureGuide. This report analyses all aspects of the project. It starts with giving general information about problem definition and system overview. Besides all definitions, acronyms, abbreviations and dependencies of the project are stated. In second part MeasureGuide application’s functions, interfaces and constraints are investigated.In following section, functional and nonfunctional requirements of the project are specified. Lastly, in rest of this software requirements specification document, data model and descriptions about project and references which are used during development of SRS document could be found. The potential audiences of this software requirements specification are the development team of the MeasureGuide Project, the observers of the project, Assoc. Prof. Dr. Halit Oğuztüzün, Asst. Prof. Yusuf Sahillioğlu, project owner Spark Calibration Services[3] and CENG491 instructors Dr. Atilla Özgit and Asst. Prof. Emre Akbaş.

1.1 Problem Definition MeasureGuide project is designed by Spark Calibration Services in order to train people about their measurement devices. Aim of the project is developing a desktop application from scratch and this application is going to lead users in each step for “what to do”, to make a specific operation with that device. In the beginning project is only applicable for Keysight U1241B[4] model. But final version of the application will be applicable for new devices.

5

Figure 1: Interaction of MeasureGuide components

By this project the company will get rid of paying extra money for hiring new people to educate novice workers and their employees wouldn’t lose time to train newcomers about devices. Hence it is going to rise efficiency in both monetary and work power aspects. Since it is going to be a desktop application, it gives a wide range of working environment for company. Suppose, a novice worker is sent to make a measurement away from company center and s/he isn’t sure about how to make measurement. S/he can easily check the correct directives from a mobile device like smartphone or tablet. MeasureGuide application prevented him making a wrong measurement and avoided company possible time and money losses.

1.2 System Overview MeasureGuide software application is developed by mainly using Java and OpenCV libraries. There should be a electronic device which MeasureGuide application has already been installed, an integrated camera to the electronic device, a measurement device, an external conductive object and a user in order to make a proper measurement according to the project. In general, application will give commands to user to make some specific measurements(e.g.:voltage measurement etc.) with a specific measurement device(e.g.: Keysight U1241B). Measurement process will be as follows:

User opens the program. User sets initial settings of program. User chooses a function. Program gives a command to make that measurement.

6

Program checks whether user completed the command successfully or not by using integrated camera.

If user completes it successfully, then it shows the following step. If user couldn’t make it, then it gives an error message and warns user to check the

last step.

Figure 2: Activity Diagram of MeasureGuide Application

7

1.3 Definitions, acronyms, and abbreviations

SRS Software Requirement Specification

CENG491 Computer Engineering Senior Design Project 1

OpenCV[5] Open Source Computer Vision Library

Java A general purpose object oriented language created by James Gosling and Sun Microsystems. It is developed by Oracle Corporation.

Cpp General purpose programming language

Software Set of machine­readable instructions that directs a computer's processor to perform specific operations.

Keysight[6] A United States based company that produces measurement and test devices with related software applications.

AC Alternative current

DC Direct Current

mA Milliampere

UI User Interface

OCR Optical Character Recognition

API Application Programming Interface Table 1: List of definitions, abbreviations and acronyms

8

1.4 Assumptions and dependencies During the development of project, we assumed that measurement device’s position is going to be stable and background color of measurement device is going to be white.

In the beginning project will be applicable for only Keysight U1241B multimeter, but system architecture of the project and application will be convenient for new measurement devices.

All of these decisions are decided in directives of Spark Calibration Services.

2. Overall description

2.1 Product functions We are able to make several measurements by using Keysight U1241B multimeter.These measurements are as follows:

Measuring Voltage Measuring Current Measuring Frequency Measuring Resistance and Testing Continuity Testing Diodes Measuring Capacitance

Each of these functions will be explained in a more detailed way as use cases.

9

2.1.1 Use­case model survey In this section, a diagram of the entire use­case model and brief description of use cases are given.

Figure 3: Use Case Diagram Use case models of MeasureGuide project are stated below. For all the use cases, the actor is lab technician, namely user. Actor is explained in section 2.1.2.

10

Use Case ID Use Case Name Description

UC1 Select Camera User selects external camera device.

UC2 Select Device User selects a measurement device in order to use.

UC3 Selection of function User selects one of the available functions from function list according to the device.

UC4 Measuring Voltage User measures the voltage.

UC5 Testing Diodes User tests direction of bias.

UC6 Measuring Resistance User measures the resistance.

UC7 Measuring Capacitance User measures the capacitance.

UC8 Check Switch Condition User checks the open/close condition of a switch, relay or push button.

UC9 Record the Min/Max/Avg Value

User records the maximum, minimum and average input values during a series of measurements.

UC10 Hold Data User freezes the displayed digital value.

UC11 Subtract the value from the measurement values

User subtracts a stored value from the present measurement and displays the difference between the two values.

UC12 Measuring DC Current B440 mA

User measures the current amount in DC mode which should be greater than 440mA.

UC13 Measuring DC Current L440 mA

User measures the current amount in DC mode which should be less than 440mA.

UC14 Measuring AC Current B440 mA

User measures the current amount in AC mode which should be greater than 440mA.

UC15 Measuring AC Current L440 mA

User measures the current amount which should be less than 440mA.

UC16 Checking Info from manual User checks any information related to measurement device from related manual.

Table 2: List of functions of MeasureGuide application

11

2.1.2 Actor survey As it could be seen clearly from all use case models, main actor of all use cases is user, namely lab technician. During development and testing process of use case models, lab technicians whom are working for Spark Calibration Services, and Püsödökod project team will be in cooperation. Lab technicians who are newcomers in the company and have no background information about calibration devices and specifically Keysight U1241B will have priority in this cooperation. By this way, it is aimed to get most objective and successful results.

2.2 Interfaces The necessary user, hardware and software interfaces will be explained in the subsections.

2.2.1 User Interfaces Since our application is designed to be used by novice technicians, the user interface will be easy to use and will not require any specific prior knowledge. In the first page of the application, user is expected to choose one camera among the connected cameras to his computer that he wants to use during the process. This process is explained as use case 1 (UC1) in 2.1 Product functions section. Moreover, this page also asks the user to choose the measurement device on which he will implement operations (UC2). After these steps are completed, user interface will direct the user to the page where he can choose the function that he wants to apply on the measurement device (UC3). These functions are predefined according to the chosen measurement device. A screenshot of this page can be seen below.

12

Figure 4: MeasureGuide page to choose the function After user chooses the function from this page, user interface will direct the user to the related function page according to the choice. In function page, user will be guided with displaying messages and voice commands to implement the steps of the predefined measurement procedure. After applying each step to the measurement device, user will click on a button “Completed”. This button will trigger the MeasureGuide core to take a snapshot from the measurement device to see if the current step has been performed well. If the step is completed successfully, user interface will guide the user to the next step. On the other case, if the user applied a wrong action on the measurement device, the user interface will tell to user to make the step again. This cycle continues until the final step of the related measurement procedure is completed successfully. Moreover, the user will be able to view the manual of the measurement device in any phase of his interaction with the user interface.

13

2.2.2 Hardware Interfaces The system requires a computer and a camera connected to the computer. Camera must be positioned in front of the measurement device so that it can see the whole device. Moreover, since the system includes calibration process, measurement device is a hardware component of the system. In this project, U1241B Handheld Digital Multimeter will be used as the measurement device.

Figure 5: U1241B Handheld Digital Multimeter

2.2.3 Software Interfaces The software system will be designed with Java programming language. Hence, JRE (Java Runtime Environment) will be necessary to use this application. JavaFX API is used to design UI. For the image processing part OpenCV library and for the OCR part, Tesseract OCR engine will be used.

2.2.4 Communications Interfaces The MeasureGuide system will communicate with the camera connected to the computer.

2.3 Constraints After several discussions about the project between company, advisors and project team, it is decided that back­end development of the project will be constructed in a modular way.The idea behind of this decision is implementation of new measurement devices to current MeasureGuide application will be easier by this way.Besides, Java, Cpp and OpenCV libraries will be used in software development process. The user interface will be designed with JavaFX. However, all code segments are put together by using Java language. By the way, it is decided that NetBeans will be used as an IDE by all members of the project. The figure that shows environment of MeasureGuide with design elements is shown below.

14

Figure 6: MeasureGuide Environment As it is stated in previous parts, project will be designed for Keysight U1241B initially. A high resolution camera is needed to get images of measurement device whenever user wants to check his/her last operation is correct or not. This camera should be placed on opposite of measurement device and both measurement device and camera should be stable not to change the scale of measurement device in images. Measurement device should be on a white colored ground as stated in dependencies part.

15

3. Specific requirements

3.1 Functional Requirements

Major software functions of MeasureGuide system are explained as use cases.

Use Case Name: Select Camera

Use Case ID: UC1

Included Use Case(s):

­

Primary Actor(s): User

Description: User selects external camera device.

Precondition: User must set up the measureGuide program.

Trigger: ­

Main Scenario: 1.User navigates into Select Camera page. 2.User selects the camera which will be used to recognise measurement device. 3.System brings an instance from camera to the page. 4.User confirms the camera.

Alternate Scenarios:

3a. If system cannot bring any image from camera, system will give a notification to the user to check the connection of the camera.

Table 3: Use case table of ‘Select Camera’ function

16

Use Case Name: Select Device

Use Case ID: UC2

Included Use Case(s):

UC1

Primary Actor(s): User

Description: User selects a measurement device in order to use.

Precondition: User must set up the MeasureGuide program.

Trigger: User starts the application.

Main Scenario: 1.User navigates in Devices tab. 2.User selects the measurement device from the list of devices. 3.System brings data of the device.

Alternate Scenarios:

2a: If the user tries to select more than one device, application notifies the user and returns to device selection page.

Table 4: Use case table of ‘Select Device’ function

Use Case Name: Selection of Function

Use Case ID: UC3

Included Use Case(s):

UC1 & UC2

Primary Actor(s): User

Description: User selects one of the available functions from function list in MeasureGuide application.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on a function from function list.

Main Scenario: 1.After included use cases, user is directed to function selection. 2.User selects one of the measurement functions, which are dependent on measurement device, from the list

Alternate Scenarios:

­

Table 5: Use case table of ‘Selection of Function’ function

17

Use Case Name: Measuring Voltage

Use Case ID: UC4

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the voltage.

Precondition: 1.User must set up the MeasureGuide program 2.User should disconnect circuit power and discharge all high­voltage capacitors before testing diodes to prevent possible damage to the multimeter.

Trigger: User selects “Measure voltage” option from function list.

Main Scenario: 1.UI says which action to take at first. 2.Plug in black test probe to black “ground” socket on multimeter. 3.Plug in red test probe to red “voltage” socket on multimeter. 4.Step is checked visually(Image processing). If user done the step correctly UI says the next action. 5.Make correct terminal connection with external device. 6.Step is checked visually. If user done the step correctly UI says the next action. 7.Turn rotary switch to voltage section. 8.Read DC Voltage result on screen.

Alternate Scenarios:

4a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 4b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step. 6a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step. Measuring AC Voltage 1.After seventh step press “Shift” to select AC voltage measurement mode.

Table 6: Use case table of ‘Measuring Voltage’ function

18

Use Case Name: Testing Diodes

Use Case ID: UC5

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User tests direction of bias.

Precondition: 1.User must set up the MeasureGuide program. 2.User should disconnect circuit power and discharge all high voltage capacitors before testing diodes to prevent possible damage to the multimeter.

Trigger: User selects “Test Diodes” option from function list.

Main Scenario: 1.UI says which action to take at first. 2.Plug in black test probe to black “ground” socket on multimeter. 3.Plug in red test probe to red “diode” socket on multimeter. 4.Step is checked visually(Image processing). If user done the step correctly UI says the next action. 5.Make correct terminal connection with external device. 6.Step is checked visually. If user done the step correctly UI says the next action. 7.Turn rotary switch to diode section. 8.Read direction of bias on screen.

Alternate Scenarios:

4a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 4b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step. 6a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step.

Table 7: Use case table of ‘Testing Diodes’ function

19

Use Case Name: Measuring Resistance

Use Case ID: UC6

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the resistance.

Precondition: 1.User must set up the MeasureGuide program 2.User should disconnect circuit power and discharge all high voltage capacitors before testing diodes to prevent possible damage to the multimeter.

Trigger: User selects “Measure resistance” option from function list.

Main Scenario: 1.UI says which action to take at first. 2.Plug in black test probe to black “ground” socket on multimeter. 3.Plug in red test probe to red “resistance” socket on multimeter. 4.Step is checked visually(Image processing). If user done the step correctly UI says the next action. 5.Make correct terminal connection with external device. 6.Step is checked visually. If user done the step correctly UI says the next action. 7.Turn rotary switch to resistance section. 8.Press “Range” button to select measurement range from 1kΩ to 100MΩ. 9.Read resistance result on screen.

Alternate Scenarios:

4a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 4b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step. 6a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step.

Table 8: Use case table of ‘Measuring Resistance’ function

20

Use Case Name: Measuring Capacitance

Use Case ID: UC7

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the capacitance.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on the measure capacitance option in UI.

Main Scenario: 1.User sets the main rotary switch to “ ­)|­ ” option on the measurement device. 2.UI says which action to take at first. (Placing the red cable which is conducting positive charge to the capacitor into the rightmost hole(A) and the black cable into the ground hole(com).) 3.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Turn rotary switch to correct current section which is A.) 4.Step is checked visually. If user done the step correctly UI says the next action.

Alternate Scenarios:

1a.If the step hasn't accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step. 2a.To measure small capacitances user presses Null button on the device. 3a.If the step hasn't accomplished correctly (if the cables are not in the correct places) UI says to check that step. 3b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step.

Table 9: Use case table of ‘Measuring Capacitance’ function

21

Use Case Name: Check Switch Condition

Use Case ID: UC8

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User checks the open/close condition of a switch, relay or push button.

Precondition: 1.User must have set up the MeasureGuide program 2.The measurement device is connected to a switch.

Trigger: User clicks on the “Check the open/close condition of a switch” option in UI.

Main Scenario: 1.UI says which action to take at first. (Remove the power on the contacts or switch.) 2.UI guides the user to take the second step. (Press “Shift” button at SW­C position) 3.Second step is checked visually (Image processing). If the user has done the step correctly measurement device displays the switch condition and the UI shows the possible actions to take (restart or exit) 4.If the user clicks on the “Restart Switch Count”, UI guides the user to press on the “Null” button. 5.If the user clicks on the “Exit Switch Count”, UI guides the user to press on the “Shift” button. 6.If the previous step is completed successfully, the measurement device exits and UI returns to the main page.

Alternate Scenarios:

2a.If the step hasn't been accomplished correctly (“Shift” button are not pressed in SW­C position) UI says to repeat that step. 4a.If the step hasn't been accomplished correctly (“Null” button are not pressed) UI says to repeat that step. 5a.If the step hasn't been accomplished correctly (“Shift” button are not pressed) UI says to repeat that step.

Table 10: Use case table of ‘Check Switch Condition’ function

22

Use Case Name: Record the Min/Max/Avg Value

Use Case ID: UC9

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User records the maximum, minimum and average input values during a series of measurements. User is in the process of measuring any value.

Precondition: User must have set up the MeasureGuide program.

Trigger: User clicks on the “Record the Min/Max/Avg Value” option in UI.

Main Scenario: 1.UI says which action to take at first. (Press “Hold” button for more than one second.) 2.The beeper sounds from the measurement device when a new maximum or minimum value is recorded. 3.UI guides the user to press the “Hold” button to scroll through the maximum, minimum, average and present readings. 4.If the user clicks on the “Exit Record the Min/Max/Avg Value”, UI says which action to take. (Press “Hold” for more than one second.) 5.If the previous step is completed successfully, the measurement device exits and UI returns to the main page.

Alternate Scenarios:

1a.If the step hasn't been accomplished correctly (“Hold” button are not pressed) UI says to repeat that step. 4a.If the step hasn't been accomplished correctly (“Hold” annunciator does not disappear) UI says to repeat that step.

Table 11: Use case table of ‘Record the Min/Max/Avg Value’ function

23

Use Case Name: Hold Data

Use Case ID: UC10

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User freezes the displayed digital value.

Precondition: User must have set up the MeasureGuide program. User is in the process of measuring any value.

Trigger: User clicks on the “Hold Data” option in UI.

Main Scenario: 1.UI says which action to take at first. (Press “Hold” button) 2.If the user clicks on the “Hold next value”, UI guides the user to press the “Hold” button again. 3.If the user clicks on the “Exit Hold Data”, UI guides the user to press the “Hold” button for more than one second. 4.If the previous step is completed successfully, the measurement device exits and UI returns to the main page.

Alternate Scenarios:

1a.If the step hasn't been accomplished correctly (“Hold” button are not pressed) UI says to repeat that step. 2a.If the step hasn't been accomplished correctly (“Hold” annunciator does not flash) UI says to repeat that step. 3a.If the step hasn't been accomplished correctly (“Hold” annunciator does not disappear) UI says to repeat that step.

Table 12: Use case table of ‘Hold Data’ function

24

Use Case Name: Value Subtraction

Use Case ID: UC11

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User subtracts a stored value from the present measurement and displays the difference between the two values.

Precondition: User must have set up the MeasureGuide program.User is in the process of measuring any value.

Trigger: User clicks on the “Subtract the value from the measurement values” option in UI.

Main Scenario: 1.UI guides the user to take the first step. (Press “Null” button) 2.Second step is checked visually (Image processing). If the user has done the step correctly UI guides the user to view the stored value. (Press “Null” again.) 3.If the previous step is done correctly, the reference value in the display of measurement device is set to zero and UI displays the next options that user can take (Exit) 4.If the user clicks on the “Exit”, UI guides the user to press the “Null” button. 5.If the previous step is completed successfully, the measurement device exits and UI returns to the main page.

Alternate Scenarios:

1a.If the step hasn't been accomplished correctly (“Null” button are not pressed) UI says to repeat that step. 2a.If the step hasn't been accomplished correctly (“Null” annunciator does not flash for 3 seconds) UI says to repeat that step. 4a.If the step hasn't been accomplished correctly (“Null” annunciator does not disappear) UI says to repeat that step.

Table 13: Use case table of ‘Value Subtraction’ function

25

Use Case Name: Measuring DC Current B440 mA

Use Case ID: UC12

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the current amount which should be greater than 440mA in DC mode.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on the measure current(>440 mA) option in UI.

Main Scenario: 1.UI says which action to take at first. (Placing the red cable into the leftmost hole(A) and the black cable into the ground hole(com).) 2.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Turn rotary switch to correct current section which is A.) 3.Step is checked visually.(Image processing). If user done the step correctly UI says the next action. (Do the measurement.) 4.When the user action is done, UI returns to the main page.

Alternate Scenarios:

2a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 2b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step. 3a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step.

Table 14: Use case table of ‘Measuring DC Current B440 mA’ function

26

Use Case Name: Measuring DC Current L440 mA

Use Case ID: UC13

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the current amount which should be less than 440mA in DC mode.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on the measure current(<440 mA) option in UI.

Main Scenario: 1.UI says which action to take at first. (Placing the red cable into the second hole(mA­μA) and the black cable into the ground hole(com).) 2.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Turn rotary switch to correct current section which is mA or μA.) 3.Step is checked visually.(Image processing) If user done the step correctly UI says the next action. (Do the measurement.) 4.When the user action is done, UI returns to the main page.

Alternate Scenarios:

2a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 2b.If the next step’s requirements are already done(If the rotary switch is showing mA or μA.) UI skips the next section and says the next of next step. 3a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step.

Table 15: Use case table of ‘Measuring DC Current L440 mA’ function

27

Use Case Name: Measuring AC Current B440 mA

Use Case ID: UC14

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the current amount which should be greater than 440mA in AC mode.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on the measure current(>440 mA) option in UI.

Main Scenario: 1.UI says which action to take at first. (Placing the red cable into the leftmost hole(A) and the black cable into the ground hole(com).) 2.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Turn rotary switch to correct current section which is A.) 3.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Do the measurement.) 4.When the user action is done, UI says the next action. (Press the shift button) 5.Step is checked visually(Image processing). If user done the step correctly, UI returns to the main page.

Alternate Scenarios:

2a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 2b.If the next step’s requirements are already done(If the rotary switch is showing A.) UI skips the next section and says the next of next step. 3a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location) UI says to repeat that step. 5a.If the step hasn't been accomplished correctly (If shift button hasnt pressed yet), UI says to repeat that step.

Table 16: Use case table of ‘Measuring AC Current B440 mA’ function

28

Use Case Name: Measuring AC Current L440 mA

Use Case ID: UC15

Included Use Case(s):

UC3

Primary Actor(s): User

Description: User measures the current amount which should be less than 440mA in AC mode.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on the measure current(<440 mA) option in UI.

Main Scenario: 1.UI says which action to take at first. (Placing the red cable into the second hole(mA­μA) and the black cable into the ground hole(com).) 2.Step is checked visually(Image processing). If user done the step correctly UI says the next action. (Turn rotary switch to correct current section which is mA or μA.) 3.Step is checked visually (Image processing). If user done the step correctly UI says the next action. (Do the measurement.) 4.When the measurement is done, UI says the next action. (Press the shift button) 5.Step is checked visually(Image processing). If user done the step correctly, UI returns to the main page.

Alternate Scenarios:

2a.If the step hasn't been accomplished correctly (if the cables are not in the correct places) UI says to repeat that step. 2b.If the next step’s requirements are already done(If the rotary switch is showing mA or μA.) UI skips the next section and says the next of next step. 3a.If the step hasn't been accomplished correctly (If the rotary switch is showing different location), UI says to repeat that step. 5a.If the step hasn't been accomplished correctly (If shift button hasnt pressed yet), UI says to repeat that step.

Table 17: Use case table of ‘Measuring AC Current L440 mA’ function

29

Use Case Name: Checking Info from Manual

Use Case ID: UC16

Included Use Case(s):

UC2

Primary Actor(s): User

Description: User checks any information related to measurement device from related manual.

Precondition: User must set up the MeasureGuide program.

Trigger: User clicks on read the manual.

Main Scenario: 1.While making a measurement with MeasureGuide application, user clicks on read the manual option.(This case is available in each step of measurement.) 2. The page where user can view the manual is opened.

Alternate Scenarios:

­

Table 18: Use case table of ‘Checking Info from Manual’ function

3.2 Nonfunctional Requirements In this section, the MeasureGuide system is examined in terms of usability, reliability, performance and supportability.

3.2.1 Usability

In this section the MeasureGuide system will be examined in terms of understandability, learnability, operability.

MeasureGuide system will be designed to guide novice lab technicians. For this reason, it does not require any prior knowledge or experience to use. It will be user­friendly so that nobody will have difficulty in using it. It will display messages in each step to help the user to use the application.

To use the this system, firstly MeasureGuide application must be installed on the computer. User must have a camera which is connected to the computer. Since MeasureGuide application is aimed to be usable by all people, it does not depend on user’s computer’s

30

operating system. MeasureGuide will run on any operating system as a desktop application without connection to the Internet.

3.2.2 Reliability The system shall be available in 24 hours a day , 7 days of a week on computer with a connected camera. In case of a failure, system will restart and inform the user.

3.2.3 Performance The MeasureGuide system responds the user at most according to the following table for a specific action.

Action Time (s)

Open the application when user clicks on it 5

Select camera 0.5

Select device 0.5

Open the manual page 0.5

Select function 0.2

Take a snapshot after user clicks on “Completed” button

0.2

Display a message for next action 0.2

Screen switches 0.1 Table 19: Measure guide System Response Time Table Capacity is not an applicable constraint for MeasureGuide system since it is a desktop application and is not connected to the Internet. Another point about performance is resource utilization. The MeasureGuide application must be installed to be used. The installation package will take at most 100 MB on the computer memory.

3.2.4 Supportability The MeasureGuide system will be designed considering Object Oriented design principles in order to enhance the supportability and maintainability. Firstly, minimizing the accessibility of classes and members enables the system abstraction. Hence, future changes in the classes does not affect the implementation. Moreover, to decrease reuse, mainly composition will be used instead of inheritance. This will also provide modularity for system design. The system will be open for extension, but closed for modification.

31

4 Data Model and Description An analysis level class diagram is shown below. This class diagram is subject to change in the design document.

4.1 Data Objects The class diagram of the system is given below.

Figure 7: Class Diagram

32

4.2 Data Dictionary

Data objects are explained in this section.

4.2.1 MeasurementDevice Class Measurement Device class holds the general information of measurement devices and its functions. For this project, there is only one instance of Measurement Device class which is Keysight U1241B Handheld Digital Multimeter.

Name Type / Return Type Definition

name String This value refers to the name of the measurement device.

id Integer This value refers to the id of the measurement device.

functions List[Function] This list holds the functions that are belong to the specific measurement device.

modifyFuncList() void In this function, the functions that can be implemented on the measurement device is modified (added or deleted) on functions list.

Table 20: MeasurementDevice class

4.2.2 Function Class Function class shows every modular function that can be done on the measurement device.

Name Type / Return Type Definition

name String This value refers to the name of the function.

functionSteps() void In this function, procedures of this specific function on the measurement device are implemented.

Table 21: Function class

33

4.2.3 User Class User class shows the basis of the functions that user can do with MeasureGuide system.

Name Type / Return Type Definition

selectCamera() Integer This function returns the id of the chosen camera.*

selectDevice() Integer This function returns the id of the chosen measurement device.

chooseFunction() String This function returns the name of the chosen function.

viewManual() void This function enables the user view the manual.

Table 22: User class * Camera id’s are distributed by the computer. Hence there is no need for a Camera class.

4.2.4 ControlledScreen Class Controlled Screen class is the interface for the pages in user interface part of the MeasureGuide.

Name Type / Return Type Definition

screenId String This value refers to the id of the screen.

screenFile String This value refers to the file name of the screen.

Table 23: ControlledScreen class

34

4.2.5 ScreensController Class Screens Controller class holds the functions for screen switches.

Name Type / Return Type Definition

addScreen(...) void This function adds the screen to the screens collection.

loadScreen(...) void This function loads the fxml file of the related screen.

unloadScreen(...) void This function removes the screen with the given id from the collection of screens.

setScreen(...) void This function displays the screen with a predefined id.

Table 24: ScreensController class

4.2.6 CropImage Class Crop Image class is inside the Image Processing Module. This class is used to take snapshots of the measurement device from the necessary folders and crop them.

Name Type / Return Type Definition

images List[Mat] This value refers to the cropped images list.

cropImage() void This function crops the snapshots into three parts (led, switch rotary and cable parts) and puts them in the images list.

Table 25: CropImage class

35

4.2.7 Checker Class Checker class is composed of SwitchRotary, Cable and Led classes.

Name Type / Return Type Definition

cable Cable This object is generated to use functions of Cable class for checking the cable positions.

switchRotary SwitchRotary This object is generated to use functions of SwitchRotary class for checking position of switch rotary.

led Led This object is generated to use functions of Led class for checking what has showed in the led part of measurement device.

Table 26: Checker class

4.2.8 SwitchRotary Class Switch Rotary class is used to check the switch rotary part of the measurement device.

Name Type / Return Type Definition

image Mat This value refers to the switch rotary part image of the snapshot of the measurement device.

isOff() boolean This function is to check if switch rotary arrow shows Off position.

isVoltage() boolean This function is to check if switch rotary arrow shows Voltage position.

isCurrent() boolean This function is to check if switch rotary arrow shows Current position.

isResistance() boolean This function is to check if switch rotary arrow shows Resistance position.

isCapacitance() boolean This function is to check if switch rotary arrow shows Capacitance position.

Table 27: SwitchRotary class

36

4.2.9 Cable Class Cable class is used to check the cable part of the measurement device.

Name Type / Return Type Definition

image Mat This value refers to the cable part image of the snapshot of the measurement device.

checkGround() boolean This function is to check if the correct cable is positioned on the ground cable place.

checkVoltage() boolean This function is to check if the correct cable is positioned on the voltage cable place.

checkFirst() boolean This function is to check if the correct cable is positioned on the first cable place.

checkSecond() boolean This function is to check if the correct cable is positioned on the second cable place.

Table 28: Cable class

4.2.10 Led Class Led class is used to check the led part of the measurement device.

Name Type / Return Type Definition

image Mat This value refers to the led part image of the snapshot of the measurement device.

isWritten(...) boolean This function is to check if the name, given as an argument, is displayed on the led.

Table 29: Led class

37

5 References

[1] IEEE Guide for Software Requirements Specifications," in IEEE Std 830­1984 , vol., no., pp.1­26, Feb. 10 1984, doi: 10.1109/IEEESTD.1984.119205, URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=278253&isnumber=6883

[2] Appendix C of Don Widrig, Dean Leffingwell, “Managing Software Requirements: A Unified Approach,” Addison­Wesley Professional, Release Date: October 1999, ISBN: 0201615932.

[3] www.sparkkalibrasyon.com.tr [4] http://www.keysight.com/en/pd­1765023­pn­U1242B/handheld­digital­multimeter­4­digit? cc=US&lc=eng [5] opencv.org [6] www.keysight.com/main/home.jspx?cc=TR&lc=eng

38