nds2-client - Developer 0.16.7
Loading...
Searching...
No Matches
nds2.h
Go to the documentation of this file.
1/* -*- tab-width:8 c-basic-offset:4 indent-tabs-mode:nil -*- */
2/* set vi: ts=8:softtabstop=4,shiftwidth=4,expandtab */
3
4#ifndef DAQC_NDS2_H
5#define DAQC_NDS2_H
6
7/*
8 * Connect to the NDS2 server on the host identified by `ip' address.
9 * Returns zero if OK or the error code if failed.
10 */
11int nds2_connect( daq_t* daq, const char* host, int port );
12
13/*
14 * Get the most recent error message recorded by the server.
15 * Returns zero if OK or the error code if failed.
16 */
17int nds2_get_last_message( daq_t* daq, char* buf, size_t max_len, int* len );
18
19/*
20 * Receive channel hash using the NDS2 protocol
21 */
23 daq_t* daq, void* hash, int* length, time_t gps, enum chantype type );
24
25/*
26 * Receive channel hash using the NDS2 protocol
27 */
29 void* hash,
30 int* length,
31 time_t gps,
32 enum chantype type,
33 const char* pat );
34
35/*
36 * Receive channel data using the NDS2 protocol
37 */
39 daq_channel_t* channel,
40 int num_channels,
41 int* num_channels_received,
42 time_t gps,
43 enum chantype type,
44 const char* pat );
45
46/*
47 * Receive channel data using the NDS2 protocol
48 */
50 daq_channel_t* channel,
51 int num_channels,
52 int* num_channels_received,
53 time_t gps,
54 enum chantype type );
55
56/*
57 * Receive epoch data using the NDS2 protocol
58 */
59int
60nds2_recv_epoch_list( daq_t* daq, char* epochs, size_t max_len, int* str_len );
61
62/*
63 * Receive source list using the NDS2 protocol
64 */
66 daq_t* daq, char* list, size_t max_len, time_t gps, long* str_len );
67
68/*
69 * Receive source list using the NDS2 protocol
70 */
72 daq_t* daq, char* list, size_t max_len, time_t gps, long* str_len );
73
74/*
75 * Disconnect from the NDS2 server. Send a quit command, delete the sasl
76 * context and close the socket.
77 * Returns zero if OK or the error code if failed.
78 */
79int nds2_disconnect( daq_t* daq );
80
81/* nds2_request_check(daq_t*, time_t, time_t)
82 *
83 * Check requested channel data status for the specified interval.
84 */
85int nds2_request_check( daq_t* daq, time_t start, time_t end );
86
87/* nds2_request_data(daq_t*, time_t, time_t)
88 *
89 * Get requested channel data for the specified interval.
90 */
91int nds2_request_data( daq_t* daq, time_t start, time_t end, time_t dt );
92
93/* nds2_receive_reconfigure(daq_t* daq, long block_len)
94 *
95 * Receive a reconfigure block. receive_reconfigure is received after the
96 * block header has been read in. The block length does not include the
97 * header length.
98 */
99int nds2_receive_reconfigure( daq_t* daq, size_t block_len );
100
101/*
102 * Set the default epoch for this session.
103 */
104int nds2_set_epoch( daq_t* daq, const char* epoch );
105
106/*
107 * Initialize the nds2 client
108 * Returns zero if OK or the error code if failed.
109 */
110int nds2_startup( void );
111
112/*
113 * Unspecified NDS2 version and revision values
114 */
115#define UNSPECIFIED_NDS2_PROTOCOL_VERSION 0
116#define UNSPECIFIED_NDS2_PROTOCOL_REVISION 0
117
118/*
119 * Supported NDS2 protocols
120 */
121#define MAX_NDS2_PROTOCOL_VERSION 1
122#define MIN_NDS2_PROTOCOL_VERSION 1
123
124#define MAX_NDS2_PROTOCOL_REVISION 6
125
126#endif
chantype
Channel type code enumerator.
Definition channel.h:28
int nds2_disconnect(daq_t *daq)
Definition nds2_access.c:240
int nds2_set_epoch(daq_t *daq, const char *epoch)
Definition nds2_access.c:1210
int nds2_recv_source_data(daq_t *daq, char *list, size_t max_len, time_t gps, long *str_len)
Definition nds2_access.c:805
int nds2_receive_reconfigure(daq_t *daq, size_t block_len)
Definition nds2_access.c:1135
int nds2_recv_epoch_list(daq_t *daq, char *epochs, size_t max_len, int *str_len)
Definition nds2_access.c:715
int nds2_recv_source_list(daq_t *daq, char *list, size_t max_len, time_t gps, long *str_len)
Definition nds2_access.c:868
int nds2_recv_channel_hash(daq_t *daq, void *hash, int *length, time_t gps, enum chantype type)
Definition nds2_access.c:330
int nds2_connect(daq_t *daq, const char *host, int port)
Definition nds2_access.c:82
int nds2_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)
Definition nds2_access.c:478
int nds2_recv_hash_by_pattern(daq_t *daq, void *hash, int *length, time_t gps, enum chantype type, const char *pat)
Definition nds2_access.c:340
int nds2_startup(void)
Definition nds2_access.c:1226
int nds2_recv_channel_list(daq_t *daq, daq_channel_t *channel, int num_channels, int *num_channels_received, time_t gps, enum chantype type)
Definition nds2_access.c:456
int nds2_request_check(daq_t *daq, time_t start, time_t end)
Definition nds2_access.c:932
int nds2_request_data(daq_t *daq, time_t start, time_t end, time_t dt)
Definition nds2_access.c:1003
int nds2_get_last_message(daq_t *daq, char *buf, size_t max_len, int *len)
Definition nds2_access.c:281
NDS1/2 client status structure.
Definition daqc.h:233
Channel description structure.
Definition daqc.h:304