QuakeGod
2022-01-16 326d3e312c74726814c39c9d112faab03c4a167c
提交 | 用户 | age
0ed438 1 /*
Q 2
3
4
5 */
6 #pragma once
7 #include "KDefine.h"
326d3e 8 #include "HvSerialPort.h"
0ed438 9 #include <functional>
Q 10 class KLink
11 {
12     typedef unsigned char UCHAR;
13     typedef unsigned short USHORT;
14     typedef unsigned int UINT;
15
16 public:
17     KLink();
18     virtual ~KLink();
326d3e 19     HvSerialPort m_SerialPort;
0ed438 20 #define TYPECOIL 0x00
Q 21 #define TYPEDATA 0x80
22     enum enKLCoilTypes
23     {
24         KLCoilTypeX = 0 | TYPECOIL,        //X Input
25         KLCoilTypeY = 1 | TYPECOIL,        //Y Output
26         KLCoilTypeR = 2 | TYPECOIL,        //R register
27         KLCoilTypeLX = 3 | TYPECOIL,        //Link register
28         KLCoilTypeLY = 4 | TYPECOIL,        //Link register
29         KLCoilTypeT = 5 | TYPECOIL,        //Timer
30         KLCoilTypeC = 6 | TYPECOIL,        //Counter
31         KLCoilTypeLR = 7 | TYPECOIL,        //Link register
32         KLCoilTypeSR = 8 | TYPECOIL,        //Link register
33
34
35     };
36     enum enKLDataTypes
37     {
38         KLDataTypeDEC = 0 | TYPEDATA,
39         KLDataTypeHEX = 1 | TYPEDATA,
40         KLDataTypeFloat = 2 | TYPEDATA,
41         KLDataTypeWX = 3 | TYPEDATA,
42         KLDataTypeWY = 4 | TYPEDATA,
43         KLDataTypeWR = 5 | TYPEDATA,
44         KLDataTypeWLX = 6 | TYPEDATA,
45         KLDataTypeWLY = 7 | TYPEDATA,
46         KLDataTypeDT = 8 | TYPEDATA,
47         KLDataTypeSDT = 9 | TYPEDATA,
48         KLDataTypeWSR = 10 | TYPEDATA,
49         KLDataTypeSV = 11 | TYPEDATA,
50         KLDataTypeEV = 12 | TYPEDATA,
51         KLDataTypeLD = 13 | TYPEDATA,
52         KLDataSysCfg = 25 | TYPEDATA,
53         KLDataTypeFlash = 33 | TYPEDATA,
54         KLDataTypeTest = 254 | TYPEDATA,
55     };
56     enum enKLDataCounts
57     {
58         KLDataDTCount = 256,
59         KLDataSDTCount = 256,
60
61         KLDataWXCount = 16,
62         KLDataWYCount = 16,
63         KLDataWRCount = 16,
64         KLDataLDCount = 64,
65         KLDataWLCount = 8,
66
67         KLCoilXCount = KLDataWXCount * 16,
68         KLCoilYCount = KLDataWYCount * 16,
69         KLCoilRCount = KLDataWRCount * 16,
70
71         KLCoilTCount = 64,
72         KLCoilCCount = KLCoilTCount,
73         KLDataSVCount = KLCoilTCount,
74         KLDataEVCount = KLCoilTCount,
75
76         KLCoilLXCount = 128,
77         KLCoilLYCount = 128,
78         KLCoilLRCount = 128,
79         KLCoilSRCount = 128,
80
81     };
82     typedef struct tagKLTypeName
83     {
84         int nType;
85         const char * sName;
86         int nRange = 0;
87     }stKLTypeName;
88     static const stKLTypeName KLCoilTypeNames[];
89     static const stKLTypeName KLDataTypeNames[];
90
91 enum eKLResult
92 {
93     KL_ERR = -1,
94     KL_OK = 0,
95     KL_NG = 1,
96     KL_UNKNOWN = 2,
97     KL_TIMEOUT = 3,
98     KL_BCC_ERR = 4,
99     KL_PKG_ERR = 5,
100     KL_SEQ_ERR = 6,
101     KL_LENTH_EXCEED,
102     KL_NEED_PASS,
103     KL_NOT_SUPPORT,
104 };
105 const char * GetErrDescStr(int nErrNo);
106 enum
107 {
108     KLSignStart = '%',
109     KLSignReply = 'U',
110     KLSignEnd = 0x0D,
111     KLMaxPacketLength = 128,
112
113 };
114 enum ExtraDataType
115 {
116     KLExtTypeNone = 0,
117     KLExtTypeText = 1,
118     KLExtTypeCmd = 2,
119     KLExtTypePassTh = 3,
120
121     KLExtTypeTestData = 8,
122 };
123
124 enum enCMDs
125 {
126     //        cmdOK = '1',        //Reply OK
127     //        cmdNG = '2',        //Rplay NG
128     KLCmdNone = 0x00,        //Nothing
129     KLCmdPing = 0x01,            //Ping
130     KLCmdPingReply = 0x02,        //PingReply
131     KLCmdGetInfo = 0x03,            //GetInfo
132     KLCmdVerInfo = 0x04,            //InfoReply
133
134     KLCmdRead = 0x05,            //Read
135     KLCmdReadReply = 0x06,        //ReadReply
136     KLCmdWrite = 0x07,            //Write
137     KLCmdWriteReply = 0x08,    //WriteReply
138     KLCmdSaveToFlash = 0x09,                //Write
139
140     KLCmdExChgData = 0x0A,                //ExChangeDate, = Wirte + Read
141     KLCmdExChgDataReply,            //ExchangeData Reply
142
143     KLCmdSyncRead = 0x0D,                //SyncRead
144     KLCmdSyncWrite,                        //SyncWrite
145     KLCmdSequenRead,                    //Sequence Read
146     KLCmdSyncTime,                        //SyncTime
147
148     KLCmdChgMode = 0x11,
149     KLCmdGetMode = 0x12,
150
151     KLCmdChkPass,
152     KLCmdSetPass,
153     KLCmdEraseAll,
154     KLCmdReadProgram,
155     KLCmdStartProgram,
156     KLCmdWriteProgram,
157     KLCmdFinishProgram,
158
159     KLCmdRead1Bit = 0x21,                //ReadSingleBit
160     KLCmdWrite1Bit = 0x22,                //WriteSingleBit
161
162     KLCmdReadBits = 0x23,                //ReadBits        n = 1 - 8
163     KLCmdWriteBits = 0x24,                //ReadBits        n = 1 - 8
164
165     KLCmdReadBitsByByte = 0x25,            //ReadBitsByByte    ,byteCount
166     KLCmdWriteBitsByByte = 0x26,        //ReadBitsByByte    ,ByteCount
167
168     KLCmdReadBitsByWord = 0x27,            //ReadBitsByWord    ,WordCount
169     KLCmdWriteBitsByWord = 0x28,        //ReadBitsByWord    ,WordCount
170
171     KLCmdReadDataByte = 0x31,            //ByteCount
172     KLCmdWriteDataByte = 0x32,
173
174     KLCmdReadDataWord = 0x33,            //WordCount
175     KLCmdWriteDataWord = 0x34,
176
177     KLCmdReadData = 0x35,                //?Count
178     KLCmdWriteData = 0x36,
179
180     KLCmdReadProg = 0x51,
181     KLCmdWriteProg,
182     KLCmdReadSysCfg,
183     KLCmdWriteSysCfg,
184     KLCmdSaveSysCfg,
185     KLCmdSaveRunStat,
186     KLCmdReadRunStat,
187
188     KLCmdEraseFlashPage = 0x61,
189     KLCmdWriteToFlash = 0x62,
190
191     KLCmdGetEventLogCount,
192     KLCmdGetEventLog,
193     KLCmdClearEventLog,
194     KLCmdGetFactoryData,
195     KLCmdWriteFactoryData,
196     KLCmdResetMachine,
197     KLCmdGetUid,
198     KLCmdSetTime,
199
200     KLCmdMC,
201     KLCmdMD,
202     KLCmdMG,
203
204     KLCmdErrRply = 0xEE,                //ERRORReply
205 };
206
207 typedef struct tagRunStat
208 {
209     unsigned short Sign1;
210     unsigned short Seq1;
211     volatile unsigned short PowerCount;    //
212     volatile unsigned short Reserved1;
213     volatile unsigned int UpTime;        //Seconds;
214     volatile unsigned int UserData1;
215     volatile unsigned short WorkMode;
216     volatile unsigned short WorkMode2;
217     volatile unsigned short nBinProgBank;
218     volatile unsigned short nBinProgSize;
219     unsigned int Reserved2[1];
220     unsigned short CRC1;
221     unsigned short EndSign1;
222 }stRunStat, *pRunStat;
223
224 stRunStat KMRunStat;
225
226 enum enKeventType
227 {
228     EventTypeNone = 0,
229     EventTypePowerUp = 1,
230     EventTypePowerDown = 2,
231     EventTypePowerRecover = 3,
232     EventTypeConnected = 4,
233     EventTypeLostCon = 5,
234     EventTypeSetTime = 6,
235     EventTypeSysCfg = 7,
236     EventTypeProg = 8,
237     EventTypeForce = 9,
238     EventTypeClearEvent = 10,
239
240     EventType
241 };
242
243 typedef struct tagEventLog
244 {
245     unsigned short Sign1;
246     unsigned short Seq1;
247     unsigned int nTime;
248     unsigned short nType;
249     unsigned short nParam1;
250     unsigned int nParam2;
251 }stEventLog, *pEventLog;
252
253
254 typedef struct tagKLCmdName
255 {
256     const int nCmd;
257     const char * sName;
258     const char * sType;
259
260 }KLCmdName;
261
262 const KLCmdName KLCmdNames[42] =
263 {
264     {KLCmdNone,"None",""},    //==0    //Nothing
265     {KLCmdPing,"Ping"},    //=1        //Ping
266     {KLCmdPingReply,"PingReply"}, //2        //PingReply
267     {KLCmdGetInfo,"GetInfo"},//3            //GetInfo
268     {KLCmdVerInfo,"VerInfo"},// = 0x04,            //InfoReply
269
270     {KLCmdRead,"Read","WX;WY;DT;SDT;EV;SV;LD;WL;CFG;FLASH;RAM"},// = 0x05,            //Read
271     {KLCmdReadReply,"ReadReply"},// = 0x06,        //ReadReply
272     {KLCmdWrite,"Write"},// = 0x07,            //Write
273     {KLCmdWriteReply,"WriteReply"},// = 0x08,    //WriteReply
274     {KLCmdSaveToFlash,"SaveToFlash"},// = 0x09,                //Write
275
276     {KLCmdExChgData,"ExChgData"},// = 0x0A,                //ExChangeDate, = Wirte + Read
277     {KLCmdExChgDataReply,"ExChgDataReply"},//,            //ExchangeData Reply
278
279     {    KLCmdSyncRead,"SyncRead"},// = 0x0D,                //SyncRead
280     {    KLCmdSyncWrite,    "SyncWrite"},//                     //SyncWrite
281     {    KLCmdSequenRead,"SequenRead"},//                     //Sequence Read
282     {    KLCmdSyncTime,"SyncTime"},//                         //SyncTime
283
284     {    KLCmdGetMode,"GetMode"},//  = 0x12,
285
286     {    KLCmdChkPass,"ChkPass"},// 
287     {    KLCmdSetPass,"SetPass"},// 
288     {    KLCmdEraseAll,"EraseAll"},// 
289     {    KLCmdReadProgram,"ReadProgram"},// 
290     {    KLCmdWriteProgram,"WriteProgram"},// 
291
292     {    KLCmdRead1Bit,"Read1Bit"},//  = 0x21,                //ReadSingleBit
293     {    KLCmdWrite1Bit,"Write1Bit"},//  = 0x22,                //WriteSingleBit
294
295     {    KLCmdReadBits,"ReadBits"},//  = 0x23,                //ReadBits        n = 1 - 8
296     {    KLCmdWriteBits,"WriteBits"},//  = 0x24,                //ReadBits        n = 1 - 8
297
298     {    KLCmdReadBitsByByte,"ReadBitsByByte"},//  = 0x25,            //ReadBitsByByte
299     {    KLCmdWriteBitsByByte,"WriteBitsByByte"},//  = 0x26,        //ReadBitsByByte
300
301     {    KLCmdReadBitsByWord,"ReadBitsByWord"},//  = 0x27,            //ReadBitsByWord
302     {    KLCmdWriteBitsByWord,"WriteBitsByWord"},//  = 0x28,        //ReadBitsByWord
303
304     {    KLCmdReadDataByte,"ReadDataByte"},//  = 0x31,
305     {    KLCmdWriteDataByte,"WriteDataByte"},//  = 0x32,
306
307     {    KLCmdReadDataWord,"ReadDataWord"},//  = 0x33,
308     {    KLCmdWriteDataWord,"WriteDataWord"},//  = 0x34,
309
310     {    KLCmdReadData,"ReadData"},//  = 0x35,
311     {    KLCmdWriteData,"WriteData"},//  = 0x36,
312
313     {    KLCmdReadProg,"ReadProg"},//  = 0x51,
314     {    KLCmdWriteProg,"WriteProg"},// 
315     {    KLCmdReadSysCfg,"ReadSysCfg"},// 
316     {    KLCmdWriteSysCfg,"WriteSysCfg"},// 
317
318     {    KLCmdSaveSysCfg,"SaveSysCfg"},// 
319 //        KLCmdReadRunStat,
320
321
322     {    KLCmdErrRply,"ErrRply"}//  = 0xEE,                //ERRORReply
323 };
324
325 typedef struct tagKLExtDataFrame
326 {
327     UCHAR Dst;
328     UCHAR nType;
329     UCHAR Len2;
330     UCHAR Data[1];
331 }*pKLExtDataFrame;
332
333
334 typedef union tagKLStatDef
335 {
336     UCHAR StatByte;
337     struct {
338         UCHAR nSEQ : 4;
339         UCHAR HasExt : 1;
340         UCHAR HasErr : 1;
341     };
342 }unKLStat, *pKLStat;
343
344 int m_nSeq = 0;
345 int m_nRSeq = 0;
346 unsigned char m_Dst;
347
348 //unsigned char m_Stat;
349
350 unKLStat m_Stat1 = { 0 };
351 unKLStat m_DstStat;
352 typedef struct tagKLReqPacketDef
353 {
354
355     UCHAR StartSign;
356     UCHAR DstAddr;
357     UCHAR Stat;
358     UCHAR Cmd;
359     UCHAR Type1;
360     UCHAR Params[1];
361 }stKLReqPacket, * pKLReqPacket;
362
363 typedef struct tagKLRplyPktHdr
364 {
365     unsigned char RplyStSgn;    //
366     unsigned char DstAddr;        //
367     unsigned char nStatus;        //
368     unsigned char nRplyCMD;        //
369     unsigned char nSize1;            //
370     unsigned char Datas[1];        //
371 }stKLRplyPktHdr, *pKLRplyPktHdr;
372
373 unsigned char m_Packetbuf[256];
374 unsigned char m_SendBuf[1024];
375 unsigned char m_RecvBuf[1024];
376 unsigned char m_DataBuf[1024];
377
378 typedef struct tagChnStat
379 {
380     unsigned int Stat;
381     unsigned int SendPackets;
382     unsigned int RecvPackets;
383     unsigned int LastSentTimeuS;
384     unsigned int LostPackets;
385     unsigned int CtnLstPkts;
386     unsigned int MaxCtnLstPkts;
387     unsigned int NotPkgErr;
388     unsigned int PkgLenErr;
389     unsigned int BCCErr;
390     unsigned int TimeOutErr;
391     unsigned int Delay;
392     unsigned int MaxDelay;
393     unsigned int SendTimeInterval;
394     union
395     {
396         unsigned int ClientDatas[10];
397         struct {
398             unsigned int ClientRecvPkts;    //
399             unsigned int ClientSendPkts;    //
400             unsigned int ClientNotPktErr;    //
401             unsigned int ClientMisIdPkts;    //
402             unsigned int ClientPkgLenErr;    //
403             unsigned int ClientBccErr;        //
404             unsigned int ClientTimeOutErr;    //
405         };
406     };
407 } stChnStat, * pChnStat;
408
409 struct tagMEM
410 {
411     union //tagWX
412     {
413         USHORT WX[64];
414         UCHAR WXB[128];
415         UINT WXD[32];
416     };
417     union //tagWY
418     {
419         USHORT WY[64];
420         UCHAR WYB[128];
421         UINT WYD[32];
422     };
423     union //tagDT
424     {
425         USHORT DT[256];
426         UCHAR DTB[512];
427         UINT DTD[128];
428     };
429     union //tagWR
430     {
431         USHORT WR[64];
432         UCHAR WRB[128];
433         UINT WRD[32];
434     };
435     union //tagSDT
436     {
437         UCHAR SDB[512];
438         USHORT SDT[256];
439         UINT SDD[128];
440         struct {
441             unsigned int EffJumperSW;
442             unsigned int CurJumperSW;
443             unsigned int haltick;
444             unsigned int RunStat;
445             unsigned int ErrStat;
446             unsigned int nTickCount;
447             unsigned int TotalRunTime;
448             unsigned int ThisRunTime;
449             unsigned int PwrOnCount;
450             unsigned int LastScanTime;
451             unsigned int ScanTimeuS;
452             unsigned int MinScanTimeuS;
453             unsigned int MaxScanTimeuS;
454             unsigned short ADCValues[20];
455         };
456     };
457 }MEM;
458
459 CString m_resultStr;
460
461 static int xtoi(const char * hexstr, int len = 0);
462 unsigned char KLBCC(void * pData, int nSize);
463
464 int CalCRC(void * pBuf, int nSize);
465
466 /*
467     连接状态
468     开始连接(未定)-> 心跳包正常->已连接 -> 心跳包连续正常 -> 连接很好
469
470     连接很好 -> 心跳包 失败 / 数据包失败 -> 已连接 (有错误) 
471
472     已连接 (有错误) -> 心跳包正常 -> 已连接 
473
474
475
476 */
477
478 int ParseReqPacket();
479 int MakeRplyPacket();
480
481 typedef int(*pSend)(void *, int);
482 typedef int(*pRecv)(void *, int);
483 typedef int(*pOpen)(int);
484 typedef int(*pClose)(int);
485
486 // pSend SendPkgFunc;
487 //  pRecv RecvPkgFunc;
488 //  pOpen OpenFunc;
489 //  pClose CloseFunc;
490
491 std::function<int (void *,int)> SendPkgFunc;
492 std::function<int(void *, int)> RecvPkgFunc;
493 std::function<int(int)> OpenFunc;
494 std::function<int(int)> CloseFunc;
495
496
497
498 int m_bSendCallBackSet = 0;
499 int m_bRecvCallBackSet = 0;
500 int m_bOpenCallBackSet = 0;
501 int m_bCloseCallBackSet = 0;
502
503 bool m_bOpened=false;
504
505 int SetSendCallBackFunc(std::function<int(void *, int)> pSendFunc);
506 int SetRecvCallBackFunc(std::function<int(void *, int)> pRecvFunc);
507 int SetOpenCallBackFunc(std::function<int(int)> pOpenFunc);
508 int SetCloseCallBackFunc(std::function<int(int)> pCloseFunc);
509
510 int m_nErrCount = 0;
511 int m_nContinueErrCount = 0;
512 int Open(int OpenParam=0)
513 {
514     if (m_bOpenCallBackSet)
515     {
516         OpenFunc(OpenParam);
517     }
518     m_bOpened = true;
519     return KL_OK;
520 };
521 int Close(int CloseParam=0)
522 {
523     if (m_bCloseCallBackSet)
524     {
525         CloseFunc(CloseParam);
526     }
527     m_bOpened = false;
528     return KL_OK;
529 };
530 int SendPacket(void * pBuf, int Len)
531 {
532     if (m_bOpened && m_bSendCallBackSet) return SendPkgFunc(pBuf, Len);
533     else return KL_ERR;
534 }
535
536 int RecvPacket(void * pBuf, int LenToRead, int ReTryCount=3)
537 {
538     
539     if (m_bOpened && m_bRecvCallBackSet)
540     {
541         int len2 = 0;
542         char * pBufByte = (char *)pBuf;
543         for (int i = 0; i < ReTryCount; i++)
544         {
545             int len1= RecvPkgFunc(pBufByte + len2, LenToRead - len2);
546             len2 += len1;
547             if (len2 >= LenToRead) break;
548         }
549         if (len2 >= LenToRead) {
550             m_nContinueErrCount = 0;
551             return len2;
552         }
553         else if (len2<=0) {
554             m_nErrCount++;
555             m_nContinueErrCount++;
556             if (m_nContinueErrCount > 10)
557             {
558             //    Close(-1);
559             }
560             return KL_ERR;
561         }
562         else {
563             return len2;
564         }
565     }
566     else
567     {
568         return KL_ERR;
569     }
570 }
571 int GetNextSeq();
572
573 int MakeExtDataFrame(void * pBuf, UCHAR nDst, UCHAR nType, UCHAR len2, void * pData);
574
575 //int MakeReqPacket(void * pBuf, UCHAR nDst, UCHAR Stat, UCHAR nCMD, UCHAR Type, USHORT nAddr = 0, USHORT nCount = 0, void * pData = NULL);
576
577 int MakeReqPacketEx(void * pBuf, UCHAR nDst, UCHAR Stat, UCHAR nCMD, UCHAR Type, USHORT nAddr = 0, USHORT nCount = 0, void * pData = NULL, int ExtFrameLen = 0, void * pExtDataFrame = NULL);
578
579 int CheckPackage(void * pBuf, int nSize);
580 int ProcessPacket(void *pBuf, int nLen);
581 int ParseRplyPacket(void *pBuf, int nPkgLen, UCHAR * nCmd, UCHAR * Status, USHORT* nCount, void * pData);
582
583 int GetInfo(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT * Values);
584 int GetSN(UCHAR nDst, int * nCount);
585 int GetUID(UCHAR nDst, int * nCount);
586 //int GetTime32(UCHAR nDst, int * nCount);
587 //int SetTime32(UCHAR nDst, int * nCount);
588 int GetDateTime32(UCHAR nDst, UINT * pValue);
589 int SetDateTime32(UCHAR nDst, UINT Value);
590
591
592 int GetEventLogCount(UCHAR nDst, int * nCount);
593 int GetEventLog(UCHAR nDst, int nStartIndex, int nCount , stEventLog * pEventLogs);
594
595
596 int ReadBit(UCHAR nDst, UCHAR nType,USHORT nBitAddr, UCHAR * Value);//Read 1 Single bit
597 int WriteBit(UCHAR nDst, UCHAR nType,USHORT nBitAddr, UCHAR Value);//Write 1 Single bit
598 int ReadBits(UCHAR nDst, UCHAR nBitCount, UCHAR nType, USHORT nBitAddr, UCHAR * Values);
599 int WriteBits(UCHAR nDst, UCHAR nBitCount, UCHAR nType, USHORT nBitAddr, UCHAR * Values);
600 int ReadBitsByWord(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT *Values);
601 int WriteBitsByWord(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT *Values);
602
603 int ReadDataByte(UCHAR nDst, UCHAR nByteCount, UCHAR nType, USHORT nByteAddr, UCHAR * Values);
604 int WriteDataByte(UCHAR nDst, UCHAR nByteCount, UCHAR nType, USHORT nByteAddr, UCHAR * Values);
605
606 int ReadDataWord(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT * Values);
607 int WriteDataWord(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT * Values);
608
609 int ReadData(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT * Values);
610 int WriteData(UCHAR nDst, UCHAR nWordCount, UCHAR nType, USHORT nWordAddr, USHORT * Values);
611
612 int GetMode(UCHAR nDst, UCHAR nType);
613 int ChangeMode(UCHAR nDst,  UCHAR nType);
614
615
616 int ReadProgram(UCHAR nDst, UCHAR nType, USHORT nWordAddr, UCHAR nWordCount, USHORT * Values);
617
618 int StartProgram(UCHAR nDst, UCHAR nType);
619 int WriteProgram(UCHAR nDst, UCHAR nType, USHORT nWordAddr, UCHAR nWordCount, USHORT * Values);
620 int FinishProgram(UCHAR nDst, UCHAR nType, USHORT nStepSize);
621
622 int ReadRunStat(UCHAR nDst, UCHAR nType, USHORT nWordAddr, UCHAR nWordCount, USHORT * Values);
623
624
625 };
626