Cruise Control and Monitoring System - PowerPoint PPT Presentation

About This Presentation
Title:

Cruise Control and Monitoring System

Description:

Title: Cruise Control and Monitoring Subsystem Author: MERCURY Last modified by: Ferrando Created Date: 5/6/2001 2:26:47 PM Document presentation format – PowerPoint PPT presentation

Number of Views:303
Avg rating:3.0/5.0
Slides: 46
Provided by: Merc85
Category:

less

Transcript and Presenter's Notes

Title: Cruise Control and Monitoring System


1
Cruise Control and Monitoring System
  • Giada Carlini
  • Corso di Ingegneria del Software II
  • Caso di Studio - seconda parte.

2
Cosa abbiamo visto
  • Analysis Model
  • Strutturazione del Sistema in Sottosistemi

3
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classdel Cruise
    Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

4
Caratteristiche degli I/O device del Cruise
Control and Monitoring System
  • Asynchronous input deviceCruise control lever e
    Drive shaft
  • Passive input device e frequenza del
    lorocampionamentoBrake sensor, Engine sensor
    100 msecGas tank sensor a richiestaCalibratio
    n buttons, Mileage reset buttons 500
    msecMaintenance reset buttons ogni secondo
  • Passive output device frequenza del loro
    aggiornamentoThrottle 100 msecMileage
    display ogni secondoMaintenance display ogni
    due secondi

5
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classdel Cruise
    Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

6
Strutturazione in task concorrenti
  • Passi
  • Considerare i principali sottosistemi del caso di
    studio
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Analizzare i singoli sottosistemi dei due
    principali sottosistemi
  • Applicare i task structuring criteria ai
    collaboration diagram di ciascun sottosistema per
    individuare i task concorrenti.
  • Definire le interfacce task-task e task-passive
    objects
  • Punto di vista dellanalisi loosely o tightly
    coupling

7
Task
  • Oggetto attivo che ha il suo thread di controllo
  • Rappresenta lesecuzione di un programma
    sequenziale (task) o di una componente
    sequenziale di un programma concorrente
    (concurrent task)
  • Non cè concorrenza allinterno di un task

8
Concurrent Collaboration Diagram
  • È un collaboration diagram che disegna una rete
    di concurrent task e le loro interfacce
  • Mette in luce
  • Se la message comunication è loosely o tightly
    coupled
  • La Event Synchronization
  • Gli accessi ai passive information hiding objects

9
Task Architecture
  • Descrizione dei task concorrenti di un sistema o
    di un sottosistema in termini delle interfacce e
    interconnessioni dei task stessi

10
I sottosistemi del Cruise Control and Monitoring
Subsystem
  • Cruise Control Subsystem
  • Shaft Subsystem
  • Calibration Subsystem
  • Auto Control Subsystem
  • Distance and Speed Subsystem
  • Monitoring Subsystem
  • Trip Averages Subsystem
  • Maintenance Subsystem

11
Strutturazione del sistema in task concorrenti
  • Per ogni sottosistema sono mostrate due nuove
    figure
  • La prima illustra le decisioni di strutturazione
    in task prese su ciascun collaboration diagram
  • La seconda è un concurrent collaboration diagram
    che illustra larchitettura task risultante

12
Shaft Subsystem task structuring
ltltltexternal input devicegtgt Shaft
ltltdata collection subsystemgtgtShaftSubsystem
Shaft Input
ltltinput device interfacegtgt ShaftInterface
Update
ltltltentitygtgt ShaftRotationCount
13
Shaft Subsystem task architecture
14
Calibration Subsystem task structuring
ltltexternal input devicegtgt stopCalibrationButton
ltltexternal input devicegtgt startCalibrationButton
Start Calibration Input
Stop Calibration Input
ltltdata analysis subsystemgtgt CalibrationSubsystem
ltltinput device interfacegtgt startCalibration Button
Interface
ltltinput device interfacegtgt stopCalibration ButtonI
nterface
Calibration Stop
Calibration Start
ltltstate dependent controlgtgt CalibrationControl
Start,Stop
Read
ltltentitygtgt CalibrationConstant
ltltentitygtgt ShaftRotation Count
Shaft RotationCount Value
15
Calibration Subsystem task architecture
ltltexternal input devicegtgt startCalibrationButton
ltltexternal input devicegtgt stopCalibrationButton
ltltexternal timergtgt DigitalClock
read (out start CalibrationInput)
read (out stop CalibrationInput)
timerEvent
ltltdata analysissubsystemgtgtCalibrationSubsystem
ltlttemporal clusteringgtgt Calibration
start ( ), stop ( )
read (out shaftRotationCountValue)
ltltentitygtgt ShaftRotation Count
ltltentitygtgt CalibrationConstant
16
Auto Control Subsystem task structuring 1
ltltexternal inputdevicegtgt CruiseControlLever
ltltexternal input devicegtgt Engine
ltltexternal input devicegtgt Brake
Cruise Control Input
Engine Input
Brake Input
ltltcontrol subsystemgtgt AutoControlSubsystem
ltltinput device interfacegtgt EngineInterface
ltltinput device interfacegtgt BrakeInterface
ltltinput device interfacegtgt CruiseControlLeverI
nterface
Brake PressedBrake Released
Engine off, Engine on
Accell, Cruise, Resume, Off
ltltstate dependent controlgtgt CruiseControl
17
Auto Control Subsystem task structuring 2
ltltcontrol subsystemgtgtAutoControlSubsystem
Enable Resume Cruising, Disable Resume Cruising
ltltstate dependent controlgtgt CruiseControl
Enable Increse Speed,Disable Increse Speed
Reached Cruising
Enable Maintain Speed,Disable Maintain Speed
Select Desired SpeedClear Deired Speed
ltltalgorithmgtgt Resumption
ltltalgorithmgtgt Acceleration
ltltalgorithmgtgt Cruise
Read
Desired Speed Value
Read
Throttle Value
Desired Speed Value
ltltentitygtgtDesiredSpeed
Throttle Value
Throttle Value
ltltoutput device interfacegtgt ThrottleInterface
Throttle Position
Current Speed Value
Current Speed Value
Current Speed Value
ltltexternal output devicegtgtThrottle
Read
Read
Read
Read
ltltentitygtgtCurrentSpeed
Current Speed Value
18
Auto Control Subsystem task architecture
ltltexternal input devicegtgt CruiseControlLevel
ltltexternal input devicegtgt Brake
ltltexternal timergtgt DigitalClock
ltltexternal input devicegtgt Engine
cruiseControlInterrupt(cruiseControlInput)
timer Event
read(out brakeInput)
read(out engineInput)
ltltcontrol subsystemgtgt AutoControlSubsystem
ltlttemporal clusteringgtgtAutoSensors
ltltasynchronous input device interfacegtgt CruiseCon
trolLeverInterface
cruiseControlRequest
ltltcontrolgtgtCruiseControl
select( ), clear( )
cruiseControlRequest
cruiseControlCommand
reachedCruising
ltltentitygtgtDesiredSpeed
ltltmutually exclusive clusteringgtgtSpeedAdjustment
read(out desiredSpeedValue)
throttleValue
read(out currentSpeedValue)
read(out currentSpeedValue)
ltltperiodic output device interfacegtgtThrottleInte
rface
throttlePosition
ltltentitygtgtCurrentSpeed
ltltexternal output devicegtgt Throttle
19
Distance Speed Subsystem task structuring
ltltexternal timergtgt Clock
ltltdata analysis subsystemgtgt DistanceSpeed
Subsystem
Timer Event
Current Time
Read
ltlttimergtgt distanceTimer
Calculate (Incremental Distance)
Incremental Distance
Calculate
ltltentitygtgt Distance
ltltentitygtgt CurrentSpeed
Calibration ConstantValue
Read
Shaft Rotation CountValue
Read
ltltentitygtgt ShaftRotation Count
ltltentitygtgt Calibration Constant
20
Distance Speed Subsystem task structuring
ltltexternal timergtgt Clock
Scope of Control of DistanceSpeed Task
ltltdata analysis subsystemgtgt DistanceSpeed
Subsystem
Timer Event
Current Time
Read
Distance Speed Task
ltlttimergtgt distanceTimer
Calculate (Incremental Distance)
Incremental Distance
Calculate
ltltentitygtgt CurrentSpeed
ltltentitygtgt Distance
Read
Calibration ConstantValue
Shaft Rotation CountValue
Read
ltltentitygtgt ShaftRotation Count
ltltentitygtgt Calibration Constant
21
Distance Speed Subsystem task architecture
ltltexternal timergtgt Clock
ltltdata analysis subsystemgtgt DistanceSpeed
Subsystem
timerEvent
ltltperiodicgtgt DistanceSpeed
read (out currentTime)
calculate (incremental Distance)
calculate (out incremental Distance)
ltltentitygtgt CurrentSpeed
ltltentitygtgt Distance
read (out shaftRotation CountValue)
read (out calibration ConstantValue)
ltltentitygtgt ShaftRotation Count
ltltentitygtgt Calibration Constant
22
Definizione delle interfacce dei task del Cruise
Control Subsystem
  • Nei sottosistemi Shaft , DistanceSpeed
    e Calibration i task non interagiscono
    direttamente con altri task
  • Il task invoca le operazioni degli oggetti
    passivi
  • Questo non è vero per il sottosistema Auto
    Control

23
Auto Control Subsystem task architecture
ltltexternal input devicegtgt CruiseControlLevel
ltltexternal input devicegtgt Brake
ltltexternal timergtgt DigitalClock
ltltexternal input devicegtgt Engine
cruiseControlInterrupt(cruiseControlInput)
timer Event
read(out brakeInput)
read(out engineInput)
ltltcontrol subsystemgtgt AutoControlSubsystem
ltlttemporal clusteringgtgtAutoSensors
ltltasynchronous input device interfacegtgt CruiseCon
trolLeverInterface
cruiseControlRequest
ltltcontrolgtgtCruiseControl
select( ), clear( )
cruiseControlRequest
cruiseControlCommand
reachedCruising
ltltentitygtgtDesiredSpeed
ltltmutually exclusive clusteringgtgtSpeedAdjustment
read(out desiredSpeedValue)
throttleValue
read(out currentSpeedValue)
read(out currentSpeedValue)
ltltperiodic output device interfacegtgtThrottleInte
rface
throttlePosition
ltltentitygtgtCurrentSpeed
ltltexternal output devicegtgt Throttle
24
Definizione delle Data Abstraction Class
  • Il design delle task interface include il design
    degli entity object acceduti dai task
  • Gli entity object sono tutti data abstraction
    objectPerché
  • Bisogna soltanto incapsulare i dati che devono
    essere memorizzati

25
Definizione delle Data Abstraction Classes
  • Le operazioni sono determinate considerando come
    si accede agli oggetti nei collaboration diagram
  • Le Data Abstraction Class sono
  • Shaft Rotation Count
  • Calibration Constant
  • Current Speed
  • Desired Speed
  • Distance

26
Data abstraction class
ltltdata abstractiongtgt ShaftRotationCount -counter
Integer update ( ) read (out
shaftRotationCountValue)

27
Shaft Rotation Count collaboration diagram
ltltltexternal input devicegtgt Shaft
ltltdata collection subsystemgtgt ShaftSubsystem
Shaft Input
ltltexternal device interfacegtgt ShaftInterface
ltltsubsystemgtgt DistanceSpeed Subsystem
Update
ltltltentitygtgt Distance
Read
ltltltentitygtgt ShaftRotationCount
Shaft Routation Count Value
28
Data abstraction classes
ltltdata abstractiongtgt ShaftRotationCount -counter
Integer update ( ) read (out
shaftRotationCountValue)

29
Data abstraction classes
ltltdata abstractiongtgt Distance -cumulativeDistance
Real -incrementalDistance Real calculate (
out incrementalDistance) read (out
cumulativeDistance)

30
Definizione delle interfacce tra i task e i data
abstraction object
  • I data abstraction object sono acceduti da più
    task quindi sono modellati come monitor così le
    loro operazioni sono eseguite in modo mutuamente
    esclusivo
  • Interfacce sempre tightly coupled ( con risposta
    se cè un parametro di ritorno )

31
Cruise Control Subsystem subsystem and task
architecture
cruiseControlInterrupt(cruiseControlInput)
timer Event
timer Event
ltltsubsystemgtgt AutoControlSubsystem
ltltsubsystemgtgt DistanceSpeedSubsystem
ltltasyncronous input device interfacegtgt CruiseCont
rolLeverInterface
ltlttemporal clusteringgtgtAutoSensors
ltltperiodicgtgtDistanceSpeed
cruiseControlRequest
ltltcontrolgtgtCruiseControl
calculate(out incrementalDistance)
ltltentitygtgtDesiredSpeed
calculate(outincrementalDistance)
select( ), clear( )
cruiseControlRequest
cruiseControlCommand
reachedCruising
read(out currentSpeedValue)
read(out desiredSpeedValue)
ltltmutually exclusive clusteringgtgtSpeedAdjustment
ltltentitygtgtDistance
ltltentitygtgtCurrentSpeed
read(out currentSpeedValue)
throttleValue
ltltperiodic output device interfacegtgtThrottleInte
rface
read (out shaftRotationCountValue)
timer Event
ltltsubsystemgtgt ShaftSubsystem
ltltasyncronous input device interfacegtgt ShaftInter
face
ltltsubsystemgtgt Calibration Subsystem
ltlttemporal clusteringgtgt Calibration
shaftInterrupt
read(out calibration Constant Value)
start ( ),stop ( )
update( )
read (out shaftRotationCountValue)
ltltentitygtgt ShaftRotationCount
ltltentitygtgtShaftRotationCount
32
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classdel Cruise
    Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

33
Determinazione dei task del Monitoring Subsystem
  • Possibili modi di procedere
  • combinare tutti i button input device in un solo
    task (temporal clustering)
  • problema
  • Nella definizione del problema era richiesto di
    separare il Trip Averages Subsystem dal
    Maintenance Subsystem
  • realizzare due temporal clustering task separati

34
Trip Averages Subsystem task structuring
ltltexternal input devicegtgt fuelConsumptionResetButt
on
ltltexternal timergtgt Clock
ltltexternal input devicegtgt GasTank
ltltexternal input devicegtgt tripSpeedResetButton
Fuel Consumption Reset Input
Fuel Input
Trip Speed Reset Input
Read
ltltdata analysis subsystemgtgt TripAveragesSubsyste
m
ltltinput device interfacegtgt fuelConsumptionReset Bu
ttonInterface
ltltinput device interfacegtgt tripSpeedReset ButtonIn
terface
ltltinput device interfacegtgt GasTankInterface
Fuel Consumption Reset
Trip Speed Reset
Current Time
Read
Fuel Amount
Read
ltltalgorithmgtgt TripFuel Consumption
ltltalgorithmgtgt TripSpeed
Initialize
ltltoutput device interfacegtgt TripDisplayInterface
Initialize
CumulativeDistance
Mileage Display Data
CumulativeDistance
Read
Read
ltltexternal output devicegtgt TripDisplay
ltltentitygtgt Distance
35
Trip Averages Subsystem task structuring
ltltexternal timergtgt Clock
ltltexternal input devicegtgt GasTank
TimerEvent
TimerEvent
Fuel Input
Read
ltltdata analysis subsystemgtgt TripAveragesSubsyste
m
ltlttimergtgt fuelConsumption Timer
ltlttimergtgt tripSpeed Timer
ltltinput device interfacegtgt GasTankInterface
Calculate
Calculate
Current Time
Read
Fuel Amount
Read
ltltalgorithmgtgt TripFuel Consumption
ltltalgorithmgtgt TripSpeed
Initialize
ltltoutput device interfacegtgt TripDisplayInterface
Initialize
CumulativeDistance
Mileage Display Data
CumulativeDistance
Read
Read
ltltexternal output devicegtgt TripDisplay
ltltentitygtgt Distance
36
Trip Averages Subsystem task architecture
ltltexternal input devicegtgt fuelConsumptionResetButt
on
ltltexternal input devicegtgt tripSpeedResetButton
ltltexternal timergtgt Clock
ltltexternal input devicegtgt GasTank
read(out fuelConsumptionResetInput)
read(out tripSpeedResetInput)
timerEvent
timerEvent
read(out fuelInput)
ltltdata analysis subsystemgtgt TripAveragesSubsyste
m
ltlttemporal clusteringgtgt TripResetButtonInterface
ltlttemporal clusteringgtgt tripAveragesTimer
ltltinput device interfacegtgt GasTankInterface
reset( )
calculate( )
calculate( )
reset( )
ltltalgorithmgtgt TripFuel Consumption
read(out fuel Amount)
ltltalgorithmgtgt TripSpeed
Initialize, displayAverageFuelConsumption(fuel
Consumption)
Initialize, displayAverageSpeed(speed)
ltltoutput device interfacegtgt TripDisplayInterface
read(out cumulativeDistance)
read(out cumulativeDistance)
mileageDisplay Data
ltltexternal output devicegtgt TripDisplay
ltltentitygtgt Distance
37
Maintenance Subsystem task structuring 1
ltltexternal input devicegtgt airFilterService ResetBu
tton
ltltexternal input devicegtgt majorServiceResetButton
ltltexternal input devicegtgt oilChangeResetButton
Major Service Reset Input
ltltdata analysis subsystemgtgt Maintenance Subsystem
Temporal Clustering Task
ltltinput device interfacegtgt oilChangeReset ButtonIn
terface
ltltinput device interfacegtgt majorServiceReset Butto
nInterface
ltltinput device interfacegtgt airFilterService ResetB
uttonInterface
Major Service Reset
Oil Change Reset
Air Filter Service Reset
ltltalgorithmgtgt OilChange Consumption
ltltalgorithmgtgt AirFilterServiceMaintenance
ltltalgorithmgtgt MajorService Maintenance
Oil Change Status
Air Filter Service Status
ltltoutput device interfacegtgt MaintenanceDisplayInt
erface
Major Service Status
Read
Maintenance Display Data
Cumulative Distance
Read
Cumulative Distance
ltltexternal output devicegtgt MaintenanceDisplay
Read
Cumulative Distance
ltltentitygtgt Distance
38
Maintenance Subsystem task structuring 2
ltltexternal timergtgt Clock
Timer Event
Timer Event
Timer Event
ltltdata analysis subsystemgtgt Maintenance Subsystem
Temporal Clustering Task
ltlttimergtgt oilChange Timer
ltlttimergtgt majorService Timer
ltlttimergtgt airFilterService Timer
Check
Check
Check
ltltalgorithmgtgt OilChange Maintenance
ltltalgorithmgtgt AirFilterServiceMaintenance
ltltalgorithmgtgt MajorService Maintenance
Oil Change Status
Air Filter Service Status
ltltoutput device interfacegtgt MaintenanceDisplayInt
erface
Major Service Status
Read
Maintenance Display Data
Cumulative Distance
Read
Cumulative Distance
ltltexternal output devicegtgt MaintenanceDisplay
Read
Cumulative Distance
ltltentitygtgt Distance
39
Maintenance Subsystemtask architecture
ltltexternal input devicegtgtairFilterServiceResetB
utton
ltltexternal input devicegtgtmajorServiceResetButto
n
ltltexternal timergtgtClock
ltltexternal input devicegtgtoilChangeResetButton
timer Event
read(out oilChangeResetInput)
timer Event
read(out airFilterServiceResetInput)
read(out majorServiceResetInput)
ltltdata analysissubsystemgtgtMaintenanceSubsystem
ltlttemporal clusteringgtgtMaintenanceTimer
ltlttemporal clusteringgtgtMaintenanceResetButtonInt
erface
check( )
reset( )
check( )
check( )
reset( )
reset( )
ltltalgorithmgtgtOilChangeMaintenance
ltltalgorithmgtgtAirFilterServiceMaintenance
ltltalgorithmgtgtMajorServiceMaintenance
displayOilChangeMessage(status)
displayAirFilterMessage(status)
displayMajorServiceMessge(status)
ltltoutput device interfacegtgtMaintenanceDisplayInt
erface
maintenanceDisplayData
read(out cumulative Distance)
ltltexternal output devicegtgtMaintenanceDisplay
read(out cumulative Distance)
read(out cumulative Distance)
ltltentitygtgtDistance
40
Sviluppo del Monitoring Subsystem Task
Architecture e delle Interface
  • Conclusioni
  • i task sono tutti periodici
  • i task non interagiscono direttamente tra loro
  • le operazioni degli algorithm objects sono
    eseguite
  • nel thread di controllo dei task
  • in maniera mutuamente esclusiva

41
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classdel Cruise
    Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

42
Design delle information hiding class
  • Le information hiding class per il caso di studio
    sono
  • Input/output device interface class
  • Input/Output device inteface object
    ShaftInterface, ThrottleInterface,
    CruiseControlLeverInterface, BrakeInterface,
    EngineInterface, StartcalibrationButtonInterface,
    StopCalibrationButtonInterface
  • Entity class
  • Entity object ShaftRotationCount,
    CalibrationConstant, Distance, CurrentSpeed,
    DesiredSpeed
  • Control class
  • Control object CalibrationControl,
    distanceTimer, CruiseControl..
  • Algorithm class
  • Algorithm object Acceleration, Cruiser,
    Resumption

43
Definizione delle device interface class
  • Sappiamo che
  • Durante la Analysis e la Modeling phase vengono
    individuati gli external devices e i device
    interfece objects
  • Nella Class Design phase si determinano le
    operazioni di ogni device interface class

44
Device Interface Class
  • Una device interface class nasconde la reale
    interfaccia del real-world device
  • Cè una device interface class per ogni tipo di
    I/O device
  • Cè un device interface object per ogni istanza
    di un I/O device.
  • Una device interface class è generalmente
    inserita
  • in device interface task
  • in un task strutturato utilizzando i clustering
    criteria
  • A meno che ad esempio
  • la computazione non sia realizzata poco
    frequentemente.

45
Definizione delle device interface class
  • Le input device interface class sono
  • Engine Interface
  • Brake Interface
  • Boolean Input Device Interface abstract
  • Shaft Rotation Interface
  • Calibration Button Interface
  • Gas Tank Interface
  • Trip Reset Button Interface
  • Maintenance Reset Button interface
  • Button Interface abstract

46
Input device interface classes 1
ltltinput device interfacegtgt BooleanInputDeviceInter
face abstract initialize ( )
abstract read ( out deviceStatus ) abstract
ltltinput device interfacegtgt BrakeInterface initia
lize ( ) read ( out deviceStatus )
ltltinput device interfacegtgt EngineInterface initi
alize ( ) read ( out deviceStatus )
47
Input device interface classes 2
48
Input device interface classes 3
ltltinput device interfacegtgtMintenanceResetButton
Interface initialize ( buttonID, buttonLocation
) read ( out buttonStatus )
ltltinput device interfacegtgtCalibrationButtonInter
face initialize ( buttonID, buttonLocation
)read ( out buttonStatus )
ltltinput device interfacegtgtCalibrationButtonInter
face initialize ( buttonID, buttonLocation
)read ( out buttonStatus )
49
Definizione delle device interface class
  • Le output device interface class sono
  • Throttle Output Interface
  • Trip Display Interface
  • Maintenance Display Interface
  • Display Interface abstract

50
Output device interface class 1
ltltoutput device interfacegtgtDisplayInterface
abstract initialize ( ) abstract
ltltoutput device interfacegtgtMaintenanceDisplayInte
rface -oilChangeStatus Integer-oilChangeMessag
e String-airFilterStatus Integer-airFilterMe
ssage String-majorSeviceStatus
Integer-majiorServiceMessage
String initialize ( )display ( status
)display ( status )display ( status )
ltltoutput device interfacegtgtTripDisplayInterface
-averageSpeed Real-averageFuelConsumption
Real initialize ( )displayAverageSpeed (
speed)displayAverageFuelConsumption
(fuelConsumption)
51
Output device interface class 2
ltltoutput device interfacegtgt ThrottleOutputInterfac
e -throttleStatus Boolean -currentThrottleValue
Real -deltaIncremental Real -targetThrottleVa
lue Real initialize ( ) output ( in
throttleValue )
52
Definizione delle State-Dependent Class
  • Le state-dependent class sono
  • Il Cruise Control
  • Il Calibration Control
  • Le state-dependent class sono nel Cruise Control
    Subsystem
  • Il Monitoring Subsystem non è state-dependent

53
State-dependent class
ltltstate dependent controlgtgtStateMachine
abstract processEvent ( in event )
abstract currentState ( ) State abstract
ltltstate dependent controlgtgtCruiseControlStateMach
ine processEvent ( in event )
Action currentState ( ) State
ltltstate dependent controlgtgtCalibrationControl
processEvent ( in event ) currentState ( )
State
54
Cruise Control State Machine
Engine On/Clear Desired Speed
CruiseControlRequest
Idle
ltltcontrolgtgtCruiseControl
select( ), clear( )
Initial
ltltentitygtgtDesiredSpeed
read(out desiredSpeedValue)
AccelBrake off
AcceleratingExit/Select Desired Speed
Cruise
55
Cruise Control State Machine
  • Incapsula uno statechart
  • È inserito nel Cruise Control task
  • La specifica delle operazioni è data nella
    superclasse astratta
  • Loperazione process Event
  • ha come parametro un evento che causa una
    transizione di stato
  • ritorna lazione associata alla transizione di
    stato
  • Ogni azione è realizzata da unoperazione di un
    information hiding class

56
Definizione delle Algorithm class
  • Le Algorithm class che vedremo incapsulano i vari
    algoritmi usati nel caso di studio
  • Le operazioni di una algorithm class possono
    essere ricavate dal collaboration diagram e/o
    dallo statechart associato

ltltcontrolgtgtCruiseControl
CruisingDo/Maintain Speed
Enable Maintain Speed, Disable Maintain Speed
ltltalgorithmgtgtCruiser
57
Definizione delle Algorithm class
  • Le algorithm class del caso di studio sono
  • Acceleration
  • Cruiser
  • Resumption
  • Speed Control Algorithm abstract
  • Oil Change Maintenance
  • Air Filter Maintenance
  • Major Service Maintenance
  • Maintenance abstract
  • Trip Speed
  • Trip Fuel Consumption
  • Trip Average abstract

58
Speed Control algorithm class
ltltalgorithmgtgtSpeedControlAlgorithm
abstract initialize ( ) abstractenable (
) abstractdisable ( ) abstract
ltltalgorithmgtgtAcceleration initialize (
)enable ( )disable ( )
ltltalgorithmgtgtCruiser initialize ( )enable (
)disable ( )
ltltalgorithmgtgtResumption initialize (
)enable ( )disable ( )
59
Maintenance algorithm classes
ltltalgorithmgtgtMaintenance abstractinitialMile
age Real reset ( ) check ( ) abstract
ltltalgorithmgtgtOilChangeMaintenance -oilMaintenanc
eMileage Real 5,000 check ( )
ltltalgorithmgtgtAirFilterMaintenance -airMaintenanc
eMileage Real 10,000 check ( )
ltltalgorithmgtgtMajorServiceMaintenance -majorServi
ceMaintenanceMileage Real 15,000 check (
)
60
Trip Average algorithm classes
ltltalgorithmgtgtTripAverage abstract initialDist
ance Real reset ( ) abstract calculate (
) abstract
ltltalgorithmgtgt TripSpeed -initialTime Real
reset ( ) calculate ( )
ltltalgorithmgtgt TripSpeed -initialFuelAmount Real
reset ( )calculate ( )
61
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classdel Cruise
    Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

62
Sviluppo del Detailed Software Design
  • Questo passo sviluppa
  • La struttura interna dei clustered task
  • Il design dei connector objects
  • Il Detailed Software Design è illustrato
    attraverso i
  • detailed concurrent collaboration diagram che
  • disegnano la struttura dei task composti

63
Design dei clustered task
  • Consideriamo nellordine
  • I clustered task nel Cruise Control Subsystem
  • Speed Adjustment task
  • Calibration task
  • Auto Sensors task
  • I clustered task nel Monitoring Subsystem
  • Trip Reset Button Interface task
  • Maintenance Reset Button Interface task

64
Detailed software design of Speed Adjustment task
ltltcontrolgtgt CruiseControl
cruiseControlCommand
reachedCruising
ltltmutually exclusive clusteringgtgt Speed
Adjustment
ltltcoordinatorgtgtSpeedAdjustment Coordinator
ltltcoordinatorgtgtSpeedAdjustment Coordinator
enableIncreaseSpeed,disableIncreaseSpeed
enableResumeCruising(out reached
Cruising),disableResumeCruising
enableMaintainSpeeddisableMaintainSpeed
ltltalgorithmgtgt Resumption
ltltalgorithmgtgt Acceleration
ltltalgorithmgtgt Cruiser
read(out desiredSpeedValue)
throttleValue
throttleValue
read(out desiredSpeedValue)
ltltperiodic output device interfacegtgt ThrottleInte
rface
ltltentitygtgt DesiredSpeed
ThrottleValue
read(out current SpeedValue)
read(out currentSpeedValue)
throttlePosition
read(out currentSpeedValue)
ltltexternal output devicegtgt Throttle
read(out currentSpeedValue)
ltltentitygtgt CurrentSpeed
65
Detailed software design of Speed Adjustment task
ltltcontrolgtgt CruiseControl
cruiseControlCommand
ltltmutually exclusive clusteringgtgt Speed
Adjustment
ltltcoordinatorgtgtSpeedAdjustment Coordinator
enableIncreaseSpeed,disableIncreaseSpeed
enableMaintainSpeeddisableMaintainSpeed
ltltalgorithmgtgt Acceleration
ltltalgorithmgtgt Cruiser
throttleValue
throttleValue
ltltperiodic output device interfacegtgt ThrottleInte
rface
throttlePosition
ltltexternal output devicegtgt Throttle
66
Detailed software design of Calibration task
ltltexternal timergtgtDigitalClock
ltltexternal input devicegtgtstopCalibrationButton
ltltexternal input devicegtgtstartCalibrationButton
timer Event
read(out startCalibrationInput)
read(out stopCalibrationInput)
ltlttemporal clusteringgtgtCalibration
ltltcoordinatorgtgtCalibrationMonitor
read( )
read( )
ltltinput device interfacegtgtstartCalibrationButton
Interface
ltltinput device interfacegtgtstopCalibrationButtonI
nterface
ltltstate dependent controlgtgtCalibrationControl
processEvent(calibrationStart)
processEvent(calibrationStop)
start( ), stop ( )
ltltentitygtgtCalibrationConstant
67
Detailed software design of Auto Sensors task
ltltpassive input devicegtgt Engine
ltltpassive input devicegtgt Brake
ltltexternal timergtgt DigitalClock
timerEvent
read (out engine Input)
read (outbrake Input)
ltlttemporal clusteringgtgtAutoSensors
ltltcoordinatorgtgtAutoSensor Monitor
read (out engine Status)
read (out brake Status)
ltltinput device interfacegtgtBrakeInterface
ltltinput device interfacegtgtEngineInterface
cruiseControl Request
ltltcontrolgtgtCruiseControl
68
Detailed software design of Trip Reset Button
Interface task
ltltexternal timergtgtClock
ltltexternal input devicegtgttripSpeedResetButton
ltltexternal input devicegtgtfuelConsumptionResetButt
on
timer Event
read(out fuelConsumptionResetInput)
read(out tripSpeedResetInput)
ltlttemporal clusteringgtgtTripResetButtonInterface
ltltcoordinatorgtgtTripResetButtonMonotor
read( )
read( )
ltltinput device interfacegtgtfuelConsumptionResetBut
tonInterface
ltltinput device interfacegtgttripSpeedResetButtonIn
terface
reset( )
reset( )
ltltalgorithmgtgtTripFuelConsumption
ltltalgorithmgtgtTripSpeed
69
Design dei Connector Object
  • Come sappiamo
  • I connector object sono usati per incapsulare i
    dettagli dellinter-task message communication
  • Esempi
  • caso di loosely coupled Message Comunication
  • caso di tightly coupled Message Comunication
    senza risposta

70
Design of Cruise Control connector objects
ltltasynchronous input device interfacegtgt CruiseCon
trolLeverInterface
ltlttemporal clusteringgtgtAutoSensors
CruiseControlRequest
ltltcontrolgtgtCruiseControl
CruiseControlRequest
reachedCruising
cruiseControlCommand
ltltmutually exclusive clusteringgtgtSpeedAdjustment
Auto Control Subsystem task architecture
71
Design of Cruise Control connector objects
ltltasynchronous inputdevice interfacegtgtCruiseCo
ntrolLeverInterface
ltlttemporal clusteringgtgtAutoSensors
ltltcontrolgtgt CruiseControl
ltltmutually exclusive clusteringgtgtSpeedAdjustmen
t
cruiseControlCommand
72
Design of Cruise Control connector objects
ltltasynchronous inputdevice interfacegtgtCruiseCo
ntrolLeverInterface
ltlttemporal clusteringgtgtAutoSensors
ltltcontrolgtgt CruiseControl
send( in cruiseControlCommand)
ltltmutually exclusive clusteringgtgtSpeedAdjustmen
t
ltltconnectorgtgt speedAdjustament MessageBuffer
receive(out cruiseControlCommand)
73
Cosa vedremo nel caso di studio
  • Strutturazione del Cruise Control and Monitoring
    System in task concorrenti
  • Cruise Control Subsystem
  • Monitoring Subsystem
  • Design delle information hiding classesdel
    Cruise Control and Monitoring System
  • Sviluppo del Detailed Software Design del Cruise
    Control and Monitoring System
  • Evoluzione del Cruise Control and Monitoring
    System in un Distributed Automobile System

74
Evoluzione del Cruise Control and Monitoring
System in un Distributed Automobile System
  • Osservazioni
  • Gli Shaft, Calibration e DistanceSpeed Subsystem
    calcolano la CumulativeDistance e il CurrentSpeed
    dellauto
  • Gli Auto Control, Trip Averages e Maintenance
    Subsystem leggono il valore della
    CumulativeDistance e del CurrentSpeed dellauto
  • sono collocati su un Auto Measurement Node
  • sono client indipendenti dellAuto Measurement
    Node

75
Distribuited Automobile System
Auto Control Node
Trip Averages Node
Auto Maintenance Node
ltltautomobile LANgtgt
Auto Measurement Node
ltltsubsystemgtgt
DistanceSpeed Subsystem
ltltsubsystemgtgt
Calibration Subsystem
ltltsubsystemgtgt
Shaft Subsystem
76
Task Structuring Criteria
  • Temporal Criteria
  • Sequential Criteria
  • Mutually Exclusive Criteria
  • Priority Criteria

Torna allAuto Control Subsystem1
77
Task Structuring CriteriaTemporal Clustering
  • Raggruppo in un unico task un gruppo di task
  • I task possono ad esempio essere attivati dallo
    stesso timer event
  • Specifico lordine di esecuzione dei task
  • Condizione
  • i task sono indipendenti

78
Task Structuring CriteriaSequential Clustering
  • Raggruppo in un unico task un gruppo di task
  • Ad esempio un task è attivato da un evento
    asincrono o periodico ed un secondo task viene
    eseguito di seguito
  • Condizione
  • i task sono eseguiti in ordine sequenziale

79
Task Structuring Criteria Mutually Exclusive
Clustering
  • Raggruppo in un unico task un gruppo di task
  • Condizione
  • in ogni momento è esecuzione uno solo dei task

80
Task Structuring CriteriaPriority Clustering
  • Specifica limportanza di eseguire un dato task
    rispetto agli altri.

81
Data Collection Subsystem
  • Memorizza i dati raccolti dallesterno dopo
    averli analizzati.
  • Risponde a richieste da parte di altri
    sottosistemi che riguardano i suoi dati e la loro
    elaborazione.

82
Data Analysis Subsystem
  • Analizza dati e riporta risultati ad altri
    sottosistemi.
  • Data analysis, al contrario di data collection,
    non è fatta a real-time.

83
Control Subsystem
  • Controlla un dato aspetto del sistema
  • Riceve input dallambiente esterno o da altri
    sottosistemi
  • Genera output verso lambiente esterno o verso
    altri sottosistemi
  • Nel caso sia state-dependent contine uno
    state-dependent control object
Write a Comment
User Comments (0)
About PowerShow.com