19 #define DAQD_PROTOCOL_VERSION 12
20 #define DAQD_PROTOCOL_REVISION 0
22 #define DAQD_PORT 31200
153 #define HEADER_LEN 16
446 const char* channel );
571 int* num_channels_received );
590 daq_t* daq,
void* hash,
int* length, time_t gps,
enum chantype type );
647 int* num_channels_received,
687 int* num_channels_received,
727 daq_t* daq,
char* sources,
size_t max_len, time_t gps,
long* str_len );
742 daq_t* daq,
char* sources,
size_t max_len, time_t gps,
long* str_len );
DLL_EXPORT const char * daq_get_channel_addr(daq_t *daq, const char *channel)
Get a pointer to the data for the specified channel.
Definition: daqc_access.c:1131
unsigned int uint4_type
Definition: daqc.h:17
DLL_EXPORT int daq_is_connected(daq_t *daq)
Test for connected server.
Definition: daqc_access.c:1576
DLL_EXPORT int daq_recv_source_data(daq_t *daq, char *sources, size_t max_len, time_t gps, long *str_len)
Get a list of source frames.
Definition: daqc_access.c:951
Definition: daqc_private.h:30
int bps
Definition: daqc.h:327
int blocks
Definition: daqc.h:254
char * name
Definition: daqc.h:193
DLL_EXPORT int daq_request_channel_from_chanlist(daq_t *daq, daq_channel_t *channel)
Add a channel to the request list.
Definition: daqc_access.c:1057
DLL_EXPORT int daq_request_check(daq_t *daq, time_t start, time_t end)
Check requested data.
Definition: daqc_access.c:1282
DLL_EXPORT int daq_set_epoch(daq_t *daq, const char *epoch)
Set the default epoch.
Definition: daqc_access.c:1333
DLL_EXPORT int daq_recv_block_num(daq_t *daq)
Receive block number.
Definition: daqc_access.c:575
enum chantype type
Definition: daqc.h:196
nds_version
Definition: daqc.h:136
DLL_EXPORT uint4_type daq_get_block_secs(daq_t *daq)
Definition: daqc_internal.c:494
daq_data_t data_type
Definition: daqc.h:335
DLL_EXPORT int daq_recv_epoch_list(daq_t *daq, char *epochs, size_t max_len, int *str_len)
Get a list of epochs.
Definition: daqc_access.c:905
DLL_EXPORT int daq_recv_channel_list(daq_t *daq, daq_channel_t *channel, int num_channels, int *num_channels_received, time_t gps, enum chantype type)
Get a list of channels.
Definition: daqc_access.c:839
DLL_EXPORT int daq_request_data(daq_t *daq, time_t start, time_t end, time_t dt)
Get requested data.
Definition: daqc_access.c:1304
daq_data_t data_type
Definition: daqc.h:208
int tpnum
Definition: daqc.h:316
uint4_type num_chan_alloc
Definition: daqc.h:245
int err_num
Definition: daqc.h:289
signal_conv_t s
Definition: daqc.h:339
int chNum
Definition: daqc.h:331
uint4_type offset
Definition: daqc.h:212
#define MAX_CHANNEL_NAME_LENGTH
Definition: channel.h:63
Channel description structure.
Definition: daqc.h:303
DLL_EXPORT char * daq_get_channel_data(daq_t *daq, const char *channel, char *data)
Copy channel data.
Definition: daqc_access.c:1150
daq_block_t * tb
Definition: daqc.h:259
signal_conv_t s
Definition: daqc.h:223
DLL_EXPORT void daq_init(daq_t *daq)
Initialize a daq_t structure.
Definition: daqc_access.c:1516
int nds1_ver
Definition: daqc.h:277
int status
status or data length.
Definition: daqc.h:219
DLL_EXPORT uint4_type daq_get_block_seq_num(daq_t *daq)
Definition: daqc_internal.c:525
#define DLL_EXPORT
Definition: channel.h:12
DLL_EXPORT int daq_recv_hash_by_pattern(daq_t *daq, void *hash, int *length, time_t gps, enum chantype type, const char *pat)
Get a channel list hash.
Definition: daqc_access.c:813
uint4_type num_chan_request
Definition: daqc.h:241
DLL_EXPORT int daq_get_scaled_data(daq_t *daq, const char *channel, float *data)
Calibrate and copy channel data.
Definition: daqc_access.c:1207
char name[MAX_CHANNEL_NAME_LENGTH+1]
Definition: daqc.h:359
Channel request/status entry.
Definition: daqc.h:190
DLL_EXPORT int daq_clear_channel_list(daq_t *daq)
Clear the channel list.
Definition: daqc_access.c:1085
enum chantype type
Definition: daqc.h:323
DLL_EXPORT uint4_type daq_get_block_gpsn(daq_t *daq)
Definition: daqc_internal.c:514
DLL_EXPORT int daq_connect(daq_t *daq, const char *host, int port, enum nds_version version)
Make a connection to an NDS server.
Definition: daqc_access.c:212
DLL_EXPORT int daq_recv_channels_by_pattern(daq_t *daq, daq_channel_t *channel, int num_channels, int *num_channels_received, time_t gps, enum chantype type, const char *pat)
Get a list of channels.
Definition: daqc_access.c:866
chantype
Channel type code enumerator.
Definition: channel.h:28
struct daq_private_ * conceal
Definition: daqc.h:293
double rate
Definition: daqc.h:200
DLL_EXPORT uint4_type daq_get_block_gps(daq_t *daq)
Definition: daqc_internal.c:503
int group_num
Definition: daqc.h:356
daq_data_t
Definition: channel.h:71
float signal_offset
Definition: daqc.h:175
DLL_EXPORT long daq_recv_id(daq_t *daq)
Receive an ID.
Definition: daqc_access.c:931
chan_req_t * chan_req_list
Definition: daqc.h:249
DLL_EXPORT int daq_startup(void)
Initialize nds1/nds2 client subsystems.
Definition: daqc_access.c:1463
double rate
Definition: daqc.h:312
DLL_EXPORT int daq_recv_shutdown(daq_t *daq)
Close the client connection.
Definition: daqc_access.c:752
#define MAX_SIGNAL_UNIT_LENGTH
Definition: channel.h:66
DLL_EXPORT char * daq_get_block_data(daq_t *daq)
Definition: daqc_internal.c:533
Definition: daqc_internal.h:64
NDS1/2 client status structure.
Definition: daqc.h:232
void * auth_ctx
Definition: daqc.h:285
std::string version()
Definition: nds_version.cc:10
struct signal_conv1 * s
Definition: daqc.h:268
DLL_EXPORT int daq_request_channel(daq_t *daq, const char *name, enum chantype type, double rate)
Add a channel to the request list.
Definition: daqc_access.c:1040
DLL_EXPORT int daq_send(daq_t *daq, const char *command)
send a command string.
Definition: daqc_access.c:335
DLL_EXPORT int daq_disconnect(daq_t *daq)
Disconnect from the server.
Definition: daqc_access.c:174
#define MAX_LONG_CHANNEL_NAME_LENGTH
Definition: channel.h:60
int s_size
Definition: daqc.h:273
enum nds_version nds_versn
NDS server type.
Definition: daqc.h:237
DLL_EXPORT int daq_recv_next(daq_t *daq)
Receive a data block.
Definition: daqc_access.c:592
DLL_EXPORT int daq_recv_source_list(daq_t *daq, char *sources, size_t max_len, time_t gps, long *str_len)
Get a list of source frames.
Definition: daqc_access.c:973
DLL_EXPORT const char * daq_strerror(int errornum)
determine English equivalent of return code.
Definition: daqc_access.c:1351
Channel group structure.
Definition: daqc.h:352
int int4_type
Definition: daqc.h:16
DLL_EXPORT void daq_init_channel(daq_channel_t *chan, const char *name, enum chantype ctype, double rate, daq_data_t dtype)
Initialize a daq_channel_t structure.
Definition: daqc_access.c:1540
DLL_EXPORT int daq_get_last_message(daq_t *daq, char *buf, size_t max_len, int *len)
Get the last message.
Definition: daqc_access.c:1170
float signal_slope
Definition: daqc.h:171
char signal_units[MAX_SIGNAL_UNIT_LENGTH]
Definition: daqc.h:179
int nds1_rev
Definition: daqc.h:281
DLL_EXPORT chan_req_t * daq_get_channel_status(daq_t *daq, const char *channel)
Get a pointer to channel data.
Definition: daqc_access.c:1102
char name[MAX_LONG_CHANNEL_NAME_LENGTH+1]
Definition: daqc.h:307
DLL_EXPORT int daq_recv_block(daq_t *daq)
Receive a data block.
Definition: daqc_access.c:438
DLL_EXPORT int daq_recv_channel_hash(daq_t *daq, void *hash, int *length, time_t gps, enum chantype type)
Get a channel list hash.
Definition: daqc_access.c:791
Data unit conversion structure.
Definition: daqc.h:163
DLL_EXPORT int daq_recv_channels(daq_t *daq, daq_channel_t *channel, int num_channels, int *num_channels_received)
Get a list of online channels.
Definition: daqc_access.c:778
DLL_EXPORT int daq_get_data_length(daq_t *daq, const char *channel)
Get the channel data length.
Definition: daqc_access.c:1120
DLL_EXPORT void daq_destroy(daq_t *daq)
Close and delete all client status structure elements.
Definition: daqc_access.c:265
size_t tb_size
Definition: daqc.h:263
float signal_gain
Definition: daqc.h:167