Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1320700
  • 博文数量: 179
  • 博客积分: 4141
  • 博客等级: 中将
  • 技术积分: 2083
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-21 20:04
文章存档

2024年(1)

2019年(13)

2016年(1)

2014年(16)

2011年(8)

2010年(25)

2009年(115)

分类: C/C++

2014-10-07 18:33:56

该测试代码借助了C/C++宏定义的技巧,用了500行左右的代码,生成了1024个测试用例。同时借助测试工具的自动化功能,可以在无人在场的情况进行自动化测试。
该测试场景的测试,需要2~3天。

点击(此处)折叠或打开

  1. #pragma once

  2. namespace IMIX
  3. {
  4.     class IMIXApplication;
  5. }

  6. #define SEQ_PERSIST 0x00000001
  7. #define SEQ_SEQCHECK 0x00000002
  8. #define SEQ_RESETONLOGON 0x00000004
  9. #define SEQ_RESETONLOGOUT 0x00000008
  10. #define SEQ_RESETONDISCONNECT 0x00000010
  11. #define SEQ_REFRESHONLOGON 0x00000020

  12. class CIMIXSeqInfo
  13. {
  14. public:
  15.     int m_seqtype;
  16.     
  17. public:
  18.     CIMIXSeqInfo()
  19.     {
  20.         m_seqtype = 0;
  21.     }

  22.     void Clear()
  23.     {
  24.         m_seqtype = 0;
  25.     }

  26. #define SEQINFOMEMFUNC(name, type, configname) \
  27.     void Set##name() { m_seqtype = SetFlags(m_seqtype, type); }; \
  28.     void Clr##name() { m_seqtype = ClrFlags(m_seqtype, type); }; \
  29.     void name(int index) \
  30.     { \
  31.         if (IsFlags(m_seqtype, type)) \
  32.             CONFIGSETFIELD(index, configname, "Y") \
  33.         else \
  34.             CONFIGSETFIELD(index, configname, "N") \
  35.     }

  36.     SEQINFOMEMFUNC(Persist, SEQ_PERSIST, TEST_ConfigField_PersistMessages)
  37.     SEQINFOMEMFUNC(IsCheckSeqNum, SEQ_SEQCHECK, TEST_ConfigField_IsCheckSeqNum)
  38.     SEQINFOMEMFUNC(ResetOnLogon, SEQ_RESETONLOGON, TEST_ConfigField_ResetOnLogon)
  39.     SEQINFOMEMFUNC(ResetOnLogout, SEQ_RESETONLOGOUT, TEST_ConfigField_ResetOnLogout)
  40.     SEQINFOMEMFUNC(ResetOnDisconnect, SEQ_RESETONDISCONNECT, TEST_ConfigField_ResetOnDisconnect)
  41.     SEQINFOMEMFUNC(RefreshOnLogon, SEQ_REFRESHONLOGON, TEST_ConfigField_RefreshOnLogon)

  42.     void SeqPersistInit(int index)
  43.     {
  44.         Persist(index);
  45.         IsCheckSeqNum(index);
  46.         ResetOnLogon(index);
  47.         ResetOnLogout(index);
  48.         ResetOnDisconnect(index);
  49.         RefreshOnLogon(index);
  50.     }

  51. };

  52. class CIMIXSeqCase:public CIMIXTestCaseObject
  53. {
  54. public:
  55.     ~CIMIXSeqCase();

  56. private: // π?π≤∫? ?
  57.     CIMIXSeqCase();

  58.     static CMUTEX m_mutex;
  59.     CTerminalConfig m_terminalConfig;

  60. public:
  61.     static CTestObject *m_hinstance;
  62.     static CTestObject* GetInstance();

  63. public: // ≤? ‘”√??
  64.     TestCaseDeclaration

  65.     int GetInitiatorId(int id);
  66.     int GetAcceptorId(int id);
  67.     void RunInitiatorTest(int type, IMIX::IMIXApplication *pApp, CApiOp *pApiOp );
  68.     void RunAcceptorTest(int type, IMIX::IMIXApplication *pApp, CApiOp *pApiOp );

  69.     /*************************************************************************************************/

  70.     void CreateConfigFile(int usertype, char *protocol, CIMIXSeqInfo *seqinfo, string m_configpath);

  71. #define SEQMEMFUNCDEC1(field) \
  72.     int SeqCase_##field(char *protocol, BOOL svrseqcheck, BOOL clientseqcheck, \
  73.     BOOL svrpersist, BOOL clientpersist, BOOL svrfield, BOOL clientfield, BOOL isclient);

  74. SEQMEMFUNCDEC1(ResetOnLogon)
  75. SEQMEMFUNCDEC1(ResetOnLogout)
  76. SEQMEMFUNCDEC1(ResetOnDisconnect)
  77. SEQMEMFUNCDEC1(RefreshOnLogon)

  78. #define SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, fn_persist) \
  79.     int protocol##_SeqCase_##field##YY_##subffix##_##fn_seqcheck##_##fn_persist(); \
  80.     int protocol##_SeqCase_##field##NY_##subffix##_##fn_seqcheck##_##fn_persist(); \
  81.     int protocol##_SeqCase_##field##YN_##subffix##_##fn_seqcheck##_##fn_persist(); \
  82.     int protocol##_SeqCase_##field##NN_##subffix##_##fn_seqcheck##_##fn_persist();
  83.     
  84. #define SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, fn_seqcheck) \
  85.     SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, PersistYY) \
  86.     SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, PersistNY) \
  87.     SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, PersistYN) \
  88.     SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, PersistNN)

  89. /*#define SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, fn_seqcheck) \
  90.     SEQMEMFUNCDEC_SEQCHECK_PERISIT(protocol, field, subffix, fn_seqcheck, PersistNN)*/

  91. #define SEQMEMFUNCDEC(protocol, field, subffix) \
  92.     SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, SeqcheckYY) \
  93.     SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, SeqcheckNY) \
  94.     SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, SeqcheckYN) \
  95.     SEQMEMFUNCDEC_SEQCHECK(protocol, field, subffix, SeqcheckNN)

  96. public:
  97.     int SeqCase_CommonTest(char *protocol, CIMIXSeqInfo *svrinfo, CIMIXSeqInfo *clientinfo, int IsClient);

  98.     SEQMEMFUNCDEC(IMIXFast, ResetOnLogon, ClientStop)
  99.     SEQMEMFUNCDEC(IMIXFast, ResetOnLogout, ClientStop)
  100.     SEQMEMFUNCDEC(IMIXFast, ResetOnDisconnect, ClientStop)
  101.     SEQMEMFUNCDEC(IMIXFast, RefreshOnLogon, ClientStop)

  102.     SEQMEMFUNCDEC(IMIXFast, ResetOnLogon, SvrStop)
  103.     SEQMEMFUNCDEC(IMIXFast, ResetOnLogout, SvrStop)
  104.     SEQMEMFUNCDEC(IMIXFast, ResetOnDisconnect, SvrStop)
  105.     SEQMEMFUNCDEC(IMIXFast, RefreshOnLogon, SvrStop)

  106.     SEQMEMFUNCDEC(IMIXNormal, ResetOnLogon, ClientStop)
  107.     SEQMEMFUNCDEC(IMIXNormal, ResetOnLogout, ClientStop)
  108.     SEQMEMFUNCDEC(IMIXNormal, ResetOnDisconnect, ClientStop)
  109.     SEQMEMFUNCDEC(IMIXNormal, RefreshOnLogon, ClientStop)

  110.     SEQMEMFUNCDEC(IMIXNormal, ResetOnLogon, SvrStop)
  111.     SEQMEMFUNCDEC(IMIXNormal, ResetOnLogout, SvrStop)
  112.     SEQMEMFUNCDEC(IMIXNormal, ResetOnDisconnect, SvrStop)
  113.     SEQMEMFUNCDEC(IMIXNormal, RefreshOnLogon, SvrStop)
  114. };


点击(此处)折叠或打开

  1. #include <string>
  2. #include <stdlib.h>
  3. #include <vector>
  4. #include <map>
  5. #include <string>
  6. #include "pthread.h"

  7. #include "IMIX/IMIXAPI/IMIXApplication.h"
  8. #include "IMIX/BasicProtocol/MagicData.h"
  9. #include "IMIX/IMIXAPI/IMIXAPIErrorDef.h"
  10. #include "IMIX/IMIXAPI/Listener.h"

  11. #include "ConfigPathCls.h"
  12. #include "ApiOp.h"
  13. #include "ConstVal.h"
  14. #include "ConfigGen.h"
  15. #include "CSGen.h"
  16. #include "Platform.h"
  17. #include "AppStopThreadBody.h"
  18. #include "TerminalConfig.h"
  19. #include "Common.h"
  20. #include "CommonListenerImpl.h"

  21. #include "TestObject.h"
  22. #include "ProtocolInc.h"
  23. #include "IMIXTestCaseObject.h"
  24. #include "IMIXSeqCase.h"

  25. using namespace IMIX;

  26. CMUTEX CIMIXSeqCase::m_mutex;
  27. CTestObject* CIMIXSeqCase::m_hinstance = NULL;

  28. CIMIXSeqCase::CIMIXSeqCase(){}

  29. CIMIXSeqCase::~CIMIXSeqCase(){}

  30. BeginTestCase(CIMIXSeqCase)

  31. #define SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, fn_persist) \
  32.     ON_ADD_CASE(#protocol"_SeqCase_"#field"YY_"#subffix"_"#fn_seqcheck"_"#fn_persist, "", "true", &CIMIXSeqCase::protocol##_SeqCase_##field##YY_##subffix##_##fn_seqcheck##_##fn_persist) \
  33.     ON_ADD_CASE(#protocol"_SeqCase_"#field"NY_"#subffix"_"#fn_seqcheck"_"#fn_persist, "", "true", &CIMIXSeqCase::protocol##_SeqCase_##field##NY_##subffix##_##fn_seqcheck##_##fn_persist) \
  34.     ON_ADD_CASE(#protocol"_SeqCase_"#field"YN_"#subffix"_"#fn_seqcheck"_"#fn_persist, "", "true", &CIMIXSeqCase::protocol##_SeqCase_##field##YN_##subffix##_##fn_seqcheck##_##fn_persist) \
  35.     ON_ADD_CASE(#protocol"_SeqCase_"#field"NN_"#subffix"_"#fn_seqcheck"_"#fn_persist, "", "true", &CIMIXSeqCase::protocol##_SeqCase_##field##NN_##subffix##_##fn_seqcheck##_##fn_persist)

  36. #define SEQFUNCREG_SEQCHECK(protocol, field, subffix, fn_seqcheck) \
  37.     SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, PersistYY) \
  38.     SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, PersistNY) \
  39.     SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, PersistYN) \
  40.     SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, PersistNN)

  41. /*#define SEQFUNCREG_SEQCHECK(protocol, field, subffix, fn_seqcheck) \
  42.     SEQFUNCREG_SEQCHECK_PERSIST(protocol, field, subffix, fn_seqcheck, PersistNN) */

  43. #define SEQFUNCREG(protocol, field, subffix) \
  44.     SEQFUNCREG_SEQCHECK(protocol, field, subffix, SeqcheckYY) \
  45.     SEQFUNCREG_SEQCHECK(protocol, field, subffix, SeqcheckNY) \
  46.     SEQFUNCREG_SEQCHECK(protocol, field, subffix, SeqcheckYN) \
  47.     SEQFUNCREG_SEQCHECK(protocol, field, subffix, SeqcheckNN)

  48. SEQFUNCREG(IMIXFast, ResetOnLogon, ClientStop)
  49. SEQFUNCREG(IMIXFast, ResetOnLogout, ClientStop)
  50. SEQFUNCREG(IMIXFast, ResetOnDisconnect, ClientStop)
  51. SEQFUNCREG(IMIXFast, RefreshOnLogon, ClientStop)

  52. SEQFUNCREG(IMIXFast, ResetOnLogon, SvrStop)
  53. SEQFUNCREG(IMIXFast, ResetOnLogout, SvrStop)
  54. SEQFUNCREG(IMIXFast, ResetOnDisconnect, SvrStop)
  55. SEQFUNCREG(IMIXFast, RefreshOnLogon, SvrStop)

  56. SEQFUNCREG(IMIXNormal, ResetOnLogon, ClientStop)
  57. SEQFUNCREG(IMIXNormal, ResetOnLogout, ClientStop)
  58. SEQFUNCREG(IMIXNormal, ResetOnDisconnect, ClientStop)
  59. SEQFUNCREG(IMIXNormal, RefreshOnLogon, ClientStop)

  60. SEQFUNCREG(IMIXNormal, ResetOnLogon, SvrStop)
  61. SEQFUNCREG(IMIXNormal, ResetOnLogout, SvrStop)
  62. SEQFUNCREG(IMIXNormal, ResetOnDisconnect, SvrStop)
  63. SEQFUNCREG(IMIXNormal, RefreshOnLogon, SvrStop)

  64. EndTestClass

  65. CTestObject* CIMIXSeqCase::GetInstance()
  66. {
  67.     AutoLock autolock(&m_mutex);
  68.     if (m_hinstance == NULL)
  69.     {
  70.         m_hinstance = new CIMIXSeqCase;
  71.         m_hinstance->m_casetype = NULL;
  72.         m_hinstance->InitCaseItem();
  73.     }

  74.     return m_hinstance;
  75. }

  76. int CIMIXSeqCase::GetInitiatorId(int id)
  77. {
  78.     return TYPE_PROJECT_CASEIMIX | TYPE_IMIXSEQCASE | USER_INITIATOR | id;
  79. }

  80. int CIMIXSeqCase::GetAcceptorId(int id)
  81. {
  82.     return TYPE_PROJECT_CASEIMIX | TYPE_IMIXSEQCASE | USER_ACCEPTOR | id;
  83. }

  84. void CIMIXSeqCase::RunAcceptorTest(int type, IMIXApplication *pApp, CApiOp *pApiOp )
  85. {
  86.     if (pApp == NULL || pApiOp == NULL)
  87.         return;

  88.     CAppStopThreadBodyFactory::AddIMIXSvrStopApp(pApp);
  89.     pApiOp->StartServer(pApp);
  90. }

  91. void CIMIXSeqCase::RunInitiatorTest(int type, IMIXApplication *pApp, CApiOp *pApiOp )
  92. {
  93.     if (pApp == NULL || pApiOp == NULL)
  94.         return;

  95.     CAppStopThreadBodyFactory::AddIMIXClientStopApp(pApp);
  96.     pApiOp->StartClient(pApp, 0, 500);
  97. }

  98. void CIMIXSeqCase::CreateConfigFile(int usertype, char *protocol, CIMIXSeqInfo *seqinfo, string m_configpath)
  99. {
  100.     CConfigGen *pConfigGen = CConfigGen::GetInstance();
  101.     CApiOp *pApiOp = CApiOp::GetInstance();

  102.     pConfigGen->ClearConfig();
  103.     pConfigGen->AddSession("default", usertype);
  104.     if (usertype == USER_ACCEPTOR)
  105.     {
  106.         pApiOp->AddAcceptorSession(pConfigGen, protocol, 0);
  107.     }
  108.     else if (usertype == USER_INITIATOR)
  109.     {
  110.         pApiOp->AddInitiatorSession(pConfigGen, protocol, 0);
  111.     }

  112.     seqinfo->SeqPersistInit(1);

  113.     pConfigGen->OutConfig(m_configpath);
  114. }

  115. int CIMIXSeqCase::SeqCase_CommonTest(char *protocol, CIMIXSeqInfo *svrinfo, CIMIXSeqInfo *clientinfo, int IsClient)
  116. {
  117.     int dwSvrProcessId;
  118.     int dwClientProcessId;

  119.     void *hSvrSem = NULL;
  120.     void *hClientSem = NULL;

  121.     if (IsClient == TRUE)
  122.     {
  123.         hSvrSem = CAppStopThreadBodyFactory::CreateSvrStopApp();
  124.     }
  125.     else
  126.     {
  127.         hClientSem = CAppStopThreadBodyFactory::CreateClientStopApp();
  128.     }

  129.     CreateConfigFile(USER_ACCEPTOR, (char *)protocol, svrinfo, CConfigPathCls::GetInstance()->GetDefaultCfgAcceptor());
  130.     CreateConfigFile(USER_INITIATOR, (char *)protocol, clientinfo, CConfigPathCls::GetInstance()->GetDefaultCfgInitiator());

  131.     if (IsClient == TRUE)
  132.         m_terminalConfig.StartSvrExec(&dwSvrProcessId, (char *)CConfigPathCls::GetInstance()->GetDefaultCfgAcceptor().c_str(), GetAcceptorId(0));
  133.     else
  134.         m_terminalConfig.StartClientExec(&dwClientProcessId, (char *)CConfigPathCls::GetInstance()->GetDefaultCfgInitiator().c_str(), GetInitiatorId(0));

  135.     IMIXSleep(1000);

  136.     for (int i = 0; i < 10; ++i)
  137.     //while(true)
  138.     {
  139.         if (IsClient == TRUE)
  140.         {
  141.             hClientSem = CAppStopThreadBodyFactory::CreateClientStopApp();
  142.             m_terminalConfig.StartClientExec(&dwClientProcessId, (char *)CConfigPathCls::GetInstance()->GetDefaultCfgInitiator().c_str(), GetInitiatorId(0));
  143.         }
  144.         else
  145.         {
  146.             hSvrSem = CAppStopThreadBodyFactory::CreateSvrStopApp();
  147.             m_terminalConfig.StartSvrExec(&dwSvrProcessId, (char *)CConfigPathCls::GetInstance()->GetDefaultCfgAcceptor().c_str(), GetAcceptorId(0));
  148.         }

  149.         IMIXSleep(30 * 1000);
  150.         if (IsClient == TRUE)
  151.         {
  152.             CAppStopThreadBodyFactory::ReleaseSem(hClientSem);
  153.             WaitForProcess(dwClientProcessId, INFINITE);
  154.             CAppStopThreadBodyFactory::ClosePSem(hClientSem);
  155.             CAppStopThreadBodyFactory::DeleteClientSem();
  156.         }
  157.         else
  158.         {
  159.             CAppStopThreadBodyFactory::ReleaseSem(hSvrSem);
  160.             WaitForProcess(dwSvrProcessId, INFINITE);
  161.             CAppStopThreadBodyFactory::ClosePSem(hSvrSem);
  162.             CAppStopThreadBodyFactory::DeleteSvrSem();
  163.         }
  164.     }

  165.     if (IsClient == FALSE)
  166.         CAppStopThreadBodyFactory::ReleaseSem(hClientSem);
  167.     else
  168.         CAppStopThreadBodyFactory::ReleaseSem(hSvrSem);

  169.     if (IsClient == TRUE)
  170.         WaitForProcess(dwSvrProcessId, INFINITE);
  171.     else
  172.         WaitForProcess(dwClientProcessId, INFINITE);

  173.     if (IsClient == FALSE)
  174.     {
  175.         CAppStopThreadBodyFactory::ClosePSem(hClientSem);
  176.         CAppStopThreadBodyFactory::DeleteClientSem();
  177.     }
  178.     else
  179.     {
  180.         CAppStopThreadBodyFactory::ClosePSem(hSvrSem);
  181.         CAppStopThreadBodyFactory::DeleteSvrSem();
  182.     }

  183.     return TESTTOOL_SUCCESS;
  184. }

  185. /*********************************************************************************************/
  186. /* CommonTestFunc */
  187. /*********************************************************************************************/
  188. #define SEQMEMFUNC_COMMON(field) \
  189.     int CIMIXSeqCase::SeqCase_##field(char *protocol, BOOL svrseqcheck, BOOL clientseqcheck, \
  190.     BOOL svrpersist, BOOL clientpersist, BOOL svrfield, BOOL clientfield, BOOL isclient) \
  191.     { \
  192.         CIMIXSeqInfo svrinfo; \
  193.         CIMIXSeqInfo clientinfo; \
  194.     \
  195.         svrinfo.Clear(); \
  196.         if (svrfield) \
  197.             svrinfo.Set##field(); \
  198.         else \
  199.             svrinfo.Clr##field(); \
  200.         if (svrseqcheck == TRUE) \
  201.             svrinfo.SetIsCheckSeqNum(); \
  202.         else \
  203.             svrinfo.ClrIsCheckSeqNum(); \
  204.         if (svrpersist == TRUE) \
  205.             svrinfo.SetPersist(); \
  206.         else \
  207.             svrinfo.ClrPersist(); \
  208.         \
  209.         clientinfo.Clear(); \
  210.         if (clientfield == TRUE) \
  211.             clientinfo.Set##field(); \
  212.         else \
  213.             clientinfo.Clr##field(); \
  214.         if (clientseqcheck == TRUE) \
  215.             clientinfo.SetIsCheckSeqNum(); \
  216.         else \
  217.             clientinfo.ClrIsCheckSeqNum(); \
  218.         if (clientpersist == TRUE) \
  219.             clientinfo.SetPersist(); \
  220.         else \
  221.             clientinfo.ClrPersist(); \
  222.     \
  223.         return SeqCase_CommonTest(protocol, &svrinfo, &clientinfo, isclient); \
  224.     }

  225. SEQMEMFUNC_COMMON(ResetOnLogon)
  226. SEQMEMFUNC_COMMON(ResetOnLogout)
  227. SEQMEMFUNC_COMMON(ResetOnDisconnect)
  228. SEQMEMFUNC_COMMON(RefreshOnLogon)

  229. /************************************************************************************************************/
  230. #define SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, svrpersist, clientpersist, fn_seq, fn_persist) \
  231.     int CIMIXSeqCase::IMIX##protocol##_SeqCase_##field##YY_##subffix##_##fn_seq##_##fn_persist() \
  232.     {\
  233.         return SeqCase_##field((char *)protocol##Protocol.c_str(), svrseq, clientseq, svrpersist, clientpersist, TRUE, TRUE, isclient); \
  234.     } \
  235.     int CIMIXSeqCase::IMIX##protocol##_SeqCase_##field##NY_##subffix##_##fn_seq##_##fn_persist() \
  236.     {\
  237.         return SeqCase_##field((char *)protocol##Protocol.c_str(), svrseq, clientseq, svrpersist, clientpersist, FALSE, TRUE, isclient); \
  238.     } \
  239.     int CIMIXSeqCase::IMIX##protocol##_SeqCase_##field##YN_##subffix##_##fn_seq##_##fn_persist() \
  240.     {\
  241.         return SeqCase_##field((char *)protocol##Protocol.c_str(), svrseq, clientseq, svrpersist, clientpersist, TRUE, FALSE, isclient); \
  242.     } \
  243.     int CIMIXSeqCase::IMIX##protocol##_SeqCase_##field##NN_##subffix##_##fn_seq##_##fn_persist() \
  244.     {\
  245.         return SeqCase_##field((char *)protocol##Protocol.c_str(), svrseq, clientseq, svrpersist, clientpersist, FALSE, FALSE, isclient); \
  246.     }

  247. #define SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, svrseq, clientseq, fn_seq) \
  248.     SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, TRUE, TRUE, fn_seq, PersistYY) \
  249.     SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, FALSE, TRUE, fn_seq, PersistNY) \
  250.     SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, TRUE, FALSE, fn_seq, PersistYN) \
  251.     SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, FALSE, FALSE, fn_seq, PersistNN)

  252. /*#define SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, svrseq, clientseq, fn_seq) \
  253.     SEQMEMFUNC_SEQCHECK_PERSIST(protocol, field, subffix, isclient, svrseq, clientseq, FALSE, FALSE, fn_seq, PersistNN)*/

  254. #define SEQMEMFUNC(protocol, field, subffix, isclient) \
  255.     SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, TRUE, TRUE, SeqcheckYY) \
  256.     SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, FALSE, TRUE, SeqcheckNY) \
  257.     SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, TRUE, FALSE, SeqcheckYN) \
  258.     SEQMEMFUNC_SEQCHECK(protocol, field, subffix, isclient, FALSE, FALSE, SeqcheckNN)

  259. SEQMEMFUNC(Fast, ResetOnLogon, ClientStop, TRUE)
  260. SEQMEMFUNC(Fast, ResetOnLogout, ClientStop, TRUE)
  261. SEQMEMFUNC(Fast, ResetOnDisconnect, ClientStop, TRUE)
  262. SEQMEMFUNC(Fast, RefreshOnLogon, ClientStop, TRUE)

  263. SEQMEMFUNC(Fast, ResetOnLogon, SvrStop, FALSE)
  264. SEQMEMFUNC(Fast, ResetOnLogout, SvrStop, FALSE)
  265. SEQMEMFUNC(Fast, ResetOnDisconnect, SvrStop, FALSE)
  266. SEQMEMFUNC(Fast, RefreshOnLogon, SvrStop, FALSE)

  267. SEQMEMFUNC(Normal, ResetOnLogon, ClientStop, TRUE)
  268. SEQMEMFUNC(Normal, ResetOnLogout, ClientStop, TRUE)
  269. SEQMEMFUNC(Normal, ResetOnDisconnect, ClientStop, TRUE)
  270. SEQMEMFUNC(Normal, RefreshOnLogon, ClientStop, TRUE)

  271. SEQMEMFUNC(Normal, ResetOnLogon, SvrStop, FALSE)
  272. SEQMEMFUNC(Normal, ResetOnLogout, SvrStop, FALSE)
  273. SEQMEMFUNC(Normal, ResetOnDisconnect, SvrStop, FALSE)
  274. SEQMEMFUNC(Normal, RefreshOnLogon, SvrStop, FALSE)

阅读(5337) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~