| DWDataReader 5.0.4 Reading data from Dewesoft data files

Loading...
Searching...
No Matches
DWDataReaderLibTypes.h
Go to the documentation of this file.
1#pragma once
2#include "DWDataReaderLibDef.h"
3
4#ifndef _WIN32
5 #include <inttypes.h>
6 #define __int64 int64_t
7#endif
8
14
15#pragma pack(push, 1)
16
17 typedef void* READER_HANDLE;
18
26 enum DWStatus
27{
28 DWSTAT_OK = 0,
29 DWSTAT_ERROR = 1,
30 DWSTAT_ERROR_FILE_CANNOT_OPEN = 2,
31 DWSTAT_ERROR_FILE_ALREADY_IN_USE = 3,
32 DWSTAT_ERROR_FILE_CORRUPT = 4,
33 DWSTAT_ERROR_NO_MEMORY_ALLOC = 5,
34 DWSTAT_ERROR_CREATE_DEST_FILE = 6,
35 DWSTAT_ERROR_EXTRACTING_FILE = 7,
36 DWSTAT_ERROR_CANNOT_OPEN_EXTRACTED_FILE = 8,
37 DWSTAT_ERROR_INVALID_IB_LEVEL = 9,
38 DWSTAT_ERROR_CAN_NOT_SUPPORTED = 10,
39 DWSTAT_ERROR_INVALID_READER = 11,
40 DWSTAT_ERROR_INVALID_INDEX = 12,
41 DWSTAT_ERROR_INSUFFICENT_BUFFER = 13,
42};
43
52 enum DWChannelProps
53{
54 DW_DATA_TYPE = 0,
55 DW_DATA_TYPE_LEN_BYTES = 1,
56 DW_CH_INDEX = 2,
57 DW_CH_INDEX_LEN = 3,
58 DW_CH_TYPE = 4,
59 DW_CH_SCALE = 5,
60 DW_CH_OFFSET = 6,
61 DW_CH_XML = 7,
62 DW_CH_XML_LEN = 8,
63 DW_CH_XMLPROPS = 9,
64 DW_CH_XMLPROPS_LEN = 10,
65 DW_CH_CUSTOMPROPS = 11,
66 DW_CH_CUSTOMPROPS_COUNT = 12,
67 DW_CH_LONGNAME = 13,
68 DW_CH_LONGNAME_LEN = 14
69};
70
75 enum DWChannelType
76{
77 DW_CH_TYPE_SYNC = 0,
78 DW_CH_TYPE_ASYNC = 1,
79 DW_CH_TYPE_SV = 2
80};
81
89 enum DWCustomPropValueType
90{
91 DW_CUSTOM_PROP_VAL_TYPE_EMPTY = 0,
92 DW_CUSTOM_PROP_VAL_TYPE_INT64 = 1,
93 DW_CUSTOM_PROP_VAL_TYPE_DOUBLE = 2,
94 DW_CUSTOM_PROP_VAL_TYPE_STRING = 3,
95};
96
101 enum DWEventType
102{
103 etStart = 1,
104 etStop = 2,
105 etTrigger = 3,
106 etVStart = 11,
107 etVStop = 12,
108 etKeyboard = 20,
109 etNotice = 21,
110 etVoice = 22,
111 etPicture = 23,
112 etModule = 24,
113 etAlarm = 25,
114 etCursorInfo = 26,
115 etAlarmLevel = 27
116};
117
118
123 enum DWStoringType {
124 ST_ALWAYS_FAST = 0,
125 ST_ALWAYS_SLOW = 1,
126 ST_FAST_ON_TRIGGER = 2,
127 ST_FAST_ON_TRIGGER_SLOW_OTH = 3,
128};
129
134 enum DWDataType
135{
136 dtByte = 0,
137 dtShortInt = 1,
138 dtSmallInt = 2,
139 dtWord = 3,
140 dtInteger = 4,
141 dtSingle = 5,
142 dtInt64 = 6,
143 dtDouble = 7,
144 dtLongword = 8,
145 dtComplexSingle = 9,
146 dtComplexDouble = 10,
147 dtText = 11,
148 dtBinary = 12,
149 dtCANPortData = 13,
150 dtCANFDPortData = 14,
151 dtBytes8 = 15,
152 dtBytes16 = 16,
153 dtBytes32 = 17,
154 dtBytes64 = 18
155};
156
167 struct DWFileInfo
168{
169 double sample_rate;
170 double start_store_time;
171 double duration;
172};
173
178 struct DWMeasurementInfo
179{
180 double sample_rate;
181 double start_measure_time;
182 double start_store_time;
183 double duration;
184};
185
190 struct DWChannel
191{
192 int index;
193 char name[100];
194 char unit[20];
195 char description[200];
196 unsigned int color;
197 int array_size;
198 enum DWDataType data_type;
199};
200
205 struct DWComplex
206{
207 double re;
208 double im;
209};
210
215 struct DWEvent
216{
217 enum DWEventType event_type;
218 double time_stamp;
219 char event_text[200];
220};
221
226 struct DWReducedValue
227{
228 double time_stamp;
229 double ave;
230 double min;
231 double max;
232 double rms;
233};
234
239 struct DWArrayInfo
240{
241 int index;
242 char name[100];
243 char unit[20];
244 int size;
245};
246
254 struct DWCustomProp
255{
256 char key[100];
257 enum DWCustomPropValueType valueType;
258 __int64 int64Val;
259 double doubleVal;
260 char strVal[100];
261};
262
269 struct DWBinarySample
270{
271 __int64 position;
272 __int64 size;
273};
274
275#pragma pack(pop)
DWStoringType
DWStoringType
Specifies the type data storing mode.
Definition DWDataReaderLibTypes.h:123
ST_ALWAYS_SLOW
@ ST_ALWAYS_SLOW
Definition DWDataReaderLibTypes.h:125
ST_FAST_ON_TRIGGER_SLOW_OTH
@ ST_FAST_ON_TRIGGER_SLOW_OTH
Definition DWDataReaderLibTypes.h:127
ST_ALWAYS_FAST
@ ST_ALWAYS_FAST
Definition DWDataReaderLibTypes.h:124
ST_FAST_ON_TRIGGER
@ ST_FAST_ON_TRIGGER
Definition DWDataReaderLibTypes.h:126
DWCustomPropValueType
DWCustomPropValueType
Specifies the type of custom property value.
Definition DWDataReaderLibTypes.h:90
DW_CUSTOM_PROP_VAL_TYPE_INT64
@ DW_CUSTOM_PROP_VAL_TYPE_INT64
Definition DWDataReaderLibTypes.h:92
DW_CUSTOM_PROP_VAL_TYPE_DOUBLE
@ DW_CUSTOM_PROP_VAL_TYPE_DOUBLE
Definition DWDataReaderLibTypes.h:93
DW_CUSTOM_PROP_VAL_TYPE_STRING
@ DW_CUSTOM_PROP_VAL_TYPE_STRING
Definition DWDataReaderLibTypes.h:94
DW_CUSTOM_PROP_VAL_TYPE_EMPTY
@ DW_CUSTOM_PROP_VAL_TYPE_EMPTY
Definition DWDataReaderLibTypes.h:91
DWStatus
DWStatus
Status codes returned from library function calls.
Definition DWDataReaderLibTypes.h:27
DWSTAT_ERROR_INVALID_INDEX
@ DWSTAT_ERROR_INVALID_INDEX
Definition DWDataReaderLibTypes.h:40
DWSTAT_ERROR
@ DWSTAT_ERROR
Definition DWDataReaderLibTypes.h:29
DWSTAT_ERROR_CREATE_DEST_FILE
@ DWSTAT_ERROR_CREATE_DEST_FILE
Definition DWDataReaderLibTypes.h:34
DWSTAT_ERROR_FILE_CORRUPT
@ DWSTAT_ERROR_FILE_CORRUPT
Definition DWDataReaderLibTypes.h:32
DWSTAT_ERROR_INSUFFICENT_BUFFER
@ DWSTAT_ERROR_INSUFFICENT_BUFFER
Definition DWDataReaderLibTypes.h:41
DWSTAT_ERROR_CAN_NOT_SUPPORTED
@ DWSTAT_ERROR_CAN_NOT_SUPPORTED
Definition DWDataReaderLibTypes.h:38
DWSTAT_ERROR_INVALID_IB_LEVEL
@ DWSTAT_ERROR_INVALID_IB_LEVEL
Definition DWDataReaderLibTypes.h:37
DWSTAT_ERROR_CANNOT_OPEN_EXTRACTED_FILE
@ DWSTAT_ERROR_CANNOT_OPEN_EXTRACTED_FILE
Definition DWDataReaderLibTypes.h:36
DWSTAT_OK
@ DWSTAT_OK
Definition DWDataReaderLibTypes.h:28
DWSTAT_ERROR_INVALID_READER
@ DWSTAT_ERROR_INVALID_READER
Definition DWDataReaderLibTypes.h:39
DWSTAT_ERROR_FILE_CANNOT_OPEN
@ DWSTAT_ERROR_FILE_CANNOT_OPEN
Definition DWDataReaderLibTypes.h:30
DWSTAT_ERROR_EXTRACTING_FILE
@ DWSTAT_ERROR_EXTRACTING_FILE
Definition DWDataReaderLibTypes.h:35
DWSTAT_ERROR_NO_MEMORY_ALLOC
@ DWSTAT_ERROR_NO_MEMORY_ALLOC
Definition DWDataReaderLibTypes.h:33
DWSTAT_ERROR_FILE_ALREADY_IN_USE
@ DWSTAT_ERROR_FILE_ALREADY_IN_USE
Definition DWDataReaderLibTypes.h:31
DWChannelType
DWChannelType
Specifies the type of channel.
Definition DWDataReaderLibTypes.h:76
DW_CH_TYPE_SYNC
@ DW_CH_TYPE_SYNC
Definition DWDataReaderLibTypes.h:77
DW_CH_TYPE_ASYNC
@ DW_CH_TYPE_ASYNC
Definition DWDataReaderLibTypes.h:78
DW_CH_TYPE_SV
@ DW_CH_TYPE_SV
Definition DWDataReaderLibTypes.h:79
DWEventType
DWEventType
Specifies the type of event.
Definition DWDataReaderLibTypes.h:102
etVStart
@ etVStart
Definition DWDataReaderLibTypes.h:106
etStart
@ etStart
Definition DWDataReaderLibTypes.h:103
etStop
@ etStop
Definition DWDataReaderLibTypes.h:104
etTrigger
@ etTrigger
Definition DWDataReaderLibTypes.h:105
etAlarm
@ etAlarm
Definition DWDataReaderLibTypes.h:113
etVoice
@ etVoice
Definition DWDataReaderLibTypes.h:110
etCursorInfo
@ etCursorInfo
Definition DWDataReaderLibTypes.h:114
etModule
@ etModule
Definition DWDataReaderLibTypes.h:112
etAlarmLevel
@ etAlarmLevel
Definition DWDataReaderLibTypes.h:115
etNotice
@ etNotice
Definition DWDataReaderLibTypes.h:109
etKeyboard
@ etKeyboard
Definition DWDataReaderLibTypes.h:108
etVStop
@ etVStop
Definition DWDataReaderLibTypes.h:107
etPicture
@ etPicture
Definition DWDataReaderLibTypes.h:111
DWChannelProps
DWChannelProps
Specifies the properties that can be retrieved for a channel.
Definition DWDataReaderLibTypes.h:53
DW_CH_INDEX
@ DW_CH_INDEX
Definition DWDataReaderLibTypes.h:56
DW_CH_INDEX_LEN
@ DW_CH_INDEX_LEN
Definition DWDataReaderLibTypes.h:57
DW_CH_TYPE
@ DW_CH_TYPE
Definition DWDataReaderLibTypes.h:58
DW_CH_CUSTOMPROPS_COUNT
@ DW_CH_CUSTOMPROPS_COUNT
Definition DWDataReaderLibTypes.h:66
DW_CH_LONGNAME
@ DW_CH_LONGNAME
Definition DWDataReaderLibTypes.h:67
DW_CH_XMLPROPS
@ DW_CH_XMLPROPS
Definition DWDataReaderLibTypes.h:63
DW_CH_XML
@ DW_CH_XML
Definition DWDataReaderLibTypes.h:61
DW_CH_XMLPROPS_LEN
@ DW_CH_XMLPROPS_LEN
Definition DWDataReaderLibTypes.h:64
DW_CH_CUSTOMPROPS
@ DW_CH_CUSTOMPROPS
Definition DWDataReaderLibTypes.h:65
DW_CH_XML_LEN
@ DW_CH_XML_LEN
Definition DWDataReaderLibTypes.h:62
DW_CH_LONGNAME_LEN
@ DW_CH_LONGNAME_LEN
Definition DWDataReaderLibTypes.h:68
DW_DATA_TYPE_LEN_BYTES
@ DW_DATA_TYPE_LEN_BYTES
Definition DWDataReaderLibTypes.h:55
DW_CH_SCALE
@ DW_CH_SCALE
Definition DWDataReaderLibTypes.h:59
DW_CH_OFFSET
@ DW_CH_OFFSET
Definition DWDataReaderLibTypes.h:60
DW_DATA_TYPE
@ DW_DATA_TYPE
Definition DWDataReaderLibTypes.h:54
DWDataType
DWDataType
Specifies the channel data type.
Definition DWDataReaderLibTypes.h:135
dtComplexDouble
@ dtComplexDouble
Definition DWDataReaderLibTypes.h:146
dtInteger
@ dtInteger
Definition DWDataReaderLibTypes.h:140
dtBytes16
@ dtBytes16
Definition DWDataReaderLibTypes.h:152
dtCANFDPortData
@ dtCANFDPortData
Definition DWDataReaderLibTypes.h:150
dtComplexSingle
@ dtComplexSingle
Definition DWDataReaderLibTypes.h:145
dtBinary
@ dtBinary
Definition DWDataReaderLibTypes.h:148
dtBytes8
@ dtBytes8
Definition DWDataReaderLibTypes.h:151
dtBytes32
@ dtBytes32
Definition DWDataReaderLibTypes.h:153
dtShortInt
@ dtShortInt
Definition DWDataReaderLibTypes.h:137
dtLongword
@ dtLongword
Definition DWDataReaderLibTypes.h:144
dtSmallInt
@ dtSmallInt
Definition DWDataReaderLibTypes.h:138
dtSingle
@ dtSingle
Definition DWDataReaderLibTypes.h:141
dtInt64
@ dtInt64
Definition DWDataReaderLibTypes.h:142
dtWord
@ dtWord
Definition DWDataReaderLibTypes.h:139
dtCANPortData
@ dtCANPortData
Definition DWDataReaderLibTypes.h:149
dtText
@ dtText
Definition DWDataReaderLibTypes.h:147
dtBytes64
@ dtBytes64
Definition DWDataReaderLibTypes.h:154
dtByte
@ dtByte
Definition DWDataReaderLibTypes.h:136
dtDouble
@ dtDouble
Definition DWDataReaderLibTypes.h:143
READER_HANDLE
void * READER_HANDLE
Definition DWDataReaderLibTypes.h:17
DWArrayInfo
Represents information about an axis on and array channel.
Definition DWDataReaderLibTypes.h:240
DWArrayInfo::size
int size
Definition DWDataReaderLibTypes.h:244
DWArrayInfo::index
int index
Definition DWDataReaderLibTypes.h:241
DWArrayInfo::name
char name[100]
Definition DWDataReaderLibTypes.h:242
DWArrayInfo::unit
char unit[20]
Definition DWDataReaderLibTypes.h:243
DWBinarySample
Represents a binary sample.
Definition DWDataReaderLibTypes.h:270
DWChannel
Structure represents a Dewesoft channel.
Definition DWDataReaderLibTypes.h:191
DWChannel::description
char description[200]
Definition DWDataReaderLibTypes.h:195
DWChannel::data_type
enum DWDataType data_type
Definition DWDataReaderLibTypes.h:198
DWChannel::unit
char unit[20]
Definition DWDataReaderLibTypes.h:194
DWChannel::index
int index
Definition DWDataReaderLibTypes.h:192
DWChannel::array_size
int array_size
Definition DWDataReaderLibTypes.h:197
DWChannel::name
char name[100]
Definition DWDataReaderLibTypes.h:193
DWChannel::color
unsigned int color
Definition DWDataReaderLibTypes.h:196
DWComplex
Represents a complex number with real and imaginary components.
Definition DWDataReaderLibTypes.h:206
DWComplex::re
double re
Definition DWDataReaderLibTypes.h:207
DWComplex::im
double im
Definition DWDataReaderLibTypes.h:208
DWCustomProp
Represents a custom property associated with a channel.
Definition DWDataReaderLibTypes.h:255
DWCustomProp::key
char key[100]
Definition DWDataReaderLibTypes.h:256
DWCustomProp::valueType
enum DWCustomPropValueType valueType
Definition DWDataReaderLibTypes.h:257
DWCustomProp::int64Val
__int64 int64Val
Definition DWDataReaderLibTypes.h:258
DWCustomProp::doubleVal
double doubleVal
Definition DWDataReaderLibTypes.h:259
DWCustomProp::strVal
char strVal[100]
Definition DWDataReaderLibTypes.h:260
DWEvent
Represents an event in datafile.
Definition DWDataReaderLibTypes.h:216
DWEvent::event_text
char event_text[200]
Definition DWDataReaderLibTypes.h:219
DWEvent::time_stamp
double time_stamp
Definition DWDataReaderLibTypes.h:218
DWEvent::event_type
enum DWEventType event_type
Definition DWDataReaderLibTypes.h:217
DWFileInfo
Represents metadata about a data file.
Definition DWDataReaderLibTypes.h:168
DWFileInfo::sample_rate
double sample_rate
Definition DWDataReaderLibTypes.h:169
DWFileInfo::start_store_time
double start_store_time
Definition DWDataReaderLibTypes.h:170
DWFileInfo::duration
double duration
Definition DWDataReaderLibTypes.h:171
DWMeasurementInfo
Structure with information about the current measurement.
Definition DWDataReaderLibTypes.h:179
DWMeasurementInfo::sample_rate
double sample_rate
Definition DWDataReaderLibTypes.h:180
DWMeasurementInfo::start_store_time
double start_store_time
Definition DWDataReaderLibTypes.h:182
DWMeasurementInfo::duration
double duration
Definition DWDataReaderLibTypes.h:183
DWMeasurementInfo::start_measure_time
double start_measure_time
Definition DWDataReaderLibTypes.h:181
DWReducedValue
Represents a set of agregated data for samples over a specific time interval.
Definition DWDataReaderLibTypes.h:227
DWReducedValue::ave
double ave
Definition DWDataReaderLibTypes.h:229
DWReducedValue::min
double min
Definition DWDataReaderLibTypes.h:230
DWReducedValue::rms
double rms
Definition DWDataReaderLibTypes.h:232
DWReducedValue::time_stamp
double time_stamp
Definition DWDataReaderLibTypes.h:228
DWReducedValue::max
double max
Definition DWDataReaderLibTypes.h:231