00001
00002 #ifndef CHANNEL_H
00003 #define CHANNEL_H
00004
00005 #include <sys/types.h>
00006
00019 typedef enum chantype {
00020
00022 cUnknown,
00023
00025 cOnline,
00026
00028 cRaw,
00029
00031 cRDS,
00032
00034 cSTrend,
00035
00037 cMTrend,
00038
00040 cTestPoint
00041
00042 } chantype_t;
00043
00045 #define MAX_LONG_CHANNEL_NAME_LENGTH 255
00046
00048 #define MAX_CHANNEL_NAME_LENGTH 64
00049
00053 typedef enum {
00055 _undefined = 0,
00056
00058 _16bit_integer = 1,
00059
00061 _32bit_integer = 2,
00062
00064 _64bit_integer = 3,
00065
00067 _32bit_float = 4,
00068
00070 _64bit_double = 5,
00071
00073 _32bit_complex = 6
00074 } daq_data_t;
00075
00078 #define MIN_DATA_TYPE _16bit_integer
00079
00082 #define MAX_DATA_TYPE _32bit_complex
00083
00086 chantype_t cvt_str_chantype(const char* str);
00087
00090 const char* cvt_chantype_str(chantype_t code);
00091
00094 size_t data_type_size(daq_data_t dtype);
00095
00098 double data_type_max(daq_data_t dtype);
00099
00102 const char* data_type_name(daq_data_t dtype);
00103
00106 daq_data_t data_type_code(const char* name);
00107
00112 size_t data_type_word(daq_data_t dtype);
00113
00117 #endif