/mnt/qfs4/jzweizig/nds2_svn/trunk/client/src/client/daqc_internal.h

00001 /* -*- mode: c; c-basic-offset: 4; -*- */
00002 #ifndef DAQC_INTERNAL_H
00003 #define DAQC_INTERNAL_H
00004 
00005 #include "daqc.h"
00006 
00019 struct daq_block_header {
00022     uint4_type secs;
00023 
00027     uint4_type gps;
00028 
00031     uint4_type gpsn;
00032 
00035     uint4_type seq_num;
00036 
00039     char data [1];
00040 };
00041 
00042 /*                   Signal_conv_t1 (internal??)
00043  */
00044 
00048 typedef struct signal_conv1 {
00051     float signal_slope;
00054     float signal_offset;
00057     uint4_type   signal_status;
00058 } signal_conv_t1;
00059 
00060 
00061 /*                   Channel Group interface (obsolete)
00062  */
00063 
00068 typedef struct {
00071     int group_num;
00074     char name [MAX_CHANNEL_NAME_LENGTH + 1];
00075 } daq_channel_group_t;
00076 
00077 
00089 int
00090 daq_recv_channel_groups (daq_t* daq, daq_channel_group_t* group, 
00091                          int num_groups, int* num_channel_groups_received);
00092 
00093 
00094 /*                   Internal NDS1/2 functions
00095  */
00096 
00105 int
00106 daq_set_server(daq_t *daq, const char* host, int port);
00107 
00108 
00109 /*                   Internal NDS1 functions
00110  */
00111 
00112 /* #define DAQC_ACCESS_VERBOSE_ERRORS 1 */
00113 
00119 long
00120 read_server_response(int fd);
00121 
00129 long
00130 read_server_response_wait(int fd, int wt);
00131 
00144 size_t
00145 swap_data(size_t gran, size_t nBytes, char* data);
00146 
00152 enum chantype
00153 cvt_group_chantype(int group_num);
00154 
00155 
00160 long
00161 dca_strtol (char *str);
00162 
00173 int
00174 _daq_wait_data(int fd, int wt);
00175 
00183 int
00184 read_bytes (int fd, char *cptr, size_t numb);
00185 
00193 int
00194 read_float(int fd, float* data);
00195 
00203 int
00204 read_uint4 (int fd, uint4_type* data);
00205 
00216 int
00217 _daq_read_string(int fd, size_t maxlen, char* buf);
00218 
00228 int
00229 null_term(char* p, int len);
00230 
00242 int 
00243 _daq_get_string(const char** p, char* out, size_t lmax);
00244 
00251 int
00252 _daq_cvt_string(long in, char* out);
00253 
00257 #endif /* !defined(DAQC_INTERNAL_H) */

Generated on Fri Jul 9 11:41:23 2010 for nds2-client by  doxygen 1.4.7