Embedded System Design using UML State Machines