nds2-client - Developer 0.16.7
Loading...
Searching...
No Matches
trench.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 TRENCH_H
5#define TRENCH_H
6#include "channel.h"
7#include "sys/types.h"
8
9#ifndef DLL_EXPORT
10#if WIN32 || WIN64
11#define DLL_EXPORT __declspec( dllexport )
12#else
13#define DLL_EXPORT
14#endif /* WIN32 || WIN64 */
15#endif /* DLL_EXPORT */
16
28
59{
61 char* str;
62
64 size_t len;
65
68
71
76 double rate;
77
83};
84
96DLL_EXPORT int trench_cmp_base( struct trench_struct* t, const char* s );
97
102DLL_EXPORT void trench_destroy( struct trench_struct* t );
103
111 daq_data_t rawtype );
112
121 enum chantype ctype,
122 double rate,
123 daq_data_t rawtype );
124
130DLL_EXPORT void trench_init( struct trench_struct* t );
131
137DLL_EXPORT void trench_parse( struct trench_struct* tch, const char* str );
138
139#endif /* defined(TRENCH_H) */
#define DLL_EXPORT
Definition channel.h:12
daq_data_t
Definition channel.h:71
chantype
Channel type code enumerator.
Definition channel.h:28
enum chantype chantype_t
Channel type code enumerator.
NDS2 trend channel specification.
Definition trench.h:59
char * str
Definition trench.h:61
daq_data_t dtype
The type of the channel data.
Definition trench.h:82
double rate
Sample rate.
Definition trench.h:76
enum trench_type styp
Definition trench.h:67
size_t len
Definition trench.h:64
chantype_t ctype
Definition trench.h:70
DLL_EXPORT void trench_infer_chan_info(struct trench_struct *t, enum chantype ctype, double rate, daq_data_t rawtype)
Definition trench.c:35
DLL_EXPORT void trench_init(struct trench_struct *t)
Definition trench.c:23
trench_type
Definition trench.h:20
@ trch_n
Definition trench.h:26
@ trch_base
Definition trench.h:21
@ trch_max
Definition trench.h:25
@ trch_rms
Definition trench.h:23
@ trch_min
Definition trench.h:24
@ trch_mean
Definition trench.h:22
DLL_EXPORT int trench_cmp_base(struct trench_struct *t, const char *s)
Compare string to channel base name.
Definition trench.c:142
DLL_EXPORT void trench_parse(struct trench_struct *tch, const char *str)
Parse a channel name.
Definition trench.c:78
DLL_EXPORT daq_data_t trench_dtype(struct trench_struct *t, daq_data_t rawtype)
Definition trench.c:163
DLL_EXPORT void trench_destroy(struct trench_struct *t)
Release parsed data storage.
Definition trench.c:154