<s> import os <EOL> import json <EOL> from weblab . util import data_filename <EOL> from voodoo . gen . caller_checker import caller_check <EOL> from voodoo . log import logged <EOL> from voodoo . override import Override <EOL> import experiments . ud_xilinx . server as UdXilinxExperiment <EOL> import weblab . data . server_type as ServerType <EOL> import weblab . experiment . util as ExperimentUtil <EOL> module_directory = os . path . join ( * __name__ . split ( '<STR_LIT:.>' ) [ : - <NUM_LIT:1> ] ) <EOL> class UdDemoXilinxExperiment ( UdXilinxExperiment . UdXilinxExperiment ) : <EOL> FILES = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> def __init__ ( self , coord_address , locator , cfg_manager , * args , ** kwargs ) : <EOL> super ( UdDemoXilinxExperiment , self ) . __init__ ( coord_address , locator , cfg_manager , * args , ** kwargs ) <EOL> file_path = data_filename ( os . path . join ( module_directory , self . FILES [ self . _board_type ] ) ) <EOL> self . file_content = ExperimentUtil . serialize ( open ( file_path , "<STR_LIT:rb>" ) . read ( ) ) <EOL> @ Override ( UdXilinxExperiment . UdXilinxExperiment ) <EOL> @ caller_check ( ServerType . Laboratory ) <EOL> @ logged ( "<STR_LIT:info>" ) <EOL> def do_start_experiment ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> super ( UdDemoXilinxExperiment , self ) . do_send_file_to_device ( self . file_content , "<STR_LIT>" ) <EOL> return json . dumps ( { "<STR_LIT>" : """<STR_LIT>""" % ( self . webcam_url , self . _programmer_time ) , "<STR_LIT>" : False } ) <EOL> @ Override ( UdXilinxExperiment . UdXilinxExperiment ) <EOL> @ caller_check ( ServerType . Laboratory ) <EOL> @ logged ( "<STR_LIT:info>" ) <EOL> def do_dispose ( self ) : <EOL> super ( UdDemoXilinxExperiment , self ) . do_dispose ( ) <EOL> return "<STR_LIT>" <EOL> @ Override ( UdXilinxExperiment . UdXilinxExperiment ) <EOL> @ caller_check ( ServerType . Laboratory ) <EOL> @ logged ( "<STR_LIT:info>" , except_for = '<STR_LIT>' ) <EOL> def do_send_file_to_device ( self , file_content , file_info ) : <EOL> return "<STR_LIT>" <EOL> @ logged ( "<STR_LIT:info>" ) <EOL> @ Override ( UdXilinxExperiment . UdXilinxExperiment ) <EOL> @ caller_check ( ServerType . Laboratory ) <EOL> def do_send_command_to_device ( self , command ) : <EOL> return super ( UdDemoXilinxExperiment , self ) . do_send_command_to_device ( command ) </s>
