Stimulus Response Model
-
Upload
qaisar-ayub-sheikh -
Category
Documents
-
view
109 -
download
0
description
Transcript of Stimulus Response Model
Qaisar Ayub & Sulma Rashid [email protected]
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 DescriptionreportWeather This stimulus get the summery of data from data that have been archivedCalibrate (Instruments) Used to check the accuracy of the data collected devices/hardware equipmentsStartup(Instruments) Change the state of instruments in to active stateShutdown(Instruments) Change the state of instruments in to inactive state
ReportWeather
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 module3. the summarize function then summarize the collected data and send.
Report weather
Data Collect Process
Collect from data archiving module
Collect data from devices
Summarize data
Qaisar Ayub & Sulma Rashid [email protected]
Calibrate
Algorithm
This function takes the argument of device and then check the accuracy of device Active / inactive using calibrate function
Start up
Algorithm
Procedure shut_down(int device_code){Start up ground thermometer,anemometer,barometerReturn true;}
Shut down
calibrate
Calibrating device
Ground thermometer Anemometer
Barometer
Start Up Device
Ground thermometer Anemometer
Barometer
Qaisar Ayub & Sulma Rashid [email protected]
Algorithm
Procedure shut_down(int shut_down_p){If shut_down_p THENDisable the deviceReturn control;ElseReturn control;
Shut down Device
Ground thermometer Anemometer
Barometer
reportweather
Calibrate
Startup
Shutdown
Collect from data archiving module
Collect data from devices
Summarize data
Data Collect Process
Calibrating device
Ground thermometer
Anemometer
Barometer
Start Up Device
Ground thermometer
Anemometer
Barometer
Start Up Device
Ground thermometer
Anemometer
Barometer
Summery of Weaher station object
Qaisar Ayub & Sulma Rashid [email protected]
Object Weather Data
Stimuli DescriptionCollect This stimuli is used to collect the data from devicesSummarize It summarize the data for queried report
AlgrothemInt collect (int collect_device)(If collect_device ==1 thenCollect data from data archivingReturn collect data;ElseReturn collect data from devices}
Object Ground thermometer
Stimuli DescriptionTest It is used to test the instrument state Functioning / non functioningCalibrate It used to check the accuracy of device
Algrothem
Boolean calibrate (int inputdata){If inputdate = getdatafromdevice then return trueElseReturn false}
Collect
Ground Thermometer Anemometer Barometer
Data Archiving
Calibrating device
Ground thermometer
Qaisar Ayub & Sulma Rashid [email protected]
Object Anemometer
Stimuli DescriptionTest It is used to test the instrument state Functioning / non functioningCalibrate It used to check the accuracy of device
AlgrothemBoolean calibrate (int inputdata){If inputdate = getdatafromdevice then return trueElseReturn false}
Barometer
Stimuli DescriptionTest It is used to test the instrument state Functioning / non functioningCalibrate It used to check the accuracy of device
Algrothem
Boolean calibrate (int inputdata){If inputdate = getdatafromdevice then return trueElseReturn false}
Calibrating device
Ground Anemometer
Calibrating device
Ground Barometer