Exemple #1
0
 /// <summary>
 /// 设定所有通道配置
 /// </summary>
 /// <param name="lLoginID">设备用户登录ID:CLIENT_Login的返回值</param>
 /// <param name="lChannel">通道号</param>
 /// <param name="netConfig">通道配置</param>
 /// <param name="waittime">等待时间</param>
 /// <returns>true:成功;false:失败</returns>
 public static bool DHSetDevConfig(int lLoginID, DHDEV_CHANNEL_CFG[] channelConfig)
 {
     return DHSetDevConfig(lLoginID, channelConfig, 3000);
 }
Exemple #2
0
        /// <summary>
        ///  设定所有通道配置
        /// </summary>
        /// <param name="lLoginID">设备用户登录ID:CLIENT_Login的返回值</param>
        /// <param name="lChannel">通道号</param>
        /// <param name="netConfig">通道配置</param>
        /// <param name="waittime">等待时间</param>
        /// <returns>true:成功;false:失败</returns>
        public static bool DHSetDevConfig(int lLoginID, DHDEV_CHANNEL_CFG[] channelConfig, int waittime)
        {
            object[] result = new object[channelConfig.Length];
            for (int i = 0; i < channelConfig.Length; i++)
            {
                result[i] = (object)channelConfig[i];
            }
            bool returnValue = false;
            returnValue = PSetDevConfig(lLoginID, CONFIG_COMMAND.DH_DEV_CHANNELCFG, result, typeof(DHDEV_CHANNEL_CFG), waittime);

            return returnValue;
        }
Exemple #3
0
 /// <summary>
 ///  获取指定通道配置[默认等待时间3000]
 /// </summary>
 /// <param name="lLoginID">设备用户登录ID:CLIENT_Login的返回值</param>
 /// <param name="lChannel">通道号[此值不能为-1]</param>
 /// <param name="netConfig">通道配置</param>
 /// <returns>true:成功;false:失败</returns>
 public static bool DHGetDevConfig(int lLoginID, int lChannel, ref DHDEV_CHANNEL_CFG channelConfig)
 {
     return DHGetDevConfig(lLoginID, lChannel, ref channelConfig);
 }
Exemple #4
0
 /// <summary>
 /// 设定指定通道配置
 /// </summary>
 /// <param name="lLoginID">设备用户登录ID:CLIENT_Login的返回值</param>
 /// <param name="lChannel">通道号[此值不能为-1]</param>
 /// <param name="netConfig">通道配置</param>
 /// <param name="waittime">等待时间</param>
 /// <returns>true:成功;false:失败</returns>
 public static bool DHSetDevConfig(int lLoginID, int lChannel, DHDEV_CHANNEL_CFG channelConfig, int waittime)
 {
     bool returnValue = false;
     returnValue = PSetDevConfig(lLoginID, lChannel, CONFIG_COMMAND.DH_DEV_CHANNELCFG,(object)channelConfig, typeof(DHDEV_CHANNEL_CFG), waittime);
     return returnValue;
 }
Exemple #5
0
 /// <summary>
 ///  获取指定通道配置
 /// </summary>
 /// <param name="lLoginID">设备用户登录ID:CLIENT_Login的返回值</param>
 /// <param name="lChannel">通道号[此值不能为-1]</param>
 /// <param name="netConfig">通道配置</param>
 /// <param name="waittime">等待时间</param>
 /// <returns>true:成功;false:失败</returns>
 public static bool DHGetDevConfig(int lLoginID, int lChannel, ref DHDEV_CHANNEL_CFG channelConfig, int waittime)
 {
     object result = new object();
     bool returnValue = false;
     returnValue = PGetDevConfig(lLoginID, lChannel, CONFIG_COMMAND.DH_DEV_CHANNELCFG, ref result, typeof(DHDEV_CHANNEL_CFG), waittime);
     channelConfig = (DHDEV_CHANNEL_CFG)result;
     return returnValue;
 }