@@ -0,0 +1,52 @@ | |||
#include "XNetSDKTest.h" | |||
#include "SystemInfo.h" | |||
#include "SystemFunction.h" | |||
#include "Camera_Param.h" | |||
#include "Simplify_Encode.h" | |||
USE_NS_NETSDK_CFG | |||
// | |||
//void OnDevConfig(int nMsgId, int nResult, const char *szCfgName, const char *szResult, int nResultLen, int nSeq) | |||
//{ | |||
// if (nResult < 0) | |||
// { | |||
// printf("OnDevConfig:[MsgId:%d; Result:%d]\r\n", nMsgId, nResult); | |||
// return; | |||
// } | |||
// | |||
// if((ESXSDK_DEV_GET_SYS_CONFIG == nMsgId || ESXSDK_DEV_GET_CHN_CONFIG == nMsgId) && szCfgName && szResult && nResultLen > 0) | |||
// { | |||
// if (strcmp(szCfgName, JK_SystemInfo) == 0) | |||
// { | |||
// SystemInfo cfg; | |||
// cfg.Parse(szResult); | |||
// printf("SystemInfo:[SerialNo:%s; BuildTime:%s; ]\r\n", cfg.SerialNo.Value(), cfg.BuildTime.Value()); | |||
// } | |||
// else if (strcmp(szCfgName, JK_SystemFunction) == 0) | |||
// { | |||
// SystemFunction cfg; | |||
// cfg.Parse(szResult); | |||
// printf("SystemFunction:[CombineStream:%d; ]\r\n", cfg.mEncodeFunction.CombineStream.Value()); | |||
// } | |||
// else if(strcmp(szCfgName, "Camera.Param.[0]") == 0) | |||
// { | |||
// Camera_Param cfg; | |||
// cfg.SetName("Camera.Param.[0]"); | |||
// cfg.Parse(szResult); | |||
// printf("Camera_Param:[IRCUTMode:%d; ]\r\n", cfg.IRCUTMode.Value()); | |||
// | |||
// const char *pCfg = cfg.ToString(); | |||
// int nRet = XSDK_DevSetChnConfig(g_hDevice, 0, JK_Camera_Param, pCfg, strlen(pCfg), 5000, EXCMD_CONFIG_SET); | |||
// } | |||
// else if(strcmp(szCfgName, "Simplify.Encode") == 0) | |||
// { | |||
// Simplify_Encode cfg; | |||
// cfg.Parse(szResult); | |||
// printf("Simplify_Encode:[BitRate:%d; ]\r\n", cfg.mExtraFormat.mVideo.BitRate.Value()); | |||
// | |||
// const char *pCfg = cfg.ToString(); | |||
// int nRet = XSDK_DevSetSysConfig(g_hDevice, JK_Simplify_Encode, pCfg, strlen(pCfg), 5000, EXCMD_CONFIG_SET); | |||
// } | |||
// | |||
// } | |||
//} |
@@ -0,0 +1,99 @@ | |||
#include "../XNetSDKTest.h" | |||
#include "XNetSDKSyn.h" | |||
#include "Camera_Param.h" | |||
#include "Camera_ParamEx.h" | |||
USE_NS_NETSDK_CFG | |||
int TestCameraConfig() | |||
{ | |||
printf("%s\r\n", __FUNCTION__); | |||
char c = 0; | |||
int nRet = 0; | |||
while((c = getchar()) != 'q') | |||
{ | |||
switch(c) | |||
{ | |||
//通用相机参数 | |||
case 'a': | |||
{ | |||
///获取相机参数 | |||
char szOutBuffer[4096] = {0}; | |||
char outbuffer[100] = {0}; | |||
int len = 0; | |||
int nInOutSize = sizeof(szOutBuffer); | |||
nRet =XSDK_DevGetChnConfigSyn(g_hDevice, 0, JK_Camera_Param, szOutBuffer, &nInOutSize, 4000, EXCMD_CONFIG_GET); | |||
XSDK_CFG::Camera_Param se; | |||
se.SetName("Camera.Param.[0]"); | |||
se.Parse(szOutBuffer); | |||
//白平衡 | |||
printf("White balance = %x\r\n", se.WhiteBalance.Value()); | |||
//IRCUT | |||
printf("IRCUT = %d\r\n", se.IRCUTMode.Value()); | |||
//镜像 | |||
printf("PictureMirror = %x\r\n", se.PictureMirror.Value()); | |||
//白天降噪等级 | |||
printf("Day_nfLevel = %d\r\n", se.Day_nfLevel.Value()); | |||
//晚上降噪等级 | |||
printf("Night_nfLevel = %d\r\n", se.Night_nfLevel.Value()); | |||
//设置相机参数 | |||
if(nRet >= 0) | |||
{ | |||
se.Day_nfLevel.SetValue(1); | |||
const char *pCfg = se.ToString(); | |||
nRet = XSDK_DevSetChnConfigSyn(g_hDevice, 0, JK_Camera_Param, pCfg, strlen(pCfg), outbuffer, &len, 5000, EXCMD_CONFIG_SET); | |||
if(nRet >= 0) | |||
{ | |||
printf("Set Success!\r\n"); | |||
} | |||
} | |||
} | |||
break; | |||
//相机参数扩展版 | |||
case 'b': | |||
{ | |||
///获取相机参数 | |||
char szOutBuffer[4096] = {0}; | |||
char outbuffer[100] = {0}; | |||
int len = 0; | |||
int nInOutSize = sizeof(szOutBuffer); | |||
nRet =XSDK_DevGetChnConfigSyn(g_hDevice, 0, JK_Camera_ParamEx, szOutBuffer, &nInOutSize, 4000, EXCMD_CONFIG_GET); | |||
XSDK_CFG::Camera_ParamEx se; | |||
se.SetName("Camera.ParamEx.[0]"); | |||
se.Parse(szOutBuffer); | |||
//宽动态 | |||
printf("BroadTrends AutoGain = %d, Gain = %d\r\n", se.mBroadTrends.AutoGain.Value(), se.mBroadTrends.Gain.Value()); | |||
//设置相机参数 | |||
if(nRet >= 0) | |||
{ | |||
se.mBroadTrends.AutoGain.SetValue(1); | |||
const char *pCfg = se.ToString(); | |||
nRet = XSDK_DevSetChnConfigSyn(g_hDevice, 0, JK_Camera_ParamEx, pCfg, strlen(pCfg), outbuffer, &len, 5000, EXCMD_CONFIG_SET); | |||
if(nRet >= 0) | |||
{ | |||
printf("Set Success!\r\n"); | |||
} | |||
} | |||
} | |||
break; | |||
} | |||
} | |||
return 0; | |||
} | |||
@@ -0,0 +1,32 @@ | |||
#ifndef TESTCONFIG | |||
#define TESTCONFIG | |||
#include <iostream> | |||
#include <map> | |||
#include <string> | |||
#include <stdio.h> | |||
using namespace std; | |||
#define XSDK_HANDLE int | |||
class CTestConfig | |||
{ | |||
public: | |||
CTestConfig(); | |||
virtual ~CTestConfig(); | |||
//系统类配置 | |||
virtual int SysDevConfig(XSDK_HANDLE hDevice, int nSeq, int nTimeout, char *pConfig, int nConfigLen)=0; | |||
//通道类配置 | |||
virtual int ChnDevConfig(XSDK_HANDLE hDevice, int nChannelNo, int nSeq, int nTimeout, const char *pConfig, int nConfigLen)=0; | |||
public: | |||
//获取到的JSON数据 | |||
static int GetJsonData(int nMsgId, int nResult, const char *szCfgName, const char *szResult, int nResultLen, int nSeq); | |||
//public: | |||
// std::map<int, string> m_JsonData; | |||
}; | |||
#endif |
@@ -0,0 +1,38 @@ | |||
#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; | |||
} | |||
@@ -0,0 +1,73 @@ | |||
#include "XNetSDKTest.h" | |||
#include "XNetSDKSyn.h" | |||
#include "SystemInfo.h" | |||
#include "SystemFunction.h" | |||
USE_NS_NETSDK_CFG | |||
int TestDevSystemConfig() | |||
{ | |||
printf("%s\r\n", __FUNCTION__); | |||
char c = 0; | |||
while((c = getchar()) != 'q') | |||
{ | |||
switch(c) | |||
{ | |||
/////////获取设备支持的功能///////// | |||
case 'a': | |||
{ | |||
// [异步]获取设备能力级 | |||
// XSDK_DevGetSysConfig(g_hDevice, JK_SystemFunction, 1234, 4000, JK_SystemFunction_MsgId); | |||
// [同步]获取设备能力级 | |||
char szOutBuffer[40960] = {0}; | |||
int nInOutSize = sizeof(szOutBuffer); | |||
int nResult = XSDK_DevGetSysConfigSyn(g_hDevice, JK_SystemFunction, szOutBuffer, &nInOutSize, 4000, JK_SystemFunction_MsgId); | |||
if(nResult >= 0) | |||
{ | |||
printf("Get Success String[%s]\r\n", szOutBuffer); | |||
SystemFunction cfg; | |||
cfg.Parse(szOutBuffer); | |||
printf("AlarmFunction.AlarmConfig = %d\r\n", cfg.mAlarmFunction.AlarmConfig.Value()); | |||
} | |||
else | |||
{ | |||
printf("Get Fail String[%s], nResult = %d\r\n", szOutBuffer, nResult); | |||
} | |||
} | |||
break; | |||
case 'b': | |||
{ | |||
// [异步]获取设备基本信息(版本信息等) | |||
//XSDK_DevGetSysConfig(g_hDevice, JK_SystemInfo, 123, 4000, JK_SystemInfo_MsgId); | |||
// [同步]获取设备基本信息(版本信息等) | |||
char szOutBuffer[40960] = {0}; | |||
int nInOutSize = sizeof(szOutBuffer); | |||
int nResult = XSDK_DevGetSysConfigSyn(g_hDevice, JK_SystemInfo, szOutBuffer, &nInOutSize, 4000, JK_SystemInfo_MsgId); | |||
if(nResult >= 0) | |||
{ | |||
printf("Get Success String[%s]\r\n", szOutBuffer); | |||
SystemInfo cfg; | |||
cfg.Parse(szOutBuffer); | |||
const char * SoftWareVersion = cfg.SoftWareVersion.ToString(); | |||
printf("SoftWareVersion = %s\r\n", SoftWareVersion); | |||
} | |||
else | |||
{ | |||
printf("Get Fail String[%s], nResult = %d\r\n", szOutBuffer, nResult); | |||
} | |||
} | |||
break; | |||
} | |||
} | |||
return 0; | |||
} | |||
@@ -0,0 +1,578 @@ | |||
#include "../XNetSDKTest.h" | |||
#include "Simplify_Encode.h" | |||
#include "XNetSDKSyn.h" | |||
#include "EncodeCapability.h" | |||
#include "SystemFunction.h" | |||
USE_NS_NETSDK_CFG | |||
#define IFRAME_EQ_PFRAME 10 | |||
#define BITMSK(bit) (int)(1 << (bit)) | |||
typedef struct | |||
{ | |||
unsigned long dwSize; | |||
unsigned long dsMask; | |||
}SResolution; | |||
enum | |||
{ | |||
MAIN_STREAM = 0, | |||
EXPAND_STREAM, | |||
COMBINE_STREAM, | |||
STREAM_NUM, | |||
}; | |||
static SResolution m_resolution[CAPTURE_IMAGE_SIZE_EXT_V3_NR]; | |||
static int STREAM_CODE_VALUE[CAPTURE_IMAGE_SIZE_EXT_V3_NR][6] = { | |||
{512, 768, 1024, 1536, 2048, 2560}, ///< D1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< HD1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< BCIF | |||
{64, 192, 384, 512, 768, 1024}, ///< CIF | |||
{64, 128, 192, 384, 448, 512}, ///< QCIF | |||
{512, 768, 896, 1280, 1536, 2048}, ///< VGA | |||
{256, 384, 512, 640, 768, 1024}, ///< QVGA | |||
{512, 768, 896, 1280, 1536, 2048}, ///< SVCD | |||
{64, 128, 192, 384, 448, 512}, ///< QQVGA | |||
{64, 128, 256, 448, 512, 768}, ///< ND1 | |||
{896, 1024, 1536, 2048, 3072, 4096}, ///< 650TVL | |||
{1024,1536, 2048, 2560, 3072, 4096}, ///< 720P | |||
{1024,1536, 2048, 3072, 4096, 5120}, ///< 1_3M | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< UXGA | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< 1080P | |||
{1177,2355, 3532, 4710, 7065, 10240}, ///< WUXGA | |||
{1280,2560, 3840, 5120, 7680, 10240}, ///< 2_5M | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 3M | |||
{2048, 3072, 4096, 6144, 8192,10240}, ///5M | |||
{1024,1536, 2048, 2560, 3072, 4096}, ///< 1080N | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 4M | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 6M | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 8M | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 12M | |||
{2048, 4096, 6144, 8192, 11264, 13312}, ///< 4K | |||
{512, 768, 1024, 1536, 2048, 2560}, ///< 720N | |||
{1024,1536, 2048, 2560, 3072, 4096}, ///< WSVGA | |||
{512, 768, 896, 1280, 1536, 2048}, ///< NHD | |||
{1024,1536, 2048, 3072, 4096, 5120}, ///< 3M_N | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< 4M_N | |||
{1280, 2560, 3840, 5120, 7680, 10240}, ///< 5M_N | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 4K_N | |||
}; | |||
//大小眼睛的低码率 | |||
static int LOWBITRATE_STREAM_CODE_VALUE[CAPTURE_IMAGE_SIZE_EXT_V3_NR][6] = { | |||
{384, 576, 768, 1152, 1536, 1920}, ///< D1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< HD1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< BCIF | |||
{48, 144, 288, 384, 576, 768}, ///< CIF | |||
{48, 96, 144, 288, 336, 384}, ///< QCIF | |||
{512, 768, 896, 1280, 1536, 2048}, ///< VGA | |||
{256, 384, 512, 640, 768, 1024}, ///< QVGA | |||
{512, 768, 896, 1280, 1536, 2048}, ///< SVCD | |||
{64, 128, 192, 384, 448, 512}, ///< QQVGA | |||
{64, 128, 256, 448, 512, 768}, ///< ND1 | |||
{896, 1024, 1536, 2048, 3072, 4096}, ///< 960H | |||
{768, 1152, 1536, 1920, 2304, 3072}, ///< 720P | |||
{1024,1536, 2048, 3072, 4096, 5120}, ///< 960P | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< UXGA | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< 1080P | |||
{640, 1024, 1536, 2048, 3072, 4096}, ///< WUXGA | |||
{640, 1024, 1536, 2048, 3072, 4096}, ///< 2_5M | |||
{640, 1024, 1536, 2048, 3072, 4096}, ///< 3M | |||
{720, 1024, 1536, 2048, 3072, 5120}, ///< 5M | |||
{0,0, 0, 0, 0, 0}, ///< 1080N | |||
{0, 0, 0, 0, 0, 0}, ///< 4M | |||
{0,0,0,0,0,0}, //6M | |||
{0,0,0,0,0,0}, //8M | |||
{0,0,0,0,0,0}, //12M | |||
{0,0,0,0,0,0}, //4K | |||
{0, 0, 0, 0, 0, 0}, ///< 720N | |||
{0,0,0,0,0,0}, //RES1 | |||
{0,0,0,0,0,0}, //RES2 | |||
{0,0,0,0,0,0}, //RES3 | |||
{0,0,0,0,0,0}, //RES4 | |||
{0,0,0,0,0,0}, //RES5 | |||
{0,0,0,0,0,0}, //RES6 | |||
}; | |||
static int FISHEYE_STREAM_CODE_VALUE[CAPTURE_IMAGE_SIZE_EXT_V3_NR][6] = { | |||
{512, 768, 1024, 1536, 2048, 2560}, ///< D1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< HD1 | |||
{384, 512, 768, 1024, 1536, 2048}, ///< BCIF | |||
{64, 192, 384, 512, 768, 1024}, ///< CIF | |||
{64, 128, 192, 384, 448, 512}, ///< QCIF | |||
{512, 768, 896, 1280, 1536, 2048}, ///< VGA | |||
{256, 384, 512, 640, 768, 1024}, ///< QVGA | |||
{512, 768, 896, 1280, 1536, 2048}, ///< SVCD | |||
{64, 128, 192, 384, 448, 512}, ///< QQVGA | |||
{64, 128, 256, 448, 512, 768}, ///< ND1 | |||
{896, 1024, 1536, 2048, 3072, 4096}, ///< 650TVL | |||
{1536, 2048, 2560, 3072, 4096, 6096}, ///< 720P | |||
{1024,1536, 2048, 3072, 4096, 5120}, ///< 1_3M | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< UXGA | |||
{1024,2048, 3072, 4096, 6144, 8192}, ///< 1080P | |||
{1177,2355, 3532, 4710, 7065, 10240}, ///< WUXGA | |||
{1280,2560, 3840, 5120, 7680, 10240}, ///< 2_5M | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 3M | |||
{2048, 3072, 4096, 6144, 8192,10240}, ///5M | |||
{1024,1536, 2048, 2560, 3072, 4096}, ///< 1080N | |||
{1536, 3072, 4096, 6144, 8192, 10240}, ///< 4M | |||
{0,0,0,0,0,0}, //6M | |||
{0,0,0,0,0,0}, //8M | |||
{0,0,0,0,0,0}, //12M | |||
{0,0,0,0,0,0}, //4K | |||
{512, 768, 1024, 1536, 2048, 2560}, ///< 720N | |||
{1024,1536, 2048, 2560, 3072, 4096}, ///< WSVGA | |||
{0,0,0,0,0,0}, //RES2 | |||
{0,0,0,0,0,0}, //RES3 | |||
{0,0,0,0,0,0}, //RES4 | |||
{0,0,0,0,0,0}, //RES5 | |||
{0,0,0,0,0,0}, //RES6 | |||
}; | |||
static int H265_STREAM_CODE_VALUE[CAPTURE_IMAGE_SIZE_EXT_V3_NR][6] = { | |||
{332, 499, 665, 998, 1331, 1664}, ///< D1 | |||
{249, 332, 499, 665, 998, 1331}, ///< HD1 | |||
{249, 332, 499, 665, 998, 1331}, ///< BCIF | |||
{41, 124, 249, 332, 499, 665}, ///< CIF | |||
{41, 83, 124, 249, 291, 332}, ///< QCIF | |||
{332, 499, 582, 832, 998, 1331}, ///< VGA | |||
{166, 249, 332, 416, 499, 665}, ///< QVGA | |||
{332, 499, 582, 832, 998, 1331}, ///< SVCD | |||
{41, 83, 124, 249, 291, 332}, ///< QQVGA | |||
{41, 83, 166, 291, 332, 499}, ///< ND1 | |||
{582, 665, 998, 1331, 1996, 2662}, ///< 650TVL | |||
{665,998, 1331, 1664, 1996, 2662}, ///< 720P | |||
{665,998, 1331, 1996, 2662, 3328}, ///< 1_3M | |||
{665,1331, 1996, 2662, 3993, 5324}, ///< UXGA | |||
{665,1331, 1996, 2662, 3993, 5324}, ///< 1080P | |||
{765,1530, 2295, 3061, 4592, 6656}, ///< WUXGA | |||
{832,1664, 2496, 3328, 4992, 6656}, ///< 2_5M | |||
{998, 1996, 2662, 3993, 5324, 6656}, ///< 3M | |||
{1331, 1996, 2662, 3993, 5324,6656}, ///5M | |||
{665,998, 1331, 1664, 1996, 2662}, ///< 1080N | |||
{998, 1996, 2662, 3993, 5324, 6656}, ///< 4M | |||
{998, 1996, 2662, 3993, 5324, 6656}, ///< 6M | |||
{998, 1996, 2662, 3993, 5324, 6656}, ///< 8M | |||
{998, 1996, 2662, 3993, 5324, 6656}, ///< 12M | |||
{1331, 2662, 3993, 5324, 7321, 8652}, ///< 4K | |||
{332, 499, 665, 998, 1331, 1664}, ///< 720N | |||
{582, 665, 998, 1331, 1996, 2662}, ///< WSVGA(1024*576) | |||
{332, 499, 582, 832, 998, 1327}, ///< NHD | |||
{665,998, 1331, 1996, 2662, 3328}, ///< 3M_N | |||
{665,1331, 1996, 2662, 3993, 5324}, ///< 4M_N | |||
{832, 1664, 2496, 3328, 4992, 6656}, ///< 5M_N | |||
{1331, 1996, 2665, 3993, 5324, 6656}, ///< 4K_N | |||
}; | |||
//函数说明:计算码固定码率支持的码流值 | |||
//参数说明: | |||
//dstFormat : 媒体格式 | |||
//bLowBitrate : 是否支持大小眼 | |||
//bLowBitrate : 是否支持鱼眼 | |||
//bH265Bitrate : 是否支持h265 | |||
void CalculateCodeStreamValue(SDK_VIDEO_FORMAT * vfSetFormat, bool bLowBitrate, bool bFisheyeBitrate, bool bH265Bitrate) | |||
{ | |||
int j = 0; | |||
int nTmpFPS = 0; | |||
int nFPS = 25; | |||
nTmpFPS = min(vfSetFormat->nFPS, nFPS); | |||
int iBitrate = 0; | |||
if(bLowBitrate) | |||
{ | |||
for (j = 0; j < sizeof(LOWBITRATE_STREAM_CODE_VALUE[vfSetFormat->iResolution]) / sizeof(int); ++j) | |||
{ | |||
iBitrate = LOWBITRATE_STREAM_CODE_VALUE[vfSetFormat->iResolution][j] * (vfSetFormat->iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (vfSetFormat->iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
printf("Support iBitrate[%d] = %d\r\n", j, iBitrate); | |||
} | |||
} | |||
else if(bFisheyeBitrate) | |||
{ | |||
for (j = 0; j < sizeof(FISHEYE_STREAM_CODE_VALUE[vfSetFormat->iResolution]) / sizeof(int); ++j) | |||
{ | |||
iBitrate = FISHEYE_STREAM_CODE_VALUE[vfSetFormat->iResolution][j] * (vfSetFormat->iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (vfSetFormat->iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
printf("Support iBitrate[%d] = %d\r\n", j, iBitrate); | |||
} | |||
} | |||
else if(bH265Bitrate) | |||
{ | |||
for (j = 0; j < sizeof(H265_STREAM_CODE_VALUE[vfSetFormat->iResolution]) / sizeof(int); ++j) | |||
{ | |||
iBitrate = H265_STREAM_CODE_VALUE[vfSetFormat->iResolution][j] * (vfSetFormat->iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (vfSetFormat->iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
printf("Support iBitrate[%d] = %d\r\n", j, iBitrate); | |||
} | |||
} | |||
else | |||
{ | |||
for (j = 0; j < sizeof(STREAM_CODE_VALUE[vfSetFormat->iResolution]) / sizeof(int); ++j) | |||
{ | |||
iBitrate = STREAM_CODE_VALUE[vfSetFormat->iResolution][j] * (vfSetFormat->iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (vfSetFormat->iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
printf("Support iBitrate[%d] = %d\r\n", j, iBitrate); | |||
} | |||
} | |||
} | |||
void GetMaxResolAndRate(int &nResolu, int &nRate, long lFreePower) | |||
{ | |||
if ( lFreePower <= 0 ) | |||
{ | |||
return; | |||
} | |||
int nSize = m_resolution[nResolu].dwSize; | |||
if ( nSize > lFreePower ) | |||
{ | |||
nResolu = -1; | |||
nRate = -1; | |||
return; | |||
} | |||
else | |||
{ | |||
int nTempRate = lFreePower / nSize; | |||
if ( nTempRate > 25 ) | |||
{ | |||
nTempRate = 25; | |||
} | |||
nRate = nTempRate; | |||
} | |||
long lMaxSize = nSize; | |||
for ( int i = 0; i < CAPTURE_IMAGE_SIZE_EXT_V3_NR; i ++ ) | |||
{ | |||
long lTempsize = m_resolution[i].dwSize; | |||
if ( lFreePower >= lTempsize && lMaxSize < lTempsize ) | |||
{ | |||
nResolu = i; | |||
lMaxSize = lTempsize; | |||
} | |||
} | |||
} | |||
void GetSupportRes(int maxSize, unsigned long dwMask ) | |||
{ | |||
for (int i = 0; i < CAPTURE_IMAGE_SIZE_EXT_V3_NR ; i ++) | |||
{ | |||
if ( (m_resolution[i].dwSize <= m_resolution[maxSize].dwSize ) | |||
&& ( dwMask & (0x01<<i) ) ) | |||
{ | |||
printf("m_resolution[%d]\r\n", i); | |||
} | |||
} | |||
} | |||
int TestEncodeConfig() | |||
{ | |||
printf("%s\r\n", __FUNCTION__); | |||
char c = 0; | |||
bool bSupport = false; | |||
char szOutBuffer[40960] = {0}; | |||
int nInOutSize = sizeof(szOutBuffer); | |||
int nResult = 0; | |||
int nCompression; | |||
int nMainStreamResolution = 0; | |||
// unsigned long ulMask = 0; | |||
int nQuality = 0; | |||
int nGop = 0; | |||
int nFps = 0; | |||
bool m_bH265Bitrate[STREAM_NUM]; | |||
bool m_bMultiStream = false; | |||
bool m_bLowBitrate = false; | |||
bool m_bFisheyeBitrate = false; | |||
m_bH265Bitrate[MAIN_STREAM] = false; | |||
m_bH265Bitrate[EXPAND_STREAM] = false; | |||
m_bH265Bitrate[COMBINE_STREAM] = false; | |||
unsigned long lFreePower = 0; | |||
///////////////////////////////////现有支持的所有分辨率///////////////////////////////// | |||
m_resolution[CAPTURE_IMAGE_SIZE_D1].dwSize = 704 * 480; | |||
m_resolution[CAPTURE_IMAGE_SIZE_HD1].dwSize = 704 * 240; | |||
m_resolution[CAPTURE_IMAGE_SIZE_BCIF].dwSize = 352 * 480; | |||
m_resolution[CAPTURE_IMAGE_SIZE_CIF].dwSize = 352 * 240; | |||
m_resolution[CAPTURE_IMAGE_SIZE_QCIF].dwSize = 176 * 120; | |||
m_resolution[CAPTURE_IMAGE_SIZE_VGA].dwSize = 640 * 480; | |||
m_resolution[CAPTURE_IMAGE_SIZE_QVGA].dwSize = 320 * 240; | |||
m_resolution[CAPTURE_IMAGE_SIZE_SVCD].dwSize = 480 * 480; | |||
m_resolution[CAPTURE_IMAGE_SIZE_QQVGA].dwSize = 160 * 128; | |||
m_resolution[CAPTURE_IMAGE_SIZE_ND1].dwSize = 240*192; | |||
m_resolution[CAPTURE_IMAGE_SIZE_650TVL].dwSize = 928*480; | |||
m_resolution[CAPTURE_IMAGE_SIZE_720P].dwSize = 1280*720; | |||
m_resolution[CAPTURE_IMAGE_SIZE_1_3M].dwSize = 1280*960; | |||
m_resolution[CAPTURE_IMAGE_SIZE_UXGA].dwSize = 1600*1200; | |||
m_resolution[CAPTURE_IMAGE_SIZE_1080P].dwSize = 1920*1080; | |||
m_resolution[CAPTURE_IMAGE_SIZE_WUXGA].dwSize = 1920*1200; | |||
m_resolution[CAPTURE_IMAGE_SIZE_2_5M].dwSize = 1872*1408; | |||
m_resolution[CAPTURE_IMAGE_SIZE_3M].dwSize = 2048*1536; | |||
m_resolution[CAPTURE_IMAGE_SIZE_5M].dwSize = 3744*1408; | |||
m_resolution[CAPTURE_IMAGE_SIZE_1080N].dwSize = 944*1080; | |||
m_resolution[CAPTURE_IMAGE_SIZE_4M].dwSize = 2592*1520; | |||
m_resolution[CAPTURE_IMAGE_SIZE_6M].dwSize = 3072*2048; | |||
m_resolution[CAPTURE_IMAGE_SIZE_8M].dwSize = 3264*2448; | |||
m_resolution[CAPTURE_IMAGE_SIZE_12M].dwSize = 4000*3000; | |||
m_resolution[CAPTURE_IMAGE_SIZE_4K].dwSize = 4096*2160; | |||
m_resolution[CAPTURE_IMAGE_SIZE_720N].dwSize = 640*720; | |||
m_resolution[CAPTURE_IMAGE_SIZE_WSVGA].dwSize = 1024*576; | |||
m_resolution[CAPTURE_IMAGE_SIZE_NHD].dwSize = 640*360; | |||
m_resolution[CAPTURE_IMAGE_SIZE_3M_N].dwSize = 1024*1536; | |||
m_resolution[CAPTURE_IMAGE_SIZE_4M_N].dwSize = 1296*1520; | |||
m_resolution[CAPTURE_IMAGE_SIZE_5M_N].dwSize = 1872*1408; | |||
m_resolution[CAPTURE_IMAGE_SIZE_4K_N].dwSize = 2048*2160; ///2048 * 2160通用/1920*2160海思 | |||
/////////////////////////////////////////////掩码////////////////////////////////////////// | |||
m_resolution[CAPTURE_IMAGE_SIZE_D1].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_HD1].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_BCIF].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_BCIF) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_CIF].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_QCIF].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_VGA].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_VGA) | BITMSK(CAPTURE_IMAGE_SIZE_QVGA); | |||
m_resolution[CAPTURE_IMAGE_SIZE_QVGA].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_QVGA); | |||
m_resolution[CAPTURE_IMAGE_SIZE_SVCD].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_SVCD); | |||
m_resolution[CAPTURE_IMAGE_SIZE_QQVGA].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_QQVGA); | |||
m_resolution[CAPTURE_IMAGE_SIZE_ND1].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_ND1); | |||
m_resolution[CAPTURE_IMAGE_SIZE_650TVL].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_720P].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_1_3M].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_UXGA].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_1080P].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_WUXGA].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_2_5M].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_3M].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_5M].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
m_resolution[CAPTURE_IMAGE_SIZE_1080N].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_650TVL) | BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF) | BITMSK(CAPTURE_IMAGE_SIZE_720P); | |||
m_resolution[CAPTURE_IMAGE_SIZE_4M].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_D1) | BITMSK(CAPTURE_IMAGE_SIZE_HD1) | BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF) | BITMSK(CAPTURE_IMAGE_SIZE_720P); | |||
m_resolution[CAPTURE_IMAGE_SIZE_720N].dsMask = BITMSK(CAPTURE_IMAGE_SIZE_CIF) | BITMSK(CAPTURE_IMAGE_SIZE_QCIF); | |||
while((c = getchar()) != 'q') | |||
{ | |||
switch(c) | |||
{ | |||
//判断是否支持组合编码 | |||
case 'a': | |||
{ | |||
memset(&szOutBuffer, 0, 40960); | |||
nResult = XSDK_DevGetSysConfigSyn(g_hDevice, JK_SystemFunction, szOutBuffer, &nInOutSize, 4000, JK_SystemFunction_MsgId); | |||
if(nResult >= 0) | |||
{ | |||
SystemFunction sysfunc; | |||
sysfunc.Parse(szOutBuffer); | |||
bSupport = sysfunc.mEncodeFunction.CombineStream.ToBool(); | |||
m_bMultiStream = sysfunc.mEncodeFunction.DoubleStream.ToBool(); | |||
m_bLowBitrate = sysfunc.mEncodeFunction.LowBitRate.ToBool(); | |||
m_bFisheyeBitrate = sysfunc.mOtherFunction.SupportFishEye.ToBool(); | |||
printf("bSupport = %d, m_bMultiStream = %d, m_bLowBitrate = %d, m_bFisheyeBitrate = %d\r\n", | |||
bSupport, m_bMultiStream, m_bLowBitrate, m_bFisheyeBitrate); | |||
} | |||
} | |||
break; | |||
case 'b': | |||
{ | |||
memset(&szOutBuffer, 0, 40960); | |||
nResult = XSDK_DevGetSysConfigSyn(g_hDevice, JK_EncodeCapability, szOutBuffer, &nInOutSize, 4000, EXCMD_ABILITY_GET); | |||
if(nResult >= 0) | |||
{ | |||
EncodeCapability encode; | |||
encode.Parse(szOutBuffer); | |||
///////////////////////////////////获取主辅码流支持的压缩格式///////////////////////////////// | |||
////获取主码流支持的压缩格式 | |||
nCompression = encode.mEncodeInfo[0].CompressionMask.Value(); | |||
for ( int i = 0; i < CAPTURE_COMPRESS_NR; i ++ ) | |||
{ | |||
if (nCompression & ( 1 << i ) ) | |||
{ | |||
printf("[Main]Support Compression Type = %s\r\n", CompressionMap[i].name); | |||
} | |||
} | |||
////获取辅码流的支持的压缩格式 | |||
nCompression = encode.mEncodeInfo[1].CompressionMask.Value(); | |||
for ( int i = 0; i < CAPTURE_COMPRESS_NR; i ++ ) | |||
{ | |||
if (nCompression & ( 1 << i ) ) | |||
{ | |||
printf("[Extra]Support Compression Type = %s\r\n", CompressionMap[i].name); | |||
} | |||
} | |||
lFreePower = encode.MaxEncodePower.Value(); | |||
//ulMask = encode.ImageSizePerChannel[0].Value(); | |||
} | |||
} | |||
break; | |||
case 'g': | |||
{ | |||
char szOutBuf[40960] = {0}; | |||
int nInOutBufLen = sizeof(szOutBuf); | |||
SDK_VIDEO_FORMAT mainFormat; | |||
memset(&mainFormat, 0, sizeof(SDK_VIDEO_FORMAT)); | |||
int nGetCfg = XSDK_DevGetSysConfigSyn(g_hDevice, JK_Simplify_Encode, szOutBuf, &nInOutBufLen, 4000, EXCMD_CONFIG_GET); | |||
if (nGetCfg >= 0 && nInOutBufLen > 0) | |||
{ | |||
JObjArrayObject<Simplify_Encode> cfg(NULL, JK_Simplify_Encode); | |||
cfg.Parse(szOutBuf); | |||
if(cfg.objs.Size() > 0) | |||
{ | |||
///主码流分辨率 | |||
const char * mainStrRes = cfg.objs[0].mMainFormat.mVideo.Resolution.Value(); | |||
printf("MainFormat[Resolution:%s]\r\n", cfg.objs[0].mMainFormat.mVideo.Resolution.Value()); | |||
for ( int i = 0; i < CAPTURE_IMAGE_SIZE_EXT_V3_NR; i ++ ) | |||
{ | |||
if(strcmp(mainStrRes, s_videoResolutionMap[i].name) == 0) | |||
{ | |||
nMainStreamResolution = i; | |||
} | |||
} | |||
if(nMainStreamResolution == CAPTURE_COMPRESS_H265) | |||
{ | |||
m_bH265Bitrate[EXPAND_STREAM] = true; | |||
} | |||
else | |||
{ | |||
m_bH265Bitrate[EXPAND_STREAM] = false; | |||
} | |||
mainFormat.iResolution = nMainStreamResolution; | |||
///主码流帧率 | |||
nFps = cfg.objs[0].mMainFormat.mVideo.FPS.Value(); | |||
printf("MainFormat[FPS:%d]\r\n", cfg.objs[0].mMainFormat.mVideo.FPS.Value()); | |||
mainFormat.nFPS = nFps; | |||
///主码流码流值 | |||
printf("MainFormat[BitRate:%d]\r\n", cfg.objs[0].mMainFormat.mVideo.BitRate.Value()); | |||
mainFormat.nBitRate = cfg.objs[0].mMainFormat.mVideo.BitRate.Value(); | |||
///主码流帧间隔 | |||
nGop = cfg.objs[0].mMainFormat.mVideo.GOP.Value(); | |||
printf("MainFormat[GOP:%d]\r\n", cfg.objs[0].mMainFormat.mVideo.GOP.Value()); | |||
mainFormat.iGOP = cfg.objs[0].mMainFormat.mVideo.GOP.Value(); | |||
///主码流码率控制 | |||
printf("MainFormat[BitRateControl:%s]\r\n", cfg.objs[0].mMainFormat.mVideo.BitRateControl.Value()); | |||
///主码流压缩格式 | |||
printf("MainFormat[Compression:%s]\r\n", cfg.objs[0].mMainFormat.mVideo.Compression.Value()); | |||
int iCompression = 0; | |||
for ( int i = 0; i < CAPTURE_COMPRESS_NR; i ++ ) | |||
{ | |||
if(strcmp(mainStrRes, CompressionMap[i].name) == 0) | |||
{ | |||
iCompression = i; | |||
} | |||
} | |||
mainFormat.iCompression = iCompression; | |||
///主码流画质 | |||
nQuality = cfg.objs[0].mMainFormat.mVideo.Quality.Value(); | |||
printf("MainFormat[Quality:%d]\r\n", cfg.objs[0].mMainFormat.mVideo.Quality.Value()); | |||
mainFormat.iQuality = nQuality; | |||
/////////////////////////////////////////////设置////////////////////////////////////////////////// | |||
int nChannelCount = 1; //通道个数,默认为1 | |||
unsigned long dwChnUsed = 0; | |||
unsigned long dwChnFree = 0; | |||
unsigned long dwPower = lFreePower / nChannelCount; | |||
int nExStreamResolution = 0; | |||
int nExFps = 0; | |||
const char * ExStrRes = cfg.objs[0].mExtraFormat.mVideo.Resolution.Value(); | |||
nExFps = cfg.objs[0].mExtraFormat.mVideo.FPS.Value(); | |||
for ( int i = 0; i < CAPTURE_IMAGE_SIZE_EXT_V3_NR; i ++ ) | |||
{ | |||
if(strcmp(ExStrRes, s_videoResolutionMap[i].name) == 0) | |||
{ | |||
nExStreamResolution = i; | |||
} | |||
} | |||
if (m_bMultiStream && cfg.objs[0].mExtraFormat.VideoEnable.Value()) | |||
{ | |||
dwChnUsed = m_resolution[nExStreamResolution].dwSize * nExFps; | |||
} | |||
dwChnFree = dwPower - dwChnUsed; | |||
////////////主码流///////// | |||
mainFormat.nFPS = 25; | |||
int MaxSize = 0; | |||
GetMaxResolAndRate(MaxSize, nFps, dwChnFree); | |||
//GetSupportRes(MaxSize, ulMask); | |||
//////固定码率时的码流值选择 | |||
CalculateCodeStreamValue(&mainFormat, m_bLowBitrate, m_bFisheyeBitrate, m_bH265Bitrate); | |||
//////////设置码流值 | |||
cfg.objs[0].mMainFormat.mVideo.FPS.SetValue(25); | |||
mainFormat.nFPS = 25; | |||
int nFPS = 25; | |||
int nTmpFPS = 25; /////设置的帧率 | |||
int dwBitrate = 0; | |||
//////////码流值的计算//////// | |||
if (m_bLowBitrate) | |||
{ | |||
dwBitrate = LOWBITRATE_STREAM_CODE_VALUE[mainFormat.iResolution][mainFormat.iQuality - 1] * (mainFormat.iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (mainFormat.iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
} | |||
else if(m_bFisheyeBitrate) | |||
{ | |||
dwBitrate = FISHEYE_STREAM_CODE_VALUE[mainFormat.iResolution][mainFormat.iQuality - 1] * (mainFormat.iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (mainFormat.iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
} | |||
else if (m_bH265Bitrate[MAIN_STREAM]) | |||
{ | |||
dwBitrate = H265_STREAM_CODE_VALUE[mainFormat.iResolution][mainFormat.iQuality - 1] * (mainFormat.iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (mainFormat.iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
} | |||
else | |||
{ | |||
dwBitrate = STREAM_CODE_VALUE[mainFormat.iResolution][mainFormat.iQuality - 1] * (mainFormat.iGOP * nTmpFPS + IFRAME_EQ_PFRAME - 1) / (mainFormat.iGOP * nFPS + IFRAME_EQ_PFRAME - 1); | |||
} | |||
cfg.objs[0].mMainFormat.mVideo.BitRate.SetValue(dwBitrate); | |||
const char *pCfg = cfg.ToString(); | |||
XSDK_DevSetSysConfig(g_hDevice, JK_Simplify_Encode, pCfg, strlen(pCfg), 1, 5000, EXCMD_CONFIG_SET); | |||
} | |||
} | |||
} | |||
break; | |||
} | |||
} | |||
return 0; | |||
} | |||
@@ -0,0 +1,42 @@ | |||
#include "XNetSDKTest.h" | |||
#include "ModifyPassword.h" | |||
USE_NS_NETSDK_CFG | |||
int TestModifyPassword() | |||
{ | |||
printf("%s\r\n", __FUNCTION__); | |||
int nRet = 0; | |||
char c = 0; | |||
while((c = getchar()) != 'q') | |||
{ | |||
switch(c) | |||
{ | |||
case 's': | |||
{ | |||
char oldPsw[6] = "10111"; | |||
signed char oldEncryptPsw[6] = {0}; | |||
XSDK_EncryptPassword(oldPsw, oldEncryptPsw, 6); | |||
printf("oldEncryptPassWord = %s\n", oldEncryptPsw); | |||
char newPsw[5] = "1011"; | |||
signed char newEncryptPsw[5] = {0}; | |||
XSDK_EncryptPassword(newPsw, newEncryptPsw, 5); | |||
printf("newEncryptPassWord = %s\n", newEncryptPsw); | |||
SXSDK_MODIFY_PSW cfg; | |||
strcpy(cfg.Password, (const char *)oldEncryptPsw); | |||
strcpy(cfg.NewPassword, (const char *)newEncryptPsw); | |||
strcpy(cfg.sUserName, "admin"); | |||
nRet = XSDK_DevModifyIPConfig(g_hDevice, (const char *)&cfg, sizeof(SXSDK_MODIFY_PSW), 12, 5000); | |||
} | |||
break; | |||
} | |||
} | |||
return 0; | |||
} | |||
@@ -0,0 +1,30 @@ | |||
#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; | |||
} | |||
@@ -0,0 +1,26 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "VideoColorParam.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_AVEnc_VideoColor "AVEnc.VideoColor" | |||
class AVEnc_VideoColor : public JObject | |||
{ | |||
public: | |||
JObjArray<JObjArray<JStrObj> > TimeSection; ///// ʱ¼ä¶Î | |||
JIntObj Enable; ///// ʹÄÜ:0,1 | |||
VideoColorParam m_VideoColorParam; ///// ÑÕÉ«¶¨Òå | |||
public: | |||
AVEnc_VideoColor(JObject *pParent = NULL, const char *szName = JK_AVEnc_VideoColor): | |||
JObject(pParent,szName), | |||
TimeSection(this, "TimeSection"), | |||
Enable(this, "Enable"), | |||
m_VideoColorParam(this, "VideoColorParam"){ | |||
}; | |||
~AVEnc_VideoColor(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,32 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "ChannelTitle.h" | |||
#include "ChannelTitleAttribute.h" | |||
#include "TimeTitleAttribute.h" | |||
#include "Covers.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_AVEnc_VideoWidget "AVEnc.VideoWidget" | |||
class AVEnc_VideoWidget : public JObject | |||
{ | |||
public: | |||
ChannelTitle mChannelTitle; ///< 通道名称 | |||
ChannelTitleAttribute mChannelTitleAttribute; ///< 通道名称的位置 | |||
JObjArray<Covers> mCovers; | |||
JIntObj CoversNum; ///< 当前该通道有几个叠加的区域 */ | |||
TimeTitleAttribute mTimeTitleAttribute; ///< 设备时间 | |||
public: | |||
AVEnc_VideoWidget(JObject *pParent = NULL, const char *szName = JK_AVEnc_VideoWidget): | |||
JObject(pParent,szName), | |||
mChannelTitle(this, "ChannelTitle"), | |||
mChannelTitleAttribute(this, "ChannelTitleAttribute"), | |||
mCovers(this, "Covers"), | |||
CoversNum(this, "CoversNum"), | |||
mTimeTitleAttribute(this, "TimeTitleAttribute"){ | |||
}; | |||
~AVEnc_VideoWidget(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,44 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_AlarmFunction "AlarmFunction" | |||
class AlarmFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj AlarmConfig; | |||
JBoolObj BlindDetect; | |||
JBoolObj IPCAlarm; | |||
JBoolObj LossDetect; | |||
JBoolObj MotionDetect; | |||
JBoolObj NetAbort; | |||
JBoolObj NetAbortExtend; | |||
JBoolObj NetAlarm; | |||
JBoolObj NetIpConflict; | |||
JBoolObj StorageFailure; | |||
JBoolObj StorageLowSpace; | |||
JBoolObj StorageNotExist; | |||
JBoolObj VideoAnalyze; | |||
public: | |||
AlarmFunction(JObject *pParent = NULL, const char *szName = JK_AlarmFunction): | |||
JObject(pParent,szName), | |||
AlarmConfig(this, "AlarmConfig"), | |||
BlindDetect(this, "BlindDetect"), | |||
IPCAlarm(this, "IPCAlarm"), | |||
LossDetect(this, "LossDetect"), | |||
MotionDetect(this, "MotionDetect"), | |||
NetAbort(this, "NetAbort"), | |||
NetAbortExtend(this, "NetAbortExtend"), | |||
NetAlarm(this, "NetAlarm"), | |||
NetIpConflict(this, "NetIpConflict"), | |||
StorageFailure(this, "StorageFailure"), | |||
StorageLowSpace(this, "StorageLowSpace"), | |||
StorageNotExist(this, "StorageNotExist"), | |||
VideoAnalyze(this, "VideoAnalyze"){ | |||
}; | |||
~AlarmFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,29 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_AlarmInfo "AlarmInfo" | |||
class AlarmInfo : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JStrObj Event; | |||
JStrObj StartTime; | |||
JStrObj Status; | |||
JStrObj ExtInfo; | |||
public: | |||
AlarmInfo(JObject *pParent = NULL, const char *szName = JK_AlarmInfo): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
Event(this, "Event"), | |||
StartTime(this, "StartTime"), | |||
Status(this, "Status"), | |||
ExtInfo(this, "ExtInfo"){ | |||
}; | |||
~AlarmInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Alarm_AlarmOut "Alarm.AlarmOut" | |||
class Alarm_AlarmOut : public JObject | |||
{ | |||
public: | |||
JStrObj AlarmOutStatus; | |||
JStrObj AlarmOutType; | |||
public: | |||
Alarm_AlarmOut(JObject *pParent = NULL, const char *szName = JK_Alarm_AlarmOut): | |||
JObject(pParent,szName), | |||
AlarmOutStatus(this, "AlarmOutStatus"), | |||
AlarmOutType(this, "AlarmOutType"){ | |||
}; | |||
~Alarm_AlarmOut(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_BroadTrends "BroadTrends" | |||
class BroadTrends : public JObject | |||
{ | |||
public: | |||
JIntObj AutoGain; /////自动增益是否启用,0:不开启 1:开启 | |||
JIntObj Gain; /////自动增益上限(自动增益启用)或固定增益值 | |||
public: | |||
BroadTrends(JObject *pParent = NULL, const char *szName = JK_BroadTrends): | |||
JObject(pParent,szName), | |||
AutoGain(this, "AutoGain"), | |||
Gain(this, "Gain"){ | |||
}; | |||
~BroadTrends(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_AUX "AUX" | |||
class AUX : public JObject | |||
{ | |||
public: | |||
JIntObj Number; | |||
JStrObj Status; | |||
public: | |||
AUX(JObject *pParent = NULL, const char *szName = JK_AUX): | |||
JObject(pParent,szName), | |||
Number(this, "Number"), | |||
Status(this, "Status"){ | |||
}; | |||
~AUX(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Camera_ClearFog "Camera.ClearFog" | |||
class Camera_ClearFog : public JObject | |||
{ | |||
public: | |||
JBoolObj enable; | |||
JIntObj level; | |||
public: | |||
Camera_ClearFog(JObject *pParent = NULL, const char *szName = JK_Camera_ClearFog): | |||
JObject(pParent,szName), | |||
enable (this, "enable"), | |||
level (this, "level"){ | |||
}; | |||
~Camera_ClearFog(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,54 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "ExposureParam.h" | |||
#include "GainParam.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Camera_Param "Camera.Param" | |||
class Camera_Param: public JObject | |||
{ | |||
public: | |||
JIntObj AeSensitivity; ///ae灵敏度配置 | |||
JIntHex ApertureMode; ///自动光圈模式(类型是unsigned int) | |||
JIntHex BLCMode; ///背光补偿模式(类型是unsigned int) | |||
JIntHex DayNightColor; ///日夜模式,取值有彩色、自动切换和黑白(类型是unsigned int) | |||
JIntObj Day_nfLevel; ///白天降噪等级,0-5,0不滤波,1-5 值越大滤波效果越明显 | |||
JIntObj DncThr; ///日夜转换阈值 | |||
JIntObj ElecLevel; ///参考电平值(类型是unsigned int) | |||
JIntHex EsShutter; ///电子慢快门功能(类型是unsigned int) | |||
ExposureParam mExposureParam; ///曝光配置 | |||
GainParam mGainParam; ///增益配置 | |||
JIntObj IRCUTMode; ///IR-CUT切换 0 = 红外灯同步切换 1 = 自动切换 | |||
JIntObj IrcutSwap; ///ircut 正常序= 0 反序= 1 | |||
JIntObj Night_nfLevel; ///晚上降噪等级,0-5,0不滤波,1-5 值越大滤波效果越明显 | |||
JIntHex PictureFlip; ///图片上下翻转(类型是unsigned int) | |||
JIntHex PictureMirror; ///图片左右翻转(镜像)(类型是unsigned int) | |||
JIntHex RejectFlicker; ///日光灯防闪功能(类型是unsigned int) | |||
JIntHex WhiteBalance; ///白平衡(类型是unsigned int) | |||
public: | |||
Camera_Param(JObject *pParent = NULL, const char *szName = JK_Camera_Param): | |||
JObject(pParent,szName), | |||
AeSensitivity(this, "AeSensitivity"), | |||
ApertureMode(this, "ApertureMode"), | |||
BLCMode(this, "BLCMode"), | |||
DayNightColor(this, "DayNightColor"), | |||
Day_nfLevel(this, "Day_nfLevel"), | |||
DncThr(this, "DncThr"), | |||
ElecLevel(this, "ElecLevel"), | |||
EsShutter(this, "EsShutter"), | |||
mExposureParam(this, "ExposureParam"), | |||
mGainParam(this, "GainParam"), | |||
IRCUTMode(this, "IRCUTMode"), | |||
IrcutSwap(this, "IrcutSwap"), | |||
Night_nfLevel(this, "Night_nfLevel"), | |||
PictureFlip(this, "PictureFlip"), | |||
PictureMirror(this, "PictureMirror"), | |||
RejectFlicker(this, "RejectFlicker"), | |||
WhiteBalance(this, "WhiteBalance"){ | |||
}; | |||
~Camera_Param(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,44 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "BroadTrends.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Camera_ParamEx "Camera.ParamEx" | |||
class Camera_ParamEx : public JObject // | |||
{ | |||
public: | |||
JIntObj AeMeansure; ///测光模式校正 0:平均测光 1:中央测光 | |||
BroadTrends mBroadTrends; ///宽动态 | |||
JIntObj Dis; ///电子防抖设置 0:关闭 1:开启 | |||
JIntHex ExposureTime; ///实际生效的曝光时间(类型是unsigned int) | |||
JIntObj Ldc; //镜头畸变校正 0:关闭 1:开启 | |||
JIntObj LowLuxMode; ///微光模式 mode:0 关闭 1开启 ==only imx291 | |||
JStrObj Style; ///风格类型,由设备底层控制--"typedefault","type1","type2" | |||
JIntObj CorridorMode; ///1:走廊模式 0:普通模式 | |||
JIntObj LightRestrainLevel; ///强光抑制功能0~255,默认16 | |||
JIntObj PreventOverExpo; ///防过曝 0:关闭 1:开启 | |||
JIntObj SoftPhotosensitivecontrol; ///软光敏控制 0:光敏自动调节 1:软件自动调节 2:开启3:关闭 | |||
JIntObj AutomaticAdjustment; /// 自动调节档次 : 1~4 | |||
public: | |||
Camera_ParamEx(JObject *pParent = NULL, const char *szName = JK_Camera_ParamEx): | |||
JObject(pParent,szName), | |||
AeMeansure(this, "AeMeansure"), | |||
mBroadTrends(this, "BroadTrends"), | |||
Dis(this, "Dis"), | |||
ExposureTime(this, "ExposureTime"), | |||
Ldc(this, "Ldc"), | |||
LowLuxMode(this, "LowLuxMode"), | |||
Style(this, "Style"), | |||
CorridorMode(this, "CorridorMode"), | |||
LightRestrainLevel(this, "LightRestrainLevel"), | |||
PreventOverExpo(this, "PreventOverExpo"), | |||
SoftPhotosensitivecontrol(this, "SoftPhotosensitivecontrol"), | |||
AutomaticAdjustment(this, "AutomaticAdjustment"){ | |||
}; | |||
~Camera_ParamEx(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ChannelTitle "ChannelTitle" | |||
class ChannelTitle : public JObject | |||
{ | |||
public: | |||
JStrObj Name; ///< ͨµÀÃû³Æ | |||
JStrObj SerialNo; | |||
public: | |||
ChannelTitle(JObject *pParent = NULL, const char *szName = JK_ChannelTitle): | |||
JObject(pParent,szName), | |||
Name(this, "Name"), | |||
SerialNo(this, "SerialNo"){ | |||
}; | |||
~ChannelTitle(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ChannelTitleAttribute "ChannelTitleAttribute" | |||
class ChannelTitleAttribute : public JObject | |||
{ | |||
public: | |||
JStrObj BackColor; ///< 物件的后景MakeRGB,和透明度 | |||
JBoolObj EncodeBlend; ///< 编码叠加 | |||
JStrObj FrontColor; ///< 物件的前景MakeRGB,和透明度 | |||
JBoolObj PreviewBlend; ///< 预览叠加,是否显示,1:显示 0:隐藏 | |||
JObjArray<JIntObj> RelativePos; ///< 物件边距与整长的比例*8192(数组[左,上, 右,底]) | |||
public: | |||
ChannelTitleAttribute(JObject *pParent = NULL, const char *szName = JK_ChannelTitleAttribute): | |||
JObject(pParent,szName), | |||
BackColor(this, "BackColor"), | |||
EncodeBlend(this, "EncodeBlend"), | |||
FrontColor(this, "FrontColor"), | |||
PreviewBlend(this, "PreviewBlend"), | |||
RelativePos(this, "RelativePos"){ | |||
}; | |||
~ChannelTitleAttribute(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ChannelTitle "ChannelTitle" | |||
class ChannelTitleV2 : public JObject | |||
{ | |||
public: | |||
JObjArray<JStrObj> ChannelTitleEx; | |||
public: | |||
ChannelTitleV2(JObject *pParent = NULL): | |||
JObject(pParent), | |||
ChannelTitleEx(this, "ChannelTitle"){ | |||
}; | |||
~ChannelTitleV2(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_CombEncodeInfo "CombEncodeInfo" | |||
class CombEncodeInfo : public JObject | |||
{ | |||
public: | |||
JIntHex CompressionMask; ///< 掩码 | |||
JBoolObj Enable; ///< 使能项 | |||
JBoolObj HaveAudio; ///< 是否支持音频 | |||
JIntHex ResolutionMask; ///< 掩码 | |||
JStrObj StreamType; ///< 码流类型 | |||
public: | |||
CombEncodeInfo(JObject *pParent = NULL, const char *szName = JK_CombEncodeInfo): | |||
JObject(pParent,szName), | |||
CompressionMask(this, "CompressionMask"), | |||
Enable(this, "Enable"), | |||
HaveAudio(this, "HaveAudio"), | |||
ResolutionMask(this, "ResolutionMask"), | |||
StreamType(this, "StreamType"){ | |||
}; | |||
~CombEncodeInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_CommFunction "CommFunction" | |||
class CommFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj CommRS232; | |||
JBoolObj CommRS485; | |||
public: | |||
CommFunction(JObject *pParent = NULL, const char *szName = JK_CommFunction): | |||
JObject(pParent,szName), | |||
CommRS232(this, "CommRS232"), | |||
CommRS485(this, "CommRS485"){ | |||
}; | |||
~CommFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_CoverInfo "" | |||
class CoverInfo : public JObject | |||
{ | |||
public: | |||
JIntHex BackColor; | |||
JBoolObj EncodeBlend; | |||
JIntHex FrontColor; | |||
JBoolObj PreviewBlend; | |||
JObjArray<JObjArray<JStrObj> > RelativePos; | |||
public: | |||
CoverInfo(JObject *pParent = NULL, const char *szName = JK_CoverInfo): | |||
JObject(pParent,szName), | |||
BackColor(this, "BackColor"), | |||
EncodeBlend(this, "EncodeBlend"), | |||
FrontColor(this, "FrontColor"), | |||
PreviewBlend(this, "PreviewBlend"), | |||
RelativePos(this, "RelativePos"){ | |||
}; | |||
~CoverInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Covers "Covers" | |||
class Covers : public JObject | |||
{ | |||
public: | |||
JStrObj BackColor; ///< 物件的后景MakeRGB,和透明度 | |||
JBoolObj EncodeBlend; ///< 编码叠加 | |||
JStrObj FrontColor; ///< 物件的前景MakeRGB,和透明度 | |||
JBoolObj PreviewBlend; ///< 预览叠加,是否显示,1:显示 0:隐藏 | |||
JObjArray<JIntObj> RelativePos; ///< 物件边距与整长的比例*8191 | |||
public: | |||
Covers(JObject *pParent = NULL, const char *szName = JK_Covers): | |||
JObject(pParent,szName), | |||
BackColor(this, "BackColor"), | |||
EncodeBlend(this, "EncodeBlend"), | |||
FrontColor(this, "FrontColor"), | |||
PreviewBlend(this, "PreviewBlend"), | |||
RelativePos(this, "RelativePos"){ | |||
}; | |||
~Covers(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,30 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_DSTEnd "DSTEnd" | |||
class DSTEnd : public JObject | |||
{ | |||
public: | |||
JIntObj Day; | |||
JIntObj Hour; | |||
JIntObj Minute; | |||
JIntObj Month; | |||
JIntObj Week; | |||
JIntObj Year; | |||
public: | |||
DSTEnd(JObject *pParent = NULL, const char *szName = JK_DSTEnd): | |||
JObject(pParent,szName), | |||
Day(this, "Day"), | |||
Hour(this, "Hour"), | |||
Minute(this, "Minute"), | |||
Month(this, "Month"), | |||
Week(this, "Week"), | |||
Year(this, "Year"){ | |||
}; | |||
~DSTEnd(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,30 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_DSTStart "DSTStart" | |||
class DSTStart : public JObject | |||
{ | |||
public: | |||
JIntObj Day; | |||
JIntObj Hour; | |||
JIntObj Minute; | |||
JIntObj Month; | |||
JIntObj Week; | |||
JIntObj Year; | |||
public: | |||
DSTStart(JObject *pParent = NULL, const char *szName = JK_DSTStart): | |||
JObject(pParent,szName), | |||
Day(this, "Day"), | |||
Hour(this, "Hour"), | |||
Minute(this, "Minute"), | |||
Month(this, "Month"), | |||
Week(this, "Week"), | |||
Year(this, "Year"){ | |||
}; | |||
~DSTStart(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,25 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "EventHandler.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Detect_BlindDetect "Detect.BlindDetect" | |||
class Detect_BlindDetect : public JObject //视频遮挡 | |||
{ | |||
public: | |||
JBoolObj Enable; | |||
EventHandler mEventHandler; | |||
JIntObj Level; | |||
public: | |||
Detect_BlindDetect(JObject *pParent = NULL, const char *szName = JK_Detect_BlindDetect): | |||
JObject(pParent,szName), | |||
Enable(this, "Enable"), | |||
mEventHandler(this, "EventHandler"), | |||
Level(this, "Level"){ | |||
}; | |||
~Detect_BlindDetect(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,23 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "EventHandler.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Detect_LossDetect "Detect.LossDetect" | |||
class Detect_LossDetect : public JObject //视频丢失 | |||
{ | |||
public: | |||
JBoolObj Enable; | |||
EventHandler mEventHandler; | |||
public: | |||
Detect_LossDetect(JObject *pParent = NULL, const char *szName = JK_Detect_LossDetect): | |||
JObject(pParent,szName), | |||
Enable(this, "Enable"), | |||
mEventHandler(this, "EventHandler"){ | |||
}; | |||
~Detect_LossDetect(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,27 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "EventHandler.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Detect_MotionDetect "Detect.MotionDetect" | |||
class Detect_MotionDetect: public JObject //移动侦测 | |||
{ | |||
public: | |||
JBoolObj Enable; ///是否开启 | |||
EventHandler mEventHandler; ///联动事件 | |||
JIntObj Level; ///灵敏度 | |||
JObjArray<JIntHex> Region; /// 区域,每一行使用一个二进制串 | |||
public: | |||
Detect_MotionDetect(JObject *pParent = NULL, const char *szName = JK_Detect_MotionDetect): | |||
JObject(pParent,szName), | |||
Enable(this, "Enable"), | |||
mEventHandler(this, "EventHandler"), | |||
Level(this, "Level"), | |||
Region(this, "Region"){ | |||
}; | |||
~Detect_MotionDetect(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,158 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "EncodeInfo.h" | |||
#include "CombEncodeInfo.h" | |||
NS_NETSDK_CFG_BEGIN | |||
struct ConfigPair | |||
{ | |||
const char* name; | |||
int value; | |||
}; | |||
/// 捕获压缩格式类型 | |||
enum CaptureCompressType | |||
{ | |||
CAPTURE_COMPRESS_DIVX_MPEG4, ///< DIVX MPEG4。 | |||
CAPTURE_COMPRESS_MS_MPEG4, ///< MS MPEG4。 (已弃用) | |||
CAPTURE_COMPRESS_MPEG2, ///< MPEG2。 | |||
CAPTURE_COMPRESS_MPEG1, ///< MPEG1。 | |||
CAPTURE_COMPRESS_H263, ///< H.263 | |||
CAPTURE_COMPRESS_MJPG, ///< MJPG | |||
CAPTURE_COMPRESS_FCC_MPEG4, ///< FCC MPEG4 (已弃用) | |||
CAPTURE_COMPRESS_H264, ///< H.264 | |||
CAPTURE_COMPRESS_H265, ///< H.265 | |||
CAPTURE_COMPRESS_NR ///< 枚举的压缩标准数目。 | |||
}; | |||
static ConfigPair CompressionMap[] = | |||
{ | |||
{"MPEG4", CAPTURE_COMPRESS_DIVX_MPEG4}, | |||
{" ", CAPTURE_COMPRESS_MS_MPEG4}, | |||
{"MPEG2", CAPTURE_COMPRESS_MPEG2}, | |||
{"MPEG1", CAPTURE_COMPRESS_MPEG1}, | |||
{"H.263", CAPTURE_COMPRESS_H263}, | |||
{"MJPG", CAPTURE_COMPRESS_MJPG}, | |||
{" ", CAPTURE_COMPRESS_FCC_MPEG4}, | |||
{"H.264", CAPTURE_COMPRESS_H264}, | |||
{"H.265", CAPTURE_COMPRESS_H265}, | |||
{NULL, } | |||
}; | |||
/// 捕获分辨率类型 | |||
enum CaptureImageSize | |||
{ | |||
CAPTURE_IMAGE_SIZE_D1, ///< 704*576(PAL) 704*480(NTSC) | |||
CAPTURE_IMAGE_SIZE_HD1, ///< 704*288(PAL) 704*240(NTSC) | |||
CAPTURE_IMAGE_SIZE_BCIF, ///< 352*576(PAL) 352*480(NTSC) | |||
CAPTURE_IMAGE_SIZE_CIF, ///< 352*288(PAL) 352*240(NTSC) | |||
CAPTURE_IMAGE_SIZE_QCIF, ///< 176*144(PAL) 176*120(NTSC) | |||
CAPTURE_IMAGE_SIZE_VGA, ///< 640*480(PAL) 640*480(NTSC) | |||
CAPTURE_IMAGE_SIZE_QVGA, ///< 320*240(PAL) 320*240(NTSC) | |||
CAPTURE_IMAGE_SIZE_SVCD, ///< 480*480(PAL) 480*480(NTSC) | |||
CAPTURE_IMAGE_SIZE_QQVGA, ///< 160*128(PAL) 160*128(NTSC) | |||
CAPTURE_IMAGE_SIZE_NR = 9, ///< 枚举的图形大小种类的数目。 | |||
CAPTURE_IMAGE_SIZE_ND1 = 9, ///< 240*192 | |||
CAPTURE_IMAGE_SIZE_650TVL, ///< 926*576 | |||
CAPTURE_IMAGE_SIZE_720P, ///< 1280*720 | |||
CAPTURE_IMAGE_SIZE_1_3M, ///< 1280*960 | |||
CAPTURE_IMAGE_SIZE_UXGA , ///< 1600*1200 | |||
CAPTURE_IMAGE_SIZE_1080P, ///< 1920*1080 | |||
CAPTURE_IMAGE_SIZE_WUXGA, ///< 1920*1200 | |||
CAPTURE_IMAGE_SIZE_2_5M, ///< 1872*1408 | |||
CAPTURE_IMAGE_SIZE_3M, ///< 2048*1536 | |||
CAPTURE_IMAGE_SIZE_5M, ///< 3744*1408 | |||
CAPTURE_IMAGE_SIZE_EXT_NR = 19, | |||
CAPTURE_IMAGE_SIZE_1080N = 19, ///< 960*1080 | |||
CAPTURE_IMAGE_SIZE_4M, ///< 2592*1520 | |||
CAPTURE_IMAGE_SIZE_6M, ///< 3072×2048 | |||
CAPTURE_IMAGE_SIZE_8M, ///< 3264×2448 | |||
CAPTURE_IMAGE_SIZE_12M, ///< 4000*3000 | |||
CAPTURE_IMAGE_SIZE_4K, ///< 4096 * 2160/3840*2160 | |||
CAPTURE_IMAGE_SIZE_EXT_V2_NR =25, | |||
CAPTURE_IMAGE_SIZE_720N = 25, ///< 640*720 | |||
CAPTURE_IMAGE_SIZE_WSVGA, ///< 1024*576 | |||
CAPTURE_IMAGE_SIZE_NHD, ///< Wifi IPC 640*360 | |||
CAPTURE_IMAGE_SIZE_3M_N, ///< 1024*1536 | |||
CAPTURE_IMAGE_SIZE_4M_N, ///< 1296*1520 | |||
CAPTURE_IMAGE_SIZE_5M_N, ///< 1872*1408 | |||
CAPTURE_IMAGE_SIZE_4K_N, ///< 2048 * 2160通用/1920*2160海思 | |||
CAPTURE_IMAGE_SIZE_EXT_V3_NR, | |||
}; | |||
static ConfigPair s_videoResolutionMap[] = | |||
{ | |||
{"D1", CAPTURE_IMAGE_SIZE_D1}, | |||
{"HD1", CAPTURE_IMAGE_SIZE_HD1}, | |||
{"BCIF", CAPTURE_IMAGE_SIZE_BCIF}, | |||
{"CIF", CAPTURE_IMAGE_SIZE_CIF}, | |||
{"QCIF", CAPTURE_IMAGE_SIZE_QCIF}, | |||
{"VGA", CAPTURE_IMAGE_SIZE_VGA}, | |||
{"QVGA", CAPTURE_IMAGE_SIZE_QVGA}, | |||
{"SVCD", CAPTURE_IMAGE_SIZE_SVCD}, | |||
{"QQVGA",CAPTURE_IMAGE_SIZE_QQVGA}, | |||
{"ND1",CAPTURE_IMAGE_SIZE_ND1}, | |||
{"650TVL",CAPTURE_IMAGE_SIZE_650TVL}, | |||
{"720P",CAPTURE_IMAGE_SIZE_720P}, | |||
{"1_3M",CAPTURE_IMAGE_SIZE_1_3M}, | |||
{"UXGA",CAPTURE_IMAGE_SIZE_UXGA}, | |||
{"1080P",CAPTURE_IMAGE_SIZE_1080P}, | |||
{"WUXGA",CAPTURE_IMAGE_SIZE_WUXGA}, | |||
{"2_5M",CAPTURE_IMAGE_SIZE_2_5M}, | |||
{"3M",CAPTURE_IMAGE_SIZE_3M}, | |||
{"5M",CAPTURE_IMAGE_SIZE_5M}, | |||
{"1080N",CAPTURE_IMAGE_SIZE_1080N}, | |||
{"4M",CAPTURE_IMAGE_SIZE_4M}, | |||
{"6M",CAPTURE_IMAGE_SIZE_6M}, | |||
{"8M",CAPTURE_IMAGE_SIZE_8M}, | |||
{"12M",CAPTURE_IMAGE_SIZE_12M}, | |||
{"4K",CAPTURE_IMAGE_SIZE_4K}, | |||
{"720N",CAPTURE_IMAGE_SIZE_720N}, | |||
{"WSVGA",CAPTURE_IMAGE_SIZE_WSVGA}, | |||
{"NHD", CAPTURE_IMAGE_SIZE_NHD}, | |||
{"3M_N",CAPTURE_IMAGE_SIZE_3M_N}, | |||
{"4M_N",CAPTURE_IMAGE_SIZE_4M_N}, | |||
{"5M_N",CAPTURE_IMAGE_SIZE_5M_N}, | |||
{"4K_N",CAPTURE_IMAGE_SIZE_4K_N}, | |||
{NULL, } | |||
}; | |||
#define JK_EncodeCapability "EncodeCapability" | |||
class EncodeCapability : public JObject | |||
{ | |||
public: | |||
JIntObj ChannelMaxSetSync; ///< 每个通道分辨率是否需要同步 0-不同步, 1 -同步 | |||
JObjArray<CombEncodeInfo> mCombEncodeInfo; ///< 组合编码信息,暂时最大就4中码流 | |||
JIntHex Compression; ///< 编码模式掩码 | |||
JObjArray<EncodeInfo> mEncodeInfo; ///< 编码信息,暂时最大就4中码流 | |||
JObjArray<JIntHex> ExImageSizePerChannel; ///< 每个通道支持的辅码流图像分辨率 | |||
JObjArray<JObjArray<JIntHex> > ExImageSizePerChannelEx; ///< 每个通道支持的辅码流图像分辨率 | |||
JObjArray<JIntHex> ImageSizePerChannel; ///< 每个通道支持的图像分辨率 | |||
JIntObj MaxBitrate; ///< 最高码流Kbps | |||
JIntObj MaxEncodePower; ///< 支持的最大编码能力 | |||
JObjArray<JIntHex> MaxEncodePowerPerChannel; ///< 每个通道支持的最高编码能力 | |||
JObjArray<JIntHex> ThirdStreamImageSize; ///< CHL_3IRD_T码流支持的图像分辨率 | |||
JObjArray<JIntHex> FourthStreamImageSize; ///< CHL_4RTH_T码流支持的图像分辨率 | |||
public: | |||
EncodeCapability(JObject *pParent = NULL, const char *szName = JK_EncodeCapability): | |||
JObject(pParent,szName), | |||
ChannelMaxSetSync(this, "ChannelMaxSetSync"), | |||
mCombEncodeInfo(this, "CombEncodeInfo"), | |||
Compression(this, "Compression"), | |||
mEncodeInfo(this, "EncodeInfo"), | |||
ExImageSizePerChannel(this, "ExImageSizePerChannel"), | |||
ExImageSizePerChannelEx(this, "ExImageSizePerChannelEx"), | |||
ImageSizePerChannel(this, "ImageSizePerChannel"), | |||
MaxBitrate(this, "MaxBitrate"), | |||
MaxEncodePower(this, "MaxEncodePower"), | |||
ThirdStreamImageSize(this, "ThirdStreamImageSize"), | |||
FourthStreamImageSize(this, "FourthStreamImageSize"), | |||
MaxEncodePowerPerChannel(this, "MaxEncodePowerPerChannel"){ | |||
this->Parse("{ \"EncodeCapability\" : { \"ChannelMaxSetSync\" : 0, \"CombEncodeInfo\" : [ { \"CompressionMask\" : \"0x00000000\", \"Enable\" : true, \"HaveAudio\" : true, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"MainStream\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"ExtraStream2\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"ExtraStream3\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"ExtraStream4\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"JPEGStream\" } ], \"Compression\" : \"0x00000000\", \"EncodeInfo\" : [ { \"CompressionMask\" : \"0x00000080\", \"Enable\" : true, \"HaveAudio\" : true, \"ResolutionMask\" : \"0xFFBFFFFF\", \"StreamType\" : \"MainStream\" }, { \"CompressionMask\" : \"0x00000080\", \"Enable\" : true, \"HaveAudio\" : true, \"ResolutionMask\" : \"0xFFFFFFFF\", \"StreamType\" : \"ExtraStream2\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"ExtraStream3\" }, { \"CompressionMask\" : \"0x00000000\", \"Enable\" : false, \"HaveAudio\" : false, \"ResolutionMask\" : \"0x00000000\", \"StreamType\" : \"ExtraStream4\" }, { \"CompressionMask\" : \"0x00000080\", \"Enable\" : true, \"HaveAudio\" : true, \"ResolutionMask\" : \"0xFFFFFFFF\", \"StreamType\" : \"JPEGStream\" } ], \"ExImageSizePerChannel\" : [ \"0x00000009\" ], \"ExImageSizePerChannelEx\" : [ [ \"0x00000018\", \"0x00000000\", \"0x00000000\", \"0x00000018\", \"0x00000010\", \"0x00000078\", \"0x00000040\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000009\", \"0x00000009\", \"0x00000000\", \"0x00000009\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\", \"0x00000000\" ] ], \"FourthStreamImageSize\" : [ \"0x00000000\" ], \"ImageSizePerChannel\" : [ \"0x00000801\" ], \"MaxBitrate\" : 49152, \"MaxEncodePower\" : 38016000, \"MaxEncodePowerPerChannel\" : [ \"0x02441400\" ], \"ThirdStreamImageSize\" : [ \"0x00000000\" ] }, \"Name\" : \"EncodeCapability\", \"Ret\" : 100, \"SessionID\" : \"0x00000178\" }"); | |||
}; | |||
~EncodeCapability(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,44 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_EncodeFunction "EncodeFunction" | |||
class EncodeFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj DoubleStream; ///< 双码流功能 | |||
JBoolObj CombineStream; ///< 组合编码 | |||
JBoolObj SnapStream; ///< 抓图编码 | |||
JBoolObj WaterMark; ///< 水印功能------功能废弃(2016.1.16) | |||
JBoolObj IFrameRange; ///< I帧间隔 | |||
JBoolObj LowBitRate; ///< 低码流,家用产品使用 | |||
JBoolObj SmartH264; ///< H264+ | |||
JBoolObj IntelligentEncode; ///< 智能编码 | |||
JBoolObj SmartH264Plus; ///< H264++ | |||
JBoolObj SmartH264V2; //新的H264+/H264++ | |||
JBoolObj CustomChnDAMode; ///< 自定义数模切换功能 | |||
JBoolObj SmartEncodeDigital; ///Smart编码数字通道 | |||
JBoolObj MultiChannel; ///多通道编码 | |||
public: | |||
EncodeFunction(JObject *pParent = NULL, const char *szName = JK_EncodeFunction): | |||
JObject(pParent,szName), | |||
DoubleStream(this, "DoubleStream"), | |||
CombineStream(this, "CombineStream"), | |||
SnapStream(this, "SnapStream"), | |||
WaterMark(this, "WaterMark"), | |||
IFrameRange(this, "IFrameRange"), | |||
LowBitRate(this, "LowBitRate"), | |||
SmartH264(this, "SmartH264"), | |||
IntelligentEncode(this, "IntelligentEncode"), | |||
SmartH264Plus(this, "SmartH264Plus"), | |||
SmartH264V2(this, "SmartH264V2"), | |||
CustomChnDAMode(this, "CustomChnDAMode"), | |||
SmartEncodeDigital(this, "SmartEncodeDigital"), | |||
MultiChannel(this, "MultiChannel"){ | |||
}; | |||
~EncodeFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_EncodeInfo "EncodeInfo" | |||
class EncodeInfo : public JObject | |||
{ | |||
public: | |||
JIntHex CompressionMask; ///< 掩码 | |||
JBoolObj Enable; ///< 使能项 | |||
JBoolObj HaveAudio; ///< 是否支持音频 | |||
JIntHex ResolutionMask; ///< 掩码 | |||
JStrObj StreamType; ///< 码流类型 | |||
public: | |||
EncodeInfo(JObject *pParent = NULL, const char *szName = JK_EncodeInfo): | |||
JObject(pParent,szName), | |||
CompressionMask(this, "CompressionMask"), | |||
Enable(this, "Enable"), | |||
HaveAudio(this, "HaveAudio"), | |||
ResolutionMask(this, "ResolutionMask"), | |||
StreamType(this, "StreamType"){ | |||
}; | |||
~EncodeInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,78 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_EventHandler "EventHandler" | |||
class EventHandler : public JObject | |||
{ | |||
public: | |||
JStrObj AlarmInfo; /// 要显示的报警信息 | |||
JBoolObj AlarmOutEnable; /// 报警使能 | |||
JIntObj AlarmOutLatch; /// 报警输出延时:10?300 sec | |||
JIntHex AlarmOutMask; /// 报警输出通道掩码 | |||
JBoolObj BeepEnable; /// 蜂鸣 | |||
JIntObj EventLatch; /// 联动开始延时时间,s为单位 | |||
JBoolObj FTPEnable; /// 启动FTP传输 | |||
JBoolObj LogEnable; /// 日志使能 | |||
JBoolObj MailEnable; /// 发送邮件 | |||
JBoolObj MatrixEnable; /// 矩阵使能 | |||
JIntHex MatrixMask; /// 矩阵掩码 | |||
JBoolObj MessageEnable; /// 发送消息到报警中心 | |||
JBoolObj MsgtoNetEnable; /// 消息上传给网络使能 | |||
JBoolObj MultimediaMsgEnable; /// 发送彩信 | |||
JBoolObj PtzEnable; /// 云台联动使能 | |||
JBoolObj RecordEnable; /// 录像使能 | |||
JIntObj RecordLatch; /// 录像延时:10?300 sec | |||
JIntHex RecordMask; /// 录象掩码 | |||
JBoolObj ShortMsgEnable; /// 发送短信 | |||
JBoolObj ShowInfo; /// 是否在GUI上和编码里显示报警信息 | |||
JIntHex ShowInfoMask; /// 要联动显示报警信息的通道掩码 | |||
JBoolObj SnapEnable; /// 抓图使能 | |||
JIntHex SnapShotMask; /// 抓图掩码 | |||
JObjArray<JObjArray<JStrObj> > TimeSection;/// 录像时间段 | |||
JBoolObj TipEnable; /// 屏幕提示使能 | |||
JBoolObj TourEnable; /// 轮巡使能 | |||
JIntHex TourMask; /// 抓图掩码 | |||
JBoolObj VoiceEnable; /// 语音提示 | |||
JIntObj VoiceType; /// 和上面的bVoice对应,表示语音提示音类型 | |||
JObjArray<JObjArray<JIntObj> > PtzLink; /// 云台联动项 | |||
public: | |||
EventHandler(JObject *pParent = NULL, const char *szName = JK_EventHandler): | |||
JObject(pParent,szName), | |||
AlarmInfo(this, "AlarmInfo"), | |||
AlarmOutEnable(this, "AlarmOutEnable"), | |||
AlarmOutLatch(this, "AlarmOutLatch"), | |||
AlarmOutMask(this, "AlarmOutMask"), | |||
BeepEnable(this, "BeepEnable"), | |||
EventLatch(this, "EventLatch"), | |||
FTPEnable(this, "FTPEnable"), | |||
LogEnable(this, "LogEnable"), | |||
MailEnable(this, "MailEnable"), | |||
MatrixEnable(this, "MatrixEnable"), | |||
MatrixMask(this, "MatrixMask"), | |||
MessageEnable(this, "MessageEnable"), | |||
MsgtoNetEnable(this, "MsgtoNetEnable"), | |||
MultimediaMsgEnable(this, "MultimediaMsgEnable"), | |||
PtzEnable(this, "PtzEnable"), | |||
RecordEnable(this, "RecordEnable"), | |||
RecordLatch(this, "RecordLatch"), | |||
RecordMask(this, "RecordMask"), | |||
ShortMsgEnable(this, "ShortMsgEnable"), | |||
ShowInfo(this, "ShowInfo"), | |||
ShowInfoMask(this, "ShowInfoMask"), | |||
SnapEnable(this, "SnapEnable"), | |||
SnapShotMask(this, "SnapShotMask"), | |||
TimeSection(this, "TimeSection"), | |||
TipEnable(this, "TipEnable"), | |||
TourEnable(this, "TourEnable"), | |||
TourMask(this, "TourMask"), | |||
VoiceType(this, "VoiceType"), | |||
PtzLink(this, "PtzLink"), | |||
VoiceEnable(this, "VoiceEnable"){ | |||
}; | |||
~EventHandler(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,25 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ExposureParam "ExposureParam" | |||
class ExposureParam : public JObject //曝光 | |||
{ | |||
public: | |||
JIntHex LeastTime; ///自动曝光时间下限或手动曝光时间,单位微秒 | |||
JIntObj Level; ///曝光等级 | |||
JIntHex MostTime; ///自动曝光时间上限,单位微秒 | |||
public: | |||
ExposureParam(JObject *pParent = NULL, const char *szName = JK_ExposureParam): | |||
JObject(pParent,szName), | |||
LeastTime(this, "LeastTime"), | |||
Level(this, "Level"), | |||
MostTime(this, "MostTime"){ | |||
}; | |||
~ExposureParam(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,25 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "Video.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ExtraFormat "ExtraFormat" | |||
class ExtraFormat : public JObject | |||
{ | |||
public: | |||
JBoolObj AudioEnable; ///是否开启视频编码 | |||
Video mVideo; ///视频格式定义 | |||
JBoolObj VideoEnable; ///是否开启音频编码 | |||
public: | |||
ExtraFormat(JObject *pParent = NULL, const char *szName = JK_ExtraFormat): | |||
JObject(pParent,szName), | |||
AudioEnable(this, "AudioEnable"), | |||
mVideo(this, "Video"), | |||
VideoEnable(this, "VideoEnable"){ | |||
}; | |||
~ExtraFormat(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_FbExtraStateCtrl "FbExtraStateCtrl" | |||
class FbExtraStateCtrl : public JObject | |||
{ | |||
public: | |||
JIntObj ison; | |||
public: | |||
FbExtraStateCtrl(JObject *pParent = NULL, const char *szName = JK_FbExtraStateCtrl): | |||
JObject(pParent,szName), | |||
ison(this, "ison"){ | |||
}; | |||
~FbExtraStateCtrl(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_GainParam "GainParam" | |||
class GainParam : public JObject | |||
{ | |||
public: | |||
JIntObj AutoGain; ///自动增益是否启用,0:不开启 1:开启 | |||
JIntObj Gain; ///自动增益上限(自动增益启用)或固定增益值 | |||
public: | |||
GainParam(JObject *pParent = NULL, const char *szName = JK_GainParam): | |||
JObject(pParent,szName), | |||
AutoGain(this, "AutoGain"), | |||
Gain(this, "Gain"){ | |||
}; | |||
~GainParam(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,38 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_General_General "General.General" | |||
class General_General : public JObject | |||
{ | |||
public: | |||
JIntObj AutoLogout; | |||
JIntObj FontSize; | |||
JIntObj IranCalendarEnable; | |||
JIntObj LocalNo; | |||
JStrObj MachineName; | |||
JStrObj OverWrite; | |||
JIntObj ScreenAutoShutdown; | |||
JIntObj ScreenSaveTime; | |||
JIntObj SnapInterval; | |||
JStrObj VideoOutPut; | |||
public: | |||
General_General(JObject *pParent = NULL, const char *szName = JK_General_General): | |||
JObject(pParent,szName), | |||
AutoLogout(this, "AutoLogout"), | |||
FontSize(this, "FontSize"), | |||
IranCalendarEnable(this, "IranCalendarEnable"), | |||
LocalNo(this, "LocalNo"), | |||
MachineName(this, "MachineName"), | |||
OverWrite(this, "OverWrite"), | |||
ScreenAutoShutdown(this, "ScreenAutoShutdown"), | |||
ScreenSaveTime(this, "ScreenSaveTime"), | |||
SnapInterval(this, "SnapInterval"), | |||
VideoOutPut(this, "VideoOutPut"){ | |||
}; | |||
~General_General(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,38 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "DSTEnd.h" | |||
#include "DSTStart.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_General_Location "General.Location" | |||
class General_Location : public JObject | |||
{ | |||
public: | |||
DSTEnd mDSTEnd; | |||
JStrObj DSTRule; | |||
DSTStart mDSTStart; | |||
JStrObj DateFormat; | |||
JStrObj DateSeparator; | |||
JStrObj Language; | |||
JStrObj TimeFormat; | |||
JStrObj VideoFormat; | |||
JIntObj WorkDay; | |||
public: | |||
General_Location(JObject *pParent = NULL, const char *szName = JK_General_Location): | |||
JObject(pParent,szName), | |||
mDSTEnd(this, "DSTEnd"), | |||
DSTRule(this, "DSTRule"), | |||
mDSTStart(this, "DSTStart"), | |||
DateFormat(this, "DateFormat"), | |||
DateSeparator(this, "DateSeparator"), | |||
Language(this, "Language"), | |||
TimeFormat(this, "TimeFormat"), | |||
VideoFormat(this, "VideoFormat"), | |||
WorkDay(this, "WorkDay"){ | |||
}; | |||
~General_Location(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_InputMethod "InputMethod" | |||
class InputMethod : public JObject | |||
{ | |||
public: | |||
JBoolObj NoSupportChinese; | |||
public: | |||
InputMethod(JObject *pParent = NULL, const char *szName = JK_InputMethod): | |||
JObject(pParent,szName), | |||
NoSupportChinese(this, "NoSupportChinese"){ | |||
}; | |||
~InputMethod(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_IntelDataWriteRsp "IntelDataWriteRsp" | |||
class IntelDataWriteRsp : public JObject | |||
{ | |||
public: | |||
JIntObj Index; | |||
public: | |||
IntelDataWriteRsp(JObject *pParent = NULL, const char *szName = JK_IntelDataWriteRsp): | |||
JObject(pParent,szName), | |||
Index(this, "Index"){ | |||
}; | |||
~IntelDataWriteRsp(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,218 @@ | |||
#pragma once | |||
#ifndef JOBJECT_H | |||
#define JOBJECT_H | |||
#include <iostream> | |||
#include <vector> | |||
#ifdef WIN32 | |||
#ifdef XJSON_EXPORTS | |||
#define XJSON_API __declspec(dllexport) | |||
#define XJSON_TEMPLATE __declspec(dllexport) | |||
#else | |||
#define XJSON_API __declspec(dllimport) | |||
#define XJSON_TEMPLATE | |||
#endif | |||
#define CALLBACK __stdcall | |||
#else | |||
#define XJSON_API | |||
#define XJSON_TEMPLATE | |||
#define CALLBACK | |||
#endif | |||
typedef void* PJSON_DATA; | |||
typedef void* PJSON_STRING; | |||
class XJSON_API JObject | |||
{ | |||
public: | |||
JObject(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JObject(void); | |||
public: | |||
virtual int Parse(const char *szJson); | |||
virtual int Parse(PJSON_DATA pParent, int index = -1); | |||
virtual const char *ToString(); | |||
virtual const char* Name(){return name;}; | |||
virtual void SetName(const char*nm); | |||
virtual int ToInt(); | |||
virtual bool ToBool(); | |||
virtual int SetValue(const char *szValue); | |||
virtual int SetValue(bool bValue); | |||
virtual int SetValue(int nValue); | |||
virtual JObject *NewChild(); | |||
virtual int AddChild(JObject *pNew); | |||
virtual int DelChild(const char *szName); | |||
virtual char *GetChannelName(int nChannelNo, const char* szStrName, char *pOutChannelName); | |||
virtual int GetBoolOfObjs(const char *szKeys, int nDefValue = 0); | |||
void JSON_SetParent(PJSON_DATA pParent); | |||
int JSON_AddToArray(JObject *pChild); | |||
int JSON_DelFromArray(int nIndex); | |||
protected: | |||
virtual void Clear(); | |||
protected: | |||
char *name; | |||
PJSON_DATA _pJSData; | |||
PJSON_DATA _pRoot; | |||
std::vector<JObject *> _items; | |||
PJSON_STRING _sJsonReslt; | |||
}; | |||
class XJSON_API JIntObj : public JObject | |||
{ | |||
public: | |||
JIntObj(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JIntObj(void); | |||
public: | |||
int Value(); | |||
virtual void operator=(const int nValue); | |||
}; | |||
class XJSON_API JStrObj : public JObject | |||
{ | |||
public: | |||
JStrObj(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JStrObj(void); | |||
public: | |||
const char *Value(); | |||
virtual void operator=(const char *szValue); | |||
protected: | |||
void *_sValue; | |||
}; | |||
class XJSON_API JIntHex : public JStrObj | |||
{ | |||
public: | |||
JIntHex(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JIntHex(void); | |||
int SetValue(bool bValue); | |||
int SetValue(int nValue); | |||
int ToInt(); | |||
public: | |||
int Value(); | |||
virtual void operator=(int); | |||
}; | |||
class XJSON_API JBoolObj : public JObject | |||
{ | |||
public: | |||
JBoolObj(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JBoolObj(void); | |||
public: | |||
bool Value(); | |||
virtual void operator=(const bool bValue); | |||
}; | |||
class XJSON_API JDoubleObj : public JObject | |||
{ | |||
public: | |||
JDoubleObj(JObject *pParent = NULL, const char *szName = ""); | |||
virtual ~JDoubleObj(void); | |||
public: | |||
double Value(); | |||
virtual void operator=(const double nValue); | |||
}; | |||
template <class T> | |||
class XJSON_TEMPLATE JObjArray : public JObject | |||
{ | |||
public: | |||
JObjArray(JObject *pParent = NULL, const char *szName = ""): | |||
JObject(pParent, szName) | |||
{ | |||
}; | |||
virtual ~JObjArray(void){}; | |||
public: | |||
T &operator[] (const int index) | |||
{ | |||
return *_arrayItems[index]; | |||
}; | |||
void Clear() | |||
{ | |||
typename std::vector<T*>::iterator iter = _arrayItems.begin(); | |||
while ( iter != _arrayItems.end() ) | |||
{ | |||
if( *iter ) | |||
{ | |||
delete *iter; | |||
} | |||
iter++; | |||
} | |||
_arrayItems.clear(); | |||
_items.clear(); | |||
JObject::Clear(); | |||
}; | |||
JObject *NewChild() | |||
{ | |||
T *pNew = new T(); | |||
_arrayItems.push_back(pNew); | |||
return (JObject *)pNew; | |||
}; | |||
virtual int AddChild(JObject *pChild) | |||
{ | |||
JSON_AddToArray(pChild); | |||
pChild->JSON_SetParent(NULL); | |||
_arrayItems.push_back((T*)pChild); | |||
return 0; | |||
}; | |||
virtual int DelChild(int nIndex) | |||
{ | |||
if (nIndex < 0 || nIndex >= _arrayItems.size()) | |||
{ | |||
return -1; | |||
} | |||
JSON_DelFromArray(nIndex); | |||
delete _arrayItems[nIndex]; | |||
_arrayItems.erase(_arrayItems.begin() + nIndex); | |||
return 0; | |||
} | |||
int Size() | |||
{ | |||
return (int)_arrayItems.size(); | |||
}; | |||
protected: | |||
std::vector<T*> _arrayItems; | |||
}; | |||
template <class T> | |||
class XJSON_TEMPLATE JObjArrayObject : public JObject | |||
{ | |||
public: | |||
JObjArrayObject(JObject *pParent = NULL, const char *szName = ""): | |||
JObject(NULL, ""), | |||
objs(this, szName) | |||
{ | |||
}; | |||
virtual ~JObjArrayObject(void){}; | |||
virtual int AddChild(JObject *pNew) | |||
{ | |||
return objs.AddChild(pNew); | |||
}; | |||
public: | |||
JObjArray<T> objs; | |||
}; | |||
#endif //JOBJECT_H |
@@ -0,0 +1,9 @@ | |||
#pragma once | |||
#include "JObject.h" | |||
#define NS_NETSDK_CFG_BEGIN namespace XSDK_CFG{ | |||
#define NS_NETSDK_CFG_END } | |||
#define USE_NS_NETSDK_CFG using namespace XSDK_CFG; | |||
@@ -0,0 +1,26 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_POINT "POINT" | |||
class JPOINT : public JObject | |||
{ | |||
public: | |||
JIntObj bottom; | |||
JIntObj left; | |||
JIntObj right; | |||
JIntObj top; | |||
public: | |||
JPOINT(JObject *pParent = NULL, const char *szName = JK_POINT): | |||
JObject(pParent,szName), | |||
bottom(this, "bottom"), | |||
left(this, "left"), | |||
right(this, "right"), | |||
top(this, "top"){ | |||
}; | |||
~JPOINT(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,15 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include <string> | |||
using namespace std; | |||
NS_NETSDK_CFG_BEGIN | |||
#define CFG_CHN_NAME(x,y) JCFG::GetChnCfgName(x, y).c_str() | |||
namespace JCFG | |||
{ | |||
string GetChnCfgName(const char *szCfgName, int nChnIndex); | |||
} | |||
NS_NETSDK_CFG_END | |||
@@ -0,0 +1,24 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "Video.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_MainFormat "MainFormat" | |||
class MainFormat : public JObject //主码流配置 | |||
{ | |||
public: | |||
JBoolObj AudioEnable; ///是否开启视频编码 | |||
Video mVideo; ///视频格式定义 | |||
JBoolObj VideoEnable; ///是否开启音频编码 | |||
public: | |||
MainFormat(JObject *pParent = NULL, const char *szName = JK_MainFormat): | |||
JObject(pParent,szName), | |||
AudioEnable(this, "AudioEnable"), | |||
mVideo(this, "Video"), | |||
VideoEnable(this, "VideoEnable"){ | |||
}; | |||
~MainFormat(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_MobileDVR "MobileDVR" | |||
class MobileDVR : public JObject | |||
{ | |||
public: | |||
JBoolObj CarPlateSet; | |||
JBoolObj DVRBootType; | |||
JBoolObj DelaySet; | |||
JBoolObj GpsTiming; | |||
JBoolObj StatusExchange; | |||
public: | |||
MobileDVR(JObject *pParent = NULL, const char *szName = JK_MobileDVR): | |||
JObject(pParent,szName), | |||
CarPlateSet(this, "CarPlateSet"), | |||
DVRBootType(this, "DVRBootType"), | |||
DelaySet(this, "DelaySet"), | |||
GpsTiming(this, "GpsTiming"), | |||
StatusExchange(this, "StatusExchange"){ | |||
}; | |||
~MobileDVR(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_ModifyPassword "ModifyPassword" | |||
class ModifyPassword : public JObject //修改密码相关 | |||
{ | |||
public: | |||
JStrObj EncryptType; | |||
JStrObj NewPassWord; | |||
JStrObj PassWord; | |||
JStrObj SessionID; | |||
JStrObj UserName; | |||
public: | |||
ModifyPassword(JObject *pParent = NULL, const char *szName = JK_ModifyPassword): | |||
JObject(pParent,szName), | |||
EncryptType(this, "EncryptType"), | |||
NewPassWord(this, "NewPassWord"), | |||
PassWord(this, "PassWord"), | |||
SessionID(this, "SessionID"), | |||
UserName(this, "UserName"){ | |||
}; | |||
~ModifyPassword(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,102 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_NetServerFunction "NetServerFunction" | |||
class NetServerFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj MACProtocol; | |||
JBoolObj MonitorPlatform; | |||
JBoolObj NATProtocol; | |||
JBoolObj Net3G; | |||
JBoolObj NetARSP; | |||
JBoolObj NetAlarmCenter; | |||
JBoolObj NetAnJuP2P; | |||
JBoolObj NetBaiduCloud; | |||
JBoolObj NetBjlThy; | |||
JBoolObj NetDAS; | |||
JBoolObj NetDDNS; | |||
JBoolObj NetDHCP; | |||
JBoolObj NetDNS; | |||
JBoolObj NetEmail; | |||
JBoolObj NetFTP; | |||
JBoolObj NetGodEyeAlarm; | |||
JBoolObj NetIPFilter; | |||
JBoolObj NetKaiCong; | |||
JBoolObj NetKeyboard; | |||
JBoolObj NetLocalSdkPlatform; | |||
JBoolObj NetMobile; | |||
JBoolObj NetMobileWatch; | |||
JBoolObj NetMutliCast; | |||
JBoolObj NetNTP; | |||
JBoolObj NetNat; | |||
JBoolObj NetOpenVPN; | |||
JBoolObj NetPMS; | |||
JBoolObj NetPPPoE; | |||
JBoolObj NetPhoneMultimediaMsg; | |||
JBoolObj NetPhoneShortMsg; | |||
JBoolObj NetPlatMega; | |||
JBoolObj NetPlatShiSou; | |||
JBoolObj NetPlatVVEye; | |||
JBoolObj NetPlatXingWang; | |||
JBoolObj NetRTSP; | |||
JBoolObj NetSPVMN; | |||
JBoolObj NetTUTKIOTC; | |||
JBoolObj NetUPNP; | |||
JBoolObj NetVPN; | |||
JBoolObj NetWifi; | |||
JBoolObj PlatFormGBeyes; | |||
JBoolObj XMHeartBeat; | |||
public: | |||
NetServerFunction(JObject *pParent = NULL, const char *szName = JK_NetServerFunction): | |||
JObject(pParent,szName), | |||
MACProtocol(this, "MACProtocol"), | |||
MonitorPlatform(this, "MonitorPlatform"), | |||
NATProtocol(this, "NATProtocol"), | |||
Net3G(this, "Net3G"), | |||
NetARSP(this, "NetARSP"), | |||
NetAlarmCenter(this, "NetAlarmCenter"), | |||
NetAnJuP2P(this, "NetAnJuP2P"), | |||
NetBaiduCloud(this, "NetBaiduCloud"), | |||
NetBjlThy(this, "NetBjlThy"), | |||
NetDAS(this, "NetDAS"), | |||
NetDDNS(this, "NetDDNS"), | |||
NetDHCP(this, "NetDHCP"), | |||
NetDNS(this, "NetDNS"), | |||
NetEmail(this, "NetEmail"), | |||
NetFTP(this, "NetFTP"), | |||
NetGodEyeAlarm(this, "NetGodEyeAlarm"), | |||
NetIPFilter(this, "NetIPFilter"), | |||
NetKaiCong(this, "NetKaiCong"), | |||
NetKeyboard(this, "NetKeyboard"), | |||
NetLocalSdkPlatform(this, "NetLocalSdkPlatform"), | |||
NetMobile(this, "NetMobile"), | |||
NetMobileWatch(this, "NetMobileWatch"), | |||
NetMutliCast(this, "NetMutliCast"), | |||
NetNTP(this, "NetNTP"), | |||
NetNat(this, "NetNat"), | |||
NetOpenVPN(this, "NetOpenVPN"), | |||
NetPMS(this, "NetPMS"), | |||
NetPPPoE(this, "NetPPPoE"), | |||
NetPhoneMultimediaMsg(this, "NetPhoneMultimediaMsg"), | |||
NetPhoneShortMsg(this, "NetPhoneShortMsg"), | |||
NetPlatMega(this, "NetPlatMega"), | |||
NetPlatShiSou(this, "NetPlatShiSou"), | |||
NetPlatVVEye(this, "NetPlatVVEye"), | |||
NetPlatXingWang(this, "NetPlatXingWang"), | |||
NetRTSP(this, "NetRTSP"), | |||
NetSPVMN(this, "NetSPVMN"), | |||
NetTUTKIOTC(this, "NetTUTKIOTC"), | |||
NetUPNP(this, "NetUPNP"), | |||
NetVPN(this, "NetVPN"), | |||
NetWifi(this, "NetWifi"), | |||
PlatFormGBeyes(this, "PlatFormGBeyes"), | |||
XMHeartBeat(this, "XMHeartBeat"){ | |||
}; | |||
~NetServerFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,66 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_NetWork_NetCommon "NetWork.NetCommon" | |||
class NetWork_NetCommon : public JObject | |||
{ | |||
public: | |||
JStrObj DeviceID; | |||
JIntObj DeviceType; | |||
JStrObj DvrMac; | |||
JIntObj EncryptType; | |||
JStrObj GateWay; | |||
JStrObj HostIP; | |||
JStrObj HostName; | |||
JIntObj HttpPort; | |||
JStrObj MAC; | |||
JIntObj MaxBps; | |||
JIntObj MonMode; | |||
JStrObj Password; | |||
JStrObj SN; | |||
JIntObj SSLPort; | |||
JStrObj Submask; | |||
JIntObj TCPMaxConn; | |||
JIntObj TCPPort; | |||
JIntObj TransferPlan; | |||
JIntObj UDPPort; | |||
JBoolObj UseHSDownLoad; | |||
JStrObj Username; | |||
JStrObj Version; | |||
JStrObj BuildDate; | |||
public: | |||
NetWork_NetCommon(JObject *pParent = NULL, const char *szName = JK_NetWork_NetCommon): | |||
JObject(pParent,szName), | |||
DeviceID(this, "DeviceID"), | |||
DeviceType(this, "DeviceType"), | |||
DvrMac(this, "DvrMac"), | |||
EncryptType(this, "EncryptType"), | |||
GateWay(this, "GateWay"), | |||
HostIP(this, "HostIP"), | |||
HostName(this, "HostName"), | |||
HttpPort(this, "HttpPort"), | |||
MAC(this, "MAC"), | |||
MaxBps(this, "MaxBps"), | |||
MonMode(this, "MonMode"), | |||
Password(this, "Password"), | |||
SN(this, "SN"), | |||
SSLPort(this, "SSLPort"), | |||
Submask(this, "Submask"), | |||
TCPMaxConn(this, "TCPMaxConn"), | |||
TCPPort(this, "TCPPort"), | |||
TransferPlan(this, "TransferPlan"), | |||
UDPPort(this, "UDPPort"), | |||
UseHSDownLoad(this, "UseHSDownLoad"), | |||
Username(this, "Username"), | |||
Version(this, "Version"), | |||
BuildDate(this, "BuildDate"){ | |||
const char *szInit = "{ \"Name\" : \"NetWork.NetCommon\", \"NetWork.NetCommon\" : { \"DeviceID\" : \"0x00000000\", \"DeviceType\" : 65535, \"DvrMac\" : \"50:7B:9D:C2:04:FA\", \"EncryptType\" : 1, \"GateWay\" : \"0x01200a0a\", \"HostIP\" : \"0x010aa8c0\", \"HostName\" : \"robot_5002\", \"HttpPort\" : 80, \"MAC\" : \"ac:a2:13:0e:50:02\", \"MaxBps\" : 0, \"MonMode\" : 0, \"Password\" : \"QyZfVmgd\", \"SN\" : \"\", \"SSLPort\" : 8443, \"Submask\" : \"0x00f0ffff\", \"TCPMaxConn\" : 10, \"TCPPort\" : 34567, \"TransferPlan\" : 0, \"UDPPort\" : 34562, \"UseHSDownLoad\" : false, \"Username\" : \"admin\", \"Version\" : \"V4.02.R12.E1207810.12002.130302.00000\", \"BuildDate\" : \"2016-12-30 10:53:37\" }, \"Ret\" : 100, \"SessionID\" : \"0x00000000\" }"; | |||
this->Parse(szInit); | |||
}; | |||
~NetWork_NetCommon(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,40 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_NetWork_Wifi "NetWork.Wifi" | |||
class NetWork_Wifi : public JObject | |||
{ | |||
public: | |||
JStrObj Auth; | |||
JIntObj Channel; | |||
JBoolObj Enable; | |||
JStrObj EncrypType; | |||
JStrObj GateWay; | |||
JStrObj HostIP; | |||
JIntObj KeyType; | |||
JStrObj Keys; | |||
JStrObj NetType; | |||
JStrObj SSID; | |||
JStrObj Submask; | |||
public: | |||
NetWork_Wifi(JObject *pParent = NULL, const char *szName = JK_NetWork_Wifi): | |||
JObject(pParent,szName), | |||
Auth(this, "Auth"), | |||
Channel(this, "Channel"), | |||
Enable(this, "Enable"), | |||
EncrypType(this, "EncrypType"), | |||
GateWay(this, "GateWay"), | |||
HostIP(this, "HostIP"), | |||
KeyType(this, "KeyType"), | |||
Keys(this, "Keys"), | |||
NetType(this, "NetType"), | |||
SSID(this, "SSID"), | |||
Submask(this, "Submask"){ | |||
}; | |||
~NetWork_Wifi(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,41 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPDefaultConfig "OPDefaultConfig" | |||
class OPDefaultConfig : public JObject | |||
{ | |||
public: | |||
JBoolObj Account; // 用户管理 | |||
JBoolObj Alarm; // 报警 | |||
JBoolObj CameraPARAM; // 网络摄像头配置 | |||
JBoolObj CommPtz; // 云台,串口 | |||
JBoolObj Encode; // 编码配置 | |||
JBoolObj Factory; // 恢复出厂设置配置 | |||
JBoolObj General; // 普通配置 | |||
JBoolObj NetCommon; // 通用网络 | |||
JBoolObj NetServer; // 网络服务 | |||
JBoolObj Preview; // 预览配置 | |||
JBoolObj Record; // 录像配置 | |||
public: | |||
OPDefaultConfig(JObject *pParent = NULL, const char *szName = JK_OPDefaultConfig): | |||
JObject(pParent,szName), | |||
Account(this, "Account"), | |||
Alarm(this, "Alarm"), | |||
CameraPARAM(this, "CameraPARAM"), | |||
CommPtz(this, "CommPtz"), | |||
Encode(this, "Encode"), | |||
Factory(this, "Factory"), | |||
General(this, "General"), | |||
NetCommon(this, "NetCommon"), | |||
NetServer(this, "NetServer"), | |||
Preview(this, "Preview"), | |||
Record(this, "Record"){ | |||
this->Parse("{ \"Name\" : \"OPDefaultConfig\", \"OPDefaultConfig\" : { \"Account\" : false, \"Alarm\" : false, \"CameraPARAM\" : false, \"CommPtz\" : false, \"Encode\" : false, \"Factory\" : false, \"General\" : false, \"NetCommon\" : false, \"NetServer\" : false, \"Preview\" : false, \"Record\" : false }, \"SessionID\" : \"0x4d\" }"); | |||
}; | |||
~OPDefaultConfig(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,36 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPFileQuery "OPFileQuery" | |||
// MSGID:EXCMD_FILESEARCH_REQ(1440) | |||
class OPFileQuery : public JObject | |||
{ | |||
public: | |||
JStrObj BeginTime; | |||
JIntObj Channel; | |||
JStrObj DriverTypeMask; | |||
JStrObj EndTime; | |||
JStrObj SubType; | |||
JIntHex StreamType; | |||
JStrObj Type; | |||
public: | |||
OPFileQuery(JObject *pParent = NULL, const char *szName = JK_OPFileQuery): | |||
JObject(pParent,szName), | |||
BeginTime(this, "BeginTime"), | |||
Channel(this, "Channel"), | |||
DriverTypeMask(this, "DriverTypeMask"), | |||
EndTime(this, "EndTime"), | |||
SubType(this, "Event"), | |||
StreamType(this, "StreamType"), | |||
Type(this, "Type") | |||
{ | |||
this->Parse("{ \"Name\" : \"OPFileQuery\", \"OPFileQuery\" : { \"BeginTime\" : \"2018-07-24 00:00:00\", \"Channel\" : 0, \"DriverTypeMask\" : \"0x0000FFFF\", \"EndTime\" : \"2018-07-24 23:59:59\", \"Event\" : \"*\", \"StreamType\" : \"0x00000000\", \"Type\" : \"h264\" }, \"SessionID\" : \"0x4d5\" }"); | |||
}; | |||
~OPFileQuery(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,27 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPLogQuery "OPLogQuery" | |||
class OPLogQuery : public JObject | |||
{ | |||
public: | |||
JStrObj BeginTime; ///< 查询日志开始时间,格式:YYYY-MM-DD HH:mm:SS | |||
JStrObj EndTime; ///< 查询日志结束时间,格式:YYYY-MM-DD HH:mm:SS | |||
JIntObj LogPosition; ///< 从上次查询的结束时的日志指针:0 | |||
JStrObj Type; ///< 日志类型--“LogAll”:所有;"LogSystem":系统;"LogConfig":配置;"LogStorage":存储;"LogAlarm":报警;"LogRecord":录像;"LogAccount":账号;"LogFile":文件 | |||
public: | |||
OPLogQuery(JObject *pParent = NULL, const char *szName = JK_OPLogQuery): | |||
JObject(pParent,szName), | |||
BeginTime(this, "BeginTime"), | |||
EndTime(this, "EndTime"), | |||
LogPosition(this, "LogPosition"), | |||
Type(this, "Type"){ | |||
this->Parse("{ \"Name\" : \"OPLogQuery\", \"OPLogQuery\" : { \"BeginTime\" : \"2019-03-27 00:00:00\", \"EndTime\" : \"2019-03-27 23:59:59\", \"LogPosition\" : 0, \"Type\" : \"LogAll\" }, \"SessionID\" : \"0x1\" }"); | |||
}; | |||
~OPLogQuery(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,66 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
////////////////返回的日志类型字符串注释///////////////// | |||
#define LogTypeAccountRestore "AccountRestore" //账号还原默认 | |||
#define LogTypeAddGroup "AddGroup" //添加组 | |||
#define LogTypeAddUser "AddUser" //增加用户 | |||
#define LogTypeClearDriver "ClearDriver" //清除驱动器数据 | |||
#define LogTypeClearLog "ClearLog" //清除日志 | |||
#define LogTypeDeleteGroup "DeleteGroup" //删除组 | |||
#define LogTypeDeleteUser "DeleteUser" //删除用户 | |||
#define LogTypeDiskChanged "DiskChanged" //存储设备变动 | |||
#define LogTypeEventLatch "EventLatch" //延迟事件 | |||
#define LogTypeEventStart "EventStart" //报警开始 | |||
#define LogTypeEventStop "EventStop" //报警结束 | |||
#define LogTypeFileAccess "FileAccess" //文件存取 | |||
#define LogTypeFileAccessError "FileAccessError" //文件访问出错 | |||
#define LogTypeFileSearch "FileSearch" //文件查询 | |||
#define LogTypeLogIn "LogIn" //用户登录 | |||
#define LogTypeLogOut "LogOut" //用户登出 | |||
#define LogTypeModifyGroup "ModifyGroup" //修改组 | |||
#define LogTypeModifyPassword "ModifyPassword" //修改密码 | |||
#define LogTypeModifyTime "ModifyTime" //修改系统时间 | |||
#define LogTypeModifyUser "ModifyUser" //修改用户 | |||
#define LogTypePTZTour "PTZTour" //巡航路线 | |||
#define LogTypeReboot "Reboot" //重启 | |||
#define LogTypeRecord "Record" //录像操作 | |||
#define LogTypeSaveConfig "SaveConfig" //保存配置 | |||
#define LogTypeSetDriverType "SetDriverType" //设置驱动器类型 | |||
#define LogTypeShutDown "ShutDown" //关机 | |||
#define LogTypeStorageDeviceError "StorageDeviceError" //存储设备出错 | |||
#define LogTypeUpdate "Update" //更新 | |||
#define LogTypeUpgrade "Upgrade" //系统升级 | |||
#define LogTypeZeroBitrate "ZeroBitrate" //无码流 | |||
#define LogTypeSaveSystemState "SaveSystemState" //保存系统状态 | |||
#define LogTypeTimeChanged "TimeChanged" //修改时间 | |||
#define LogTypeSetTime "SetTime" //设置时间 | |||
#define JK_OPLogQueryInfo "OPLogQuery" | |||
class OPLogQueryInfo : public JObject | |||
{ | |||
public: | |||
JStrObj Data; ///< 日志数据 | |||
JIntObj Position; ///< 从上次查询的结束时的日志指针 | |||
JStrObj Time; ///< 日志时间 | |||
JStrObj Type; ///< 日志类型 | |||
JStrObj User; ///< 日志用户 | |||
public: | |||
OPLogQueryInfo(JObject *pParent = NULL, const char *szName = JK_OPLogQueryInfo): | |||
JObject(pParent,szName), | |||
Data(this, "Data"), | |||
Position(this, "Position"), | |||
Time(this, "Time"), | |||
Type(this, "Type"), | |||
User(this, "User"){ | |||
}; | |||
~OPLogQueryInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPMachine "OPMachine" | |||
class OPMachine : public JObject | |||
{ | |||
public: | |||
JStrObj Action; | |||
public: | |||
OPMachine(JObject *pParent = NULL, const char *szName = JK_OPMachine): | |||
JObject(pParent,szName), | |||
Action(this, "Action"){ | |||
this->Parse("{ \"Name\" : \"OPMachine\", \"OPMachine\" : { \"Action\" : \"Shutdown\" }, \"SessionID\" : \"0x1b\" }"); | |||
}; | |||
~OPMachine(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,23 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPNetKeyboard "OPNetKeyboard" | |||
class OPNetKeyboard : public JObject | |||
{ | |||
public: | |||
JStrObj Status; | |||
JStrObj Value; | |||
public: | |||
OPNetKeyboard(JObject *pParent = NULL, const char *szName = JK_OPNetKeyboard): | |||
JObject(pParent,szName), | |||
Status(this, "Status"), | |||
Value(this, "Value"){ | |||
this->Parse("{\"Name\" : \"OPNetKeyboard\",\"OPNetKeyboard\" : {\"Status\" : \"KeyUp\",\"Value\" : \"AutoTour\"},\"SessionID\" : \"0x5a91\"}"); | |||
}; | |||
~OPNetKeyboard(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,58 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "Parameter.h" | |||
#include "../XNetSDKDefine.h" | |||
NS_NETSDK_CFG_BEGIN | |||
/////////////////方向控制///////////////// | |||
#define JPTZ_DirectionLeftUp "DirectionLeftUp" | |||
#define JPTZ_DirectionUp "DirectionUp" | |||
#define JPTZ_DirectionRightUp "DirectionRightUp" | |||
#define JPTZ_DirectionLeft "DirectionLeft" | |||
#define JPTZ_DirectionRight "DirectionRight" | |||
#define JPTZ_DirectionLeftDown "DirectionLeftDown" | |||
#define JPTZ_DirectionDown "DirectionDown" | |||
#define JPTZ_DirectionRightDown "DirectionRightDown" | |||
#define JPTZ_IrisSmall "IrisSmall" | |||
#define JPTZ_IrisLarge "IrisLarge" | |||
#define JPTZ_FocusNear "FocusNear" | |||
#define JPTZ_FocusFar "FocusFar" | |||
#define JPTZ_ZoomWide "ZoomWide" | |||
#define JPTZ_ZoomTile "ZoomTile" | |||
#define JPTZ_Reset "Reset" | |||
#define JPTZ_OPERATION_START 65535 | |||
#define JPTZ_OPERATION_STOP -1 | |||
/////////////////云台预置点操作///////////////// | |||
#define JPTZ_GotoPreset "GotoPreset" | |||
#define JPTZ_SetPreset "SetPreset" | |||
#define JPTZ_ClearPreset "ClearPreset" | |||
/////////////////云台巡航操作///////////////// | |||
#define JPTZ_AddTour "AddTour" //添加巡航点 | |||
#define JPTZ_DeleteTour "DeleteTour" //删除预置点 | |||
#define JPTZ_StartTour "StartTour" //开始巡航 | |||
#define JPTZ_StopTour "StopTour" //停止巡航 | |||
#define JK_OPPTZControl "OPPTZControl" | |||
class OPPTZControl : public JObject | |||
{ | |||
public: | |||
Parameter mParameter; | |||
JStrObj Command; | |||
public: | |||
OPPTZControl(JObject *pParent = NULL, const char *szName = JK_OPPTZControl): | |||
JObject(pParent, JK_OPPTZControl), | |||
mParameter(this, "Parameter"), | |||
Command(this,"Command") | |||
{ | |||
this->Parse("{ \"Name\" : \"OPPTZControl\", \"OPPTZControl\" : { \"Command\" : \"DirectionLeft\", \"Parameter\" : { \"AUX\" : { \"Number\" : 0, \"Status\" : \"On\" }, \"Channel\" : 0, \"MenuOpts\" : \"Enter\", \"POINT\" : { \"bottom\" : 0, \"left\" : 0, \"right\" : 0, \"top\" : 0 }, \"Pattern\" : \"SetBegin\", \"Preset\" : 65535, \"Step\" : 5, \"Tour\" : 0 } }, \"SessionID\" : \"0x0000000000\" }"); | |||
}; | |||
~OPPTZControl(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,109 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PlayBackParameter "Parameter" | |||
class PlayBackParameter : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JStrObj FileName; | |||
JStrObj PlayMode; | |||
JIntObj Stream_Type; | |||
JIntObj Value; | |||
JStrObj TransMode; | |||
JStrObj IntelligentPlayBackEvent; | |||
JIntObj IntelligentPlayBackSpeed; | |||
public: | |||
PlayBackParameter(JObject *pParent = NULL, const char *szName = JK_PlayBackParameter): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
FileName(this, "FileName"), | |||
PlayMode(this, "PlayMode"), | |||
Stream_Type(this, "Stream_Type"), | |||
Value(this, "Value"), | |||
TransMode(this, "TransMode"), | |||
IntelligentPlayBackEvent(this, "IntelligentPlayBackEvent"), | |||
IntelligentPlayBackSpeed(this, "IntelligentPlayBackSpeed"){ | |||
}; | |||
~PlayBackParameter(void){}; | |||
// F_SUB_COMMON = 0x00, F_SUB_LOCALALARM = 0x01, ///< 本地报警 | |||
// F_SUB_NETALARM = 0x02, ///< 网络报警 F_SUB_NETABORT = 0x03, ///< 断网报警 | |||
// F_SUB_IPCALARM = 0x04, ///< IPC报警 F_SUB_SPEEDALARM = 0x05, ///< 超速报警 | |||
// F_SUB_GSENSORALARM = 0x06, ///< SENSOR报警 F_SUB_SERIALALARM = 0x07, ///<串口报警 | |||
// F_SUB_MOTIONDETECT = 0x08, ///< 移动侦测 F_SUB_LOSSDETECT = 0x09, ///< 视频丢失 | |||
// F_SUB_BLINDDETECT = 0x0a, ///< 视频遮挡 F_SUB_PIRALARM = 0x0b, ///< 红外检测 | |||
// F_SUB_CARDNUMBER = 0x0c, ///< 卡号录像 F_SUB_PERIMETER = 0x0d, ///< 周界检测 | |||
// F_SUB_TRIPWIRE = 0x0e, ///< 单绊线检测 F_SUB_ABANDUM = 0x0f, ///< 物品遗留 | |||
// F_SUB_STOLEN = 0x10, ///< 物品被盗 F_SUB_CHANGE = 0x11, ///< 场景变换 | |||
// F_SUB_NR = 0x1f, | |||
void SetPlayBackEvent(unsigned int *event, int nCount) | |||
{ | |||
unsigned int value; | |||
for(int i = 0; i < nCount; i++) | |||
{ | |||
value |= (0x1 << event[i]); | |||
} | |||
}; | |||
void SetPlayBackEvent(const char *szEvent) | |||
{ | |||
}; | |||
}; | |||
#define JK_OPPlayBack "OPPlayBack" | |||
class OPPlayBack : public JObject | |||
{ | |||
public: | |||
JStrObj Action; | |||
PlayBackParameter mParameter; | |||
JStrObj EndTime; | |||
JStrObj StartTime; | |||
public: | |||
OPPlayBack(JObject *pParent = NULL, const char *szName = JK_OPPlayBack): | |||
JObject(pParent,szName), | |||
Action(this, "Action"), | |||
mParameter(this, JK_PlayBackParameter), | |||
EndTime(this, "EndTime"), | |||
StartTime(this, "StartTime"){ | |||
static const char *s_szInitValue = | |||
"{\r\n\"Name\" : \"OPPlayBack\",\r\n\ | |||
\"SessionID\" : \"0x2c\", \r\n\ | |||
\"OPPlayBack\": {\r\n\ | |||
\"Action\": \"Stop\",\r\n\ | |||
\"Parameter\": {\r\n\ | |||
\"Channel\": 1,\r\n\ | |||
\"FileName\": \"01_2018-09-12 00:00:00\",\r\n\ | |||
\"PlayMode\": \"ByTime\",\r\n\ | |||
\"Stream_Type\": 0,\r\n\ | |||
\"Value\": 0,\r\n\ | |||
\"TransMode\": \"TCP\",\r\n\ | |||
\"IntelligentPlayBackEvent\": \"ALL\",\r\n\ | |||
\"IntelligentPlayBackSpeed\": 0\r\n\ | |||
},\r\n\ | |||
\"StartTime\": \"2018-09-12 00:00:00\",\r\n\ | |||
\"EndTime\": \"2018-09-12 23:59:59\"\r\n\ | |||
}\r\n}"; | |||
this->Parse(s_szInitValue); | |||
}; | |||
void SetStartTime(int tt[6]) | |||
{ | |||
char szTime[32]; | |||
sprintf(szTime, "%04d-%02d-%02d %02d:%02d:%02d", tt[0], tt[1], tt[2], tt[3], tt[4], tt[5]); | |||
StartTime = szTime; | |||
}; | |||
void SetEndTime(int tt[6]) | |||
{ | |||
char szTime[32]; | |||
sprintf(szTime, "%04d-%02d-%02d %02d:%02d:%02d", tt[0], tt[1], tt[2], tt[3], tt[4], tt[5]); | |||
EndTime = szTime; | |||
}; | |||
~OPPlayBack(void){}; | |||
}; | |||
NS_NETSDK_CFG_END | |||
@@ -0,0 +1,36 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPPowerSocketGet "OPPowerSocketGet" | |||
class OPPowerSocketGet : public JObject | |||
{ | |||
public: | |||
JIntObj Switch; | |||
JIntObj AutoSwitch; | |||
JIntObj Light; | |||
JIntObj UsbPower; | |||
JIntObj AutoLight; | |||
JIntObj AutoUsbPower; | |||
JIntObj SensorSwitch; | |||
JIntObj SensorLight; | |||
JIntObj SensorUsbPower; | |||
public: | |||
OPPowerSocketGet(JObject *pParent = NULL, const char *szName = JK_OPPowerSocketGet): | |||
JObject(pParent,szName), | |||
Switch(this, "Switch"), | |||
AutoSwitch(this, "AutoSwitch"), | |||
Light(this, "Light"), | |||
UsbPower(this, "UsbPower"), | |||
AutoLight(this, "AutoLight"), | |||
AutoUsbPower(this, "AutoUsbPower"), | |||
SensorSwitch(this, "SensorSwitch"), | |||
SensorLight(this, "SensorLight"), | |||
SensorUsbPower(this, "SensorUsbPower"){ | |||
}; | |||
~OPPowerSocketGet(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,29 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPReqImport "OPReqImport" | |||
class OPReqImport : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JIntObj Length; | |||
JStrObj IntelType; | |||
JStrObj Opr; | |||
JIntObj Index; | |||
public: | |||
OPReqImport(JObject *pParent = NULL, const char *szName = JK_OPReqImport): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
Length(this, "Length"), | |||
IntelType(this, "IntelType"), | |||
Index(this, "Index"), | |||
Opr(this, "Opr"){ | |||
this->Parse("{\"Name\" : \"OPReqImport\",\"OPReqImport\" : {\"Channel\" : 0,\"Length\" : 0,\"Index\" : 0,\"IntelType\" : \"CarPlate\",\"Opr\" : \"Stop\"},\"SessionID\" : \"0x5a91\"}"); | |||
}; | |||
~OPReqImport(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,24 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "OSDInfo.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPSetOSD "OPSetOSD" | |||
class OPSetOSD : public JObject | |||
{ | |||
public: | |||
JStrObj strEnc; | |||
JObjArray<OSDInfo> mOSDInfo; | |||
public: | |||
OPSetOSD(JObject *pParent = NULL, const char *szName = JK_OPSetOSD): | |||
JObject(pParent,szName), | |||
strEnc(this, "strEnc"), | |||
mOSDInfo(this, "OSDInfo"){ | |||
this->Parse("{ \"Name\" : \"OPSetOSD\", \"OPSetOSD\" : { \"OSDInfo\" : [ { \"Info\" : [ \"CAM01\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" ], \"OSDInfoWidget\" : { \"BackColor\" : \"0xF00000FF\", \"EncodeBlend\" : true, \"FrontColor\" : \"0x40000000\", \"PreviewBlend\" : false, \"RelativePos\" : [ 425, 728, 55318480, 0 ] } } ], \"strEnc\" : \"UTF-8\" }, \"SessionID\" : \"0x29\" }"); | |||
}; | |||
~OPSetOSD(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,29 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPStorageManager "OPStorageManager" | |||
class OPStorageManager : public JObject //存储管理 | |||
{ | |||
public: | |||
JStrObj Action; | |||
JIntObj PartNo; | |||
JIntObj SerialNo; | |||
JStrObj Type; | |||
public: | |||
OPStorageManager(JObject *pParent = NULL, const char *szName = JK_OPStorageManager): | |||
JObject(pParent,szName), | |||
Action(this, "Action"), | |||
PartNo(this, "PartNo"), | |||
SerialNo(this, "SerialNo"), | |||
Type(this, "Type"){ | |||
char szConfig[256] = {0}; | |||
sprintf(szConfig, "{\"Name\":\"%s\", \"%s\":{\"Action\":\"\",\"PartNo\":0,\"SerialNo\":0,\"Type\":\"\"}}", JK_OPStorageManager, JK_OPStorageManager); | |||
int nRet = Parse(szConfig); | |||
}; | |||
~OPStorageManager(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,29 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OPTimeSetting "OPTimeSetting" | |||
class OPTimeSetting : public JObject | |||
{ | |||
public: | |||
JStrObj Name; | |||
JStrObj mOPTimeSetting; | |||
JStrObj SessionID; | |||
public: | |||
OPTimeSetting(): | |||
JObject(NULL, ""), | |||
Name(this, JK_OPTimeSetting), | |||
mOPTimeSetting(this, "\"2018-07-25 17:20:37\""), | |||
SessionID(this, "SessionID") | |||
{ | |||
this->Parse("{ \"Name\" : \"OPTimeSetting\", \"OPTimeSetting\" : \"2018-07-25 17:20:37\", \"SessionID\" : \"0x00000000\" }"); | |||
}; | |||
~OPTimeSetting(void) | |||
{ | |||
}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,23 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "OSDInfoWidget.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OSDInfo "OSDInfo" | |||
class OSDInfo : public JObject | |||
{ | |||
public: | |||
JObjArray<JStrObj> Info; | |||
OSDInfoWidget mOSDInfoWidget; | |||
public: | |||
OSDInfo(JObject *pParent = NULL, const char *szName = JK_OSDInfo): | |||
JObject(pParent,szName), | |||
Info(this, "Info"), | |||
mOSDInfoWidget(this, "OSDInfoWidget"){ | |||
}; | |||
~OSDInfo(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OSDInfoWidget "OSDInfoWidget" | |||
class OSDInfoWidget : public JObject | |||
{ | |||
public: | |||
JStrObj BackColor; | |||
JBoolObj EncodeBlend; | |||
JStrObj FrontColor; | |||
JBoolObj PreviewBlend; | |||
JObjArray<JIntObj> RelativePos; | |||
public: | |||
OSDInfoWidget(JObject *pParent = NULL, const char *szName = JK_OSDInfoWidget): | |||
JObject(pParent,szName), | |||
BackColor(this, "BackColor"), | |||
EncodeBlend(this, "EncodeBlend"), | |||
FrontColor(this, "FrontColor"), | |||
PreviewBlend(this, "PreviewBlend"), | |||
RelativePos(this, "RelativePos"){ | |||
}; | |||
~OSDInfoWidget(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,212 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_OtherFunction "OtherFunction" | |||
class OtherFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj DownLoadPause; | |||
JBoolObj USBsupportRecord; | |||
JBoolObj SDsupportRecord; | |||
JBoolObj SupportOnvifClient; | |||
JBoolObj SupportNetLocalSearch; | |||
JBoolObj SupportMaxPlayback; | |||
JBoolObj SupportNVR; | |||
JBoolObj SupportC7Platform; | |||
JBoolObj SupportMailTest; | |||
JBoolObj SupportOSDInfo; | |||
JBoolObj HideDigital; | |||
JBoolObj NotSupportAH; //水平锐度AcutanceHorizontal | |||
JBoolObj NotSupportAV; //垂直锐度AcutanceVertial | |||
JBoolObj SupportBT; //宽动态BroadTrends | |||
JBoolObj NotSupportTalk ; //对讲 | |||
JBoolObj AlterDigitalName; //支持修改数字通道名称 | |||
JBoolObj SupportShowConnectStatus; | |||
JBoolObj SupportPlayBackExactSeek; | |||
JBoolObj TitleAndStateUpload; | |||
JBoolObj NOHDDRECORD; | |||
JBoolObj MusicFilePlay; | |||
JBoolObj SupportSetDigIP; | |||
JBoolObj SupportShowProductType; | |||
JBoolObj SupportCamareStyle; | |||
JBoolObj Supportonviftitle; | |||
JBoolObj SupportDimenCode; | |||
JBoolObj SupportStorageNAS; | |||
JBoolObj ShowFalseCheckTime; | |||
JBoolObj SupportTimeZone; | |||
JBoolObj ShowAlarmLevelRegion; | |||
JBoolObj SupportPOS; //支持POS | |||
JBoolObj HddLowSpaceUseMB; //硬盘空间不足报警用MB | |||
JBoolObj SupportCustomOemInfo; //定制OEM客户版本信息 | |||
JBoolObj SupportDigitalEncode; //数字通道编码配置 | |||
JBoolObj SupportResumePtzState; //开机恢复云台状态 | |||
JBoolObj SupportSnapCfg; | |||
JBoolObj SupportAbnormitySendMail; //存储设备存在及存储异常及存储空间不足发邮件} | |||
JBoolObj SupportDigitalPre; //数字通道支持预录 | |||
JBoolObj SupportWriteLog; //报警页面添加是否写日志勾选框 | |||
JBoolObj SuppportChangeOnvifPort; //支持修改onvif端口 | |||
JBoolObj SupportCommDataUpload; //支持串口数据透传 | |||
JBoolObj SupportTextPassword; //保存可以反解的密码用于onvif鉴权 | |||
JBoolObj SupportCloudUpgrade; | |||
JBoolObj SupportUserProgram; //支持客户启动小程序 | |||
JBoolObj SupportModifyFrontcfg; // | |||
JBoolObj SupportFTPTest; //ftp测试 | |||
JBoolObj SupportPtzIdleState; //云台空闲动作配置 | |||
JBoolObj SupportImpRecord; //web端是否提供关键录像搜索选项 | |||
JBoolObj SupportCameraMotorCtrl; //IE端支持机器人马达控制 | |||
JBoolObj SupportEncodeAddBeep; //设置编码每隔30秒加入beep声 | |||
JBoolObj SupportFishEye; //鱼眼功能 | |||
JBoolObj SupportSPVMNNasServer; //安徽超清定制 | |||
JBoolObj SupportSmallChnTitleFont; //使用12*18的通道标题点阵 | |||
JBoolObj SupportCfgCloudupgrad; //支持云升级功能配置修改 | |||
JBoolObj SupportStorageFailReboot; | |||
JBoolObj SupportSplitControl; //修改DVR预览画面分割 | |||
JBoolObj SupportRTSPClient; //数字通道连接RTSP前端 | |||
JBoolObj SupportLowLuxMode; //摄像机是否支持微光模式 | |||
JBoolObj SupportSwitchResolution; //修改前端数字通道分辨率 | |||
JBoolObj SupportSlowMotion; //摄像机是否支持慢动作 | |||
JBoolObj SupportCorridorMode; //支持走廊模式 | |||
JBoolObj SupportWIFINVR; //是WIFINVR设备 | |||
JBoolObj SupportSnapSchedule; //是否支持定时抓图 | |||
JBoolObj SupportPWDSafety; //是否支持密码找回}, | |||
JBoolObj SupportPlateDetect; //支持车牌侦测 | |||
JBoolObj SupportBreviary; //是否支持缩略图 | |||
JBoolObj SupportIntelligentPlayBack; //是否支持智能快放 | |||
JBoolObj SupportFaceDetect; //是否支持人脸识别 | |||
JBoolObj SupportDeviceInfoNew; //是否支持新设备信息 | |||
JBoolObj SupportBallCameraTrackDetect; //支持球机跟踪识别 | |||
JBoolObj SpecialNight; //夜间特殊模式控制 | |||
JBoolObj SupportSetHardwareAbility; //支持设置设备硬件能力集 | |||
JBoolObj SupportSafetyEmail; //支持通过Email重置密码 | |||
JBoolObj SupportSensorAbilitySetting; ///支持合封模组支持的sensor等级 | |||
JBoolObj SupportAlarmVoiceTips; | |||
JBoolObj SupportAlarmLinkLight; | |||
JBoolObj SupportSetRtcTime; //支持Rtc时间校正功能 | |||
JBoolObj SupportAudioFormat; //支持音频编码 | |||
JBoolObj SupportSoftPhotosensitive; //软光敏 | |||
JBoolObj SupportCloudUpgradeIPC; | |||
JBoolObj SupportFileUpgradeIPC; //支持IE发送文件通过NVR给IPC升级 | |||
JBoolObj SupportParkingGuide; //支持车位引导功能 | |||
JBoolObj SupportLimitNetLoginUsers; //限制网络登陆的用户数 | |||
JBoolObj SupportCoaxialParamCtrl; //同轴参数控制 | |||
JBoolObj SupportShowH265X; //显示H265X编码 | |||
JBoolObj SupportLogStorageCtrl; //日志存储控制 | |||
JBoolObj SupportAdminContactInfo; //支持设置管理员联系方式 | |||
JBoolObj SupportWarnWeakPWD; //显示弱密码提醒 | |||
JBoolObj SupportStringChangedXPOE; //支持通道模式显示为XPOE | |||
JBoolObj SupportAlarmVoiceTipsType; //支持报警提示音类型修改 | |||
JBoolObj SupportAcrossIPCTalk; //支持前端IPC对讲 | |||
JBoolObj SupportSetVolume; //支持设置喇叭音量 | |||
JBoolObj SupportFaceDetectV2; | |||
JBoolObj SupportFaceksHumanDetect; //支持旷视人形检测 | |||
JBoolObj SupportFacekshttpcommunication; //支持旷视http传输 | |||
JBoolObj SupportFaceRecognition; //支持人脸识别 | |||
JBoolObj SupportCustomizeLpRect; //是否支持任意形状的车位 | |||
public: | |||
OtherFunction(JObject *pParent = NULL, const char *szName = JK_OtherFunction): | |||
JObject(pParent,szName), | |||
DownLoadPause(this, "DownLoadPause"), | |||
USBsupportRecord(this, "USBsupportRecord"), | |||
SDsupportRecord(this, "SDsupportRecord"), | |||
SupportOnvifClient(this, "SupportOnvifClient"), | |||
SupportNetLocalSearch(this, "SupportNetLocalSearch"), | |||
SupportMaxPlayback(this, "SupportMaxPlayback"), | |||
SupportNVR(this, "SupportNVR"), | |||
SupportC7Platform(this, "SupportC7Platform"), | |||
SupportMailTest(this, "SupportMailTest"), | |||
SupportOSDInfo(this, "SupportOSDInfo"), | |||
HideDigital(this, "HideDigital"), | |||
NotSupportAH(this, "NotSupportAH"), | |||
NotSupportAV(this, "NotSupportAV"), | |||
SupportBT(this, "SupportBT"), | |||
NotSupportTalk(this, "NotSupportTalk"), | |||
AlterDigitalName(this, "AlterDigitalName"), | |||
SupportShowConnectStatus(this, "SupportShowConnectStatus"), | |||
SupportPlayBackExactSeek(this, "SupportPlayBackExactSeek"), | |||
TitleAndStateUpload(this, "TitleAndStateUpload"), | |||
NOHDDRECORD(this, "NOHDDRECORD"), | |||
MusicFilePlay(this, "MusicFilePlay"), | |||
SupportSetDigIP(this, "SupportSetDigIP"), | |||
SupportShowProductType(this, "SupportShowProductType"), | |||
SupportCamareStyle(this, "SupportCamareStyle"), | |||
Supportonviftitle(this, "Supportonviftitle"), | |||
SupportDimenCode(this, "SupportDimenCode"), | |||
SupportStorageNAS(this, "SupportStorageNAS"), | |||
ShowFalseCheckTime(this, "ShowFalseCheckTime"), | |||
SupportTimeZone(this, "SupportTimeZone"), | |||
ShowAlarmLevelRegion(this, "ShowAlarmLevelRegion"), | |||
SupportPOS(this, "SupportPOS"), | |||
HddLowSpaceUseMB(this, "HddLowSpaceUseMB"), | |||
SupportCustomOemInfo(this, "SupportCustomOemInfo"), | |||
SupportDigitalEncode(this, "SupportDigitalEncode"), | |||
SupportResumePtzState(this, "SupportResumePtzState"), | |||
SupportSnapCfg(this, "SupportSnapCfg"), | |||
SupportAbnormitySendMail(this, "SupportAbnormitySendMail"), | |||
SupportDigitalPre(this, "SupportDigitalPre"), | |||
SupportWriteLog(this, "SupportWriteLog"), | |||
SuppportChangeOnvifPort(this, "SuppportChangeOnvifPort"), | |||
SupportCommDataUpload(this, "SupportCommDataUpload"), | |||
SupportTextPassword(this, "SupportTextPassword"), | |||
SupportCloudUpgrade(this, "SupportCloudUpgrade"), | |||
SupportUserProgram(this, "SupportUserProgram"), | |||
SupportModifyFrontcfg(this, "SupportModifyFrontcfg"), | |||
SupportFTPTest(this, "SupportFTPTest"), | |||
SupportPtzIdleState(this, "SupportPtzIdleState"), | |||
SupportImpRecord(this, "SupportImpRecord"), | |||
SupportCameraMotorCtrl(this, "SupportCameraMotorCtrl"), | |||
SupportEncodeAddBeep(this, "SupportEncodeAddBeep"), | |||
SupportFishEye(this, "SupportFishEye"), | |||
SupportSPVMNNasServer(this, "SupportSPVMNNasServer"), | |||
SupportSmallChnTitleFont(this, "SupportSmallChnTitleFont"), | |||
SupportCfgCloudupgrad(this, "SupportCfgCloudupgrad"), | |||
SupportStorageFailReboot(this, "SupportStorageFailReboot"), | |||
SupportSplitControl(this, "SupportSplitControl"), | |||
SupportRTSPClient(this, "SupportRTSPClient"), | |||
SupportLowLuxMode(this, "SupportLowLuxMode"), | |||
SupportSwitchResolution(this, "SupportSwitchResolution"), | |||
SupportSlowMotion(this, "SupportSlowMotion"), | |||
SupportCorridorMode(this, "SupportCorridorMode"), | |||
SupportWIFINVR(this, "SupportWIFINVR"), | |||
SupportSnapSchedule(this, "SupportSnapSchedule"), | |||
SupportPWDSafety(this, "SupportPWDSafety"), | |||
SupportPlateDetect(this, "SupportPlateDetect"), | |||
SupportBreviary(this, "SupportBreviary"), | |||
SupportIntelligentPlayBack(this, "SupportIntelligentPlayBack"), | |||
SupportFaceDetect(this, "SupportFaceDetect"), | |||
SupportDeviceInfoNew(this, "SupportDeviceInfoNew"), | |||
SupportBallCameraTrackDetect(this, "SupportBallCameraTrackDetect"), | |||
SpecialNight(this, "SpecialNight"), | |||
SupportSetHardwareAbility(this, "SupportSetHardwareAbility"), | |||
SupportSafetyEmail(this, "SupportSafetyEmail"), | |||
SupportSensorAbilitySetting(this, "SupportSensorAbilitySetting"), | |||
SupportAlarmVoiceTips(this, "SupportAlarmVoiceTips"), | |||
SupportAlarmLinkLight(this, "SupportAlarmLinkLight"), | |||
SupportSetRtcTime(this, "SupportSetRtcTime"), | |||
SupportAudioFormat(this, "SupportAudioFormat"), | |||
SupportSoftPhotosensitive(this, "SupportSoftPhotosensitive"), | |||
SupportCloudUpgradeIPC(this, "SupportCloudUpgradeIPC"), | |||
SupportFileUpgradeIPC(this, "SupportFileUpgradeIPC"), | |||
SupportParkingGuide(this, "SupportParkingGuide"), | |||
SupportLimitNetLoginUsers(this, "SupportLimitNetLoginUsers"), | |||
SupportCoaxialParamCtrl(this, "SupportCoaxialParamCtrl"), | |||
SupportShowH265X(this, "SupportShowH265X"), | |||
SupportLogStorageCtrl(this, "SupportLogStorageCtrl"), | |||
SupportAdminContactInfo(this, "SupportAdminContactInfo"), | |||
SupportWarnWeakPWD(this, "SupportWarnWeakPWD"), | |||
SupportStringChangedXPOE(this, "SupportStringChangedXPOE"), | |||
SupportAlarmVoiceTipsType(this, "SupportAlarmVoiceTipsType"), | |||
SupportAcrossIPCTalk(this, "SupportAcrossIPCTalk"), | |||
SupportSetVolume(this, "SupportSetVolume"), | |||
SupportFaceDetectV2(this, "SupportFaceDetectV2"), | |||
SupportFaceksHumanDetect(this, "SupportFaceksHumanDetect"), | |||
SupportFacekshttpcommunication(this, "SupportFacekshttpcommunication"), | |||
SupportFaceRecognition(this, "SupportFaceRecognition"), | |||
SupportCustomizeLpRect(this, "SupportCustomizeLpRect"){ | |||
}; | |||
~OtherFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,36 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "CFG_AUX.h" | |||
#include "JPOINT.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Parameter "Parameter" | |||
class Parameter : public JObject | |||
{ | |||
public: | |||
AUX mAUX; | |||
JIntObj Channel; | |||
JStrObj MenuOpts; | |||
JPOINT mPOINT; | |||
JStrObj Pattern; | |||
JIntObj Preset; | |||
JIntObj Step; | |||
JIntObj Tour; | |||
public: | |||
Parameter(JObject *pParent = NULL, const char *szName = JK_Parameter): | |||
JObject(pParent,szName), | |||
mAUX(this, "AUX"), | |||
Channel(this, "Channel"), | |||
MenuOpts(this, "MenuOpts"), | |||
mPOINT(this, "POINT"), | |||
Pattern(this, "Pattern"), | |||
Preset(this, "Preset"), | |||
Step(this, "Step"), | |||
Tour(this, "Tour"){ | |||
}; | |||
~Parameter(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,38 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Partition "Partition" | |||
class Partition : public JObject //硬盘相关 | |||
{ | |||
public: | |||
JIntObj DirverType; | |||
JBoolObj IsCurrent; | |||
JIntObj LogicSerialNo; | |||
JStrObj NewEndTime; | |||
JStrObj NewStartTime; | |||
JStrObj OldEndTime; | |||
JStrObj OldStartTime; | |||
JIntHex RemainSpace; | |||
JIntObj Status; | |||
JIntHex TotalSpace; | |||
public: | |||
Partition(JObject *pParent = NULL, const char *szName = JK_Partition): | |||
JObject(pParent,szName), | |||
DirverType(this, "DirverType"), | |||
IsCurrent(this, "IsCurrent"), | |||
LogicSerialNo(this, "LogicSerialNo"), | |||
NewEndTime(this, "NewEndTime"), | |||
NewStartTime(this, "NewStartTime"), | |||
OldEndTime(this, "OldEndTime"), | |||
OldStartTime(this, "OldStartTime"), | |||
RemainSpace(this, "RemainSpace"), | |||
Status(this, "Status"), | |||
TotalSpace(this, "TotalSpace"){ | |||
}; | |||
~Partition(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocketAutoLightItem "" | |||
class PowerSocketAutoLightItem : public JObject | |||
{ | |||
public: | |||
JIntObj DayStop; | |||
JBoolObj Enable; | |||
JIntObj TimeStop; | |||
JIntObj TimeStart; | |||
JIntObj DayStart; | |||
public: | |||
PowerSocketAutoLightItem(JObject *pParent = NULL, const char *szName = JK_PowerSocketAutoLightItem): | |||
JObject(pParent,szName), | |||
DayStop(this, "DayStop"), | |||
Enable(this, "Enable"), | |||
TimeStop(this, "TimeStop"), | |||
TimeStart(this, "TimeStart"), | |||
DayStart(this, "DayStart"){ | |||
}; | |||
~PowerSocketAutoLightItem(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocketAutoSwitchItem "" | |||
class PowerSocketAutoSwitchItem : public JObject | |||
{ | |||
public: | |||
JIntObj TimeStart; | |||
JIntObj TimeStop; | |||
JIntObj DayStart; | |||
JIntObj DayStop; | |||
JBoolObj Enable; | |||
public: | |||
PowerSocketAutoSwitchItem(JObject *pParent = NULL, const char *szName = JK_PowerSocketAutoSwitchItem): | |||
JObject(pParent,szName), | |||
TimeStart(this, "TimeStart"), | |||
TimeStop(this, "TimeStop"), | |||
DayStart(this, "DayStart"), | |||
DayStop(this, "DayStop"), | |||
Enable(this, "Enable"){ | |||
}; | |||
~PowerSocketAutoSwitchItem(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,28 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocketAutoUsbItem "PowerSocketAutoUsbItem" | |||
class PowerSocketAutoUsbItem : public JObject | |||
{ | |||
public: | |||
JIntObj DayStop; | |||
JBoolObj Enable; | |||
JIntObj TimeStop; | |||
JIntObj TimeStart; | |||
JIntObj DayStart; | |||
public: | |||
PowerSocketAutoUsbItem(JObject *pParent = NULL, const char *szName = JK_PowerSocketAutoUsbItem): | |||
JObject(pParent,szName), | |||
DayStop(this, "DayStop"), | |||
Enable(this, "Enable"), | |||
TimeStop(this, "TimeStop"), | |||
TimeStart(this, "TimeStart"), | |||
DayStart(this, "DayStart"){ | |||
}; | |||
~PowerSocketAutoUsbItem(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_Arm "PowerSocket.Arm" | |||
class PowerSocket_Arm : public JObject | |||
{ | |||
public: | |||
JIntObj Guard; | |||
public: | |||
PowerSocket_Arm(JObject *pParent = NULL, const char *szName = JK_PowerSocket_Arm): | |||
JObject(pParent,szName), | |||
Guard(this, "Guard"){ | |||
}; | |||
~PowerSocket_Arm(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_Authority "PowerSocket.Authority" | |||
class PowerSocket_Authority : public JObject | |||
{ | |||
public: | |||
JIntObj Level; | |||
JIntObj Ability; | |||
public: | |||
PowerSocket_Authority(JObject *pParent = NULL, const char *szName = JK_PowerSocket_Authority): | |||
JObject(pParent,szName), | |||
Level(this, "Level"), | |||
Ability(this, "Ability"){ | |||
}; | |||
~PowerSocket_Authority(void){}; | |||
}; | |||
NS_NETSDK_CFG_BEGIN |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "PowerSocketAutoLightItem.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_AutoLight "PowerSocket.AutoLight" | |||
class PowerSocket_AutoLight : public JObject | |||
{ | |||
public: | |||
JObjArray<PowerSocketAutoLightItem> AutoLight; | |||
public: | |||
PowerSocket_AutoLight(JObject *pParent = NULL, const char *szName = JK_PowerSocket_AutoLight): | |||
JObject(pParent,szName), | |||
AutoLight(this, ""){ | |||
}; | |||
~PowerSocket_AutoLight(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "PowerSocketAutoSwitchItem.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_AutoSwitch "PowerSocket.AutoSwitch" | |||
class PowerSocket_AutoSwitch : public JObject | |||
{ | |||
public: | |||
JObjArray<PowerSocketAutoSwitchItem> AutoSwitch; | |||
public: | |||
PowerSocket_AutoSwitch(JObject *pParent = NULL, const char *szName = JK_PowerSocket_AutoSwitch): | |||
JObject(pParent,szName), | |||
AutoSwitch(this, ""){ | |||
}; | |||
~PowerSocket_AutoSwitch(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "PowerSocketAutoUsbItem.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_AutoUsb "PowerSocket.AutoUsb" | |||
class PowerSocket_AutoUsb : public JObject | |||
{ | |||
public: | |||
JObjArray<PowerSocketAutoUsbItem> AutoUsb; | |||
public: | |||
PowerSocket_AutoUsb(JObject *pParent = NULL, const char *szName = JK_PowerSocket_AutoUsb): | |||
JObject(pParent,szName), | |||
AutoUsb(this, ""){ | |||
}; | |||
~PowerSocket_AutoUsb(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_BanLed "PowerSocket.BanLed" | |||
class PowerSocket_BanLed : public JObject | |||
{ | |||
public: | |||
JIntObj Banstatus; | |||
public: | |||
PowerSocket_BanLed(JObject *pParent = NULL, const char *szName = JK_PowerSocket_BanLed): | |||
JObject(pParent,szName), | |||
Banstatus(this, "Banstatus"){ | |||
}; | |||
~PowerSocket_BanLed(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,26 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_DelaySwitch "PowerSocket.DelaySwitch" | |||
class PowerSocket_DelaySwitch : public JObject | |||
{ | |||
public: | |||
JIntObj PeriodOn; | |||
JIntObj PeriodOff; | |||
JIntObj Mode; | |||
JIntObj Enable; | |||
public: | |||
PowerSocket_DelaySwitch(JObject *pParent = NULL, const char *szName = JK_PowerSocket_DelaySwitch): | |||
JObject(pParent,szName), | |||
PeriodOn(this, "PeriodOn"), | |||
PeriodOff(this, "PeriodOff"), | |||
Mode(this, "Mode"), | |||
Enable(this, "Enable"){ | |||
}; | |||
~PowerSocket_DelaySwitch(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_Image "PowerSocket.Image" | |||
class PowerSocket_Image : public JObject | |||
{ | |||
public: | |||
JIntObj flip; | |||
public: | |||
PowerSocket_Image(JObject *pParent = NULL, const char *szName = JK_PowerSocket_Image): | |||
JObject(pParent,szName), | |||
flip(this, "flip"){ | |||
}; | |||
~PowerSocket_Image(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,20 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_Sensitive "PowerSocket.Sensitive" | |||
class PowerSocket_Sensitive : public JObject | |||
{ | |||
public: | |||
JIntObj Sensitive; | |||
public: | |||
PowerSocket_Sensitive(JObject *pParent = NULL, const char *szName = JK_PowerSocket_Sensitive): | |||
JObject(pParent,szName), | |||
Sensitive(this, "Sensitive"){ | |||
}; | |||
~PowerSocket_Sensitive(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,34 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PowerSocket_WorkRecord "PowerSocket.WorkRecord" | |||
class PowerSocket_WorkRecord : public JObject | |||
{ | |||
public: | |||
JIntObj TotalEnergy; | |||
JIntObj TotalTime; | |||
JIntObj EnergyOfThisMon; | |||
JIntObj TimeOfThisMon; | |||
JIntObj EnergyRecently; | |||
JIntObj TimeRecently; | |||
JIntObj DeviceType; | |||
JIntObj DevicePower; | |||
public: | |||
PowerSocket_WorkRecord(JObject *pParent = NULL, const char *szName = JK_PowerSocket_WorkRecord): | |||
JObject(pParent,szName), | |||
TotalEnergy(this, "TotalEnergy"), | |||
TotalTime(this, "TotalTime"), | |||
EnergyOfThisMon(this, "EnergyOfThisMon"), | |||
TimeOfThisMon(this, "TimeOfThisMon"), | |||
EnergyRecently(this, "EnergyRecently"), | |||
TimeRecently(this, "TimeRecently"), | |||
DeviceType(this, "DeviceType"), | |||
DevicePower(this, "DevicePower"){ | |||
}; | |||
~PowerSocket_WorkRecord(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_PreviewFunction "PreviewFunction" | |||
class PreviewFunction : public JObject | |||
{ | |||
public: | |||
JBoolObj GUISet; | |||
JBoolObj Tour; | |||
public: | |||
PreviewFunction(JObject *pParent = NULL, const char *szName = JK_PreviewFunction): | |||
JObject(pParent,szName), | |||
GUISet(this, "GUISet"), | |||
Tour(this, "Tour"){ | |||
}; | |||
~PreviewFunction(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,37 @@ | |||
#pragma once | |||
#include "JsonCfgBase.h" | |||
NS_NETSDK_CFG_BEGIN | |||
/////////////////////////录像模式字符串及其注释////////////////////// | |||
#define RECORD_MODE_CLOSED "ClosedRecord" ///< 关闭录像 | |||
#define RECORD_MODE_MANUAL "ManualRecord" ///< 手动录像 | |||
#define RECORD_MODE_CONFIG "ConfigRecord" ///< 按配置录像 | |||
#define JK_Record "Record" | |||
class RecordCfg : public JObject | |||
{ | |||
public: | |||
JObjArray<JObjArray<JIntHex> > Mask; ///< 录像类型掩码 | |||
JIntObj PacketLength; ///< 录像打包长度(分钟)[1, 255] | |||
JIntObj PreRecord; ///< 预录时间,为零时表示关闭 | |||
JStrObj RecordMode; ///< 录像模式 | |||
JBoolObj Redundancy; ///< 冗余开关 | |||
JObjArray<JObjArray<JStrObj> > TimeSection; ///< 录像时间段 | |||
public: | |||
RecordCfg(JObject *pParent = NULL, const char *szName = JK_Record): | |||
JObject(pParent,szName), | |||
Mask(this, "Mask"), | |||
PacketLength(this, "PacketLength"), | |||
PreRecord(this, "PreRecord"), | |||
RecordMode(this, "RecordMode"), | |||
Redundancy(this, "Redundancy"), | |||
TimeSection(this, "TimeSection"){ | |||
}; | |||
~RecordCfg(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXGetLightLux "SensorHXGetLightLux" | |||
class SensorHXGetLightLux : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
public: | |||
SensorHXGetLightLux(JObject *pParent = NULL, const char *szName = JK_SensorHXGetLightLux): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"){ | |||
this->Parse("{\"Name\" : \"SensorHXGetLightLux\",\"SensorHXGetLightLux\" : {\"Channel\" :0}}"); | |||
}; | |||
~SensorHXGetLightLux(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXGetLightLuxEx "SensorHXGetLightLux" | |||
class SensorHXGetLightLuxEx : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JStrObj Info; | |||
public: | |||
SensorHXGetLightLuxEx(JObject *pParent = NULL, const char *szName = JK_SensorHXGetLightLuxEx): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
Info(this, "Info"){ | |||
}; | |||
~SensorHXGetLightLuxEx(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXGetTempWet "SensorHXGetTempWet" | |||
class SensorHXGetTempWet : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
public: | |||
SensorHXGetTempWet(JObject *pParent = NULL, const char *szName = JK_SensorHXGetTempWet): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"){ | |||
this->Parse("{\"Name\" : \"SensorHXGetTempWet\",\"SensorHXGetTempWet\" : {\"Channel\" :0}}"); | |||
}; | |||
~SensorHXGetTempWet(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,22 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXGetTempWetEx "SensorHXGetTempWet" | |||
class SensorHXGetTempWetEx : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JStrObj Info; | |||
public: | |||
SensorHXGetTempWetEx(JObject *pParent = NULL, const char *szName = JK_SensorHXGetTempWetEx): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
Info(this, "Info"){ | |||
}; | |||
~SensorHXGetTempWetEx(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,21 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXManualWakeUp "SensorHXManualWakeUp" | |||
class SensorHXManualWakeUp : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
public: | |||
SensorHXManualWakeUp(JObject *pParent = NULL, const char *szName = JK_SensorHXManualWakeUp): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"){ | |||
this->Parse("{\"Name\" : \"SensorHXManualWakeUp\",\"SensorHXManualWakeUp\" : {\"Channel\" :0}}"); | |||
}; | |||
~SensorHXManualWakeUp(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,23 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_SensorHXSetMicMode "SensorHXSetMicMode" | |||
class SensorHXSetMicMode : public JObject | |||
{ | |||
public: | |||
JIntObj Channel; | |||
JStrObj Mode; | |||
public: | |||
SensorHXSetMicMode(JObject *pParent = NULL, const char *szName = JK_SensorHXSetMicMode): | |||
JObject(pParent,szName), | |||
Channel(this, "Channel"), | |||
Mode(this, "Mode"){ | |||
this->Parse("{\"Name\" : \"SensorHXSetMicMode\",\"SensorHXSetMicMode\" : {\"Channel\" :0,\"Mode\" : \"VoiceWakeUp\"}}"); | |||
}; | |||
~SensorHXSetMicMode(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,24 @@ | |||
#pragma once | |||
#include "JObject_NetSDK.h" | |||
#include "ExtraFormat.h" | |||
#include "MainFormat.h" | |||
NS_NETSDK_CFG_BEGIN | |||
#define JK_Simplify_Encode "Simplify.Encode" | |||
class Simplify_Encode : public JObject | |||
{ | |||
public: | |||
ExtraFormat mExtraFormat; ///Ö÷ÂëÁ÷ | |||
MainFormat mMainFormat; ///¸¨ÂëÁ÷ | |||
public: | |||
Simplify_Encode(JObject *pParent = NULL, const char *szName = JK_Simplify_Encode): | |||
JObject(pParent,szName), | |||
mExtraFormat(this, "ExtraFormat"), | |||
mMainFormat(this, "MainFormat"){ | |||
}; | |||
~Simplify_Encode(void){}; | |||
}; | |||
NS_NETSDK_CFG_END |
@@ -0,0 +1,19 @@ | |||
#pragma once | |||
#include "JsonCfgBase.h" | |||
#define JK_Status_NatInfo "Status.NatInfo" | |||
class Status_NatInfo : public JObject //网络状态头文件 | |||
{ | |||
public: | |||
JStrObj NaInfoCode; | |||
JStrObj NatStatus; | |||
public: | |||
Status_NatInfo(JObject *pParent = NULL, const char *szName = JK_Status_NatInfo): | |||
JObject(pParent,szName), | |||
NaInfoCode(this, "NaInfoCode"), | |||
NatStatus(this, "NatStatus"){ | |||
}; | |||
~Status_NatInfo(void){}; | |||
}; |