46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_RAWJFUDPPACKET_H
|
|
#define JUNGFRAUJOCH_RAWJFUDPPACKET_H
|
|
|
|
#include <cstdint>
|
|
|
|
struct __attribute__((packed, aligned(2))) jf_payload {
|
|
uint64_t framenum;
|
|
uint32_t exptime; // x 1e-7 sec
|
|
uint32_t packetnum;
|
|
uint64_t bunchid;
|
|
uint64_t timestamp;
|
|
uint16_t moduleID;
|
|
uint16_t xCoord;
|
|
uint16_t yCoord;
|
|
uint16_t zCoord;
|
|
uint32_t debug;
|
|
uint16_t roundRobin;
|
|
uint8_t detectortype;
|
|
uint8_t headerVersion;
|
|
uint16_t data[4096];
|
|
};
|
|
|
|
struct __attribute__((packed, aligned(2))) RawJFUDPacket {
|
|
char dest_mac[6];
|
|
char sour_mac[6];
|
|
uint16_t ether_type;
|
|
uint16_t ipv4_header_h;
|
|
uint16_t ipv4_header_total_length;
|
|
uint16_t ipv4_header_identification;
|
|
uint16_t ipv4_header_flags_frag;
|
|
uint16_t ipv4_header_ttl_protocol;
|
|
uint16_t ipv4_header_checksum;
|
|
uint32_t ipv4_header_sour_ip;
|
|
uint32_t ipv4_header_dest_ip;
|
|
uint16_t udp_sour_port;
|
|
uint16_t udp_dest_port;
|
|
uint16_t udp_length;
|
|
uint16_t udp_checksum;
|
|
jf_payload jf;
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_RAWJFUDPPACKET_H
|