Project

General

Profile

Feature #889 » se_typedef.h

shixun yan, 10/22/2020 11:48 AM

 
1

    
2
#ifndef Basetypes_H
3
#define Basetypes_H 
4

    
5
#include <stdlib.h>
6
#include <sys/types.h>
7
/*
8
 * Operating system global symbols: OSF1_MIPS, OSF1_ALPHA, ULTRIX, AIX, IRIX,
9
 * WIN_NT
10
 */
11
#ifdef ultrix
12
#define ULTRIX
13
#else
14
#ifdef sgi
15
#define IRIX
16
#else
17
#ifdef __alpha
18
#define OSF1_ALPHA 
19
#else
20
#ifdef _AIX
21
#define AIX
22
#define _POSIX_SOURCE
23
#else
24
#ifdef __mips__
25
#define OSF1_MIPS
26
#else
27
#ifdef __hpux /* see cpp man pages */
28
#define HPUX
29
#define _POSIX_SOURCE
30
#else
31
#ifdef _WIN32
32
#define WIN_NT
33
#endif /* _WIN32 */
34
#endif /* hpux */
35
#endif /* __mips__ */
36
#endif /* _AIX */
37
#endif /* __alpha */
38
#endif /* sgi */
39
#endif /* ultrix */
40

    
41
/* General symbols definitions */
42

    
43
#ifndef TRUE
44
#define TRUE  1
45
#endif /* TRUE */
46

    
47
#ifndef FALSE
48
#define FALSE 0
49
#endif /* FALSE */
50

    
51
#ifndef NULL
52
#define NULL 0
53
#endif /* NULL */
54

    
55
/* Define the exit codes */
56

    
57
#ifndef EXIT_SUCCESS
58
#define EXIT_SUCCESS        0
59
#endif /* EXIT_SUCCESS */
60

    
61
#ifndef EXIT_FAILURE
62
#define EXIT_FAILURE        1
63
#endif /* EXIT_FAILURE */
64

    
65
/* Fixed size data types (must be used for inter-machine communication) */ 
66

    
67
typedef signed char         sint8;  /* 8 bits signed integer */
68
typedef unsigned char       uint8;  /* 8 bits unsigned integer */
69
typedef short int           sint16; /* 16 bits signed integer */
70
typedef unsigned short int  uint16; /* 16 bits unsigned integer */
71
typedef float               float32;/* 32 bits floating point */
72
typedef double              float64;/* 64 bits floating point */
73

    
74

    
75
#ifdef OSF1_MIPS  
76
typedef long int            sint32; /* 32 bits signed integer */
77
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
78

    
79
/*====== The following code modified for DEC OSF/1 V3.2 ======*/
80
#else
81
#ifdef OSF1_ALPHA
82
#include <rpc/types.h>
83
typedef int                 sint32; /* 32 bits signed integer */
84
typedef long int            sint64; /* 64 bits signed integer */
85
/*============================================================*/
86

    
87
#else
88
#ifdef ULTRIX
89
typedef long int            sint32; /* 32 bits signed integer */
90
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
91

    
92
#else
93
#ifdef AIX
94
typedef long int            sint32; /* 32 bits signed integer */
95
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
96

    
97
#else
98
#ifdef IRIX
99
typedef long int            sint32; /* 32 bits signed integer */
100
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
101

    
102
#else
103
#ifdef HPUX
104
typedef long int            sint32; /* 32 bits signed integer */
105
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
106

    
107
#else
108
#ifdef WIN32
109
typedef int       sint32;
110
typedef unsigned int      uint32;
111
typedef __int64       sint64;
112
typedef unsigned __int64    uint64;
113
typedef int       pid_t;
114
typedef char *        caddr_t;
115

    
116
struct timezone
117
{
118
   int   tz_minuteswest;
119
   int   tx_dsttime;
120
};
121

    
122
#else
123
typedef long int            sint32; /* 32 bits signed integer */
124
typedef unsigned long int   uint32; /* 32 bits unsigned integer */
125

    
126
#endif /* WIN_NT */
127
#endif /* HPUX */
128
#endif /* IRIX */
129
#endif /* AIX */
130
#endif /* ULTRIX */
131
#endif /* OSF1_ALPHA */
132
#endif /* OSF1_MIPS */
133

    
134
/* Implementation specific data types */
135

    
136
typedef signed char         schar;  /* signed byte */
137
typedef int                 sint;   /* signed integer */
138
typedef short int           sshort; /* signed integer */
139
typedef long int            slong;  /* signed long integer */
140
typedef float               sfloat; /* single-precision floating point */
141
typedef double              dfloat; /* double-precision floating point */
142

    
143
#ifdef OSF1_MIPS
144
#ifndef _SYS_TYPES_H_
145
typedef unsigned char       uchar;  /* unsigned byte */
146
typedef unsigned int        uint;   /* unsigned integer */
147
typedef unsigned short int  ushort; /* unsigned integer */
148
typedef unsigned long int   ulong;  /* unsigned long integer */
149
#else
150
#ifndef _OSF_SOURCE
151
typedef unsigned char       uchar;  /* unsigned byte */
152
typedef unsigned int        uint;   /* unsigned integer */
153
typedef unsigned short int  ushort; /* unsigned integer */
154
typedef unsigned long int   ulong;  /* unsigned long integer */
155
#endif /* _OSF_SOURCE */
156
#endif /* _SYS_TYPES_H_ */
157
#else
158
#ifdef OSF1_ALPHA
159
#ifndef _SYS_TYPES_H_
160
typedef unsigned char       uchar;  /* unsigned byte */
161
typedef unsigned int        uint;   /* unsigned integer */
162
typedef unsigned short int  ushort; /* unsigned integer */
163
typedef unsigned long int   ulong;  /* unsigned long integer */
164
#else
165
#ifndef _OSF_SOURCE
166
typedef unsigned char       uchar;  /* unsigned byte */
167
typedef unsigned int        uint;   /* unsigned integer */
168
typedef unsigned short int  ushort; /* unsigned integer */
169
typedef unsigned long int   ulong;  /* unsigned long integer */
170
#endif /* _OSF_SOURCE */
171
#endif /* _SYS_TYPES_H_ */
172
#else
173
#ifdef ULTRIX
174
typedef unsigned char       uchar;  /* unsigned byte */
175
#ifndef _TYPES_
176
typedef unsigned int        uint;   /* unsigned integer */
177
typedef unsigned short int  ushort; /* unsigned integer */
178
#endif /* _TYPES_ */
179
typedef unsigned long int   ulong;  /* unsigned long integer */
180
#else
181
#ifdef AIX
182
#ifndef _H_TYPES
183
typedef unsigned char       uchar;  /* unsigned byte */
184
typedef unsigned int        uint;   /* unsigned integer */
185
typedef unsigned short int  ushort; /* unsigned integer */
186
typedef unsigned long int   ulong;  /* unsigned long integer */
187
#endif /* _H_TYPES */
188
#else
189
#ifdef IRIX
190
typedef unsigned char       uchar;  /* unsigned byte */
191
#ifndef __SYS_TYPES_H__
192
typedef unsigned int        uint;   /* unsigned integer */
193
typedef unsigned short int  ushort; /* unsigned integer */
194
typedef unsigned long int   ulong;  /* unsigned long integer */
195
#endif /* __SYS_TYPES_H__ */
196
#else
197
#ifdef HPUX
198
typedef unsigned char       uchar;  /* unsigned byte */
199
typedef unsigned long int   ulong;  /* unsigned long integer */
200
#if !defined(_SYS_TYPES_INCLUDED) || !defined(_INCLUDE_HPUX_SOURCE)
201
typedef unsigned int        uint;   /* unsigned integer */
202
typedef unsigned short int  ushort; /* unsigned integer */
203
#endif /* !defined(_SYS_TYPES_INCLUDED) || !defined(_INCLUDE_HPUX_SOURCE)... */
204
#else
205
typedef unsigned char       uchar;  /* unsigned byte */
206
typedef unsigned int        uint;   /* unsigned integer */
207
typedef unsigned short int  ushort; /* unsigned integer */
208
typedef unsigned long int   ulong;  /* unsigned long integer */
209
#endif /* HPUX */
210
#endif /* IRIX */
211
#endif /* AIX */
212
#endif /* ULTRIX */
213
#endif /* OSF1_ALPHA */
214
#endif /* OSF1_MIPS */
215

    
216
/* Definition of condition value returned (message id) by all services */
217

    
218
typedef sint32              MSG_ID_T;   
219
typedef sint32              SE_MSG_ID;       
220

    
221
/* Boolean definition */ 
222

    
223
#ifndef bool
224

    
225
#if defined(WIN32) /* && defined(__cpluehplcus) */
226
/* the MS C++ compiler gives a warning if typedefining bool because it keeps
227
   the keyword for future use!! */
228
//wyf #define bool       int
229
#else
230
//wyf typedef int                 bool;
231
#endif
232

    
233
#endif /* bool */
234

    
235
/* Define variables for SIO */
236

    
237
#ifdef SIO
238
typedef char *            SE_MSG_ID;
239
typedef char *              MSG_ID_T;
240
typedef char *              MSG_CTL_STR_T;
241
typedef char                bool;
242
#endif /* SIO */
243

    
244
/* Character string. Null terminated or not. */
245

    
246
typedef char *              string;        /* must be removed */
247
typedef char *              charstring;
248

    
249
/* Include project specific parameters and types */
250

    
251

    
252
#ifdef __unix
253
#define  DIR_SEPERATOR    "/"
254
#else
255
#define  DIR_SEPERATOR    "\\"
256
#endif
257

    
258

    
259
/*
260
 *-----------------------------------------------------------------------------
261
 * Point Class Attributes 
262
 * ????????
263
 *-----------------------------------------------------------------------------
264
 */
265

    
266
/*
267
 *-----------------------------------------------------------------------------
268
 * Point Type Attribute Parameter Definitions
269
 * ?????????Բ???????
270
 *-----------------------------------------------------------------------------
271
 *
272
 * ???????????Ϊһλ???ϣ??????˵????Դ????ʾ??ʽ?ʹ?????ʽ??
273
 *
274
 * ??????????԰?????????ģ?Ͷ???:
275
 *
276
 * ???????? = 'PointType'
277
 * ???????? =  uint32??unsinged int??
278
 *
279
 */
280

    
281
// ????????Դ
282

    
283
// ?????
284
#define SE_M_PT_TEL              0x00000001 
285

    
286
// ???????
287
#define SE_M_PT_BBDL             0x00000002 
288

    
289
// ?????
290
#define SE_M_PT_CALC             0x00000004 
291

    
292
/*
293
 *-----------------------------------------------------------------------------
294
 * Point Status Attribute Parameter Definitions
295
 * ??״̬???????Բ???????
296
 *-----------------------------------------------------------------------------
297
 *
298
 * ???״̬????????Ϊһλ???ϣ???????????ֵ????????״̬??
299
 *
300
 * ???״̬???????԰?????????ģ?Ͷ???:
301
 *
302
 * ???????? = 'Status'
303
 * ???????? =  uint32??unsinged int??
304
 *
305
 */
306
/*
307
 *-----------------------------------------------------------------------------
308
 * ?????????е??״̬λ????
309
 *-----------------------------------------------------------------------------
310
 */
311

    
312
// ??ֵ                                          
313
#define SE_M_PT_GOOD_VAL         0x00000001
314

    
315
// ??ı???δȷ??                    
316
#define SE_M_PT_UNACK_ALM        0x00000002 
317

    
318
// ???ֹ????                         
319
#define SE_M_PT_INHIB_ALM        0x00000004 
320

    
321
// ?㱻???Ʊ???
322
#define SE_M_PT_SELECT           0x00000008 
323

    
324
// ?㲻?                             
325
#define SE_M_PT_DEACT            0x00000010 
326

    
327
// ??ֵΪ?˹?????                                
328
#define SE_M_PT_MAN_VAL          0x00000020 
329

    
330
// ??ֵΪ????ת??         
331
#define SE_M_PT_NET_VAL          0x00000040 
332
 
333
// ʵʱ????غ??ֵδ?仯     
334
#define SE_M_PT_UNCHG_VAL        0x00000080 
335

    
336
// RTU ????
337
#define SE_M_PT_RTU_FAIL         0x00000100 
338
     
339
// FTU ????
340
#define SE_M_PT_FTU_FAIL         0x00000200 
341

    
342
// ???? ????
343
#define SE_M_PT_NET_FAIL         0x00000400 
344

    
345
// ????ע??
346
#define SE_M_PT_OPERNOTES        0x00000800 
347

    
348
// ?㱻(??·/?Զˣ????          
349
#define SE_M_PT_REPLACED         0x00001000                                    
350

    
351
// ??????˸
352
#define SE_M_PT_FLASHING         0x00002000
353
/*
354
 *-----------------------------------------------------------------------------
355
 * ????????ģ???????״̬λ????
356
 *-----------------------------------------------------------------------------
357
 */
358

    
359
// Point in Zero suppression alarm          
360
#define SE_M_PT_ZS_ALM         0x00020000
361

    
362
// ??ֵ                                     
363
#define SE_M_PT_ZERO_VAL         0x00040000
364

    
365
// ??ֵ???Ӧ????״ֵ̬??һ??               
366
#define SE_M_PT_INCONSISTE       0x00080000
367

    
368
// ??ʱ????ʱ                 
369
#define SE_M_PT_TIMER_EXPIRED    0x00100000
370

    
371
// ??ʱ??????                  
372
#define SE_M_PT_TIMER_ACTIVE     0x00200000    
373

    
374
// ??ֹ??ͨԽ?޼??        
375
#define SE_M_PT_INHIB_NL         0x00400000
376

    
377
// ??ֹ??????Խ?޼??    
378
#define SE_M_PT_INHIB_RL         0x00800000
379

    
380
// ??ֹ????Խ?޼??   
381
#define SE_M_PT_INHIB_EL         0x01000000 
382

    
383
// Խ??????           
384
#define SE_M_PT_ROC_ALM          0x02000000
385

    
386
// ??ֵԽ???????? 
387
#define SE_M_PT_RL_ALM           0x04000000
388

    
389
// ??ֵԽ????????
390
#define SE_M_PT_LEL_ALM          0x08000000
391

    
392
// ??ֵԽ??ͨ????    
393
#define SE_M_PT_LNL_ALM          0x10000000
394

    
395
// ??ֵԽ??ͨ????   
396
#define SE_M_PT_HNL_ALM          0x20000000
397

    
398
// ??ֵԽ????????
399
#define SE_M_PT_HEL_ALM          0x40000000 
400

    
401
// ????
402
#define SE_M_PT_DEAD             0x80000000 
403

    
404
/*
405
 *-----------------------------------------------------------------------------
406
 * ?????????????????״̬λ????
407
 *-----------------------------------------------------------------------------
408
 */
409
 
410
// ?㴦???м?̬??????
411
#define SE_M_PT_TRANSIT_ALM      0x02000000
412
 
413
// ???????????豸????
414
#define SE_M_PT_ENERGIZED        0x04000000
415

    
416
// ????Ա?趨??ֵ 
417
#define SE_M_PT_CMD_VAL          0x08000000
418

    
419
// ??ֵ?쳣            
420
#define SE_M_PT_ABN_VAL          0x10000000
421

    
422
// ???ڵ???Աң??״̬ 
423
#define SE_M_PT_OPERCHG          0x20000000
424

    
425
// ֵ??ͻ  
426
#define SE_M_PT_TRANS            0x40000000
427

    
428

    
429
/*
430
 *-----------------------------------------------------------------------------
431
 * Tag Applicaton Mask Attribute Parameter Definitions
432
 * ??־??Ӧ?????????Բ???????
433
 *-----------------------------------------------------------------------------
434
 *
435
 * ??־??Ӧ??????????Ϊһλ???ϣ????ڶ????־?ƵIJ???????????????????״̬
436
 * ??????,????????????????ʽ??
437
 *
438
 * ??־??Ӧ?????????԰?????????ģ?Ͷ???:
439
 *
440
 * ???????? = 'AppMask' 'F4026_AppMask'
441
 * ???ڿ?? = 'tagdesc' 'TB4026_TagDesc'
442
 * ???????? =  uint32??unsinged int??
443
 *
444
 */
445

    
446
//
447
// ???????????
448

    
449
// ??????? ??INHIBit add when energized??
450
#define SE_M_TAG_INHIB_ENG                0x00000001
451

    
452
// ʧ????? ??INHIBit add when Outage??          
453
#define SE_M_TAG_INHIB_OUT                0x00000002
454

    
455
// ?ǽӵؽ??? ??INHIBit add when not ground?? FIVECHECK___20060627
456
#define SE_M_TAG_INHIB_GND                0x00000400
457

    
458

    
459
// ?ӵؽ?ժ ??INHIBit remove when ground?? FIVECHECK___20060627          
460
#define SE_M_TAG_INHIB_UNGND              0x00000800
461

    
462
//
463
// ?????????????״̬??????
464

    
465
// ?ӵ?  ??GROUND??
466
#define SE_M_TAG_GROUND                   0x00000004
467

    
468
// ????????ʧ?? ??OUTAGE??
469
#define SE_M_TAG_OUTAGE                   0x00000008 
470

    
471
//
472
// ???????????
473
 
474
// ??ֹң??Խ?ޱ?????INHIBit LIMit ALarM??
475
#define SE_M_TAG_INHIB_LIMALM             0x00000010
476

    
477
// ?????豸 ??INHIBit Control Device??
478
#define SE_M_TAG_INHIB_CD                 0x00000020
479

    
480
// ?????????豸(INHIBit Control Upstream Device)  
481
#define SE_M_TAG_INHIB_CUD                0x00000040
482

    
483
// ?????????豸(INHIBit Control Downstream Device)
484
#define SE_M_TAG_INHIB_CDD                0x00000080 
485

    
486
//
487
// ?????????ʽ
488

    
489
// ͼ?????߿?
490
#define SE_M_TAG_FRAME                    0x00000100 
491

    
492
//
493
// ????ͨ????ʽ
494

    
495
// ??ֹ?ٲ?
496
#define SE_M_TAG_INHIB_SCAN               0x00000200 
497

    
498
/*
499
 *-----------------------------------------------------------------------------
500
 * ģ??????ȡֵ??ʽ????????
501
 *-----------------------------------------------------------------------------
502
 *
503
 *
504
 *  ģ??????ȡֵ??ʽΪһ????ֵ??
505
 * 
506
 *  ģ??????ȡֵ??ʽ????????????ģ?Ͷ??壺
507
 *
508
 * ????????     = "ConvMode"
509
 * ????????     =  short
510
 *
511
 */
512

    
513
// ȡԭֵ 
514
#define SE_K_PT_SOU_VAL            0
515

    
516
// ȡ?෴ֵ
517
#define SE_K_PT_COMP_VAL           1
518

    
519
// ȡ????ֵ
520
#define SE_K_PT_ABS_VAL            2
521
/*
522
 *-----------------------------------------------------------------------------
523
 * Point Alarm Priority Attribute Parameter Definitions
524
 * ??ı??????ȼ????Բ???????
525
 *-----------------------------------------------------------------------------
526
 *
527
 * ??ı??????ȼ??????DZ???ֵ????????ı?????Ϣ????????ơ?
528
 * 
529
 * ??ı??????ȼ?????????????ģ?Ͷ??壺
530
 *
531
 * ????????     = "Pt_AlmPrio"
532
 * ????????     =  uint8
533
 */
534

    
535
#define SE_K_ALM_MAJOR           1   // major alarm         
536
#define SE_K_ALM_MINOR           2   // minor alarm         
537
#define SE_K_ALM_LOW             3   // low priority alarm  
538
#define SE_K_ALM_MSG             4   // message only alarm  
539

    
540
/*
541
 *-----------------------------------------------------------------------------
542
 * Point Conversion Type Attribute Parameter Definitions
543
 * ??Ĺ???ת?????????Բ???????
544
 *-----------------------------------------------------------------------------
545
 *
546
 * ??Ĺ???ת???????????DZ???ֵ?????????ԭֵ??????ֵ??ת????ʽ??
547
 * 
548
 * ??Ĺ???ת??????????????????ģ?Ͷ??壺
549
 *
550
 * ????????     = "ConvType"
551
 * ????????     =  uint8
552
 */
553
#define SE_K_NO_CONV             1    // ??ת??
554
#define SE_K_LINEAR_CONV         2    // ????ת??
555
#define SE_K_1BKP_CONV           3    // ??һ???ϵ??????ת??
556

    
557
// CCTV?豸???ձ?
558
#define DEF_TB2023_DEVLEN       40
559

    
560
/*
561
 *-----------------------------------------------------------------------------
562
 * Point Control Information Attribute Parameter Definitions
563
 * ??Ŀ?????Ϣ???Բ???????
564
 *-----------------------------------------------------------------------------
565
 *
566
 * ??Ŀ?????Ϣ?????????ֵ???????˿??Ƶ????????????Ϣ??
567
 * 
568
 * ??Ŀ?????Ϣ????????????ģ?Ͷ??壺
569
 *
570
 * ????????     = "Pt_Control"
571
 * ????????     =  DSICTL
572
 */
573

    
574
#define SE_K_PT_CTL_DISC_SBO            1
575
#define SE_K_PT_CTL_TAP_SBO            15
576
#define SE_K_PT_CTL_TAP_PULSE          16
577
#define SE_K_PT_CTL_JOG_SBO            17
578
#define SE_K_PT_CTL_JOG_PULSE          18
579
#define SE_K_PT_CTL_JOG_PULSE_TRAIN    19
580
#define SE_K_PT_CTL_AO                 20
581
#define SE_K_PT_CTL_CCTV_PTZ           25
582
#define SE_K_PT_CTL_CCTV_SWITCH        26
583
#define SE_K_PT_CTL_PA                 27
584
#define SE_K_PT_CTL_PIDS               28
585
#define SE_K_PT_CTL_TRAIN              29
586
#define SE_K_PT_CTL_SCRIPT             30
587
#define SE_K_PT_CTL_TEXT               31
588

    
589
/*
590
 *-----------------------------------------------------------------------------
591
 * Point Calculation Evaluation Types Parameter Definitions
592
 * ??ֵ???Ͳ???????
593
 *-----------------------------------------------------------------------------
594
 */
595
#define  SE_K_EVALTYPE_NULL            0   // NULL   
596
#define  SE_K_EVALTYPE_EXPRESSION      1   // ??????????ʽ   
597
#define  SE_K_EVALTYPE_BEST_SOURCE     2   // ???Դ????       
598
#define  SE_K_EVALTYPE_OP_COUNTER      3   // ?豸???????????? 
599
#define  SE_K_EVALTYPE_INTEGKWH        4   // ???ֵ??         
600
#define  SE_K_EVALTYPE_SUMKWH          5   // ?ۼӵ??         
601
#define  SE_K_EVALTYPE_TAPDES          6   // ʮ???Ʊ?ѹ????λ 
602
#define  SE_K_EVALTYPE_TAPBIN          7   // ?????Ʊ?ѹ????λ 
603
#define  SE_K_EVALTYPE_TAPBCD          8   // BCD??ѹ????λ    
604
#define  SE_K_EVALTYPE_COS             9   // ?Զ????㹦??????
605
#define  SE_K_EVALTYPE_POWER           10  // ?Զ????????ڹ???
606
#define  SE_K_EVALTYPE_GROUPALM        11  // ?鱨????ͳ??
607
#define  SE_K_EVALTYPE_APPSYSALM       12  // ??ϵͳ??????ͳ??
608
#define  SE_K_EVALTYPE_RUNDURATION     13  // ?豸????ʱ????????? 
609

    
610
/*
611
 *-----------------------------------------------------------------------------
612
 * Point Calculation Calculate Types Parameter Definitions
613
 * ???㷽ʽ????????
614
 *
615
 * ??ע??׼ʵʱ????Ҫ?????в????????????Զ??????ڵĸ??¹??????ݡ?
616
 *-----------------------------------------------------------------------------
617
 */
618
#define  SE_K_CALCTYPE_AUTO            0   // ʵʱ?Զ?????   
619
#define  SE_K_CALCTYPE_PERIODIC        1   // ʵʱ???ڼ???
620
#define  SE_K_CALCTYPE_DEMAND          2   // ʵʱ???????
621
#define  SE_K_CALCTYPE_SEMI_AUTO       3   // ׼ʵʱ?Զ?????
622
#define  SE_K_CALCTYPE_SEMI_PERIODIC   4   // ׼ʵʱ???ڼ???     
623
#define  SE_K_CALCTYPE_SEMI_DEMAND     5   // ׼ʵʱ???????         
624

    
625
/*
626
 *-----------------------------------------------------------------------------
627
 * RTU Status Attribute Parameter Definitions
628
 * RTU ״̬?????Բ???????
629
 *-----------------------------------------------------------------------------
630
 *
631
 * RTU ״̬??????Ϊһλ???ϣ???????????ֵ????????״̬??
632
 *
633
 * RTU ״̬?????԰?????????ģ?Ͷ???:
634
 *
635
 * ???????? = 'Status'
636
 * ???????? =  uint32??unsinged int??
637
 *
638
 */
639
// ????????                         
640
#define SE_M_RTU_DWLD             0x00000001 
641
                                    
642
// ????????                         
643
#define SE_M_RTU_RUN              0x00800000
644

    
645
// ????????
646
#define SE_M_RTU_DWLD_REQ         0x00004000
647

    
648
// ??????ɣ???????????
649
#define SE_M_RTU_DWLD_WRNG      0x00008000
650

    
651
// ??ֹ?ϱ?????????
652
#define SE_M_RTU_RPT_DIG_INHIB  0x00010000
653

    
654
// ??ֹ?ϱ?SOE
655
#define SE_M_RTU_RPT_SOE_INHIB  0x00020000
656

    
657
// ??ֹ?ϱ?ģ??????
658
#define SE_M_RTU_RPT_ANA_INHIB  0x00040000
659

    
660
// ??ֹ???ر???
661
#define SE_M_RTU_ALM_BKR_INHIB  0x00080000
662

    
663
// RTU disabled (out of scan)  
664
#define SE_M_RTU_DSBL             0x00100000  
665
                                    
666
// ͨѶʧ??                         
667
#define SE_M_RTU_FAIL             0x00200000                                    
668
                                    
669
// ????ң??ģʽ                     
670
#define SE_M_RTU_REMOTE           0x01000000 
671
                                    
672
// RTU outputs are enabled          
673
#define SE_M_RTU_OUT_ENAB         0x02000000 
674
                                    
675
// RTU ???????ģʽ                 
676
#define SE_M_RTU_DIAG             0x04000000 
677
                                    
678
// RTU????δ??                      
679
#define SE_M_RTU_DWLD_PEND        0x08000000  
680
                                    
681
// ??ֹ???????㱨??                 
682
#define SE_M_RTU_ALM_DIG_INHIB    0x10000000 
683
                                    
684
// RTU??????ɣ???????????          
685
#define SE_M_RTU_DWLD_ERR         0x20000000 
686
                                    
687
// ??ֹģ?????㱨??                 
688
#define SE_M_RTU_ALM_ANA_INHIB    0x40000000 
689

    
690
// ???ڲ???ģʽ
691
#define SE_M_RTU_TEST             0x80000000  
692

    
693
/*
694
 *-----------------------------------------------------------------------------
695
 * RTU State Attribute Parameter Definitions
696
 * RTU ״?????Բ???????
697
 *----------------------------------------------------------------------------- 
698
 *
699
                                 
700
// RTU????                        
701
#define SE_K_RTU_STOP       1 // RTUͣ??
702
#define SE_K_RTU_RUNM       2 // RTU????????ͨ??
703
#define SE_K_RTU_RUNB       3 // RTU?????ڱ?ͨ??
704
          
705

    
706
// RTUͨ??״̬                    
707
#define SE_K_RTU_ACQUISITION    1 // RTUѯ??
708
#define SE_K_RTU_UNACQUISITION  0 // RTU??ѯ??
709
*/                                  
710
                                  
711

    
712
/*
713
 *-----------------------------------------------------------------------------
714
 * RTU Mode Attribute Parameter Definitions
715
 * RTU ģʽ???Բ???????
716
 *-----------------------------------------------------------------------------
717
 *
718
 * RTU ģʽ???ԡ?
719
 *
720
 * RTU ģʽ???԰?????????ģ?Ͷ???:
721
 *
722
 * ???????? = 'Mode'
723
 * ???????? =  uint32??unsinged int??
724
 *
725
 */
726
#define SE_K_RTU_TEST_MODE        4  // RTU ????ģʽ        
727
#define SE_K_RTU_NORMAL_MODE      5  // RTU ????״̬        
728
                                       
729
#define SE_K_RTU_RPT_DIG_INHIB    6  // RTU ?????????ϱ???ֹ
730
#define SE_K_RTU_RPT_DIG_ENABLE   7  // RTU ?????????ϱ?????                                      
731
#define SE_K_RTU_RPT_SOE_INHIB    8  // RTU SOE?ϱ???ֹ     
732
#define SE_K_RTU_RPT_SOE_ENABLE   9  // RTU SOE?ϱ?????     
733
#define SE_K_RTU_RPT_ANA_INHIB   10  // RTU ģ???????ϱ???ֹ
734
#define SE_K_RTU_RPT_ANA_ENABLE  11  // RTU ģ???????ϱ?????
735
                                       
736
#define SE_K_RTU_ALM_BRK_INHIB   12  // RTU ???ر?????ֹ    
737
#define SE_K_RTU_ALM_BRK_ENABLE  13  // RTU ???ر???????                                          
738
#define SE_K_RTU_ALM_DIG_INHIB   14  // RTU ???????㱨????ֹ
739
#define SE_K_RTU_ALM_DIG_ENABLE  15  // RTU ???????㱨??????                                      
740
#define SE_K_RTU_ALM_ANA_INHIB   16  // RTU ???????㱨????ֹ
741
#define SE_K_RTU_ALM_ANA_ENABLE  17  // RTU ģ?????㱨??????
742
                                      
743
#define SE_K_RTU_MAINT_ON_MODE   18  // RTU ά??ģʽ????        
744
#define SE_K_RTU_MAINT_OFF_MODE  19  // RTU ά??ģʽ????        
745

    
746
/*
747
 *-----------------------------------------------------------------------------
748
 * STATION Status Attribute Parameter Definitions
749
 * ??վ״̬???Բ???????
750
 *-----------------------------------------------------------------------------
751
 *
752
 * ??վ״̬????Ϊһλ???ϣ???????????վ״̬??
753
 *
754
 * ??վ״̬???԰?????????ģ?Ͷ???:
755
 *
756
 * ???????? = 'Status'
757
 * ???????? =  uint32??unsinged int??
758
 *
759
 */
760

    
761
// ?п??ر?λ????????˸??
762
#define SE_M_SUBST_FLASHING         0x00000001
763

    
764
// ?????澯
765
#define SE_M_SUBST_IN_ALM             0x00000002
766

    
767
// ??ֹ?ϱ?????????
768
#define SE_M_SUBST_RPT_DIG_INHIB      0x00000004
769

    
770
// ??ֹ?ϱ?SOE
771
#define SE_M_SUBST_RPT_SOE_INHIB      0x00000008
772

    
773
// ??ֹ?ϱ?ģ??????
774
#define SE_M_SUBST_RPT_ANA_INHIB      0x00000010
775

    
776
// ??ֹ???ر???
777
#define SE_M_SUBST_ALM_BKR_INHIB      0x00000020
778
                                                                        
779
// ??ֹ???????㱨??                 
780
#define SE_M_SUBST_ALM_DIG_INHIB      0x00000040 
781
                                                                        
782
// ??ֹģ?????㱨??                 
783
#define SE_M_SUBST_ALM_ANA_INHIB      0x00000080 
784

    
785
// ???ڲ???ģʽ
786
#define SE_M_SUBST_TEST               0x00000100  
787

    
788
/*
789
 *-----------------------------------------------------------------------------
790
 * SUBSTATION Mode Attribute Parameter Definitions
791
 * ??վģʽ???Բ???????
792
 *-----------------------------------------------------------------------------
793
 *
794
 * ??վģʽ???ԡ?
795
 *
796
 * ??վģʽ???԰?????????ģ?Ͷ???:
797
 *
798
 * ???????? = 'Mode'
799
 * ???????? =  uint32??unsinged int??
800
 *
801
 */
802
#define SE_K_SUBST_STOP_FLASHING    1  // SUBST ͣ??         
803
#define SE_K_SUBST_TEST_MODE        4  // SUBST ????ģʽ        
804
#define SE_K_SUBST_NORMAL_MODE      5  // SUBST ????״̬        
805
                                           
806
#define SE_K_SUBST_RPT_DIG_INHIB    6  // SUBST ?????????ϱ???ֹ
807
#define SE_K_SUBST_RPT_DIG_ENABLE   7  // SUBST ?????????ϱ?????                                          
808
#define SE_K_SUBST_RPT_SOE_INHIB    8  // SUBST SOE?ϱ???ֹ     
809
#define SE_K_SUBST_RPT_SOE_ENABLE   9  // SUBST SOE?ϱ?????     
810
#define SE_K_SUBST_RPT_ANA_INHIB   10  // SUBST ģ???????ϱ???ֹ
811
#define SE_K_SUBST_RPT_ANA_ENABLE  11  // SUBST ģ???????ϱ?????
812
                                          
813
#define SE_K_SUBST_ALM_BRK_INHIB   14  // SUBST ???ر?????ֹ    
814
#define SE_K_SUBST_ALM_BRK_ENABLE  15  // SUBST ???ر???????                                               
815
#define SE_K_SUBST_ALM_DIG_INHIB   16  // SUBST ???????㱨????ֹ
816
#define SE_K_SUBST_ALM_DIG_ENABLE  17  // SUBST ???????㱨??????                                         
817
#define SE_K_SUBST_ALM_ANA_INHIB   18  // SUBST ģ?????㱨????ֹ
818
#define SE_K_SUBST_ALM_ANA_ENABLE  19  // SUBST ģ?????㱨??????                                          
819
#define SE_K_SUBST_ALM_ALL_INHIB   20  // SUBST ???е㱨????ֹ
820
#define SE_K_SUBST_ALM_ALL_ENABLE  21  // SUBST ???е㱨??????     
821

    
822

    
823
/*
824
 *-----------------------------------------------------------------------------
825
 * Ӧ????ֵ??????????
826
 *-----------------------------------------------------------------------------
827
 *
828
 *
829
 * ??ֵ??????Ϊһ????ֵ??
830
 * 
831
 * ??ֵ??????????????????ģ?Ͷ??壺
832
 *
833
 * ????????     = "LimSetInUseCur"
834
 * ????????     = uint8
835
 *
836
 */
837

    
838
/* Current Database Limit Set In Use Identification */
839

    
840
#define  SE_K_LIMSET_UNDEFINED          0 // Limit Set Is Undefined   
841
#define  SE_K_LIMSET_GROUP1             1 // Limit Set Group 1        
842
#define  SE_K_LIMSET_GROUP2             2 // Limit Set Group 2        
843
#define  SE_K_LIMSET_GROUP3             3 // Limit Set Group 3        
844
#define  SE_K_LIMSET_GROUP4             4 // Limit Set Group 4        
845
#define  SE_K_LIMSET_GROUP5             5 // Limit Set Group 5        
846
#define  SE_K_LIMSET_GROUP6             6 // Limit Set Group 6        
847
#define  SE_K_LIMSET_IN_TRANS_GROUP1    7 // In Transition to Group 1 
848
#define  SE_K_LIMSET_IN_TRANS_GROUP2    8 // In Transition to Group 2 
849
#define  SE_K_LIMSET_IN_TRANS_GROUP3    9 // In Transition to Group 3 
850
#define  SE_K_LIMSET_IN_TRANS_GROUP4   10 // In Transition to Group 4 
851
#define  SE_K_LIMSET_IN_TRANS_GROUP5   11 // In Transition to Group 5 
852
#define  SE_K_LIMSET_IN_TRANS_GROUP6   12 // In Transition to Group 6 
853

    
854
#define  SE_K_LIMSET_MAX               12 // The maximum value the limit set can be  
855

    
856
/*
857
 *-----------------------------------------------------------------------------
858
 * ?豸?????????
859
 *-----------------------------------------------------------------------------
860
 */
861

    
862
/*
863
 *-----------------------------------------------------------------------------
864
 * ?豸???Ͳ???????
865
 *-----------------------------------------------------------------------------
866
 *
867
 * ?豸????Ϊһ????ֵ??
868
 * 
869
 * ?豸????????????????ģ?Ͷ??壺
870
 *
871
 * ????????     = "DevType"
872
 * ????????     = uint16
873
 *
874
 */
875
 
876
/*
877
#define SE_K_DEV_AA           1   // Area                            
878
#define SE_K_DEV_IJ           2   // Injection                       
879
#define SE_K_DEV_TF           3   // Transformer                     
880
#define SE_K_DEV_FS           4   // Feeder Section                  
881
#define SE_K_DEV_UC           6   // ????              
882
#define SE_K_DEV_OD           7   // ?ܿ???
883
#define SE_K_DEV_GL           8   // ?ӵ???              
884
#define SE_K_DEV_SW           9   // Switch                          
885
#define SE_K_DEV_BK           10  // Breaker  
886
#define SE_K_DEV_MELT         11  // ?۶???
887
#define SE_K_DEV_HBRK         12  // ?ֳ? 
888
#define SE_K_DEV_MPS          13  // Multiple Switch                 
889
#define SE_K_DEV_BUS          14  // Bus                             
890
#define SE_K_DEV_LD           15  // Load                            
891
#define SE_K_DEV_BA           16  // Bank                            
892
#define SE_K_DEV_OR           17  // Over Current Relay              
893
#define SE_K_DEV_AR           18  // Auto Transfer Relay             
894
#define SE_K_DEV_LR           19  // Lockout Relay                   
895
#define SE_K_DEV_RR           20  // Reclosure Relay                  
896
#define SE_K_DEV_WT           21  // Wire Type                        
897
#define SE_K_DEV_FT           22  // Feeder Type                      
898
#define SE_K_DEV_UT           23  // Underground Cable Type            
899
#define SE_K_DEV_TT           24  // Transformer Type                  
900
#define SE_K_DEV_LT           26  // Load Type                         
901
#define SE_K_DEV_BT           27  // Bank Type                         
902
#define SE_K_DEV_ST           28  // Switch Type                      
903
*/
904

    
905
#define SE_K_DEV_NULL           0  //?????ڵ??豸
906

    
907
// PSCADA
908
#define SE_K_DEV_LINE           1  //??????·
909
#define SE_K_DEV_BUS            2  //ĸ??
910
#define SE_K_DEV_TRANS          3  //??ѹ??
911
#define SE_K_DEV_BREAK          4  //????
912
#define SE_K_DEV_SWITCH         5  //??բ
913
#define SE_K_DEV_DRQ            6  //??????
914
#define SE_K_DEV_DKQ            7  //?翹??
915
#define SE_K_DEV_BLQ            8  //??????
916
#define SE_K_DEV_RDQ            9  //?ݶ???
917
#define SE_K_DEV_LOAD           10  //????
918
#define SE_K_DEV_RECT           11  //??????
919
#define SE_K_DEV_TFEEDER        12  //??ѹ??????
920
#define SE_K_DEV_POLE           13  //????
921
#define SE_K_DEV_MLINE          14  //
922

    
923
//EMCS
924
#define SE_K_DEV_FAN	          20	//???	
925
#define SE_K_DEV_FV	            21	//?緧	
926
#define SE_K_DEV_WV	            22	//ˮ??	
927
#define SE_K_DEV_PUMP	          23	//ˮ??	
928
#define SE_K_DEV_LSG	          24	//??ˮ????	
929
#define SE_K_DEV_TRANSDUCER	    25	//??Ƶ??	
930
#define SE_K_DEV_LIGHT	        26	//????	
931
#define SE_K_DEV_LIFT	          27	//?Զ?????	
932
#define SE_K_DEV_ELEVATOR	      28	//??ֱ????	
933
#define SE_K_DEV_ONOFF	        29	//????	
934
#define SE_K_DEV_EPS	          30	//????	
935
#define SE_K_DEV_UPS	          31	//UPS	
936
#define SE_K_DEV_SENSOR	        32	//??????	
937

    
938
// FAS
939
#define SE_K_DEV_DETECTOR	      40	//̽????	
940
#define SE_K_DEV_MODULE	        41	//ģ??	
941
#define SE_K_DEV_MCONTROLLER	  42	//???ֿ?????	
942
#define SE_K_DEV_JLM	          43	//??????	
943

    
944
// PSD,PG
945
#define SE_K_DEV_PSD	          50	//??????	
946
#define SE_K_DEV_ASD	          51	//??????	
947
#define SE_K_DEV_EED	          52	//Ӧ????	
948
#define SE_K_DEV_PED	          53	//????	
949
#define SE_K_DEV_PG	            54	//??????	
950
#define SE_K_DEV_FG	            55	//?˷???	
951

    
952
// ACS
953
#define SE_K_DEV_ACSD	          60	//?Ž???	
954
#define SE_K_DEV_ACSC	          61	//?Ž???????	
955
#define SE_K_DEV_ACSR	          62	//?Ž???????	
956

    
957
// CCTV
958
#define SE_K_DEV_BCAMERA	      70	//???	
959
#define SE_K_DEV_GCAMERA	      71	//ǹ??	
960
#define SE_K_DEV_MONITOR	      72	//??????	
961
#define SE_K_DEV_DENCODER	      73	//??????	
962
#define SE_K_DEV_DDECODER	      74	//??????	
963
#define SE_K_DEV_MATRIX	        75	//????	
964
#define SE_K_DEV_CKEY	          76	//???Ƽ???	
965

    
966
// PA
967
#define SE_K_DEV_GF	            80	//???ʷŴ???	
968
#define SE_K_DEV_LAERA	        81	//????????	
969
#define SE_K_DEV_BAERA	        82	//?㲥????	
970
#define SE_K_DEV_CBOX	          83	//?㲥???ƺ?	
971
#define SE_K_DEV_QTWS	          84	//????????	
972

    
973
// PIDS
974
#define SE_K_DEV_DISPLAY	      90	//??ʾ??	
975
#define SE_K_DEV_DCR	          91	//??????	
976

    
977
// AFC
978
#define SE_K_DEV_AFM	          100	//?Զ???Ʊ??	
979
#define SE_K_DEV_ACM	          101	//?Զ???Ʊ??	
980

    
981
// ????
982
#define SE_K_DEV_SERVER	        140	//??????
983
#define SE_K_DEV_WS	            141	//????վ
984
#define SE_K_DEV_LAN	          142	//????????
985
#define SE_K_DEV_FEP	          143	//ǰ?û?
986
#define SE_K_DEV_RTU	          144	//?ɼ??ն?
987
#define SE_K_DEV_CHANNEL	      145	//?ɼ?ͨ??
988
#define SE_K_DEV_SWITCHER	      146	//??????
989

    
990

    
991
// ????Ϊ?????Ͷ???
992
#define SE_K_CNT_LINE           200    //?г???        
993
#define SE_K_CNT_STATION        201    //??վ
994
#define SE_K_DEV_YARD           202    //ͣ????
995
#define SE_K_CNT_CLD            203    //??????
996
#define SE_K_CNT_LZH            204    //??վ
997
#define SE_K_CNT_BUID           205    //??¥
998
#define SE_K_CNT_TRACK          206    //???
999
#define SE_K_CNT_TUNNEL         207    //????
1000
#define SE_K_CNT_PLATFORM       208    //վ??
1001
#define SE_K_CNT_HALL           209    //վ̨
1002

    
1003

    
1004

    
1005

    
1006
//????????ʹ??
1007
#define SE_K_CNT_FEEDER           250    //?г???????        
1008
#define SE_K_CNT_BDZ            251    //???վ
1009
#define SE_K_DEV_PDF            252    //??緿
1010
#define SE_K_CNT_HWK            253    //??????
1011
#define SE_K_CNT_KBS            254    //??????
1012
#define SE_K_CNT_PLANT          255    //???糧
1013
#define SE_K_CNT_DLFZX          256    //???·?֧??
1014
#define SE_K_CNT_ALLDEV         257    //Ԥ??
1015

    
1016
/*
1017
 *-----------------------------------------------------------------------------
1018
 * ?豸״̬????????
1019
 *-----------------------------------------------------------------------------
1020
 *
1021
 * ?豸״̬Ϊһλ???ϡ?
1022
 * 
1023
 * ?豸״̬????????????ģ?Ͷ??壺
1024
 *
1025
 * ????????     = "DevStatus"
1026
 * ????????     = uint32
1027
 *
1028
 */
1029
#define SE_M_LOOP               0x00000001  // ????
1030
#define SE_M_LIVE_P             0x00000002  // 
1031
#define SE_M_LIVE_S             0x00000004  // 
1032
#define SE_M_KNOWN_S            0x00000008  // 
1033
#define SE_M_KNOWN_P            0x00000010  // 
1034
#define SE_M_OCFAULT            0x00000020  // ???? over current fault 
1035
#define SE_M_LKFAULT            0x00000080  // lock out fault       
1036

    
1037
/*
1038
 *-----------------------------------------------------------------------------
1039
 * ?????????????
1040
 *-----------------------------------------------------------------------------
1041
 */
1042

    
1043
/*
1044
 *-----------------------------------------------------------------------------
1045
 * ??????????????
1046
 *-----------------------------------------------------------------------------
1047
 *
1048
 * ???????Ϊһ?ַ???ֵ??
1049
 * 
1050
 * ???????????????????ģ?Ͷ??壺
1051
 *
1052
 * ????????     = "MeasTypeCat"
1053
 * ????????     = charstring
1054
 * ?ַ???????   = SE_K_MEAS_CAT ??se_typedef.h?ж???
1055
 *
1056
 */
1057
 
1058
#define SE_K_MEAS_CURRENT      "CURRENT"  // Current           
1059
#define SE_K_MEAS_POWER        "POWER"    // Total power       
1060
#define SE_K_MEAS_POWER_P      "POWER_P"  // Active power      
1061
#define SE_K_MEAS_POWER_Q      "POWER_Q"  // Reactive power    
1062
#define SE_K_MEAS_VOLT         "VOLT"     // Voltage           
1063
#define SE_K_MEAS_SW_POS       "SW_POS"   // Switch position    
1064

    
1065
/*
1066
 *-----------------------------------------------------------------------------
1067
 * ????˲???????
1068
 *-----------------------------------------------------------------------------
1069
 *
1070
 * ?????Ϊһ?ַ???ֵ??
1071
 * 
1072
 * ?????????????????ģ?Ͷ??壺
1073
 *
1074
 * ????????     = "MeasTypeSide"
1075
 * ????????     =  charstring
1076
 * ?ַ???????   = SE_K_MEAS_SIDE ??se_typedef.h?ж???
1077
 *
1078
 */
1079
 
1080
#define SE_K_MEAS_HS           "HS"       /* High side                    */
1081
#define SE_K_MEAS_LS           "LS"       /* Low side                     */
1082

    
1083
/*
1084
 *-----------------------------------------------------------------------------
1085
 * ??????λ????????
1086
 *-----------------------------------------------------------------------------
1087
 *
1088
 * ??????λΪһ?ַ???ֵ??
1089
 * 
1090
 * ??????λ????????????ģ?Ͷ??壺
1091
 *
1092
 * ????????     = "MeasTypePhase"
1093
 * ????????     =  charstring
1094
 * ?ַ???????   = SE_K_MEAS_PHASE ??se_typedef.h?ж???
1095
 *
1096
 */
1097
#define SE_K_MEAS_ABC          "ABC"
1098
#define SE_K_MEAS_AB           "AB"
1099
#define SE_K_MEAS_AC           "AC"
1100
#define SE_K_MEAS_BC           "BC"
1101
#define SE_K_MEAS_A            "A"
1102
#define SE_K_MEAS_B            "B"
1103
#define SE_K_MEAS_C            "C"
1104

    
1105
/*
1106
 *-----------------------------------------------------------------------------
1107
 * ???????Ͳ???????
1108
 *-----------------------------------------------------------------------------
1109
 *
1110
 * ????????Ϊһ?޷?????????
1111
 * 
1112
 * ????????????????????ģ?Ͷ??壺
1113
 *
1114
 * ????????     = "MeasType"        
1115
 * ????????     = uint16            
1116
 *                                  
1117
 */                                 
1118
                                    
1119
//ģ???????????Ͷ???                      
1120
                                   
1121
#define SE_K_POWER_ABC           1  // ???ڹ?????            
1122
#define SE_K_POWER_A             2  // A?????ڹ???         
1123
#define SE_K_POWER_B             3  // B?????ڹ???         
1124
#define SE_K_POWER_C             4  // C?????ڹ???         
1125
#define SE_K_POWER_AB            5  // AB?????ڹ???        
1126
#define SE_K_POWER_AC            6  // BC?????ڹ???        
1127
#define SE_K_POWER_BC            7  // CA?????ڹ???        
1128
#define SE_K_POWER_O             8  // ???????ڹ???                                              
1129
#define SE_K_POWER_P_ABC         9  // ?й?????
1130
#define SE_K_POWER_P_A          10  // A???й?????
1131
#define SE_K_POWER_P_B          11  // B???й?????
1132
#define SE_K_POWER_P_C          12  // C???й?????
1133
#define SE_K_POWER_P_AB         13  // AB???й?????
1134
#define SE_K_POWER_P_BC         14  // BC???й?????
1135
#define SE_K_POWER_P_CA         15  // CA???й?????
1136
#define SE_K_POWER_P_O          16  // ?????й?????                                    
1137
#define SE_K_POWER_Q_ABC        17  // ?޹?????
1138
#define SE_K_POWER_Q_A          18  // A???޹?????
1139
#define SE_K_POWER_Q_B          19  // B???޹?????
1140
#define SE_K_POWER_Q_C          20  // C???޹?????
1141
#define SE_K_POWER_Q_AB         21  // AB???޹????? 
1142
#define SE_K_POWER_Q_BC         22  // BC???޹????? 
1143
#define SE_K_POWER_Q_CA         23  // CA???޹????? 
1144
#define SE_K_POWER_Q_O          24  // ?????޹?????                          
1145
                                    
1146
#define SE_K_CURRENT_ABC        43  // ????
1147
#define SE_K_CURRENT_A          44  // A?????
1148
#define SE_K_CURRENT_B          45  // B?????
1149
#define SE_K_CURRENT_C          46  // C?????
1150
#define SE_K_CURRENT_AB         47  // AB????? 
1151
#define SE_K_CURRENT_BC         48  // BC????? 
1152
#define SE_K_CURRENT_CA         49  // CA????? 
1153
#define SE_K_CURRENT_O          50  // ???????
1154
                                    
1155
#define SE_K_VOLT_ABC           57  // ??ѹ
1156
#define SE_K_VOLT_A             58  // A???ѹ
1157
#define SE_K_VOLT_B             59  // B???ѹ
1158
#define SE_K_VOLT_C             60  // C???ѹ
1159
#define SE_K_VOLT_AB            61  // AB?ߵ?ѹ
1160
#define SE_K_VOLT_BC            62  // BC?ߵ?ѹ
1161
#define SE_K_VOLT_CA            63  // CA?ߵ?ѹ
1162
#define SE_K_VOLT_O             64  // ?????ѹ
1163
                                                                      
1164
#define SE_K_TAP_POS_LS_ABC     71  // ??ѹ????λ
1165
#define SE_K_TAP_POS_LS_A       72
1166
#define SE_K_TAP_POS_LS_B       73
1167
#define SE_K_TAP_POS_LS_C       74
1168
#define SE_K_TAP_POS_LS_AB      75
1169
#define SE_K_TAP_POS_LS_AC      76
1170
#define SE_K_TAP_POS_LS_BC      77
1171

    
1172
#define SE_K_PHASE_ANGLE_ABC    85  // ???
1173
#define SE_K_PHASE_ANGLE_A      86
1174
#define SE_K_PHASE_ANGLE_B      87
1175
#define SE_K_PHASE_ANGLE_C      88
1176
#define SE_K_PHASE_ANGLE_AB     89
1177
#define SE_K_PHASE_ANGLE_AC     90
1178
#define SE_K_PHASE_ANGLE_BC     91
1179

    
1180
#define SE_K_DEMAND_P_P         92  // ???й?????
1181
#define SE_K_DEMAND_N_P         93  // ???й?????
1182
#define SE_K_DEMAND_P_Q         94  // ???޹?????
1183
#define SE_K_DEMAND_N_Q         95  // ???޹?????
1184

    
1185
/*
1186
#define SE_K_BANK_COUNT_ABC     99
1187
#define SE_K_BANK_COUNT_A       100
1188
#define SE_K_BANK_COUNT_B       101
1189
#define SE_K_BANK_COUNT_C       102
1190
#define SE_K_BANK_COUNT_AB      103
1191
#define SE_K_BANK_COUNT_AC      104
1192
#define SE_K_BANK_COUNT_BC      105
1193
*/
1194
#define SE_K_DENSITY            103 // Ũ??
1195
#define SE_K_SIGNNO             104 // ??Դ???
1196
#define SE_K_VOLUMN             105 // ????
1197
#define SE_K_AMBIANT_TEMP       106 // ?¶?
1198
#define SE_K_HUMIDITY           107 // ʪ??
1199
#define SE_K_WIND_SPEED         108 // ????
1200
#define SE_K_TAP                109 // ??λ
1201
#define SE_K_U_IMBLALANCE       110 // ??ѹ??ƽ????
1202
#define SE_K_I_IMBLALANCE       111 // ??????ƽ????
1203
#define SE_K_LOSE_ABC           112 // ??????
1204

    
1205
#define SE_K_WATER              115 // ˮλ
1206
#define SE_K_PRESSURE           116 // ѹ??
1207
#define SE_K_FLOW               117 // ???? 
1208
#define SE_K_FREQUENCY          118 // Ƶ??
1209
#define SE_K_DGRES              119 // ????
1210
#define SE_K_COUNTER            120 // ????
1211
#define SE_K_DURATION           121 // ʱ??
1212

    
1213
#define SE_K_COS_ABC            123 // ????????
1214
#define SE_K_COS_A              124 // A?๦??????
1215
#define SE_K_COS_B              125 // B?๦??????
1216
#define SE_K_COS_C              126 // C?๦??????
1217

    
1218
#define SE_K_VOLT_POSITIVE      150 // ?????ѹ
1219
#define SE_K_VOLT_NEGATIVE      151 // ?????ѹ
1220
#define SE_K_CURRENT_POSITIVE   152 // ???????
1221
#define SE_K_CURRENT_NEGATIVE   153 // ???????
1222

    
1223

    
1224
//?????????????Ͷ???
1225
#define SE_K_ACC_P                200 // ?й????
1226
#define SE_K_ACC_Q                201 // ?޹????
1227
#define SE_K_ACC_P_POSITIVE       202 // ???й????
1228
#define SE_K_ACC_P_NEGATIVE       203 // ???й????
1229
#define SE_K_ACC_Q_POSITIVE       204 // ???޹????
1230
#define SE_K_ACC_Q_NEGATIVE       205 // ???޹????
1231

    
1232

    
1233
//?????????????Ͷ???
1234
#define SE_K_STS_BREAKER          300  // ????????״̬
1235
#define SE_K_STS_DBREAKER         301  // ????˫λ????״̬
1236
#define SE_K_STS_CAPACITOR        302  // ????????״̬
1237

    
1238
#define SE_K_STS_ABC              400 // ״̬
1239
#define SE_K_STS_CHANNEL          401 // ͨ??״̬ 
1240
#define SE_K_STS_RTU              402 // RTU״̬
1241
#define SE_K_STS_NET              403 // ????״̬  
1242
#define SE_K_STS_CN               404 // ????״̬  
1243
#define SE_K_STS_COMM             405 // ͨѶ״̬  
1244
#define SE_K_STS_FEP              406 // FEP״̬  
1245

    
1246
   
1247
#define SE_K_STS_SWITCH           500 // ??բ:??????ʹ??????
1248
#define SE_K_STS_SWITCH_LINE      501 // ??·???뵶
1249
#define SE_K_STS_SWITCH_BUSI      502 // Iĸ???뵶
1250
#define SE_K_STS_SWITCH_BUSII     503 // IIĸ???뵶
1251
#define SE_K_STS_SWITCH_BUSIII    504 // IIIĸ???뵶
1252
#define SE_K_STS_SWITCH_BUSIV     505 // IV ĸ???뵶
1253
#define SE_K_STS_GRD_LINE         506 // ??·?ӵص?
1254
#define SE_K_STS_GRD_BUSI         507 // Iĸ?ӵص?
1255
#define SE_K_STS_GRD_BUSII        508 // IIĸ?ӵص?
1256
#define SE_K_STS_GRD_BUSIII       509 // IIIĸ?ӵص?
1257
#define SE_K_STS_GRD_BUSIV        510 // IV ĸ?ӵص?
1258

    
1259
#define SE_K_PROTECT              601 // ????
1260
#define SE_K_SGZ                  602 // ?¹???
1261
#define SE_K_WARN_SIGNAL          603 // Ԥ???ź?
1262
#define SE_K_FTU_FAULT            604 // FTU?????ź?
1263
#define SE_K_FTU_AOVER            605 // A?????
1264
#define SE_K_FTU_BOVER            606 // B?????
1265
#define SE_K_FTU_COVER            607 // C?????
1266
#define SE_K_FTU_OOVER            608 // O?????
1267
#define SE_K_FTU_ASHORT           609 // A???·
1268
#define SE_K_FTU_BSHORT           610 // B???·
1269
#define SE_K_FTU_CSHORT           611 // C???·
1270
#define SE_K_FTU_OSHORT           612 // O???·
1271

    
1272

    
1273
#define SE_K_STS_RL               700 // Զ??/?͵? REMOTE/LOCAL
1274
#define SE_K_STS_R                701 // Զ??
1275
#define SE_K_STS_L                702 // ?͵?
1276
#define SE_K_STS_MA               703 // ?ֶ?/?Զ? MANUAL/AUTO
1277
#define SE_K_STS_GB               704 // ??Ƶ/??Ƶ  
1278
#define SE_K_STS_JZ               705 // ????/ֱ?? 
1279
#define SE_K_STS_SO               706 // ??վ/???? STATION/OCC
1280
#define SE_K_STS_SF               707 // ?ɹ?/ʧ?? SUCCESS/FAILUER                              
1281
#define SE_K_STS_IP               708 // ??ֹ/???? INHIBIT/PERMIT    
1282
#define SE_K_STS_VI               709 // ??Ч/??Ч VALID/INVALID    
1283
#define SE_K_STS_NA               710 // ????/?쳣 NORMAL/ABNORMAL    
1284
#define SE_K_STS_OO               711 // ????/???? OFFLINE/ONLINE
1285
#define SE_K_STS_NT               712 // ????/???? NORMAL/TROUBLE    
1286
                     
1287
#define SE_K_FAS_F  	            750	  //̽???????ֱ???״̬	
1288
#define SE_K_FAS_FA	              751	  //̽???????ֱ???ȷ??
1289
#define SE_K_FAS_T	              752	  //̽????????״̬	
1290
#define SE_K_FAS_TA	              753	  //̽????????ȷ??	
1291
#define SE_K_FAS_D	              754	  //̽????????״̬	
1292
#define SE_K_FAS_C	              755	  //̽????????״̬	
1293
#define SE_K_FAS_S	              756	  //̽?????ල״̬	
1294
#define SE_K_FAS_SA	              757	  //̽?????ලȷ??״̬
1295
#define SE_K_FAS_U	              758	  //???ܱ?/??????״̬
1296

    
1297
#define SE_K_ACS_ACU	            770	  //ACU????״̬
1298
#define SE_K_ACS_DOOR	            771	  //??״̬
1299
#define SE_K_ACS_EV1              772	  //?Ƿ????뱨??
1300
#define SE_K_ACS_EV2              773	  //??ʱδ?ر???
1301
#define SE_K_ACS_BT 	            774	  //???Ű?ť״̬
1302
#define SE_K_ACS_KEY	            775	  //ˢ??????
1303

    
1304
#define SE_K_PSD_DOOR             780   //??????״̬
1305
#define SE_K_PSD_T                781   //???????豸????״̬
1306
#define SE_K_PSD_E                782   //?????ſ???ʹ??
1307
#define SE_K_PSD_O                783   //?????ſ???????
1308
#define SE_K_PSD_C                784   //????????״̬
1309
            
1310
#define SE_K_EMCS_OC  	          800	  //??/??״̬	  
1311
#define SE_K_EMCS_OPEN 	          801	  //??״̬	      
1312
#define SE_K_EMCS_CLOSE	          802	  //??״̬	      
1313
#define SE_K_EMCS_RS  	          803	  //????/ֹͣ״̬	
1314
#define SE_K_EMCS_RUN 	          804	  //????״̬	    
1315
#define SE_K_EMCS_STOP 	          805	  //ֹͣ״̬	    
1316
#define SE_K_EMCS_N    	          806	  //??ת״̬	    
1317
#define SE_K_EMCS_INVER	          807	  //??ת״̬	    
1318
#define SE_K_EMCS_UP  	          808	  //????״̬	    
1319
#define SE_K_EMCS_DOWN	          809	  //????״̬	    
1320
#define SE_K_EMCS_RL  	          810	  //????/????״̬	 	    
1321
#define SE_K_EMCS_LEFT	          811	  //????״̬	    
1322
#define SE_K_EMCS_RIGHT	          812	  //????״̬	    
1323
#define SE_K_EMCS_LE	            813	  //?͵?/????	    
1324
#define SE_K_EMCS_EI	            814	  //????/ISCS	    
1325
#define SE_K_EMCS_LI  	          815	  //?͵?/ISCS	              
1326
  
1327
#define SE_K_STS_CAMERA_M         850	  //?????????״̬                              
1328
#define SE_K_STS_CAMERA_F         851	  //?̶??????״̬  
1329
#define SE_K_STS_MONITOR          852	  //??????״̬                              
1330
#define SE_K_STS_DECODER          853	  //??????״̬                              
1331
#define SE_K_STS_ENCODER          854	  //??????״̬ 
1332
#define SE_K_STS_TR               855	  //????״̬                              
1333
#define SE_K_STS_BT               856	  //??????ť״̬ 
1334
#define SE_K_STS_TC               857	  //????̽????״̬
1335
#define SE_K_PA_BOX_S             860   //???ع㲥״̬
1336
#define SE_K_PA_BOX_O             861   //???Ĺ㲥״̬
1337
#define SE_K_PA_AREA              862   //?㲥״̬
1338
#define SE_K_PA_DEV               863   //?㲥?豸״̬
1339
#define SE_K_PA_TEST              864   //????״̬
1340
#define SE_K_PIS_MONT             870   //??ʾ?ն˹???״̬
1341
#define SE_K_PIS_MON              871   //??ʾ?ն?״̬
1342
#define SE_K_PIS_LED              872   //LED????״̬
1343

    
1344
#define SE_K_AFC_POSE             880	  //?豸????״̬ 
1345
#define SE_K_STS_M833	            890	  //????/????	    
1346

    
1347

    
1348

    
1349

    
1350
#define SE_K_MEASTYPE_ANA_START   1
1351
#define SE_K_MEASTYPE_ANA_END     199
1352

    
1353
#define SE_K_MEASTYPE_ACC_START   200
1354
#define SE_K_MEASTYPE_ACC_END     299
1355

    
1356
#define SE_K_MEASTYPE_BRK_START   300
1357
#define SE_K_MEASTYPE_BRK_END     399
1358

    
1359
#define SE_K_MEASTYPE_STS_START   400
1360
#define SE_K_MEASTYPE_STS_END     499
1361

    
1362
#define SE_K_MEASTYPE_SWT_START   500
1363
#define SE_K_MEASTYPE_SWT_END     599
1364

    
1365
#define SE_K_MEASTYPE_PROT_START  600
1366
#define SE_K_MEASTYPE_PROT_END    699
1367

    
1368
#define SE_K_FTU_FAULT_START      SE_K_FTU_FAULT
1369
#define SE_K_FTU_FAULT_END        620
1370
                                                                     
1371
/*
1372
 *-----------------------------------------------------------------------------
1373
 * ????????״̬Ӧ??????
1374
 *-----------------------------------------------------------------------------
1375
 */
1376

    
1377
#define SE_M_PS_CLOSED                 0x00001
1378
#define SE_M_PS_ONLINE                 0x00002
1379
#define SE_M_PS_ON                     0x00004
1380
#define SE_M_PS_IN_TRANSIT             0x00008
1381
#define SE_M_PS_RECLOSED               0x00010
1382
#define SE_M_PS_LOCKOUT                0x00020
1383
#define SE_M_PS_RAISE                  0x00040
1384

    
1385
/*
1386
 *-----------------------------------------------------------------------------
1387
 * Incident Mode Attribute parameter Definitions 
1388
 * ?¹??жϷ?ʽ???Բ???????
1389
 *-----------------------------------------------------------------------------
1390
 *
1391
 * ?¹??жϷ?ʽ??һ?з???16λ????ֵ??
1392
 *
1393
 * ?¹??жϷ?ʽ???԰?????????ģ?Ͷ???:
1394
 *
1395
 * ???????? = 'IncidentMode'
1396
 * ???????? =  sint16
1397
 *
1398
 *-----------------------------------------------------------------------------
1399
 */
1400
#define SE_K_INC_MODE_NULL             0  // ?????¹?
1401
#define SE_K_INC_MODE_SGZ              1  // ?¹???
1402
#define SE_K_INC_MODE_SGZANDPROT       2  // ?¹????뱣??
1403
#define SE_K_INC_MODE_SGZORPROT        3  // ?¹??ܻ򱣻?
1404
#define SE_K_INC_MODE_SGZANDZEROANA    4  // ?¹?????ң?????
1405
#define SE_K_INC_MODE_BREAKER          5  // ???ر?λ
1406

    
1407
/*
1408
 *-----------------------------------------------------------------------------
1409
 * His Data Save Type Attribute parameter Definitions 
1410
 * ??ʷ???ݴ??̷?ʽ???Բ???????
1411
 *-----------------------------------------------------------------------------
1412
 *
1413
 * ??ʷ???ݴ??̷?ʽ??һ?з???16λ????ֵ??
1414
 *
1415
 * ??ʷ???ݴ??̷?ʽ???԰?????????ģ?Ͷ???:
1416
 *
1417
 * ???????? = 'SaveType'
1418
 * ???????? =  sint16
1419
 *
1420
 *-----------------------------------------------------------------------------
1421
 */
1422
#define SE_K_SAVETYPE_NULL             0  // ??????
1423
#define SE_K_SAVETYPE_REAL             1  // ʵʱֵ
1424
#define SE_K_SAVETYPE_AVERAGE          2  // ƽ??ֵ
1425

    
1426
/*
1427
 *-----------------------------------------------------------------------------
1428
 * State data cat Attribute parameter Definitions 
1429
 * ״̬?????????????Բ???????
1430
 *-----------------------------------------------------------------------------
1431
 *
1432
 * ??????????һ?з???16λ????ֵ??
1433
 *
1434
 * ???????????԰?????????ģ?Ͷ???:
1435
 *
1436
 * ???????? = 'DataCat'
1437
 * ???????? =  sint16
1438
 *
1439
 *-----------------------------------------------------------------------------
1440
 */
1441
#define SE_K_DATACAT_TWOBIT       1
1442

    
1443

    
1444
/*
1445
 *-----------------------------------------------------------------------------
1446
 * Schedule Type Attribute parameter Definitions 
1447
 * ʱ??????????Բ???????
1448
 *-----------------------------------------------------------------------------
1449
 *
1450
 * ʱ?????????һ?޷???8λ????ֵ??
1451
 *
1452
 * ʱ??????????԰?????????ģ?Ͷ???:
1453
 *
1454
 * ???????? = 'ScheduleType'
1455
 * ???????? =  uint8
1456
 *
1457
 *-----------------------------------------------------------------------------
1458
 */
1459
#define SE_K_SCHEDULETYPE_WEEK         1  // ÿ?ܣ?ÿ????ָ??????ִ??
1460
#define SE_K_SCHEDULETYPE_MONTH        2  // ÿ?£?ÿ????ִ??????ִ?У????ȼ?????ÿ??
1461
#define SE_K_SCHEDULETYPE_ONLYONE      3  // һ???ԣ???Ч???ڣ?ÿ????Ч?????ȼ?????ÿ?º?ÿ??
1462

    
1463
/*
1464
 *-----------------------------------------------------------------------------
1465
 * Reaction Program Trigger Type Attribute parameter Definitions 
1466
 * ???????򴥷????????Բ???????
1467
 *-----------------------------------------------------------------------------
1468
 *
1469
 * ???????򴥷???????һ?޷???8λ????ֵ??
1470
 *
1471
 * ???????򴥷????????԰?????????ģ?Ͷ???:
1472
 *
1473
 * ???????? = 'TriggerType'
1474
 * ???????? =  uint8
1475
 *
1476
 *-----------------------------------------------------------------------------
1477
 */
1478
#define SE_K_TRIGGERTYPE_AUTO         1  // ?Զ????д??????????????????????????????Զ??ں?ִ̨??
1479
#define SE_K_TRIGGERTYPE_SEMIAUTO     2  // ???Զ????д????????????????????˻??????????ʾ?????????????ֹ?ִ??
1480
#define SE_K_TRIGGERTYPE_MANUAL       3  // ?ֶ????޴??????????????????ֹ?ִ??
1481
/*
1482
 *-----------------------------------------------------------------------------
1483
 * Application System Attribute parameter Definitions 
1484
 * Ӧ??ϵͳ???Բ???????
1485
 *-----------------------------------------------------------------------------
1486
 *
1487
 * Ӧ??ϵͳ??һ?޷???8λ????ֵ??
1488
 *
1489
 * Ӧ??ϵͳ???԰?????????ģ?Ͷ???:
1490
 *
1491
 * ???????? = 'AppSysId'
1492
 * ???????? =  uint8
1493
 *
1494
 *-----------------------------------------------------------------------------
1495
 */
1496
#define SE_K_APPSYS_PSCADA    0 // ????
1497
#define SE_K_APPSYS_EMCS      1 // ?????豸
1498
#define SE_K_APPSYS_FAS       2 // ????
1499
#define SE_K_APPSYS_ACS       3 // ?Ž?
1500
#define SE_K_APPSYS_PSD       4 // ??????
1501
#define SE_K_APPSYS_CCTV      5 // ??·????
1502
#define SE_K_APPSYS_PA        6 // ?㲥
1503
#define SE_K_APPSYS_PIS       7 // ?˿͵???
1504
#define SE_K_APPSYS_AFC       8 // ?Զ??ۼ?Ʊ
1505

    
1506
#define SE_K_AOJ_PSCADA       3 //???
1507

    
1508

    
1509
/*
1510
 *-----------------------------------------------------------------------------
1511
 * Supervise Type Attribute parameter Definitions 
1512
 * ң?ؼල???????Բ???????
1513
 *-----------------------------------------------------------------------------
1514
 *
1515
 * ң?ؼල??????һ?޷???8λ????ֵ??
1516
 *
1517
 * ң?ؼල???????԰?????????ģ?Ͷ???:
1518
 *
1519
 * ???????? = 'SuperviseType'
1520
 * ???????? =  uint8
1521
 *
1522
 *-----------------------------------------------------------------------------
1523
 */
1524
#define SE_K_SUPERVISETYPE_NO             0 // ???ල
1525
#define SE_K_SUPERVISETYPE_ACK_SELF       1 // ֱ??ȷ??
1526
#define SE_K_SUPERVISETYPE_ACK_OTHER      2 // ˫ϯ?ල
1527
#define SE_K_SUPERVISETYPE_ACK_OTHERNODE  3 // ˫ϯ˫???ල
1528

    
1529
/*
1530
 *-----------------------------------------------------------------------------
1531
 * Dual Bit  Digital Point Attribute parameter Definitions 
1532
 * ??????˫λ?????Բ???????
1533
 *-----------------------------------------------------------------------------
1534
 *
1535
 * ??????˫λ????????һ?޷???8λ????ֵ??
1536
 *
1537
 * ??????˫λ?????????԰?????????ģ?Ͷ???:
1538
 *
1539
 * ???????? = 'DualBit'
1540
 * ???????? =  uint8
1541
 *
1542
 *-----------------------------------------------------------------------------
1543
 */
1544
#define SE_K_DUALBIT_SINGLE             0 // ??λ??,֧??0??1??̬
1545
#define SE_K_DUALBIT_NORMAL             1 // ??ͨ˫λ?㣬֧??0??1??2??3??̬
1546
#define SE_K_DUALBIT_00_11              2 // ??̬?㣬֧?֣?00=??0????11=??1????01??10=??2??̬??????2???м?̬
1547
#define SE_K_DUALBIT_10_01              3 // ??̬?㣬֧?֣?10=??0????01=??1????00??11=??2??̬??????2???м?̬
1548

    
1549
/*
1550
 *-----------------------------------------------------------------------------
1551
 * Control Action For Digital Output Point and Analog Output Point Attribute 
1552
 * Parameter Definitions 
1553
 * AO??DO????ƹ??????Բ???????
1554
 *-----------------------------------------------------------------------------
1555
 *
1556
 * AO??DO????ƹ?????????һ?޷???8λ????ֵ??
1557
 *
1558
 * AO??DO????ƹ??????????԰?????????ģ?Ͷ???:
1559
 *
1560
 * ???????? = 'Action'
1561
 * ???????? =  uint8
1562
 *
1563
 *-----------------------------------------------------------------------------
1564
 */
1565
#define SE_K_ACTION_ONE_STEP             0 // һ????ִ??
1566
#define SE_K_ACTION_TWO_STEP             1 // ??????ѡ??ִ??
1567
/*
1568
 *-----------------------------------------------------------------------------
1569
 * End of file
1570
 *-----------------------------------------------------------------------------
1571
 */
1572
#define  SCDSTYPE_ERRRET          255   //????????
1573

    
1574
/*
1575
 *-----------------------------------------------------------------------------
1576
 * ȫ?ֶ??????????????
1577
 *-----------------------------------------------------------------------------
1578
 */
1579
#define SE_K_MAXPATHNAME      300     // ?ļ?ϵͳ·????󳤶?
1580
#define SE_K_MAXFILENAME       75     // ?ļ?ϵͳ?ļ?????󳤶?
1581
#define SE_K_MAXEXTENSION       3     // ?ļ?ϵͳ??չ????󳤶? 
1582

    
1583
/*
1584
 *-----------------------------------------------------------------------------
1585
 * ????ģ?????????
1586
 *-----------------------------------------------------------------------------
1587
 */
1588

    
1589
#define  SE_K_SRC           4     // ????ģ????????󳤶?
1590
#define  SE_K_SRC_SDB         "SDB"   // SCADA???ݿ?       
1591
#define  SE_K_SRC_HIS         "HIS" // ??ʷ??            
1592
#define  SE_K_SRC_NET         "NET"   // ???????ݿ?        
1593
#define  SE_K_SRC_DAS         "DAS"   // DAS ???ݿ?        
1594
#define  SE_K_SRC_COM         "COM"   // ǰ?û????ݿ? 
1595

    
1596

    
1597
/*
1598
 *-----------------------------------------------------------------------------
1599
 * ͨ?ö??????????
1600
 *-----------------------------------------------------------------------------
1601
 */
1602
#define  SE_K_CODE    24        // ??????봮????
1603
#define  SE_K_DESC    40        // ??????????????
1604

    
1605
/*
1606
 *-----------------------------------------------------------------------------
1607
 * ʵʱ?????????
1608
 *-----------------------------------------------------------------------------
1609
 */
1610
#define  SE_K_TABLE_NAME    24        // ʵʱ???????????
1611
#define  SE_K_COLUMN_NAME   40        // ʵʱ????????????
1612

    
1613
/*
1614
 *-----------------------------------------------------------------------------
1615
 * ??ѹ?ȼ??????????
1616
 *-----------------------------------------------------------------------------
1617
 */
1618

    
1619
#define  SE_K_VOLTLEV_CODE    SE_K_CODE   // ??ѹ?ȼ????봮????
1620
#define  SE_K_VOLTLEV_DESC    SE_K_DESC   // ??ѹ?ȼ???????????
1621

    
1622
/*
1623
 *-----------------------------------------------------------------------------
1624
 *  ???????????
1625
 *-----------------------------------------------------------------------------
1626
 */
1627

    
1628
#define  SE_K_GROUP_CODE    8           // ?????ƴ?????
1629
#define  SE_K_GROUP_DESC    24        // ????????????
1630

    
1631
/*
1632
 *-----------------------------------------------------------------------------
1633
 * RTU ?????????
1634
 *-----------------------------------------------------------------------------
1635
 */
1636

    
1637
#define  SE_K_RTU_CODE    SE_K_CODE   // RTU???봮????
1638
#define  SE_K_RTU_DESC    SE_K_DESC   // RTU??????????
1639

    
1640
/*
1641
 *-----------------------------------------------------------------------------
1642
 * ??????????? 
1643
 *-----------------------------------------------------------------------------
1644
 */
1645

    
1646
#define  SE_K_PT_CODE            24     // ????봮????
1647
#define  SE_K_PT_DESC            40     // ????????????  
1648
#define  SE_K_CALC_EXPRESS      255     // ???????ʽ????
1649
#define  SE_K_UNITS               8     // ģ??????λ????
1650

    
1651
/*
1652
 *-----------------------------------------------------------------------------
1653
 * ͼ??????????? 
1654
 *-----------------------------------------------------------------------------
1655
 */
1656

    
1657
#define  SE_K_GRAPH_NAME       40   // ͼ???ļ????ƴ?????
1658
#define  SE_K_SYMBOL_NAME      40   // ͼԪ?ļ????ƴ?????
1659

    
1660
/*
1661
 *-----------------------------------------------------------------------------
1662
 * ?????????????????
1663
 *-----------------------------------------------------------------------------
1664
 */
1665

    
1666
#define  SE_K_STATE      13 // ????????״̬??????????
1667
#define  SE_K_MAX_STATE   4 // ???????????״̬??
1668
                                
1669
#define  SE_K_DCAT_NAME   7 // ???????ʹ??봮????
1670
#define  SE_K_DCAT_DESC  23 // ??????????????????      
1671
                                  
1672
/*                                
1673
 *-----------------------------------------------------------------------------
1674
 * ?????????????                 
1675
 *-----------------------------------------------------------------------------
1676
 */
1677

    
1678
#define  SE_K_ALM_CLASS_NAME        20  // ?????????Ƴ???
1679
#define  SE_K_ALM_CLASS_DESC        20  // ?????????Ƴ???
1680
#define  SE_K_ALM_DEVICE_KEY        32  // ?????豸??????????
1681
#define  SE_K_ALM_USER_ATTR         24  // ?????û?????ֵ????
1682
#define  SE_K_ALM_TEXT_MESSAGE     128  // ?????ı???????
1683
#define  SE_K_ALM_AUDIO_MESSAGE    128  // ??????????????
1684

    
1685
/*
1686
 *-----------------------------------------------------------------------------
1687
 * ????????Ȩ?޹????????????
1688
 *-----------------------------------------------------------------------------
1689
 */
1690

    
1691
#define  SE_K_AOJ_CODE          SE_K_CODE   // AOJ ???봮???? 
1692
#define  SE_K_AOJ_DESC          SE_K_DESC   // AOJ ?????????? 
1693

    
1694
#define  SE_K_USERGROUP_CODE    SE_K_CODE   // ?û?????봮???? 
1695
#define  SE_K_USERGROUP_DESC    SE_K_DESC   // ?û????????????? 
1696

    
1697
#define  SE_K_USER_CODE         SE_K_CODE   // ?û????봮???? 
1698
#define  SE_K_USER_DESC         SE_K_DESC   // ?û??????????? 
1699

    
1700
#define  SE_K_ROLE_CODE         SE_K_CODE   // ??ɫ???봮???? 
1701
#define  SE_K_ROLE_DESC         SE_K_DESC   // ??ɫ?????????? 
1702

    
1703
#define  SE_K_NODE_CODE         SE_K_CODE   // ?ڵ???봮???? 
1704
#define  SE_K_NODE_DESC         SE_K_DESC   // ?ڵ??????????? 
1705

    
1706
/*
1707
 *-----------------------------------------------------------------------------
1708
 * ?豸?????????????
1709
 *-----------------------------------------------------------------------------
1710
 */
1711

    
1712
#define  SE_K_DEVTYP_CODE      SE_K_CODE     // ?豸???ʹ??봮????
1713
#define  SE_K_DEVTYP_DESC      SE_K_DESC     // ?豸??????????????
1714

    
1715
/*
1716
 *-----------------------------------------------------------------------------
1717
 * ?豸?????????
1718
 *-----------------------------------------------------------------------------
1719
 */
1720

    
1721
#define  SE_K_DEV_CODE      SE_K_CODE     // ?豸???봮????
1722
#define  SE_K_DEV_DESC      SE_K_DESC     // ?豸??????????
1723

    
1724
/*
1725
 *-----------------------------------------------------------------------------
1726
 * ?????????????????
1727
 *-----------------------------------------------------------------------------
1728
 */
1729

    
1730
#define  SE_K_MEAS_CAT        17  // ???????ͷ??മ????   
1731
#define  SE_K_MEAS_SIDE        3  // ???????Ͷ˴?????   
1732
#define  SE_K_MEAS_PHASE       4  // ?????????മ????                                      
1733
#define  SE_K_MEAS_DESC       40  // ??????????????????                                       
1734
#define  SE_K_MEAS_MAX_PHASE   3  // ???????
1735

    
1736
/*
1737
 *-----------------------------------------------------------------------------
1738
 * ????ģʽ?????????????
1739
 *-----------------------------------------------------------------------------
1740
 */
1741

    
1742
#define  SE_K_MODE_NAME          8  // ģʽ???Ƴ???   
1743
#define  SE_K_MODE_DESC          8  // ģʽ????????   
1744
#define  SE_K_MODE_TRIGGER      48  // ģʽ??????????                                      
1745

    
1746
/*
1747
 *-----------------------------------------------------------------------------
1748
 * DAS ???ݿ???????Դ????
1749
 *-----------------------------------------------------------------------------
1750
 */
1751

    
1752
#define  SE_K_SOURCE_TEL  "TEL" // ???? (ȱʡ)
1753
#define  SE_K_SOURCE_EST  "EST" // ״̬????
1754

    
1755
/*
1756
 *-----------------------------------------------------------------------------
1757
 * DAS ???ݿ?????????????
1758
 *-----------------------------------------------------------------------------
1759

    
1760
/* 
1761
 *-----------------------------------------------------------------------------
1762
 * ͳ???????????
1763
 *-----------------------------------------------------------------------------
1764
 */
1765

    
1766

    
1767
/*
1768
 *-----------------------------------------------------------------------------
1769
 * SCADA???????Խű?????????
1770
 *-----------------------------------------------------------------------------
1771
 */
1772

    
1773
#define  SE_K_SCRIPT_NAME          32   // ?ű????ƴ?????
1774
#define  SE_K_SCRIPT_MODE           3   // ?ű?ģʽ??????
1775
#define  SE_K_SCRIPT_GRP_NAME       4   // ?ű?Ӧ???????ƴ?????
1776
#define  SE_K_SCRIPT_AUTHOR        21   // ?ű????????ƴ?????
1777
#define  SE_K_SCRIPT_DESC         161   // ?ű???????????
1778
#define  SE_K_SCRIPT_TEXT       32000   // ?ű??ı???????
1779

    
1780
/*
1781
 *-----------------------------------------------------------------------------
1782
 * ????????????
1783
 *-----------------------------------------------------------------------------
1784
 */
1785

    
1786
#define  SE_K_ODR_NAME             32   // ???????ƴ?????
1787
#define  SE_K_ODR_PRINTER          11   // ??ӡ?????ƴ????? 
1788

    
1789
/*
1790
 *-----------------------------------------------------------------------------
1791
 * ģ???̲???????
1792
 *-----------------------------------------------------------------------------
1793
 */
1794

    
1795
/*
1796
 *-----------------------------------------------------------------------------
1797
 * ??Ϣ????????
1798
 *-----------------------------------------------------------------------------
1799
 */ 
1800
#define  SE_K_LOG_MESSAGE          80 // ??Ϣ??????
1801

    
1802

    
1803
/*
1804
 *-----------------------------------------------------------------------------
1805
 * ʱ?β???????
1806
 *-----------------------------------------------------------------------------
1807
 */ 
1808
#define  SE_K_INTERVAL_MAX          4 // ???ʱ?θ???
1809

    
1810
/*
1811
 *-----------------------------------------------------------------------------
1812
 * ʱ???????????
1813
 *-----------------------------------------------------------------------------
1814
 */ 
1815
#define  SE_K_SCHEDULE_INTERVAL_MAX  100 // ÿ??ʱ?????????ʱ?θ???
1816

    
1817

    
1818
/*
1819
 *-----------------------------------------------------------------------------
1820
 * ???????źŵ?
1821
 *-----------------------------------------------------------------------------
1822
 */ 
1823
#define  SE_K_ALM_SIGNAL_REACTION      "DI_ALM_REACTION" // ???????????ź?
1824
#define  SE_K_ALM_SIGNAL_FIRE          "DI_ALM_FIRE"     // ???ֱ??????ź?
1825
#define  SE_K_ALM_SIGNAL_BLOCK         "DI_ALM_BLOCK"    // ???????????ź?
1826
#define  SE_K_ALM_SIGNAL_OUTAGE        "DI_ALM_OUTAGE"   // ʧ?籨?????ź?
1827

    
1828
/*
1829
 *-----------------------------------------------------------------------------
1830
 * ???ݲɼ????ֹ???????
1831
 *-----------------------------------------------------------------------------
1832
 */ 
1833
#define   DC_K_RTUNUM           512 //??վ??
1834
#define   DC_K_CHANNUM        512 //ͨ????
1835
#define   DC_K_YCNUM            (1024*DC_K_RTUNUM)  
1836
#define   DC_K_YXNUM            (2048/8*DC_K_RTUNUM)  
1837
#define   DC_K_KWHNUM           (512  *DC_K_RTUNUM)
1838

    
1839
#include "se_math.h"
1840

    
1841
#endif /* Basetypes_H */
1842

    
1843

    
1844

    
1845

    
1846

    
1847

    
1848

    
1849

    
1850

    
1851

    
1852

    
1853

    
    (1-1/1)