AlcapDAQ
1
|
#include <map>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <linux/if_packet.h>
#include "midas.h"
#include "crate.h"
#include "vme.h"
#include "odb_wrapper.h"
#include "diag.h"
Go to the source code of this file.
Data Structures | |
struct | fadc_packet |
struct | fadc_board |
Functions | |
INT | new_fadc_bor () |
INT | new_fadc_eor () |
INT | new_fadc_read (char *pevent) |
bool | allPacketsReceived (bool diag=false) |
void | receivePackets () |
void | forgetPackets () |
void | setReg (char *if_name, int board, int fadc, int reg, unsigned long long value) |
void | setupRegs () |
Variables | |
const int | TP_BLOCK_SIZE = 8192 |
const int | TP_NUM_BLOCKS = 512 |
const int | FRAME_SIZE = 2048 |
const int | NUM_FRAMES = 2048 |
unsigned char * | packet_space = 0 |
bool | frame_examined [NUM_FRAMES] |
struct readout_module | new_fadc_module |
int | packet_socket |
const int | max_boards = 256 |
struct fadc_board | board [max_boards] |
static struct timeval | tv_start |
bool allPacketsReceived | ( | bool | diag = false ) |
void forgetPackets | ( | ) |
Definition at line 139 of file new_fadc_2007_07_17.cpp.
References board, enabled, fadc_board::first_packet_time, frame_examined, FRAME_SIZE, i, max_boards, NUM_FRAMES, packet_space, fadc_board::packets, fadc_board::start_packet_seen, and fadc_board::stop_packet_seen.
INT new_fadc_bor | ( | ) |
INT new_fadc_eor | ( | ) |
INT new_fadc_read | ( | char * | pevent) |
void receivePackets | ( | ) |
Definition at line 88 of file new_fadc_2007_07_17.cpp.
References fadc_packet::admin_message, board, fadc_packet::buffer_number, fadc_packet::content_length, enabled, fadc_board::first_packet, fadc_board::first_packet_time, frame_examined, FRAME_SIZE, i, fadc_board::last_packet, fadc_board::last_packet_time, NUM_FRAMES, fadc_packet::packet_serial, packet_space, fadc_board::packets, printf(), fadc_packet::src_addr, fadc_board::start_packet, fadc_board::start_packet_seen, fadc_board::stop_packet, and fadc_board::stop_packet_seen.
void setReg | ( | char * | if_name, |
int | board, | ||
int | fadc, | ||
int | reg, | ||
unsigned long long | value | ||
) |
Definition at line 226 of file new_fadc_2007_07_17.cpp.
References board, packet_socket, printf(), and value.
void setupRegs | ( | ) |
Definition at line 283 of file new_fadc_2007_07_17.cpp.
References board, crate_number, enabled, fadc_board::enabled, i, max_boards, odb_find_key(), odb_get_bool(), odb_get_int(), printf(), and setReg().
struct fadc_board board[max_boards] |
Definition at line 86 of file new_fadc_2007_07_17.cpp.
bool frame_examined[NUM_FRAMES] |
Definition at line 40 of file new_fadc_2007_07_17.cpp.
const int FRAME_SIZE = 2048 |
Definition at line 36 of file new_fadc_2007_07_17.cpp.
const int max_boards = 256 |
Definition at line 72 of file new_fadc_2007_07_17.cpp.
struct readout_module new_fadc_module |
Definition at line 42 of file new_fadc_2007_07_17.cpp.
const int NUM_FRAMES = 2048 |
Definition at line 37 of file new_fadc_2007_07_17.cpp.
int packet_socket |
Definition at line 57 of file new_fadc_2007_07_17.cpp.
unsigned char* packet_space = 0 |
Definition at line 39 of file new_fadc_2007_07_17.cpp.
const int TP_BLOCK_SIZE = 8192 |
Definition at line 34 of file new_fadc_2007_07_17.cpp.
const int TP_NUM_BLOCKS = 512 |
Definition at line 35 of file new_fadc_2007_07_17.cpp.
|
static |
Definition at line 418 of file new_fadc_2007_07_17.cpp.