This commit is contained in:
lhdamiani
2021-07-07 08:58:40 +02:00
parent 29db6bb2ff
commit 23483fbe19
3 changed files with 0 additions and 80 deletions
-33
View File
@@ -1,33 +0,0 @@
import socket
import numpy as np
frame_header_dt = np.dtype(
[
("Frame Number", "u8"),
("SubFrame Number/ExpLength", "u4"),
("Packet Number", "u4"),
("Bunch ID", "u8"),
("Timestamp", "u8"),
("Module Id", "u2"),
("Row", "u2"),
("Column", "u2"),
("Reserved", "u2"),
("Debug", "u4"),
("Round Robin Number", "u2"),
("Detector Type", "u1"),
("Header Version", "u1"),
]
)
ip = "127.0.0.1"
ports = list(range(50200, 50205, 1))
sockets = [socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in range(len(ports))]
for s, p in zip(sockets, ports):
s.bind((ip, p))
while True:
for s in sockets:
data, address = s.recvfrom(4096)
h = np.frombuffer(data, count=1, dtype=frame_header_dt)[0]
print(f'pkt:{h["Packet Number"]}, frame: {h["Frame Number"]}, row: {h["Row"]}, column: {h["Column"]}, mod_id: {h["Module Id"]}, timestamp: {h["Timestamp"]}')
-17
View File
@@ -1,17 +0,0 @@
detsize 1024 512
hostname beb031+beb032
udp_dstmac 9c:dc:71:4d:2a:b5
udp_dstip 10.30.20.6
#top
0:udp_dstport 50200
0:udp_dstport2 50201
0:udp_srcip 10.30.20.201
#bottom
1:udp_dstport 50202
1:udp_dstport2 50203
1:udp_srcip 10.30.20.201
tengiga 1
-30
View File
@@ -1,30 +0,0 @@
#!/bin/bash
# usage ./start_eiger_detector.sh Eiger 1
if [ $# -lt 1 ]
then
echo "Usage : $0 DETECTOR_NAME <number_of_cycles>"
echo " DETECTOR_NAME: Eiger..."
echo " number_of_cycles : optional, default 100"
exit
fi
#SLS_DET_PACKAGE_PATH='/home/dbe/git/sf_daq_buffer_eiger/slsDetectorPackage/build/bin/'
SLS_DET_PACKAGE_PATH=''
DETECTOR=$1
n_cycles=1
if [ $# == 2 ]
then
n_cycles=$2
fi
${SLS_DET_PACKAGE_PATH}sls_detector_put timing trigger
${SLS_DET_PACKAGE_PATH}sls_detector_put triggers ${n_cycles}
${SLS_DET_PACKAGE_PATH}sls_detector_put exptime 0.000005
${SLS_DET_PACKAGE_PATH}sls_detector_put frames 10
${SLS_DET_PACKAGE_PATH}sls_detector_put dr 16
#sls_detector_put ${D}-clearbit to 0x5d 0 # normal mode, not highG0
${SLS_DET_PACKAGE_PATH}sls_detector_put start
echo "Now start trigger"