File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 33krb_client = Client ("tcp://localhost:4545" )
44
55for i in range (10 ):
6- data = krb_client .next ()
6+ data , metadata = krb_client .next ()
7+ print ("Client : received train ID {}" .format (
8+ metadata ['SPB_DET_AGIPD1M-1/DET/detector' ]['timestamp.tid' ]))
79 det_data = data ['SPB_DET_AGIPD1M-1/DET/detector' ]
8- print ("Client : received train ID {}" .format (det_data ['header.trainId' ]))
910 print ("Client : - detector image shape is {}, {} Mbytes" .format (
1011 det_data ['image.data' ].shape , det_data ['image.data' ].nbytes / 1024 ** 2 ))
1112
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
12# Start simulated experiment, which offers data as the KaraboBridge
23# would be during the experiment:
34echo " demo.sh: starting (simulated) server"
4- python -c " from karabo_bridge import server_sim; server_sim( 4545) " &
5+ karabo-bridge-server-sim 4545 &
56SIMULATION_PID=$!
67
78# Start client to read 10 trains
89echo " demo.sh: starting client"
9- python demo.py
10+ python3 demo.py
1011
1112
1213# shutting down simulated experiment
13- echo " demo.sh: killing simulated KaraboBridge "
14+ echo " demo.sh: killing simulated Karabo Bridge "
1415kill $SIMULATION_PID
You can’t perform that action at this time.
0 commit comments