Beispiel #1
0
        public void NW_Init()
        {
            try
            {
                allOrg      = SysConfig.orgConfig.Orgs;;
                ALLTestList = SysConfig.DBCJconfig.ListTest;
            }
            catch (Exception ex)
            {
                LogMg.AddError(ex);
                DEBUG.ThrowException(ex);
            }

            NetwaySDK.NW_Init();
            globalOperaCallback = DoOnGlobalOperation;
            realDataCallback    = DoOnRealData;
            alarmDataCallback   = DoOnAlarmData;
            NetwaySDK.NW_SetGlobalOperaCallBack(globalOperaCallback, IntPtr.Zero); //设置全局操作回调
            NetwaySDK.NW_SetRealCallBack(realDataCallback, IntPtr.Zero);           //设置实时数据回调
            NetwaySDK.NW_SetAlarmCallBack(alarmDataCallback, IntPtr.Zero);         //设置警报回调
            NetwaySDK.NW_StartListen("0.0.0.0", 9000);
        }
Beispiel #2
0
 private void NWUnInit()
 {
     NetwaySDK.NW_SetRealCallBack(null, IntPtr.Zero);          //设置实时数据回调
     NetwaySDK.NW_SetAlarmCallBack(null, IntPtr.Zero);         //设置警报回调
 }