Библиотека RshUniDriver
SDK 2.1
Документация по программированию
Титульная страница
Описания
Структуры данных
Файлы
Файлы
Список членов всех файлов
Указатель
Структуры данных
Файлы
Функции
Переменные
Перечисления
Элементы перечислений
Макросы
Страницы
HEADERS
Include
RshUniDriverStructures.h
См. документацию.
1
18
#ifndef RSH_UNIDRIVER_STRUCTURES_H
19
#define RSH_UNIDRIVER_STRUCTURES_H
20
21
#include "Rsh.h"
22
#include "RshDefChk.h"
23
#include "
RshConsts_Common.h
"
24
#include "RshConsts_RshDataTypes.h"
25
26
#pragma pack(push, 1)
27
// Коды типов данных
29
//
30
32
// Буфер данных.
33
// Данная структура используется в функции UniDriverGetData.
34
//
35
37
typedef
struct
38
{
39
RshDataTypes
type
;
40
unsigned
int
size
;
41
unsigned
int
psize
;
42
unsigned
int
id
;
43
void
*
ptr
;
44
45
}
URshBuffer
;
46
48
// Данные структуры используютя для передачи данных
49
// в функции UniDriverGet и некоторых других
50
//
51
53
typedef
struct
54
{
55
RshDataTypes
type
;
56
void
*
data
;
57
}
URshType
;
58
60
typedef
struct
61
{
62
RshDataTypes
type
;
63
double
data
;
64
}
URshTypeDoubleStructure
;
65
67
typedef
struct
68
{
69
RshDataTypes
type
;
70
char
data
;
71
}
URshTypeS8Structure
;
72
74
typedef
struct
75
{
76
RshDataTypes
type
;
77
unsigned
char
data
;
78
}
URshTypeU8Structure
;
79
81
typedef
struct
82
{
83
RshDataTypes
type
;
84
short
data
;
85
}
URshTypeS16Structure
;
86
88
typedef
struct
89
{
90
RshDataTypes
type
;
91
unsigned
short
data
;
92
}
URshTypeU16Structure
;
93
95
typedef
struct
96
{
97
RshDataTypes
type
;
98
int
data
;
99
}
URshTypeS32Structure
;
100
102
typedef
struct
103
{
104
RshDataTypes
type
;
105
unsigned
int
data
;
106
}
URshTypeU32Structure
;
107
109
typedef
struct
110
{
111
RshDataTypes
type
;
112
unsigned
short
*
data
;
113
}
URshTypeU16PointerStructure
;
114
116
typedef
struct
117
{
118
RshDataTypes
type
;
119
char
*
data
;
120
}
URshTypeS8PointerStructure
;
121
122
struct
URshBaseType
123
{
124
unsigned
int
type
;
125
};
126
128
//Структуры с информацией о каналах и портах
129
//
130
132
typedef
struct
133
{
134
unsigned
int
gain
;
135
unsigned
int
control
;
136
double
adjustment
;
137
}
URshChannel
;
138
140
typedef
struct
141
{
142
unsigned
int
gain
;
143
unsigned
int
control
;
144
}
URshSynchroChannel
;
145
147
typedef
struct
148
{
149
unsigned
int
address
;
150
unsigned
char
bitSize
;
151
char
name[
RSH_MAX_LIST_SIZE
];
152
}
URshPortInfo
;
153
155
typedef
struct
156
{
157
unsigned
int
type
;
//код типа данных ( rshBoardPortInfo )
158
URshPortInfo
confs[
RSH_MAX_LIST_SIZE
];
159
URshPortInfo
ports[
RSH_MAX_LIST_SIZE
];
160
unsigned
int
totalConfs
;
161
unsigned
int
totalPorts
;
162
}
URshBoardPortInfo
;
163
165
typedef
struct
166
{
167
unsigned
int
type
;
//код типа данных ( rshRegister )
168
unsigned
int
size
;
//размер слова данных
169
unsigned
int
offset
;
//адрес регистра (смещение)
170
unsigned
int
value
;
//значение
171
}
URshRegister
;
172
174
//Структуры инициализации
175
//
176
178
typedef
struct
179
{
180
unsigned
int
type
;
//код типа данных ( rshInitDMA )
181
182
unsigned
int
startType
;
183
unsigned
int
bufferSize
;
184
double
frequency
;
185
186
unsigned
int
dmaMode
;
187
unsigned
int
control
;
188
double
frequencyFrame
;
189
190
URshChannel
channels[
RSH_MAX_LIST_SIZE
];
191
192
double
threshold
;
193
unsigned
int
controlSynchro
;
194
}
URshInitDMA
;
195
197
typedef
struct
198
{
199
unsigned
int
type
;
//код типа данных ( rshInitMemory )
200
201
unsigned
int
startType
;
202
unsigned
int
bufferSize
;
203
double
frequency
;
204
205
unsigned
int
control
;
206
207
unsigned
int
preHistory
;
208
unsigned
int
startDelay
;
209
unsigned
int
hysteresis
;
210
unsigned
int
packetNumber
;
211
212
double
threshold
;
213
unsigned
int
controlSynchro
;
214
215
URshSynchroChannel
channelSynchro
;
//<! настройки канала внешней синхронизации
216
URshChannel
channels[
RSH_MAX_LIST_SIZE
];
// параметры каналов
217
}
URshInitMemory
;
218
220
typedef
struct
221
{
222
unsigned
int
type
;
//код типа данных ( rshInitPort )
223
224
unsigned
int
operationType
;
225
unsigned
int
portAddress
;
226
unsigned
int
portValue
;
227
}
URshInitPort
;
228
230
typedef
struct
231
{
232
unsigned
int
type
;
//код типа данных ( rshInitDAC )
233
234
unsigned
int
id
;
235
double
voltage
;
236
}
URshInitDAC
;
237
239
typedef
struct
240
{
241
unsigned
int
type
;
//код типа данных ( rshInitGSPF )
242
243
unsigned
int
startType
;
244
double
frequency
;
245
unsigned
int
attenuator
;
246
unsigned
int
control
;
247
}
URshInitGSPF
;
248
250
typedef
struct
251
{
252
unsigned
int
type
;
//код типа данных ( rshInitVoltmeter )
253
254
unsigned
int
startType
;
255
unsigned
int
bufferSize
;
256
unsigned
int
filter
;
257
unsigned
int
control
;
258
}
URshInitVoltmeter
;
259
261
enum
URshChanControl
262
{
263
URshChanControlNotUsed
= 0x0,
264
URshChanControlNoSynchro
= 0x0,
265
URshChanControlResist1MOm
= 0x0,
266
URshChanControlDC
= 0x0,
267
URshChanControlFreqSingle
= 0x0,
268
URshChanControlICPPowerOff
= 0x0,
269
270
URshChanControlUsed
= 0x1,
271
URshChanControlSynchro
= 0x2,
272
URshChanControlAC
= 0x4,
273
URshChanControlResist50Om
= 0x8,
274
URshChanControlICPPowerOn
= 0x10,
275
276
URshChanControlFirstChannel
= 0x10000,
277
};
278
280
enum
URshSyncChanControl
281
{
282
URshSyncChanControlFilterOff
= 0x0,
283
URshSyncChanControlResist1MOm
= 0x0,
284
URshSyncChanControlDC
= 0x0,
285
286
URshSyncChanControlAC
= 0x4,
287
URshSyncChanControlResist50Om
= 0x8,
288
URshSyncChanControlFilterLow
= 0x1,
289
URshSyncChanControlFilterHigh
= 0x3,
290
};
291
293
enum
URshStart
294
{
295
URshStartTypeProgram
= 0x1,
296
URshStartTypeTimer
= 0x2,
297
URshStartTypeExternal
= 0x4,
298
URshStartTypeInternal
= 0x8,
299
URshStartTypeFrequencyExternal
= 0x10,
300
URshStartTypeMaster
= 0x20
301
};
302
304
enum
URshPortOperationCode
305
{
306
URshPortRead
= 0,
307
URshPortWrite
= 1,
308
URshPortWriteAND
= 2,
309
URshPortWriteOR
= 3
310
};
311
313
enum
URshInitDmaControl
314
{
315
URshInitDmaControlStandartMode
= 0x0,
316
317
URshInitDmaControlDiffMode
= 0x1,
318
URshInitDmaControlFrameMode
= 0x2,
319
URshInitDmaControlMulSwitchStart
= 0x4
320
};
321
323
enum
URshDmaMode
324
{
325
URshInitDmaDmaModeSingle
= 0x0,
326
URshInitDmaDmaModePersistent
= 0x1
327
};
328
330
enum
URshInitMemoryControl
331
{
332
URshInitMemoryControlFreqSingle
= 0x0,
333
URshInitMemoryControlAutoStartOff
= 0x0,
334
335
URshInitMemoryControlFreqDouble
= 0x1,
336
URshInitMemoryControlFreqQuadro
= 0x2,
337
URshInitMemoryControlAutoStartOn
= 0x4
338
};
339
341
enum
URshInitADCControlSynchro
342
{
343
URshInitADCFrequencySwitchOff
= 0x0,
344
URshInitADCSlopeFront
= 0x0,
345
URshInitADCSlopeDecline
= 0x2,
346
URshInitADCFrequencySwitchToMinimum
= 0x4,
347
URshInitADCFrequencySwitchToMaximum
= 0x8
348
};
349
351
enum
URshInitGSPFControl
352
{
353
URshInitGSPFControlFilterOff
= 0x0,
354
URshInitGSPFControlPlayOnce
= 0x0,
355
URshInitGSPFControlSynchroFront
= 0x0,
356
URshInitGSPFControlSynthesizerOff
= 0x0,
357
358
URshInitGSPFControlSynthesizerOn
= 0x1,
359
URshInitGSPFControlFilterOn
= 0x2,
360
URshInitGSPFControlPlayLoop
= 0x4,
361
URshInitGSPFControlSynchroDecline
= 0x8
362
};
363
365
enum
URshInitGSPFAttenuation
366
{
367
URshInitGSPFAttenuationOff
= 0x0,
368
URshInitGSPFAttenuation6dB
= 0x1,
369
URshInitGSPFAttenuation12db
= 0x2,
370
URshInitGSPFAttenuation18dB
= 0x3,
371
URshInitGSPFAttenuation24dB
= 0x4,
372
URshInitGSPFAttenuation30dB
= 0x5,
373
URshInitGSPFAttenuation36dB
= 0x6,
374
URshInitGSPFAttenuation42dB
= 0x7
375
};
376
377
#pragma pack(pop)
378
379
#endif //RSH_UNIDRIVER_STRUCTURES_H
Документация по Библиотека RshUniDriver. Последние изменения: Вт 29 Дек 2015 16:49:13. Создано системой
1.8.4