4 #ifndef DAQC_INTERNAL_H
5 #define DAQC_INTERNAL_H
8 #include "daq_config.h"
12 #include "daqc_private.h"
16 #define DLL_EXPORT __declspec( dllexport )
34 struct daq_block_header
64 typedef struct signal_conv1
74 uint4_type signal_status;
89 daq_channel_group_t* group,
91 int* num_channel_groups_received );
104 DLL_EXPORT
int daq_set_server( daq_t* daq,
const char* host,
int port );
137 DLL_EXPORT
size_t swap_data(
size_t gran,
size_t nBytes,
char* data );
150 DLL_EXPORT
long dca_strtol(
const char* str );
171 DLL_EXPORT
int read_bytes( nds_socket_type fd,
char* cptr,
size_t numb );
180 DLL_EXPORT
int read_float( nds_socket_type fd,
float* data );
189 DLL_EXPORT
int read_uint4( nds_socket_type fd, uint4_type* data );
214 DLL_EXPORT
int _daq_read_string( nds_socket_type fd,
size_t maxlen,
char* buf );
225 DLL_EXPORT
int null_term(
char* p,
int len );
272 DLL_EXPORT
void nds_perror(
const char* Message );
275 #if SIZEOF_TIME_T == SIZEOF_LONG
276 #define daq_cvt_timet_string( In, Out ) \
277 _daq_cvt_string( (unsigned long)In, Out )
278 #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
279 #define daq_cvt_timet_string( In, Out ) \
280 _daq_cvt_ll_string( (unsigned long long)In, Out )
int read_float(nds_socket_type fd, float *data)
Read a float data word.
Definition: daqc_internal.c:311
int _daq_read_cstring(nds_socket_type fd, size_t maxlen, char *buf)
read an nds string.
Definition: daqc_internal.c:390
enum chantype cvt_group_chantype(int group_num)
Convert group code to channel type.
Definition: daqc_internal.c:110
int _daq_read_string(nds_socket_type fd, size_t maxlen, char *buf)
read an nds2 string.
Definition: daqc_internal.c:342
size_t _daq_get_string(const char **p, const char *end, char *out, size_t lmax)
Copy a blank or null terminated string to an output buffer.
Definition: daqc_internal.c:440
int _daq_wait_data(nds_socket_type fd, int wt)
Wait for data to arrive.
Definition: daqc_internal.c:145
long read_server_response_wait(nds_socket_type fd, int wt)
Get a response integer (internal function).
Definition: daqc_internal.c:256
int _daq_cycle_conn(daq_t *daq)
Definition: daqc_access.c:304
int null_term(char *p, int len)
Add a NULL after the last non-blank in a string.
Definition: daqc_internal.c:420
size_t swap_data(size_t gran, size_t nBytes, char *data)
Swap data bytes.
Definition: daqc_internal.c:57
chantype
Channel type code enumerator.
Definition: channel.h:28
long dca_strtol(const char *str)
Definition: daqc_internal.c:129
long read_server_response(nds_socket_type fd)
Get a response code (internal function).
Definition: daqc_internal.c:282
int daq_recv_channel_groups(daq_t *daq, daq_channel_group_t *group, int num_groups, int *num_channel_groups_received)
Receive a list of channel groups.
Definition: daqc_internal.c:616
struct signal_conv1 signal_conv_t1
int daq_set_server(daq_t *daq, const char *host, int port)
Set the server address.
Definition: daqc_internal.c:545
int _daq_cvt_string(unsigned long in, char *out)
Convert an integer to a string.
Definition: daqc_internal.c:463
int _daq_cvt_ll_string(unsigned long long in, char *out)
Convert an integer to a string.
Definition: daqc_internal.c:479
int read_bytes(nds_socket_type fd, char *cptr, size_t numb)
Read a `numb' bytes.
Definition: daqc_internal.c:213
int read_uint4(nds_socket_type fd, uint4_type *data)
Read a 4-byte integer data word.
Definition: daqc_internal.c:328