pdq c++ uml state machines

7
PDQ C++ UML STATE MACHINES COMPLETELY SPECIFY TH E DYNAMIC BEHAVIOR OF YOUR APPLICATIONS

Upload: dandb-technology

Post on 15-Jan-2015

18 views

Category:

Software


1 download

DESCRIPTION

What Uml state machines are, how they work, and how to operate them.

TRANSCRIPT

Page 1: PDQ C++ Uml state Machines

PDQ C

++ UML S

TATE

MACHINES

CO

MP

LE

TE

L Y S

PE

CI F

Y T

HE

DY

NA

MI C

BE

HA

VI O

R O

F Y

OU

R

AP

PL

I CA

TI O

NS

Page 2: PDQ C++ Uml state Machines

WHAT ARE STATE MACHINES?

State machines are the description of a thing's lifeline. They describe the different stages of the lifeline, the events influencing it, and what it does when a particular event is detected at a particular stage. They offer the complete specification of the dynamic behavior of the thing.

Page 3: PDQ C++ Uml state Machines

MOTIVATION

Provable Programs

Minimal Code

Small Executable

Easy integration with inotify

Component style object files

Little syntactic noise as possible

Faster Execution Time

Reduce dependencies

Maintainable and fairly easy to work on

Nice for embedded Linux system

Easy deploy against common boxes in cloud

Page 4: PDQ C++ Uml state Machines

STATE MACHINE, STATE, TRANSITION, EVENT

Page 5: PDQ C++ Uml state Machines
Page 6: PDQ C++ Uml state Machines

THIS IS C++ CODE … REALLY THIS IS THE PROGRAM

BOOST_MSM_EUML_TRANSITION_TABLE((

Playing == Stopped + play [some_guard] / (some_action , start_playback) ,

Open == Stopped + open_close/ open_drawer ,

Stopped == Stopped + stop ,

Empty == Open + open_close / close_drawer ,

Open == Empty + open_close / open_drawer ,

Stopped == Empty + cd_detected [good_disk_format] / store_cd_info),transition_table)

Page 7: PDQ C++ Uml state Machines

OKAY SO THERE IS MORE TO DO LETS TAKE A LOOK

Link to State File

Link to Events

Link to Finite State Machine

Link to Actions

Link to Transition

Link to inotify

Link to main

Link to Makefile