<s> __author__ = '<STR_LIT>' <EOL> from aktos_dcs import * <EOL> class TestEsp ( SerialPortReader ) : <EOL> def on_connect ( self ) : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" % self . ser . baudrate <EOL> print "<STR_LIT>" <EOL> if self . ser . baudrate != <NUM_LIT> : <EOL> self . send_cmd ( "<STR_LIT>" ) <EOL> sleep ( <NUM_LIT:0.1> ) <EOL> self . ser . baudrate = <NUM_LIT> <EOL> self . ser . close ( ) <EOL> else : <EOL> print "<STR_LIT>" <EOL> print self . ser <EOL> def on_disconnect ( self ) : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> def on_connecting ( self ) : <EOL> sleep ( <NUM_LIT:1> ) <EOL> if self . ser . baudrate == <NUM_LIT> : <EOL> self . ser . baudrate = <NUM_LIT> <EOL> self . ser . close ( ) <EOL> def action ( self ) : <EOL> self . start_io_prompt ( ) <EOL> TestEsp ( port = "<STR_LIT>" , baud = <NUM_LIT> ) <EOL> wait_all ( ) </s>
