Stimulus Response Model

6
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 Algorithm Report Data Collect Collect from data archiving module Collect data from devices Summarize data

description

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

Transcript of Stimulus Response Model

Page 1: Stimulus Response Model

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 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

Page 2: Stimulus Response Model

Qaisar Ayub & Sulma Rashid

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;}

calibrate

Calibrating device

Ground thermometer Anemometer

Barometer

Start Up Device

Ground thermometer Anemometer

Barometer

Page 3: Stimulus Response Model

Qaisar Ayub & Sulma Rashid

Shut down

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

Page 4: Stimulus Response Model

Qaisar Ayub & Sulma Rashid

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

Page 5: Stimulus Response Model

Qaisar Ayub & Sulma Rashid

}

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