Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="clientCommPoint"></param>
        /// <returns></returns>
        private static bool VbusAlarm(int clientCommPoint = 9400)
        {
            string s = VbusAPI.LANIP.ToString();

            VbusAPI.Alarm += Vbus_Alarm;
            int x = VbusAPI.InitSDK(13, port, clientCommPoint);

            if (x != 1)
            {
                return(false);
            }
            int y = VbusAPI.ConnectToVBUS(VbusAPI.GetByteFromString(ip, 18, Encoding.ASCII), clientCommPoint);

            if (y != 0)
            {
                return(false);
            }
            return(true);
        }
Example #2
0
 /// <summary>
 /// 断开vbus服务器
 /// </summary>
 /// <returns>成功返回0,不成功返回1</returns>
 public static bool DisconnectVBUS()
 {
     return(VbusAPI.DisconnectVBUS() == 0 ? true : false);
 }