areaDetector
3-14
EPICS areaDetector framework
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
#include <string.h>
#include "PIXIEII_data_utilities.h"
#include <math.h>
#include <osiSock.h>
#include <epicsMessageQueue.h>
#include <epicsThread.h>
Enumerations | |
enum | id_mode { FRAG_ID , NOFRAG_ID } |
enum | moderation_type { UDPMOD , NOUDPMOD } |
Functions | |
void | print_packet (const unsigned char *buffer, unsigned int packet_len_bytes) |
void | key_proc (void *received_packet) |
int | convert_bit_stream_to_counts (int code_depth, unsigned short *source_memory_offset, unsigned short *destination_memory_offset, int reusulting_readings) |
void | my_bytes_swap (unsigned short *us_ptr) |
void * | module_data_parser_thread (void *arg) |
int | main (int argc, char **argv) |
Variables | |
unsigned char * | buf |
unsigned char * | process_buf |
unsigned char | looping =1 |
unsigned char * | uchar_ptr |
unsigned int | crc_generator =0x2608edb |
unsigned int | calculated_crc32_byme |
unsigned int | calculated_crc32 |
unsigned int | packet_index =0 |
unsigned int | testword |
int | convert_data =1 |
unsigned int | received_packets =0 |
unsigned int | error_packets =0 |
unsigned int | id_error_packets =0 |
int | verbose =0 |
epicsMessageQueueId | ptr_list |
#define AUTOCAL_DATA 0x40 |
#define AUTOCAL_NPACK 135 |
#define AUTOCAL_REG_DEPTH 5 |
#define BUFLEN (DATA_BUFFLEN_BYTES+HEADER_BUFFLEN_BYTES) |
#define BYTES_PER_ROWS 16 |
#define COUNTER_REG_DEPTH 15 |
#define DAQ_PACK_FRAGM 45 |
#define DATA_BUFFLEN_BYTES 2048 |
#define DEFAULT_NPACK 360 |
#define DOUT_1 0x0001 |
#define DOUT_10 0x0200 |
#define DOUT_11 0x0400 |
#define DOUT_12 000800 |
#define DOUT_13 0x1000 |
#define DOUT_14 0x2000 |
#define DOUT_15 0x4000 |
#define DOUT_16 0x8000 |
#define DOUT_2 0x0002 |
#define DOUT_3 0x0004 |
#define DOUT_4 0x0008 |
#define DOUT_5 0x0010 |
#define DOUT_6 0x0020 |
#define DOUT_7 0x0040 |
#define DOUT_8 0x0080 |
#define DOUT_9 0x0100 |
#define DUMMY_0_OFFSET 0 |
#define DUMMY_1_OFFSET 8 |
#define FRAME_HAS_ALIGN_ERRORS 0x20 |
#define HEADER_BUFFLEN_BYTES 32 |
#define HEADER_LENGHT 10 |
#define LOOP_COLOR_MODE_MASK 0xf |
#define LOOP_COLOR_MODE_OFFSET 0 |
#define LOOP_DTF_MODE_MASK 0xf |
#define LOOP_DTF_MODE_OFFSET 4 |
#define LOOP_MODE_MASK 0xff |
#define LOOP_MODE_OFFSET 0 |
#define MAX_PACK_LEN 1448 |
#define MAX_PENDING_BUFFERS 1500 |
#define MAX_STRLEN 200 |
#define MAXBUF 256217728 |
#define MOD_UDP_REMOTE_PORT 3333 |
#define PACKET_CRC_BYTES 4 |
#define PACKET_EXTRA_BYTES (PACKET_ID_BYTES+PACKET_TAG_BYTES+PACKET_CRC_BYTES) |
#define PACKET_ID_BYTES 2 |
#define PACKET_ID_OFFSET 2 |
#define PACKET_SENSOR_DATA_BYTES (MAX_PACK_LEN-PACKET_EXTRA_BYTES) |
#define PACKET_SENSOR_DATA_OFFSET (PACKET_TAG_BYTES+PACKET_ID_BYTES) |
#define PACKET_TAG_BYTES 2 |
#define PACKET_TAG_OFFSET 0 |
#define PIXIE_THDAC_MASK 0x1f |
#define PIXIE_THDAC_OFFSET 0 |
#define PIXIEII_MODULES 1 |
#define PORTA 2223 |
#define PORTB 2224 |
#define REG_PACKET 0x80 |
#define sh_code 33 |
#define shutter_duration_ms 44 |
#define SLOT_ID_MASK 0xff |
#define SLOT_ID_OFFSET 1 |
#define vt_dac 22 |
enum id_mode |
enum moderation_type |
int convert_bit_stream_to_counts | ( | int | code_depth, |
unsigned short * | source_memory_offset, | ||
unsigned short * | destination_memory_offset, | ||
int | reusulting_readings | ||
) |
void key_proc | ( | void * | received_packet | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
void* module_data_parser_thread | ( | void * | arg | ) |
void my_bytes_swap | ( | unsigned short * | us_ptr | ) |
void print_packet | ( | const unsigned char * | buffer, |
unsigned int | packet_len_bytes | ||
) |
unsigned char* buf |
unsigned int calculated_crc32 |
unsigned int calculated_crc32_byme |
int convert_data =1 |
unsigned int crc_generator =0x2608edb |
unsigned int error_packets =0 |
unsigned int id_error_packets =0 |
unsigned char looping =1 |
unsigned int packet_index =0 |
unsigned char * process_buf |
epicsMessageQueueId ptr_list |
unsigned int received_packets =0 |
unsigned int testword |
unsigned char* uchar_ptr |
int verbose =0 |