#include "XNetSDKTest.h"
#include "OPMachine.h"

USE_NS_NETSDK_CFG

int TestOPMachine()
{
	printf("%s\r\n", __FUNCTION__);
	int nRet = 0;
	char c = 0;
	while((c = getchar()) != 'q')
	{
		switch(c)
		{
		case 's':
			{
				OPMachine cfg;
				cfg.Action.SetValue("Reboot");			//ÖØÆô
//				cfg.Action.SetValue("Shutdown");		//¹Ø»ú
				const char *pCfg = cfg.ToString();
				nRet = XSDK_DevSetSysConfig(g_hDevice, JK_OPMachine, pCfg, strlen(pCfg), 1, 5000, EXCMD_SYSMANAGER_REQ);
				printf("nRet = %d\n", nRet);
			}
			break;
		}
	}

	return 0;
}

