#include "XNetSDKTest.h"
#include "XNetSDKSyn.h"
#include "OPDefaultConfig.h"

USE_NS_NETSDK_CFG

int TestSetDefaultConfig()
{
	printf("%s\r\n", __FUNCTION__);
	int nRet = 0;
	char c = 0;
	while((c = getchar()) != 'q')
	{
		switch(c)
		{
		case 's':
			{
				///»Ö¸´Ä¬ÈÏÅäÖÃ
				char outbuffer[100] = {0};
				int len = 0;
				OPDefaultConfig cfg;
				cfg.Factory.SetValue(false);			
				const char *pCfg = cfg.ToString();
				nRet = XSDK_DevSetSysConfigSyn(g_hDevice, JK_OPDefaultConfig, pCfg, strlen(pCfg), outbuffer, &len, 5000, EXCMD_SYSMANAGER_REQ);
				
				if(nRet >= 0)
				{
					printf("OPDefaultConfig Success!\r\n");
				}
			}
			break;
		}
	}

	return 0;
}


