Download "practical statecharts in c c " Book at link Below