Tag Embedded System Design Using UML State Machines