options: parameters: author: '' catch_exceptions: 'True' category: '[GRC Hier Blocks]' cmake_opt: '' comment: '' copyright: '' description: '' gen_cmake: 'On' gen_linking: dynamic generate_options: qt_gui hier_block_src_path: '.:' id: rpi max_nouts: '0' output_language: python placement: (0,0) qt_qss_theme: '' realtime_scheduling: '' run: 'True' run_command: '{python} -u {filename}' run_options: prompt sizing_mode: fixed thread_safe_setters: '' title: Not titled yet window_size: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [192, 12.0] rotation: 0 state: enabled blocks: - name: f id: variable parameters: comment: '' value: '1000' states: bus_sink: false bus_source: false bus_structure: null coordinate: [104, 12.0] rotation: 0 state: true - name: samp_rate id: variable parameters: comment: '' value: '48000' states: bus_sink: false bus_source: false bus_structure: null coordinate: [8, 12.0] rotation: 0 state: enabled - name: analog_sig_source_x_0 id: analog_sig_source_x parameters: affinity: '' alias: '' amp: '.8' comment: '' freq: f maxoutbuf: '0' minoutbuf: '0' offset: '0' phase: '0' samp_rate: samp_rate type: complex waveform: analog.GR_COS_WAVE states: bus_sink: false bus_source: false bus_structure: null coordinate: [24, 108.0] rotation: 0 state: true - name: blocks_throttle_0 id: blocks_throttle parameters: affinity: '' alias: '' comment: '' ignoretag: 'True' maxoutbuf: '0' minoutbuf: '0' samples_per_second: samp_rate type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [240, 148.0] rotation: 0 state: true - name: epy_module_0 id: epy_module parameters: alias: '' comment: '' source_code: "# this module will be imported in the into your flowgraph\nimport\ \ socket\nimport string\nimport sys\n\ndef jmf_server(tt):\n\tquitter=0\n\t\ while (quitter==0):\n\t\tsock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)\n\ \t\tsock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)\n\t\tsock.bind(('127.0.0.1',4242))\n\ \t\tprint(\"Attente de connexion\")\n\t\tsock.listen(1)\n\t\tconn,addr=sock.accept()\n\ \t\twith conn:\n\t\t\tprint(\"connected from: \",addr)\n\t\t\twhile True:\n\t\ \t\t\tdata=conn.recv(1)\n\t\t\t\tif data:\n\t\t\t\t\tdata=data.decode()\n\t\t\ \t\t\tprint(data)\n\t\t\t\t\tif '+' in data:\n\t\t\t\t\t\ttt.f=tt.f+1000\n\t\ \t\t\t\tif '-' in data:\n\t\t\t\t\t\ttt.f=tt.f-1000\n\t\t\t\t\ttt.set_f(tt.f)\n\ \t\t\t\t\tif 'q' in data:\n\t\t\t\t\t\tconn.close()\n\t\t\t\t\t\tsock.shutdown(socket.SHUT_RDWR)\n\ \t\t\t\t\t\tsock.close()\n\t\t\t\t\t\tquitter=1\n\t\t\t\t\t\tprint(\"Au revoir\"\ )\n\t\t\t\t\t\tbreak\n" states: bus_sink: false bus_source: false bus_structure: null coordinate: [592, 12.0] rotation: 0 state: enabled - name: qtgui_freq_sink_x_0 id: qtgui_freq_sink_x parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' autoscale: 'False' average: '1.0' axislabels: 'True' bw: samp_rate color1: '"blue"' color10: '"dark blue"' color2: '"red"' color3: '"green"' color4: '"black"' color5: '"cyan"' color6: '"magenta"' color7: '"yellow"' color8: '"dark red"' color9: '"dark green"' comment: '' ctrlpanel: 'False' fc: '0' fftsize: '1024' freqhalf: 'True' grid: 'False' gui_hint: '' label: Relative Gain label1: '' label10: '''''' label2: '''''' label3: '''''' label4: '''''' label5: '''''' label6: '''''' label7: '''''' label8: '''''' label9: '''''' legend: 'True' maxoutbuf: '0' minoutbuf: '0' name: '""' nconnections: '1' norm_window: 'False' showports: 'False' tr_chan: '0' tr_level: '0.0' tr_mode: qtgui.TRIG_MODE_FREE tr_tag: '""' type: complex units: dB update_time: '0.10' width1: '1' width10: '1' width2: '1' width3: '1' width4: '1' width5: '1' width6: '1' width7: '1' width8: '1' width9: '1' wintype: window.WIN_BLACKMAN_hARRIS ymax: '10' ymin: '-140' states: bus_sink: false bus_source: false bus_structure: null coordinate: [416, 132.0] rotation: 0 state: true - name: snippet_1 id: snippet parameters: alias: '' code: 'print("Starting server") import threading threading.Thread(target=epy_module_0.jmf_server,args=(self,)).start()' comment: '' priority: '0' section: main_after_init states: bus_sink: false bus_source: false bus_structure: null coordinate: [368, 12.0] rotation: 0 state: true connections: - [analog_sig_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_throttle_0, '0', qtgui_freq_sink_x_0, '0'] metadata: file_format: 1 grc_version: 3.10.2.0