Anda di halaman 1dari 5

Qaisar Ayub & Sulma Rashid

This document is an effort to give the understanding about stimulus response model (Software
Engineering)
Stimulus Response Model

What ?
A system which shows the system reaction to various events is called stimulus response system.

To design the weather station using a state machine model we first need to identify the stimuli’s following
table describes the stimuli for weather station

Object WeatherStation

Stimuli Description
reportWeather This stimulus get the summery of data from data that have been archived
Calibrate (Instruments) Used to check the accuracy of the data collected devices/hardware equipments
Startup(Instruments) Change the state of instruments in to active state
Shutdown(Instruments) Change the state of instruments in to inactive state

ReportWeather

Report weather

Collect from data Collect data from devices


archiving module

Data Collect Process

Summarize data

Algorithm

when reportweather function event/trigger fired then

1. Report weather contact with weather statation process Collect().


2. The collect will get the data from devices or from data archiving module
3. the summarize function then summarize the collected data and send.
Qaisar Ayub & Sulma Rashid

Calibrate

calibrate

Ground thermometer Anemometer

Calibrating device

Barometer

Algorithm

This function takes the argument of device and then check the accuracy of device Active / inactive using
calibrate function

Start up

Ground thermometer Anemometer

Start Up Device

Barometer

Algorithm

Procedure shut_down(int device_code)


{
Start up ground thermometer,anemometer,barometer
Return true;
}
Qaisar Ayub & Sulma Rashid

Shut down

Ground thermometer Anemometer

Shut down Device

Barometer

Algorithm

Procedure shut_down(int shut_down_p)


{
If shut_down_p THEN
Disable the device
Return control;
Else
Return control;

Summery of Weaher station object

reportweather Collect from Collect data from


data archiving devices
module
Calibrate Data Collect
Process
Startup

Shutdown Summarize
data
Ground Anemometer
thermometer

Calibrating
device

Barometer
Ground Anemometer
thermometer

Start Up
Device Ground Anemometer
thermometer

Start Up
Barometer Device

Barometer
Qaisar Ayub & Sulma Rashid

Object Weather Data

Stimuli Description
Collect This stimuli is used to collect the data from devices
Summarize It summarize the data for queried report

Collect

Ground Thermometer Anemometer Barometer

Data Archiving

Algrothem
Int collect (int collect_device)
(
If collect_device ==1 then
Collect data from data archiving
Return collect data;
Else
Return collect data from devices
}

Object Ground thermometer

Stimuli Description
Test It is used to test the instrument state Functioning / non functioning
Calibrate It used to check the accuracy of device

Ground thermometer

Calibrating
device
Algrothem

Boolean calibrate (int inputdata)


{
If inputdate = getdatafromdevice then return true
Else
Return false
Qaisar Ayub & Sulma Rashid

Object Anemometer

Stimuli Description
Test It is used to test the instrument state Functioning / non functioning
Calibrate It used to check the accuracy of device

Ground Anemometer

Calibrating
device

Algrothem
Boolean calibrate (int inputdata)
{
If inputdate = getdatafromdevice then return true
Else
Return false
}

Barometer

Stimuli Description
Test It is used to test the instrument state Functioning / non functioning
Calibrate It used to check the accuracy of device

Ground Barometer

Calibrating
Algrothem device

Boolean calibrate (int inputdata)


{
If inputdate = getdatafromdevice then return true
Else
Return false
}

Anda mungkin juga menyukai