APCSilcon.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /*************************************************
  2. /* Copyright (C), 2010-2011,StoneU. Co., Ltd.
  3. /* File name: APCSilcon.cpp
  4. /* Author: Zero.t
  5. /* Version: Ver1.0.0.1
  6. /* Date: 2011-10-19
  7. /* Description: ##
  8. /* Others: RS232;
  9. /* Function List: ###
  10. /* History:
  11. 1.Date: ###
  12. Author: ###
  13. Modification: ###
  14. *************************************************/
  15. #include "StdAfx.h"
  16. #include "CommProcess.h"
  17. #include ".\apcsilcon.h"
  18. APCSilcon::APCSilcon( char szPath[MAX_PATH], // 程序所在路径
  19. char szIniName[MAX_PATH], // 配置文件名称
  20. int nCommPort, // 串行端口
  21. int nAddr, // 设备地址
  22. int nRate, // 波特率
  23. int nDataBit, // 数据位
  24. int nStopBit, // 停止位
  25. int nParity, // 校验位
  26. int nInterval // 时间间隔
  27. )
  28. {
  29. #if IS_USE_READMSG_CS
  30. InitializeCriticalSection( &m_csReadMsg ); //初始化一个临界资源对象
  31. #endif
  32. MTVERIFY( m_hSemComm = CreateEvent( NULL, TRUE, TRUE, 0 ) ); //CreateEvent()创建或打开一个命名的或无名的事件对象
  33. memset(m_szSSTMsg, 0, sizeof(m_szSSTMsg));
  34. m_devOnline = TRUE;
  35. m_dwOnlineTick = 0;
  36. bSendSST = FALSE;
  37. }
  38. APCSilcon::~APCSilcon()
  39. {
  40. #if IS_USE_READMSG_CS
  41. DeleteCriticalSection( &m_csReadMsg );
  42. #endif
  43. MTVERIFY( CloseHandle( m_hSemComm ) );
  44. CloseComm();
  45. }
  46. BOOL APCSilcon::APCOpenComm(int nCommPort, int nAddr, int nRate, int nDataBit, int nStopBit, int nParity, int nInterval)
  47. {
  48. BOOL bResult = FALSE;
  49. bResult = OpenComm( nCommPort, nAddr, nRate, nDataBit, nStopBit, nParity, nInterval );
  50. return bResult;
  51. }
  52. int APCSilcon::SendReadRequest(
  53. char szPath[MAX_PATH],
  54. char szIniName[MAX_PATH],
  55. int nCommPort,
  56. int nAddr,
  57. char szCmd[MAX_CMD],
  58. char szMsg[VAR_MSG],
  59. int nReversed1,
  60. int nReversed2,
  61. int nReversed3,
  62. int nReversed4,
  63. int nReversed5,
  64. float fReversed1,
  65. float fReversed2,
  66. float fReversed3,
  67. char szReversed1[MAX_RESERVED1],
  68. char szReversed2[MAX_RESERVED2],
  69. char szReversed3[MAX_RESERVED3],
  70. char szReversed4[MAX_RESERVED4],
  71. char szReversed5[MAX_RESERVED5]
  72. )
  73. {
  74. int nIndex = 0, nLen = 0;
  75. char szSendMsg[MAX_SEND_MSG] = {0};
  76. char szType[TYPE_LENGTH] = {0};
  77. GetIniInfo(szPath, szIniName, szCmd,szSendMsg, szType, nIndex, nLen);
  78. CCommProcess *pComm = FindComm(nCommPort);
  79. if( pComm == NULL ) return -1;
  80. int nRet = -1;
  81. if (
  82. (strlen(m_szSSTMsg) ==0 &&
  83. (
  84. strcmp(szCmd, "cmd-1") == 0 || strcmp(szCmd, "cmd-2") == 0 || strcmp(szCmd, "cmd-3") == 0 ||
  85. strcmp(szCmd, "cmd-4") == 0 || strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-5") == 0 ||
  86. strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-7") == 0 || strcmp(szCmd, "cmd-8") == 0 ||
  87. strcmp(szCmd, "cmd-9") == 0 || strcmp(szCmd, "cmd-10") == 0 || strcmp(szCmd, "cmd-11") == 0 ||
  88. strcmp(szCmd, "cmd-12") == 0 || strcmp(szCmd, "cmd-13") == 0 || strcmp(szCmd, "cmd-14") == 0 ||
  89. strcmp(szCmd, "cmd-15") == 0 || strcmp(szCmd, "cmd-16") == 0 || strcmp(szCmd, "cmd-17") == 0 ||
  90. strcmp(szCmd,"cmd-18") == 0 || strcmp(szCmd,"cmd-19") == 0 || strcmp(szCmd,"cmd-20") == 0 ||
  91. strcmp(szCmd,"cmd-21") == 0 || strcmp(szCmd,"cmd-22") == 0 || strcmp(szCmd,"cmd-23") == 0 ||
  92. strcmp(szCmd,"cmd-24") == 0 || strcmp(szCmd,"cmd-25") == 0 || strcmp(szCmd,"cmd-26") == 0 ||
  93. strcmp(szCmd,"cmd-27") == 0 || strcmp(szCmd,"cmd-28") == 0 || strcmp(szCmd,"cmd-29") == 0 ||
  94. strcmp(szCmd,"cmd-30") == 0 || strcmp(szCmd,"cmd-31") == 0 || strcmp(szCmd,"cmd-32") == 0 ||
  95. strcmp(szCmd,"cmd-33") == 0 || strcmp(szCmd,"cmd-34") == 0 || strcmp(szCmd,"cmd-35") == 0 ||
  96. strcmp(szCmd,"cmd-36") == 0 || strcmp(szCmd,"cmd-37") == 0 || strcmp(szCmd,"cmd-38") == 0 ||
  97. strcmp(szCmd,"cmd-39") == 0 || strcmp(szCmd,"cmd-40") == 0 || strcmp(szCmd,"cmd-41") == 0 ||
  98. strcmp(szCmd,"cmd-42") == 0 || strcmp(szCmd,"cmd-43") == 0 || strcmp(szCmd,"cmd-44") == 0
  99. ) )
  100. ||
  101. strcmp(szCmd, "cmd-1") == 0
  102. )
  103. {
  104. nRet = GetDeviceParam( nAddr,pComm, szSendMsg, szCmd, szMsg, nIndex, nLen, szType );
  105. if( nRet != 0 ) return nRet;
  106. }
  107. if( GetTickCount() - m_dwOnlineTick > 60 *1000 && m_dwOnlineTick > 0 ){
  108. m_devOnline = FALSE;
  109. }
  110. else if( GetTickCount() - m_dwOnlineTick < 60 *1000 && m_dwOnlineTick > 0 ){
  111. m_devOnline = TRUE;
  112. }
  113. if( m_devOnline == FALSE ){
  114. return -1;
  115. }
  116. nRet = GetSSTVarMsg(szCmd, szMsg, nIndex, nLen, szType);
  117. LOG4C((LOG_NOTICE, "%s=%d, return %d", szCmd, atoi(szMsg), nRet));
  118. return nRet;
  119. }
  120. int APCSilcon::_SendSSTbyFirst(int nAddr,CCommProcess *pComm)
  121. {
  122. int nRet = 0;
  123. /************************************************************************/
  124. /* SendMsg */
  125. /************************************************************************/
  126. char SendPart[9] = {0};
  127. SendPart[0] = 0x31;
  128. SendPart[1] = 0x05;
  129. SendPart[2] = 0x01;
  130. SendPart[3] = 0x53;
  131. SendPart[4] = 0x53;
  132. SendPart[5] = 0x54;
  133. SendPart[6] = 0x02;
  134. SendPart[7] = 0x03;
  135. SendPart[8] = 0x54;
  136. //WaitForSingObject();等待有信号;
  137. if( WaitForSingleObject( m_hSemComm, 0 ) == WAIT_OBJECT_0 ) {
  138. //ResetEvent()设置无信号状态
  139. ResetEvent( m_hSemComm );
  140. int nResult = pComm->Write((BYTE *)&SendPart, 9);
  141. if( nResult != 9 ) {
  142. //SetEvent设置有信号;
  143. SetEvent( m_hSemComm );
  144. //返回 错误值;
  145. return EER_CODE_APC_COM_REGNUM;
  146. }
  147. }
  148. else{
  149. //如果m_hSemCom无信号,返回错误;
  150. return ERR_CODE_APC_COM_BUSY;
  151. }
  152. /************************************************************************/
  153. /* ReadMsg */
  154. /************************************************************************/
  155. #if 0
  156. char RecviPart[5] = {0};
  157. int nReadLen = 0;
  158. nReadLen = pComm->Read((BYTE *)RecviPart, 5);
  159. if( nReadLen != 5){
  160. // 错误数据
  161. SetEvent( m_hSemComm );
  162. return ERR_CODE_APC_COM_READ_NO_DATA;
  163. }
  164. m_dwOnlineTick = GetTickCount();
  165. SetEvent( m_hSemComm );
  166. #endif
  167. return nRet;
  168. }
  169. int APCSilcon::GetDeviceParam(
  170. int nAddr,
  171. CCommProcess *pComm, //串口对象指针
  172. char szSendMsg[MAX_SEND_MSG], //发送Buffer
  173. char szCmd[MAX_CMD], // 命令
  174. char szRecvMsg[VAR_MSG], // 接收Buffer
  175. int &nIndex, // 变量索引,针对接收Buffer而言
  176. int &nLen, // 变量长度
  177. char szType[TYPE_LENGTH]) // 变量数据类型
  178. {
  179. int nRet = -1;
  180. #if DEBUG_APC
  181. nRet = _SendSSTbyFirst(nAddr,pComm);
  182. SetEvent( m_hSemComm );
  183. if (nRet != 0) {
  184. return nRet;
  185. }
  186. #endif
  187. nRet = RequestReadStatus(nAddr,pComm, szSendMsg);
  188. if( nRet != 0 ){
  189. return nRet; // 串口忙
  190. }
  191. nRet = ResponseReadStatus(pComm, szCmd, szRecvMsg, nIndex, nLen, szType);
  192. return nRet;
  193. }
  194. int APCSilcon::GetSSTVarMsg(char szCmd[MAX_CMD], char szRecvMsg[VAR_MSG], int &nIndex, int &nLen, char szType[TYPE_LENGTH])
  195. {
  196. int nRet = 0;
  197. if( strcmp(szCmd, "cmd-1") == 0 || strcmp(szCmd, "cmd-2") == 0 || strcmp(szCmd, "cmd-3") == 0 ||
  198. strcmp(szCmd, "cmd-4") == 0 || strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-5") == 0 ||
  199. strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-7") == 0 || strcmp(szCmd, "cmd-8") == 0 ||
  200. strcmp(szCmd, "cmd-9") == 0 || strcmp(szCmd, "cmd-10") == 0 || strcmp(szCmd, "cmd-11") == 0 ||
  201. strcmp(szCmd, "cmd-12") == 0 || strcmp(szCmd, "cmd-13") == 0 || strcmp(szCmd, "cmd-14") == 0 ||
  202. strcmp(szCmd, "cmd-15") == 0 || strcmp(szCmd, "cmd-16") == 0 || strcmp(szCmd, "cmd-17") == 0 ||
  203. strcmp(szCmd,"cmd-18") == 0 || strcmp(szCmd,"cmd-19") == 0 || strcmp(szCmd,"cmd-20") == 0 ||
  204. strcmp(szCmd,"cmd-21") == 0 || strcmp(szCmd,"cmd-22") == 0 || strcmp(szCmd,"cmd-23") == 0 ||
  205. strcmp(szCmd,"cmd-24") == 0 || strcmp(szCmd,"cmd-25") == 0 || strcmp(szCmd,"cmd-26") == 0 ||
  206. strcmp(szCmd,"cmd-27") == 0 || strcmp(szCmd,"cmd-28") == 0 || strcmp(szCmd,"cmd-29") == 0 ||
  207. strcmp(szCmd,"cmd-30") == 0 || strcmp(szCmd,"cmd-31") == 0 || strcmp(szCmd,"cmd-32") == 0 ||
  208. strcmp(szCmd,"cmd-33") == 0 || strcmp(szCmd,"cmd-34") == 0 || strcmp(szCmd,"cmd-35") == 0 ||
  209. strcmp(szCmd,"cmd-36") == 0 || strcmp(szCmd,"cmd-37") == 0 || strcmp(szCmd,"cmd-38") == 0 ||
  210. strcmp(szCmd,"cmd-39") == 0 || strcmp(szCmd,"cmd-40") == 0 || strcmp(szCmd,"cmd-41") == 0 ||
  211. strcmp(szCmd,"cmd-42") == 0 || strcmp(szCmd,"cmd-43") == 0 || strcmp(szCmd,"cmd-44") == 0
  212. ){
  213. #if IS_USE_READMSG_CS
  214. EnterCriticalSection( &m_csReadMsg );
  215. #endif
  216. DataConversion(szType, m_szSSTMsg + nIndex, szRecvMsg, nLen,0,0 );
  217. #if IS_USE_READMSG_CS
  218. LeaveCriticalSection(&m_csReadMsg);
  219. #endif
  220. nRet = 0;
  221. }
  222. return nRet;
  223. }
  224. int APCSilcon::ResponseReadStatus( CCommProcess *pComm,
  225. char szCmd[MAX_CMD],
  226. char szRecvMsg[VAR_MSG],
  227. int &nIndex,
  228. int &nLen,
  229. char szType[TYPE_LENGTH] )
  230. {
  231. #if DEBUG_APC
  232. int nReceiveLen = 300;
  233. char *pBuffer = new char[ nReceiveLen ];
  234. memset(pBuffer, 0, nLen);
  235. int nReadLen = 0;
  236. nReadLen = pComm->Read((BYTE *)pBuffer, nReceiveLen);
  237. if( nReadLen <= 0){
  238. // 串口没有读到数据
  239. TRACE("串口没有读到数据!\r\n");
  240. SetEvent( m_hSemComm );
  241. if( pBuffer != NULL)
  242. {
  243. delete[] pBuffer;
  244. pBuffer = NULL;
  245. }
  246. return ERR_CODE_APC_COM_READ_NO_DATA;
  247. }
  248. SetSSTVarMsg( szCmd, pBuffer);
  249. m_dwOnlineTick = GetTickCount();
  250. SetEvent( m_hSemComm );
  251. if( pBuffer != NULL){
  252. delete[] pBuffer;
  253. pBuffer = NULL;
  254. }
  255. #else
  256. SimulationCommData();
  257. #endif
  258. return 0;
  259. }
  260. int APCSilcon::RequestReadStatus(int nAddr,CCommProcess *pComm,char chSendMsg[MAX_SEND_MSG])
  261. {
  262. #if DEBUG_APC
  263. char SendPart[2] = {0};
  264. SendPart[0] = 0x30;
  265. SendPart[1] = 0x05;
  266. //WaitForSingObject();等待有信号;
  267. if( WaitForSingleObject( m_hSemComm, 0 ) == WAIT_OBJECT_0 ) // 有信号才写串口
  268. {
  269. //ResetEvent()设置无信号状态
  270. ResetEvent( m_hSemComm );
  271. int nResult = pComm->Write((BYTE *)SendPart, 2);
  272. if( nResult != 2 )
  273. {
  274. //SetEvent设置有信号;
  275. SetEvent( m_hSemComm );
  276. //返回 错误值;
  277. return EER_CODE_APC_COM_REGNUM;
  278. }
  279. }
  280. else
  281. {
  282. //如果m_hSemCom无信号,返回错误;
  283. return ERR_CODE_APC_COM_BUSY;
  284. }
  285. #endif
  286. return 0;
  287. }
  288. void APCSilcon::SetSSTVarMsg(char szCmd[MAX_CMD], char *pBuff)
  289. {
  290. if( strcmp(szCmd, "cmd-1") == 0 || strcmp(szCmd, "cmd-2") == 0 || strcmp(szCmd, "cmd-3") == 0 ||
  291. strcmp(szCmd, "cmd-4") == 0 || strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-5") == 0 ||
  292. strcmp(szCmd, "cmd-6") == 0 || strcmp(szCmd, "cmd-7") == 0 || strcmp(szCmd, "cmd-8") == 0 ||
  293. strcmp(szCmd, "cmd-9") == 0 || strcmp(szCmd, "cmd-10") == 0 || strcmp(szCmd, "cmd-11") == 0 ||
  294. strcmp(szCmd, "cmd-12") == 0 || strcmp(szCmd, "cmd-13") == 0 || strcmp(szCmd, "cmd-14") == 0 ||
  295. strcmp(szCmd, "cmd-15") == 0 || strcmp(szCmd, "cmd-16") == 0 || strcmp(szCmd, "cmd-17") == 0 ||
  296. strcmp(szCmd,"cmd-18") == 0 || strcmp(szCmd,"cmd-19") == 0 || strcmp(szCmd,"cmd-20") == 0 ||
  297. strcmp(szCmd,"cmd-21") == 0 || strcmp(szCmd,"cmd-22") == 0 || strcmp(szCmd,"cmd-23") == 0 ||
  298. strcmp(szCmd,"cmd-24") == 0 || strcmp(szCmd,"cmd-25") == 0 || strcmp(szCmd,"cmd-26") == 0 ||
  299. strcmp(szCmd,"cmd-27") == 0 || strcmp(szCmd,"cmd-28") == 0 || strcmp(szCmd,"cmd-29") == 0 ||
  300. strcmp(szCmd,"cmd-30") == 0 || strcmp(szCmd,"cmd-31") == 0 || strcmp(szCmd,"cmd-32") == 0 ||
  301. strcmp(szCmd,"cmd-33") == 0 || strcmp(szCmd,"cmd-34") == 0 || strcmp(szCmd,"cmd-35") == 0 ||
  302. strcmp(szCmd,"cmd-36") == 0 || strcmp(szCmd,"cmd-37") == 0 || strcmp(szCmd,"cmd-38") == 0 ||
  303. strcmp(szCmd,"cmd-39") == 0 || strcmp(szCmd,"cmd-40") == 0 || strcmp(szCmd,"cmd-41") == 0 ||
  304. strcmp(szCmd,"cmd-42") == 0 || strcmp(szCmd,"cmd-43") == 0 || strcmp(szCmd,"cmd-44") == 0
  305. ){
  306. #if IS_USE_READMSG_CS
  307. EnterCriticalSection( &m_csReadMsg );
  308. #endif
  309. memcpy(m_szSSTMsg, &pBuff[5], sizeof(m_szSSTMsg));
  310. #if IS_USE_READMSG_CS
  311. LeaveCriticalSection(&m_csReadMsg);
  312. #endif
  313. }
  314. }
  315. int APCSilcon::GetIniInfo(
  316. char szPath[MAX_PATH], //服务器程序所在目录
  317. char szIniName[MAX_PATH], //配置文件名
  318. char szCmd[MAX_CMD], //命令
  319. char szSendMsg[MAX_CMD], //发送Buffer
  320. char nType[MAX_CMD],
  321. int &nIndex,
  322. int &nLen
  323. )
  324. {
  325. CHAR szFile[MAX_PATH + 1] = "";
  326. wsprintf(szFile, "%s\\config\\%s", szPath, szIniName);
  327. GetPrivateProfileString(szCmd, "SendCmd", "", szSendMsg, 10, szFile);
  328. szSendMsg[strlen(szSendMsg)] = '\0';
  329. GetPrivateProfileString(szCmd, "type", "", nType, 10, szFile);
  330. nType[strlen(nType)] = '\0';
  331. nIndex = GetPrivateProfileInt(szCmd, "Index", 0, szFile);
  332. nLen = GetPrivateProfileInt(szCmd, "Len", 0, szFile);
  333. return 0;
  334. }
  335. void APCSilcon::SimulationCommData(void)
  336. {
  337. m_szSSTMsg[0] = 0x01;
  338. m_szSSTMsg[1] =0x53;
  339. m_szSSTMsg[2] =0x53;
  340. m_szSSTMsg[3] =0x54;
  341. m_szSSTMsg[4] =0x02;
  342. m_szSSTMsg[5] =0x20;
  343. m_szSSTMsg[6] =0x33;
  344. m_szSSTMsg[7] =0x39;
  345. m_szSSTMsg[8] =0x34;
  346. m_szSSTMsg[9] =0x20;
  347. m_szSSTMsg[10] =0x33;
  348. m_szSSTMsg[11] =0x39;
  349. m_szSSTMsg[12] =0x32;
  350. m_szSSTMsg[13] =0x20;
  351. m_szSSTMsg[14] =0x33;
  352. m_szSSTMsg[15] =0x39;
  353. m_szSSTMsg[16] =0x33;
  354. m_szSSTMsg[17] =0x20;
  355. m_szSSTMsg[18] =0x34;
  356. m_szSSTMsg[19] =0x31;
  357. m_szSSTMsg[20] =0x32;
  358. m_szSSTMsg[21] =0x20;
  359. m_szSSTMsg[22] =0x34;
  360. m_szSSTMsg[23] =0x31;
  361. m_szSSTMsg[24] =0x33;
  362. m_szSSTMsg[25] =0x20;
  363. m_szSSTMsg[26] =0x34;
  364. m_szSSTMsg[27] =0x31;
  365. m_szSSTMsg[28] =0x30;
  366. m_szSSTMsg[29] =0x20;
  367. m_szSSTMsg[30] =0x34;
  368. m_szSSTMsg[31] =0x31;
  369. m_szSSTMsg[32] =0x32;
  370. m_szSSTMsg[33] =0x20;
  371. m_szSSTMsg[34] =0x34;
  372. m_szSSTMsg[35] =0x31;
  373. m_szSSTMsg[36] =0x33;
  374. m_szSSTMsg[37] =0x20;
  375. m_szSSTMsg[38] =0x34;
  376. m_szSSTMsg[39] =0x31;
  377. m_szSSTMsg[40] =0x30;
  378. m_szSSTMsg[41] =0x20;
  379. m_szSSTMsg[42] =0x20;
  380. m_szSSTMsg[43] =0x20;
  381. m_szSSTMsg[44] =0x36;
  382. m_szSSTMsg[45] =0x20;
  383. m_szSSTMsg[46] =0x20;
  384. m_szSSTMsg[47] =0x20;
  385. m_szSSTMsg[48] =0x37;
  386. m_szSSTMsg[49] =0x20;
  387. m_szSSTMsg[50] =0x20;
  388. m_szSSTMsg[51] =0x20;
  389. m_szSSTMsg[52] =0x38;
  390. m_szSSTMsg[53] =0x20;
  391. m_szSSTMsg[54] =0x20;
  392. m_szSSTMsg[55] =0x20;
  393. m_szSSTMsg[56] =0x32;
  394. m_szSSTMsg[57] =0x20;
  395. m_szSSTMsg[58] =0x20;
  396. m_szSSTMsg[59] =0x20;
  397. m_szSSTMsg[60] =0x34;
  398. m_szSSTMsg[61] =0x20;
  399. m_szSSTMsg[62] =0x20;
  400. m_szSSTMsg[63] =0x20;
  401. m_szSSTMsg[64] =0x36;
  402. m_szSSTMsg[65] =0x20;
  403. m_szSSTMsg[66] =0x20;
  404. m_szSSTMsg[67] =0x20;
  405. m_szSSTMsg[68] =0x36;
  406. m_szSSTMsg[69] =0x20;
  407. m_szSSTMsg[70] =0x20;
  408. m_szSSTMsg[71] =0x20;
  409. m_szSSTMsg[72] =0x37;
  410. m_szSSTMsg[73] =0x20;
  411. m_szSSTMsg[74] =0x20;
  412. m_szSSTMsg[75] =0x31;
  413. m_szSSTMsg[76] =0x30;
  414. m_szSSTMsg[77] =0x20;
  415. m_szSSTMsg[78] =0x20;
  416. m_szSSTMsg[79] =0x20;
  417. m_szSSTMsg[80] =0x20;
  418. m_szSSTMsg[81] =0x2B;
  419. m_szSSTMsg[82] =0x20;
  420. m_szSSTMsg[83] =0x20;
  421. m_szSSTMsg[84] =0x31;
  422. m_szSSTMsg[85] =0x20;
  423. m_szSSTMsg[86] =0x20;
  424. m_szSSTMsg[87] =0x20;
  425. m_szSSTMsg[88] =0x20;
  426. m_szSSTMsg[89] =0x20;
  427. m_szSSTMsg[90] =0x20;
  428. m_szSSTMsg[91] =0x20;
  429. m_szSSTMsg[92] =0x32;
  430. m_szSSTMsg[93] =0x20;
  431. m_szSSTMsg[94] =0x20;
  432. m_szSSTMsg[95] =0x20;
  433. m_szSSTMsg[96] =0x31;
  434. m_szSSTMsg[97] =0x30;
  435. m_szSSTMsg[98] =0x30;
  436. m_szSSTMsg[99] =0x30;
  437. m_szSSTMsg[100] =0x30;
  438. m_szSSTMsg[101] =0x30;
  439. m_szSSTMsg[102] =0x30;
  440. m_szSSTMsg[103] =0x30;
  441. m_szSSTMsg[104] =0x30;
  442. m_szSSTMsg[105] =0x30;
  443. m_szSSTMsg[106] =0x30;
  444. m_szSSTMsg[107] =0x30;
  445. m_szSSTMsg[108] =0x30;
  446. m_szSSTMsg[109] =0x20;
  447. m_szSSTMsg[110] =0x20;
  448. m_szSSTMsg[111] =0x39;
  449. m_szSSTMsg[112] =0x39;
  450. m_szSSTMsg[113] =0x20;
  451. m_szSSTMsg[114] =0x34;
  452. m_szSSTMsg[115] =0x33;
  453. m_szSSTMsg[116] =0x36;
  454. m_szSSTMsg[117] =0x20;
  455. m_szSSTMsg[118] =0x34;
  456. m_szSSTMsg[119] =0x33;
  457. m_szSSTMsg[120] =0x37;
  458. m_szSSTMsg[121] =0x20;
  459. m_szSSTMsg[122] =0x20;
  460. m_szSSTMsg[123] =0x32;
  461. m_szSSTMsg[124] =0x37;
  462. m_szSSTMsg[125] =0x20;
  463. m_szSSTMsg[126] =0x20;
  464. m_szSSTMsg[127] =0x20;
  465. m_szSSTMsg[128] =0x30;
  466. m_szSSTMsg[129] =0x20;
  467. m_szSSTMsg[130] =0x20;
  468. m_szSSTMsg[131] =0x20;
  469. m_szSSTMsg[132] =0x30;
  470. m_szSSTMsg[133] =0x20;
  471. m_szSSTMsg[134] =0x20;
  472. m_szSSTMsg[135] =0x20;
  473. m_szSSTMsg[136] =0x20;
  474. m_szSSTMsg[137] =0x20;
  475. m_szSSTMsg[138] =0x20;
  476. m_szSSTMsg[139] =0x20;
  477. m_szSSTMsg[140] =0x20;
  478. m_szSSTMsg[141] =0x20;
  479. m_szSSTMsg[142] =0x32;
  480. m_szSSTMsg[143] =0x30;
  481. m_szSSTMsg[144] =0x32;
  482. m_szSSTMsg[145] =0x20;
  483. m_szSSTMsg[146] =0x20;
  484. m_szSSTMsg[147] =0x20;
  485. m_szSSTMsg[148] =0x20;
  486. m_szSSTMsg[149] =0x20;
  487. m_szSSTMsg[150] =0x20;
  488. m_szSSTMsg[151] =0x20;
  489. m_szSSTMsg[152] =0x20;
  490. m_szSSTMsg[153] =0x20;
  491. m_szSSTMsg[154] =0x20;
  492. m_szSSTMsg[155] =0x35;
  493. m_szSSTMsg[156] =0x30;
  494. m_szSSTMsg[157] =0x20;
  495. m_szSSTMsg[158] =0x20;
  496. m_szSSTMsg[159] =0x20;
  497. m_szSSTMsg[160] =0x20;
  498. m_szSSTMsg[161] =0x20;
  499. m_szSSTMsg[162] =0x20;
  500. m_szSSTMsg[163] =0x20;
  501. m_szSSTMsg[164] =0x35;
  502. m_szSSTMsg[165] =0x2E;
  503. m_szSSTMsg[166] =0x2F;
  504. m_szSSTMsg[167] =0x2E;
  505. m_szSSTMsg[168] =0x30;
  506. m_szSSTMsg[169] =0x20;
  507. m_szSSTMsg[170] =0x20;
  508. m_szSSTMsg[171] =0x20;
  509. m_szSSTMsg[172] =0x20;
  510. m_szSSTMsg[173] =0x30;
  511. m_szSSTMsg[174] =0x30;
  512. m_szSSTMsg[175] =0x30;
  513. m_szSSTMsg[176] =0x30;
  514. m_szSSTMsg[177] =0x30;
  515. m_szSSTMsg[178] =0x30;
  516. m_szSSTMsg[179] =0x30;
  517. m_szSSTMsg[180] =0x30;
  518. m_szSSTMsg[181] =0x37;
  519. m_szSSTMsg[182] =0x30;
  520. m_szSSTMsg[183] =0x30;
  521. m_szSSTMsg[184] =0x30;
  522. m_szSSTMsg[185] =0x30;
  523. m_szSSTMsg[186] =0x30;
  524. m_szSSTMsg[187] =0x30;
  525. m_szSSTMsg[188] =0x30;
  526. m_szSSTMsg[189] =0x30;
  527. m_szSSTMsg[190] =0x30;
  528. m_szSSTMsg[191] =0x30;
  529. m_szSSTMsg[192] =0x30;
  530. m_szSSTMsg[193] =0x30;
  531. m_szSSTMsg[194] =0x30;
  532. m_szSSTMsg[195] =0x30;
  533. m_szSSTMsg[196] =0x30;
  534. m_szSSTMsg[197] =0x30;
  535. m_szSSTMsg[198] =0x30;
  536. m_szSSTMsg[199] =0x03;
  537. m_szSSTMsg[200] =0x47;
  538. char pBuffer[201] = {0};
  539. memcpy(pBuffer,m_szSSTMsg,201);
  540. memcpy(m_szSSTMsg,&pBuffer[6],201);
  541. }