Библиотека RshUniDriver  SDK 2.1
Документация по программированию
 Указатель Структуры данных Файлы Функции Переменные Перечисления Элементы перечислений Макросы Страницы
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;
65 
67 typedef struct
68 {
69  RshDataTypes type;
70  char data;
72 
74 typedef struct
75 {
76  RshDataTypes type;
77  unsigned char data;
79 
81 typedef struct
82 {
83  RshDataTypes type;
84  short data;
86 
88 typedef struct
89 {
90  RshDataTypes type;
91  unsigned short data;
93 
95 typedef struct
96 {
97  RshDataTypes type;
98  int data;
100 
102 typedef struct
103 {
104  RshDataTypes type;
105  unsigned int data;
107 
109 typedef struct
110 {
111  RshDataTypes type;
112  unsigned short* data;
114 
116 typedef struct
117 {
118  RshDataTypes type;
119  char* data;
121 
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;
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 )
160  unsigned int totalConfs;
161  unsigned int totalPorts;
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 
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]; // параметры каналов
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;
259 
262 {
269 
275 
277 };
278 
281 {
285 
290 };
291 
294 {
301 };
302 
305 {
310 };
311 
314 {
316 
320 };
321 
324 {
327 };
328 
331 {
334 
338 };
339 
342 {
348 };
349 
352 {
357 
362 };
363 
366 {
375 };
376 
377 #pragma pack(pop)
378 
379 #endif //RSH_UNIDRIVER_STRUCTURES_H