|
nds2-client - Developer 0.16.7
|
#include <sys/types.h>#include <string.h>#include <stdlib.h>#include <io.h>#include "daqc.h"#include "trench.h"#include "nds_os.h"
Functions | |
| void | trench_init (struct trench_struct *t) |
| void | trench_infer_chan_info (struct trench_struct *t, enum chantype ctype, double rate, daq_data_t rawtype) |
| void | trench_parse (struct trench_struct *t, const char *s) |
| Parse a channel name. | |
| int | trench_cmp_base (struct trench_struct *t, const char *s) |
| Compare string to channel base name. | |
| void | trench_destroy (struct trench_struct *t) |
| Release parsed data storage. | |
| daq_data_t | trench_dtype (struct trench_struct *t, daq_data_t rawtype) |
| int trench_cmp_base | ( | struct trench_struct * | t, |
| const char * | s | ||
| ) |
Compare string to channel base name.
Compare the base string of a parsed channel name to the specified string. If the parsed channel name is a simple (non-trend) channel, the argument string is compared o the full channel name. If the parsed channel name has a sub-channel suffix (i.e the channel is a trend), the argument string is compared to the base channel name.
| t | Parsed channel name structure pointer. |
| s | Pointer to comparison string.. |
| void trench_destroy | ( | struct trench_struct * | t | ) |
Release parsed data storage.
Release internal storage for a parsed channel name.
| t | Parsed channel name structure pointer. |
| daq_data_t trench_dtype | ( | struct trench_struct * | t, |
| daq_data_t | rawtype | ||
| ) |
Infer the data type from the the channel type and sub-channel ID.
| t | Parsed channel name structure pointer. |
| rawtype | Data type of raw channel. |
| void trench_infer_chan_info | ( | struct trench_struct * | t, |
| enum chantype | ctype, | ||
| double | rate, | ||
| daq_data_t | rawtype | ||
| ) |
Infer channel information from the (parsed) channel name and the specified channel type, rate and data type.
| t | Parsed channel name structure pointer. |
| ctype | Default channel type. |
| rate | Raw data type. |
| rawtype | Data type of raw channel. |
| void trench_init | ( | struct trench_struct * | t | ) |
Initialize the trench structure. THe name string is set to NULL, the channel and data types are set to unkown, the channel sub-type field is set to trch_base and the rate is set to zero.
| t | Parsed channel name structure pointer. |
| void trench_parse | ( | struct trench_struct * | tch, |
| const char * | str | ||
| ) |
Parse a channel name.
Parse a channel specifier.
| tch | Parsed channel name structure pointer. |
| str | String to be parsed. |