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 <netpacket/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_poll_live () |
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 | fadc_buffer_size = 256*1024 * sizeof(int) |
struct readout_module | new_fadc_module |
int | packet_socket |
const int | max_boards = 256 |
struct fadc_board | board [max_boards] |
char * | buf = NULL |
char * | bufp |
bool allPacketsReceived | ( | bool | diag = false ) |
void forgetPackets | ( | ) |
Definition at line 131 of file new_fadc0.cpp.
References board, buf, bufp, enabled, i, max_boards, fadc_board::packets, fadc_board::start_packet_seen, and fadc_board::stop_packet_seen.
INT new_fadc_bor | ( | ) |
Definition at line 327 of file new_fadc0.cpp.
References buf, fadc_buffer_size, forgetPackets(), packet_socket, setupRegs(), and SUCCESS.
INT new_fadc_eor | ( | ) |
INT new_fadc_poll_live | ( | ) |
Definition at line 370 of file new_fadc0.cpp.
References receivePackets(), and SUCCESS.
INT new_fadc_read | ( | char * | pevent) |
void receivePackets | ( | ) |
Definition at line 81 of file new_fadc0.cpp.
References fadc_packet::admin_message, allPacketsReceived(), board, fadc_packet::buffer_number, bufp, fadc_packet::content_length, i, fadc_packet::packet_serial, packet_socket, fadc_board::packets, printf(), fadc_packet::src_addr, fadc_board::start_packet, fadc_board::start_packet_seen, status, 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 192 of file new_fadc0.cpp.
References board, packet_socket, printf(), and value.
void setupRegs | ( | ) |
Definition at line 249 of file new_fadc0.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 77 of file new_fadc0.cpp.
char* buf = NULL |
Definition at line 78 of file new_fadc0.cpp.
Referenced by con_printf(), con_printf_xy(), epics_ca_exception_handler(), forgetPackets(), new_fadc_bor(), and TOnlineFrame::TOnlineFrame().
char* bufp |
Definition at line 79 of file new_fadc0.cpp.
Referenced by forgetPackets(), and receivePackets().
const int fadc_buffer_size = 256*1024 * sizeof(int) |
Definition at line 35 of file new_fadc0.cpp.
Referenced by new_fadc_bor().
const int max_boards = 256 |
Definition at line 67 of file new_fadc0.cpp.
struct readout_module new_fadc_module |
Definition at line 37 of file new_fadc0.cpp.
int packet_socket |
Definition at line 52 of file new_fadc0.cpp.