# DCharts description generated by SVM-AToM3-plugin, written by Thomas Feng # Source: /home/thomas/Backup/Atom3_2.2/DCharts/models/SimpleEcho/Sender.py # Date: January 15, 2004 # Time: 21:29:44 COMPONENT: id = Echo name = Echo PORT: name = message type = inout CONNECTIONS: message -- Echo.message STATECHART: Send [DS] Wait ENTER: N: Send O: from random import randint Messages=["Hello, everyone!", "Have a nice day!", "How are you today?", "I feel very well \ today!", "The same to you!"] MessageNo=len(Messages) TRANSITION: S: Send N: Wait T: 0 [RTT] C: 1 O: msg=Messages[randint(0, MessageNo-1)] [EVENT("message.send", msg)] [DUMP("Sent: " + msg)] TRANSITION: S: Wait N: Send E: message.echo C: 1 O: [DUMP("Received: " + [PARAMS])]